programming Archives - Ravi Desai

When fashion dictates our work

TLDR Don’t start your webapp using a SPA javascript framework. Read this and this if you want to hear the same message in a different tone (I freely accept that I’m brusque about this). Read Thoughtbot’s experience on this if you are still unconvinced. Context I used to hang out on internet forums in the […]

Find latest entry in a many-to-many relationship

Credit The solution here has helped me with this problem many times. This is another answer with an explanation by the same author. Introduction While I have years of experience optimizing SQL queries, I still find it difficult to think in a declarative programming style. Most programmers are familiar with the imperative style, where we […]

AWK

What’s AWK? AWK is a line-oriented programming language that has a long history, born in the the 1970s. This program is one of the UNIX tools I’ve been using more and more in the last year. Why use AWK? I often find myself parsing a lot of data. When working with JSON, I like using […]

Learning C

A few months ago, this post came out by Daniel Colascione, a contributor to GNU Emacs, my editor of choice. I found it hilarious, and scary, and exciting. And it made me want to learn more about GTK+ and how to build GUIs. Since then I’ve come across the Suckless organization’s page and gotten even […]

Talend exercises in Golang: ‘Advanced’ XML

This is a port of the previous post to golang. Golang is the closest I’ve gotten to writing production-code in a statically typed C-like language. Its nice, though I still can’t get over reading The Go Programming Language and seeing them refer to C and Go as high-level languages. Having started out in Lisp, it […]

Talend exercises in Clojure: ‘Advanced’ XML

This time, we convert a CSV-file to an XML file, but place the order-attributes not as content tags in the XML, but as attributes of each ‘ORDER_LINE’ tag. For an unknown reason, this part is titled ‘Advanced XML output for complex XML structures’. It took 54 lines of code in Clojure. Feast your eyes on […]

Talend to Clojure

I’ve had the displeasure of being introduced to the Talend data tool a few months ago. I hate it. Its source-code should be printed out, then burned, and the ashes should be flushed into a cess-pit of nuclear waste. The Talend people peg it as an easy to use tool to get data massaged into […]

Moving on to RubyMine

A few months ago at my last job, I was introduced to a senior programmer who had just started using Ruby. Since this was his first gig in Ruby, and he used to work with .Net projects before this, he wasn’t comfortable with the Ruby command-line way of programming (Edit program in text editor, then […]

Machine learning with Apache Spark

Installing Apache Spark on Ubuntu Download from the project page. Unzip into a directory. For example, I put all my custom stuff in `~/bin`. Add the bin directory of the exploded tar-file to your PATH variable. Running `which spark-shell` should point to the correct path. Restart your shell if it doesn’t. Books Fast Data Processing […]

Getting back to machine learning

In the last few months I’ve gotten back to working on AI. I was talking to a co-worker of mine about the pleasance project, and doing that got me bit by the bug again. I’ve had my new multicore desktop computer for a while now, and I should use it for parallel processing problems. Pleasance-jruby […]