Skip to content

Comment on Ask HN: Do you program in multiple languages in a day?

Comments

Since a year ago upto a few months before, my day was split in half while working on two projects. The first half had me working in C, bash and HTML/CSS, Javascript for an embedded project and the latter half was Java (Android), HTML/CSS and Javascript for a mobile/web project.

Nowadays, (moved on to another company) the first half is in Scala (Play), HTML/CSS and Javascript for a web project and the second half in Java (Android) for a mobile project.

It has been not been that difficult to manage switching between languages unless the programming paradigm changes (Java <-> Scala), but even that you get used to. The major goal is, in my opinion, to become so proficient with the language(s) that you're working with, that it becomes second nature to transform your thoughts to source code. Very much similar to learning a second natural language. It's not really necessary to learn the ins and outs of each language that you work with, but at least the stuff that would be required.

Some problems that I had,

* Realizing it takes time to get used to the context switch.

* Using different editors. I was doing C and bash coding in vi, but working and modifying Linux source in KDevelop, mostly due to changes in coding style like tabs vs spaces. Java(Android) coding was in Eclipse and HTML/CSS/Javascript was in Sublime Text.

* If you go off one lanugage for a couple of days, it takes some time to get back into it. Doing at least a few things daily keeps one in the flow.

* Static compilation helps a lot when we make mistakes after a context switch. Javascript and Bash proved to be a major pain for this (I did try out JsHint for Sublime, but it slowed the system down, so I went back to looking at errors in browser console).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.