Objective-C vs Javascript vs Python

A little over a year ago I decided to learn how to code. I knew little to nothing about it other than the things I would be able to create and communicate once I knew. I remember diving into Ruby and asking myself “what’s the point of an array or a hash? how does this relate to building a site?”. A couple weeks later I built tic-tac-toe in the console. But I started to hit the point where the learning curve was too steep and to expedite the process I attended Hack Reactor, a programming school in the bay area that focuses on getting talented young developers to a professional level.

Fast forward to now, I’ve been a software engineer at Hipmunk for close to a year. I started working mostly in Coffeescript (compiles to Javascript) and have gradually moved to writing entirely Python. I also just finished Codepath which is another coding school and learned how to write Objective-C. I’m writing this blog post to bring together my opinions on the languages:

Debugging

My friend’s dad who is also a software engineer was giving advice to my friend for which IDE/Editor to use and his advice was to pick the one that makes debugging the easiest. I didn’t fully understand why that was the most important thing until I started to code in Xcode/Objective-C… cause it’s a pain in the ass. At least to start. Xcode will print out huge 50 line errors and you will have no clue what went wrong. On top of that, the interface is extremely opinionated and you basically are forced into doing everything the Apple way. I battled with it for a solid month before I started to appreciate the design patterns and language syntax. I would never recommend it as a first language for someone. Ruby/Python are very similar and equally easy to debug. That said, I think JS is the easiest only because of the Chrome debugger (built into Google Chrome). JS as a language is fairly ugly and clumsy, but for a newbie developer, the Chrome debugger makes it very easy to step through and interact with your code.

Purpose

A friend asked me yesterday which my favorite language is and my answer was that it depended on what I was building. I guess I don’t have a favorite and I like them each for different reasons. Python is great for anything dealing with data related with libraries like NumPy/SciPy/Pandas making it very easy to munge, analyze and model data. Hipmunk’s backend is built in Python and with many other startups such as Dropbox, Eventbrite, Mixpanel, Quora, Pinterest and Yelp to name a few. JS is the only language that lives in the browser. Meaning that most special animations, logic and features that make a site ‘feel’ nice are done in JS. While it’s not the prettiest langauge, it’s extremely powerful and has now moved to backend as well with Node.js. Which is nice because it means you can share code between the front and back. Objective-C is currently only used for creating OSX and iOS apps.

Strict typing

Xcode (IDE) vs editor Exceptions Debugging Intuitive Python shortcuts