News for hackers. Stuff that matters.

Ask HN: How many programming languages/development frameworks are you currently using?

On my day job, I code in VB.Net. On my side projects, I use Python, Django, and C#.

I'm planning on developing apps on the IPhone and Android soon.

I get confused sometimes when programming (e.g. putting semicolons at the end of the statement (C#) when writing python code).

What's your experience with actively using different languages on a daily basis?

( 29 comments | 15 points | on HN )
Re:Ask HN: How many programming languages/development framew... by abstractbill on Thursday May 07, 2009 @06:19PM (#598791)
At justin.tv I program pretty much every day in Python, Javascript, and haXe. Occasionally I do Ruby too. It does get confusing sometimes - it still takes me a couple of seconds to mentally switch gears between the different languages.
Re:Ask HN: How many programming languages/development framew... by mahmud on Thursday May 07, 2009 @06:58PM (#598830)
I am a mono-linguist: Common Lisp for everything, from the hand-optimized webserver (hunchentoot), to the parser scripts that feed the database, to the data-entry software that lets my affiliates/contractors feed the database, and the daemon that runs routinely analyzing the database tables and building in-memory caches of frequently used objects and doing scheduling for the queue, and the other daemon that does backup and reporting. Even the twilio voice menu for the phone is generated by a CL-WHO app :-P

Sometimes I go for so long not touching anything but Lisp, I end up writing weird stuff like "defstruct foo { int bar, char name};" whenever I need to wrap a C library to call out to :-P

[If any Lispers are reading this: I have this weird problem where I have a slime session running on screen for weeks, during which I write something in a temporary file, or inside another file, evaluate and edit it until it works .. but I forget it there! over time, the running application has little resemblance to the textual representations I have spread over several files, and it gets worse when I delete entire useless regions and refactor them. At least other languages have the decency to bondage-and-discipline me into naming my files and organizing the project hierarchy :-]

Re:Ask HN: How many programming languages/development framew... by kriyative on Thursday May 07, 2009 @08:33PM (#598936)
This may seem really "out there", but I keep all the code of a package in one file. Not only does this reduce or eliminate asdf/defsystem maintenance, which I loathe doing, it also helps avoid the kind of habit you described. After all, the edits are all in one place.

To borrow a quote from the movie Highlander - "There can be only one (file)!"

Re:Ask HN: How many programming languages/development framew... by mahmud on Thursday May 07, 2009 @09:04PM (#598981)
the first thing I do with any new project is create a directory for it, the package.lisp file and the .asd. That much I do (though I should automate it, like weblocks does with defproject, hmmm)

but after that it's one file, until it gets too bloated and redundant, then i break it to two small redundant pieces.

Thought sometimes its too tempting to do everything in the repl: cramming a fat piece of code into one form and save the result as (setf foo *) if I like what I see :-D usually for experimentation with a new library I'm using for the first time.

Re:Ask HN: How many programming languages/development framew... by Zak on Thursday May 07, 2009 @07:08PM (#598838)
One thing that could help is to put everything like that in one place - say, a file called scratch.lisp in the root of the source tree. While it's not an ideal place to store any code long-term, it lets you know what still needs to be filed.
Re:Ask HN: How many programming languages/development framew... by mahmud on Thursday May 07, 2009 @07:14PM (#598846)
I have a misc.lisp file that I religiously copy stuff to. But usually, things go to misc first but later migrate to component level "package-misc" type locations, usually at the top of the component's file (I add stuff to the bottom and prefer to have a screenful of my working code, with less relevant code a PgUp or two away -- so stuff at the top is defpackage, in-package, defvars, conditional compilation stuff then the misc tools.)
Re:Ask HN: How many programming languages/development framew... by ii on Thursday May 07, 2009 @05:50PM (#598747)
I had this problem (putting or forgetting semicolons) for a while, but it looks to be gone with experience. I constantly switch from Python to Javascript to C to Ruby.
Re:Ask HN: How many programming languages/development framew... by inerte on Thursday May 07, 2009 @06:19PM (#598792)
Side: Python, Django, web.py, sqlalchemy, D, Javascript/jQuery, Erlang, Postgresql, Mysql, Sqlite, CouchDB, Mercurial, Git

Work: Perl, Bash, Python, PHP, Javascript/jQuery/in house stuff, ASP, Java/Jboss/Fast/JSP, ColdFusion, Soap, XML/XSL, Sql Server, Oracle, Mysql, Subversion

Huge lists on both sides, but there's a main difference: If something is broken over work, I have to fix. I don't exactly know Java or ColdFusion that much, but if the Java guy is away and something needs to be done, I know enough to poke around and consult Google.

On the Side: I don't exactly know all of D, Erlang and CouchDB, but I have fun coding small things on each language from time to time, doing stuff on Project Euler. I wouldn't accept a paying job which required Erlang, for example, but I made simple a distributed crawler just to see what the platform is capable of. I think I know enough of each to at least understand its strengths and weakness on a higher-level, to know when it could be used as a solution. When I want to do something more serious, I choose Python.

Anyway, to trim the lists a little, I would say Python on Side, and PHP on Work. These languages get 75% of my time.

Re:Ask HN: How many programming languages/development framew... by chops on Thursday May 07, 2009 @06:04PM (#598771)
Right now I regularly use PHP, perl, and lua.

I've been learning Common Lisp and Python for a while, though because my company uses those languages above, and because I haven't started any new projects yet for new languages, and because PHP has been my primary language for 5 years now, I think in PHP.

I have to broaden my horizons.

I've got some fun ideas for projects to tinker with that would use some other languages (recently bought books on Erlang, Haskell, Clojure, and Ruby). And though they likely wouldn't generate much if any revenue, it's worth doing something practical just to learn some new languages.

Back when I used to do PHP on my own, and VP ASP for my employer, I was regularly messing up if and loop syntaxes, and <? and <%, and either forgetting or adding semicolons.

Re:Ask HN: How many programming languages/development framew... by joeyo on Thursday May 07, 2009 @08:23PM (#598923)
When I write them down I'm surprised at how few I actually use on a daily basis. It boils down to (in order of decreasing frequency):

  1. Matlab
  2. C++
  3. C
Re:Ask HN: How many programming languages/development framew... by dxjones on Thursday May 07, 2009 @08:34PM (#598938)
Matlab? What is a HackerNews reader doing with Matlab?

(I ask because I also use Matlab all the time, but I am curious what others are using it for.)

Re:Ask HN: How many programming languages/development framew... by joeyo on Friday May 08, 2009 @04:14PM (#600186)
I use it to analyze neural signal data. Every now and again I fantasize about giving python and matplotlib a try, but there is too much inertia to overcome.
Re:Ask HN: How many programming languages/development framew... by dxjones on Sunday May 10, 2009 @09:59AM (#602108)
Is there a YC/HN startup analyzing neural data?

Or rather, when will there be a YC/HN startup analyzing neural data?

Re:Ask HN: How many programming languages/development framew... by apgwoz on Thursday May 07, 2009 @07:35PM (#598872)
Perl, Python, PHP, JavaScript

Movable Type, with Perl. Some Django, and non-Django stuff with Python. Hacking on Active Collab, written in PHP. Rely heavily on jQuery for JavaScript these days. Chicken Scheme for some random exploration now and again.

I've become pretty good at context switching between them all. I make mistakes sure, but I don't spend more than 5 seconds writing JavaScript in a .py file.

Re:Ask HN: How many programming languages/development framew... by rufius on Thursday May 07, 2009 @06:19PM (#598793)
Too many :-|. Ruby, Java, C, Python, Scala, Javascript and when I can't avoid it, C++. If I get the chance then some Haskell, Clojure, or Common Lisp.
Re:Ask HN: How many programming languages/development framew... by TallGuyShort on Thursday May 07, 2009 @05:36PM (#598720)
I have to switch languages a lot too, but I've found that I don't have a problem as long as I use each language regularly. It's when I haven't used a certain language for a few weeks / months that I confuse it with other languages.

edit: For the record, I frequently switch between Flex, Java, PHP/SQL, C, Lisp / Clojure, and a couple of other scripting/markup languages.

Re:Ask HN: How many programming languages/development framew... by Zak on Thursday May 07, 2009 @07:03PM (#598834)
Personal stuff tends to be in Clojure or Haskell lately. One project is currently using a little bit of Python to tie some things together, but that will probably go away. There's also some occasional Lua.

Various paid projects over the past year have used Ruby, Common Lisp, Javascript and PHP.

Emacs Lisp sees use for both on occasion, for a total of 9.

Re:Ask HN: How many programming languages/development framew... by keefe on Thursday May 07, 2009 @07:16PM (#598849)
In my project I use Java for the server with a jQuery front end and at work it's Java on the server again with an AS3 front end, so 3 serious languages unless you count RDF, OWL, Jena Rules, SWRL rules in which case it's more like 7, if you want to push the envelope and add XML 8, so taking those not-really-languages appropriately, I'd say about 5.5 (:
Re:Ask HN: How many programming languages/development framew... by squidbot on Thursday May 07, 2009 @06:36PM (#598810)
A ridiculous amount. 12 in fact. I wrote a wiki entry over at stack overflow about this (http://stackoverflow.com/questions/510261/how-do-you-keep-al...)

I agree, it sometimes seems too much and I wish for some standardization.

Re:Ask HN: How many programming languages/development framew... by yan on Thursday May 07, 2009 @05:53PM (#598753)
The more you code in each language, the less severe a problem is. I find that as soon as you lay down a few lines of code in a certain language, your mind switches context to that language and the habits you picked up in that language come back fairly soon. Once you get in the swing of things, it should be straightforward.
Re:Ask HN: How many programming languages/development framew... by icey on Thursday May 07, 2009 @06:14PM (#598788)
During the day I use C#, VB.Net, Javascript and Python (also T-SQL, not sure if that really counts for your question though).

At night, I was working on some Smalltalk and Clojure; but a friend of mine has recently convinced me to give Groovy / Grails a go.

Re:Ask HN: How many programming languages/development framew... by TJensen on Friday May 08, 2009 @12:10AM (#599167)
Java and ActionScript 3 (Flex) at work. Right now, Objective C, Python and JavaScript (jQuery) at home.

Yes, I do occasionally run into idiomatic problems as I switch languages, but it is better than coming home and doing Java. :)

Re:Ask HN: How many programming languages/development framew... by damovisa on Thursday May 07, 2009 @11:44PM (#599133)
C#, VB6 (maintenance), and PHP. My big stumbling block is foreach loops:

foreach (int i in myInts) { ... }

For Each i As Integer In myInts ... Next

foreach ($myInts as $i) { ... }

Re:Ask HN: How many programming languages/development framew... by kriyative on Thursday May 07, 2009 @08:23PM (#598922)
Common Lisp, Erlang, Javascript, and ... Objective C.

I am slowly adding Clojure to this mix.

The most dissonant cognitive shift is going from Lisp to Objective C.

Re:Ask HN: How many programming languages/development framew... by spooneybarger on Thursday May 07, 2009 @05:49PM (#598741)
For work, ignoring side fun things:

Perl, Smalltalk, Ruby, SQL, bash, make, xhtml, css, Seaside

Dips into python and C from time to time

Re:Ask HN: How many programming languages/development framew... by jefurii on Friday May 08, 2009 @01:16PM (#599926)
Work: Python, PHP, Javascript, CSS, HTML, SQL; Django, Drupal, jQuery, CleverCSS

Play: LISP, SuperCollider, Max/MSP, Processing

Re:Ask HN: How many programming languages/development framew... by marram on Friday May 08, 2009 @01:15AM (#599233)
At Sponty: Python + Google App Engine + prototype.js at consulting gig: Flex, Java, PHP and some Django.
Re:Ask HN: How many programming languages/development framew... by thorax on Thursday May 07, 2009 @08:03PM (#598898)
Today and yesterday: PHP/CI, Flex, Javascript, Python/Django, C++, C#/XAML, bash scripting.

Fun!

Re:Ask HN: How many programming languages/development framew... by wlievens on Friday May 08, 2009 @04:51AM (#599381)
C++ at the day job, Java for hobby projects, and sometimes PHP for freelance projects.