Ask HN: How did you get started with the programming languages you use?
Right now I use Ruby & Javascript the most because I have been working in startups where many companies use Rails. In undergrad I was exposed to Java and Haskell. I have taken an interest in Clojure because it seems like the most pragmatic Lisp at the moment and C because it is so ubiquitous.
How did you get started with the programming languages you use? I'm particularly interested in answers about languages that aren't insanely popular right now (e.g. Scala, Erlang, Lua, OCaml not Python, Javascript, Obj-C) since it's more interesting to hear why you value a language with low adoption than it is to hear "I use Ruby because the community is strong" or "I write Obj-C because I want to develop for iOS" (which are legitimate answers but don't tell us anything about the programming language itself). Was there a particular project that got you started? And/or did you discover something in particular about that language which made you curious?
51 comments
[ 2.5 ms ] story [ 111 ms ] threadI took the job. Embedded systems, primarily extremely resource-limited microcontrollers. It was beyond anything they could teach a student on the job, so they really did need someone who already knew the language. That was apparently a difficult skill to find among students in 2003.
10 years and 5 positions later, all of my work has been in C, and I regret nothing. It's a practical career choice: the jobs are plentiful and the competition is not. Also, it's the best language :P
Admittedly, this comes with a significant cost of development time.
C does not guarantee either in sufficiently complex programs. Here is a classic counterexample:
http://web.archive.org/web/20080624164217/http://weitz.de/cl...
I'm beginning to think my most marketable language is still going to end up being PHP, or VB/C#.
To be fair that statement isn't without merit.
I just went through a slew of interviews for new college grad positions this fall. I refused to apply for Java or .NET positions preferring Python / C / C++. This easily eliminated >90% of companies at the career fair.
Fortunately, I was still able to interview at the big 3 (Google, Amazon, MS) and a slew of Bay Area companies.
Amazon's onsite interview was a bit frustrating. All four interviewers ignored my resume and assumed Java expertise, asking the occasional question with Java terminology. When I answered the question reframed in Python / C++ terminology the conversation usually died off.
My first truly "big" project was writing the backend for the original thinkstock.com. I had never done anything on that scale before, but I jumped in with both feel and did a decent job (or so the guys who took over after me said).
At the same time, I've always been fond of Lisp (due to Emacs, Sawfish and partly GIMP-Fu I believe), and one day, reading HN, I came across Clojure. A functional Lisp on the JVM, with great interop, and strong support for concurrency. Hell yes! I toyed around with it too, but shelved it soon after, until I found a problem I could solve with it. And solve I did. The sheer beauty of the language still mesmerises me. It's insanely powerful, yet concise and easy to understand.
The thing that got me hooked into Clojure was that I could express myself a lot easier and a lot better with it, than in any other language I worked with before (and I worked with a lot of languages in the past). Everything else (core.logic, core.async, overtone, riemann, pedestal and ClojureScript) is just an added bonus.
I've a number of friends for whom haskell didn't "click" until they read Simon's book.
even ignoring the haskell bits, its also a great walk through of different paradigms of concurrent and parallel programming with working code.
Now do full-stack Rails development for a startup.
I don't really care about the language I use as long as it's the right tool for the job. I think C is the most frustrating because of its verbosity and how explicit I need to be, but I understand that there are circumstances where the low overhead is useful.
In middle school I was given my first computer. I wanted to learn how to program it, someone pointed me toward C++.
Fast forward to grad school, where I was working on a big project using C++. We nearly missed our deadline because we were all so busy trying to get C++ code to work. We worked hard to squeeze out performance, yet we were still barely able to get the results we published, and we missed some of our goals. The next iteration of the project called for high-level changes that promised much better performance, but which required a far more complicated program. C++ would have been a nightmare, so I took a risk and switched languages (a big risk in retrospect, since it meant rewriting much of the C++ code). Here is what I was looking for:
* A short learning process, at least to learn enough to start writing real code
* Reasonable performance
* Well-developed tools and documentation
I stumbled across Common Lisp, and it basically met these criteria. SBCL and CMUCL are very mature compilers, Emacs+SLIME is fantastic as an IDE, and CL's documentation is easy to find. The syntax of Lisp is dead simple which makes the learning curve very easy; you can bootstrap enough knowledge of the language to write real applications in a week or so (and more advanced features can be found as you dive deeper). Early on I noticed that I was spending almost all of my mental effort on the logic of my program, not on low-level mechanics -- even while I was debugging, and even when confronted with hard-to-identify problems, I was spending all my time thinking about logic (as opposed to C++, where I spent about 50% of my time debugging low-level issues that had nothing to do with logic errors). One very nice property of Lisp is that the default behavior is to be safe, and you can override this as an optimization (and you must be rather explicit about it).
Since then the project has gone through yet another iteration and another rewrite, which met even greater success as I was far more comfortable and capable with the language. We have sent this code to others, and the majority of bug reports we have received have been about missing features rather than program crashes.
Now, Lisp is by no means perfect. At the high-level, there are few standard data structures; these are not hard to write, but why reinvent the wheel or be forced to pull in third party code? There is also no standard support for things like sockets, and only minimal support for binary data formats (which sometimes one must deal with). For low-level code, things are not easy; neither SBCL nor CMUCL make debugging across the FFI boundary easy, and there is a serious performance hit that the FFI imposes. It would also be nice to have an optional static type system, though type hints are often good enough (SBCL and CMUCL can do a fair bit of static type checking), and for the metaobject protocol to be standardized.
I know that isn't the traditional language learning vector, but I'm not a traditional programmer. I work on problems very specific to Supply Chain Management, and programming turns out to be an incredible tool in the toolchest.
I did the exercises at 4clojure.com, I read Joy of Clojure, and I read all of Allen's commits. Obviously, I also wrote a lot of Clojure, of decreasingly poor quality as I went on.
C/C++: I was a Linux groupie by the second year of my undergrad, so I wanted to know a language that gave me more access to the bare metal. Manual memory management scared the bejesus out of me at the time, but like all things, with enough practice, it became straightforward to reason about. Wrote the majority of my programming assignments for school in C++. Ended up using primarily C++ for the next few years too as I delved into graphics work (was at Autodesk for four years) and embedded work (worked at a startup that makes a secure browsing USB stick).
C#: Was on the C# compiler team at MS for a summer, so had to learn the language. :-) The compiler itself was written in C++ though, unlike Mono (which itself is written in C#). Ended up using it for server dev work again years later.
Scala: Coming into Scala for my current job. Like Twitter, they're taking a giant, monolithic Rails app and splitting it up into highly available services written in Scala. To learn, I took the first Scala Coursera course and am taking the second one now. Programming in Scala has also been useful. It's refreshing to have a language with FP built in. The STL has some functional concepts (e.g., most of the stuff in <algorithm>), but you still have to have so much syntax to express things like a closure. Boost makes some things a bit easier (boost::bind and boost::function are incredibly useful), but it always feels you're fighting against the language. C++11 looks promising, but I never got to use it for anything commercial because it was always "too new".
In 2004, I was living in an apartment in China, with a lot of time on my hands. Heard about Python and Ruby - gave Python a try, but got stuck on something trivial and had nobody to help me. With Ruby, I didn't get stuck. Used it on and off for years for small private projects, and two NGO internships where I used Ruby and RoR (but wasn't hired for it).
Still use Ruby for a lot of side projects, text wrangling, scraping etc. Began learning R for data wrangling/statistics/visualization. Amazing ecosystem, annoying language. Heard about Clojure and began playing with it after reading lots of interesting blog posts etc. My first intro to Lisp and functional programming. Liked a lot of it, but not crazy about JVM and stack-traces.
Through reading about Clojure, got interested in Haskell, and read a bunch about it - very interesting exposure to a ton of new concepts (which Clojure had warmed me up for). Also began looking at Julia for statistics, and lately had a look at both Nimrod and Elixir (which again introduced me to lot's of new ideas from Erland).
I've learnt a huge amount in the last year, and had my eyes opened to new paradigms. Still haven't really settled on anything new, and in the meantime I keep going back to Ruby and R to get stuff done.
Going back many years, choosing Python instead of Ruby might have been a better choice - it's clearly far ahead of Ruby in terms of academia - data science, machine learning, IPython Notebook, etc. However, knowing Ruby Python is almost too similar - like learning French while speaking Spanish... I can already read it, and don't feel motivated to spend the time to learn it, more attracted by new languages with other paradigms etc. (Why I'm spending time learning Russian as well :)).
1.) We didn't have any existing infrastructure, so there were no requirements around language, environment, or tooling.
2.) I was the only person who would be developing the system.
3.) I was predominantly the only person who would be interacting with the system once it was deployed.
4.) Existing solutions to the problem I'm trying to solve are generally very expensive (either directly through the cost of the software, or indirectly through having to have professional services consultants do the integration), so it was pretty easy for this project to prove it's worth.
5.) I'm not actually paid to be a developer, so if the whole thing turned out to be a dismal failure, my boss doesn't care.
So I used this project as an opportunity to try out Haskell and Racket, two languages I didn't have any prior experience with (I had learned Scheme in school through SICP but hadn't touched it in 15 years).
I settled on Haskell for the parts of the system that were going to be deployed out in our environment. So far, that's been a server that collects events, parses them, and then forwards them along. I liked that Haskell compiled to native code (I didn't want the additional complexity of dealing with deploying an interpreter or virtual machine). I looked at using C and Go as well, as they both met all my criteria. Go doesn't really do anything for me, which admittedly isn't a great reason for not using it, but as I didn't have to sell anyone else on my decisions, that was enough. C is actually a more conventional fit for the type of server I built, and the only reason I didn't go with C is that I honestly don't trust myself to write performant, safe, C that I'd be comfortable deploying all around my enterprise.
That's not an indictment of C, it's an indictment of my abilities as a programmer. Thankfully, I'm not really a programmer, so I can still sleep at night.
In writing the server piece in Haskell, I discovered that most of my worries about it being an esoteric academic language were unfounded. I think most of that reputation comes from the fact that a large portion of the community using it is academic, so they use it for academic things, and tend to talk about it using "computer science-y" terminology. The Haskell planet blog aggregator, for instance, I've almost never found to be comprehensible. That's not their fault though, it just doesn't seem like muggles are writing blog posts about using Haskell to solve real problems. Hopefully that'll change over time as the language becomes more wide-spread.
I was very impressed with using Haskell to parse events though; I think I'm ruined on ever going back to a language that only lets you use RegEx's.
I was worried about how usable Haskell would be for really cookie-cutter systems type programming, as there isn't a lot of material online to help you do that type of stuff. Real World Haskell turned out to be a super good book though, as it was much more closely aligned with what I was doing. I was also worried about the small number of libraries compared to 1st-tier languages, but for what it's worth, that hasn't really been an issue.
If I were a good Haskell programmer, I'd have no qualms about using it for everything, but I'm not (at least not yet), so I'm doing all the application logic and web UI stuff in Racket. Obviously, people use Haskell for web programming, and it seems like Yesod is getting much better, but it was much easier for me to get a simple web application thrown together with Racket, so that's at least what I'll be doing for the time being.
My experience with Racket has been similar: not many resources on people actually using it to solve real problems, not many libraries; but for doing a really simple CRUD web app that talks to P...
I used Scala some on my own for the sake of learning, but became much more interested in it when I realized it was a viable alternative[1] to using Java for everything on Android. Especially when I just want to do what amounts to scripting at times. Plus, it's much easier/natural to run system commands for root related stuff on Android with Scala[2] than it is with Java[3]. Scala also has a superior SQL framework[4] to the cumbersome one that is built into Android for SQLite that requires a ton of boilerplate to actually make useful (especially if you wish to do asynchronous sql calls).
Using Async/Await[5] and Akka[6] are also great for mobile development when you want an alternative to the approaches built into android like AsyncTask and Handlers.
[1] https://github.com/yareally/android-scala-intellij-no-sbt-pl...
[2] http://alvinalexander.com/scala/scala-execute-exec-external-...
[3] http://www.rgagnon.com/javadetails/java-0014.html
[4] http://slick.typesafe.com/
[5] http://docs.scala-lang.org/sips/pending/async.html
[6] I know there's a Java version of Akka, but it's not quite the same as using the Scala one.
I kinda went from there. I'm a shitty programmer so it was awful at first but I learned a lot about both Python and programming from Steve and Chris.
Now I'm a less shitty programmer. :)
Java: had to learn it for school.
Python: got tired of Java's verbosity, friend recommended it.
Ocaml: job at a quant hedge fund.
Lisp/Clojure: SICP.
C++: Worked at Google for 6 months-- not long enough to join the set of 23 people in the world who actually understand it.
Scala: wanted to use a better language in a Java shop that insisted on static typing.
Haskell: studied it a bit on my own. Haven't used it for anything big, though.
C: Coursera's GPU programming course. Zed Shaw's "Learn C the Hard Way". Wouldn't say I really "know" C but I understand the principles.
Assembly: Programming from the Ground Up. Again, wouldn't say I really "know" it but I grok the principles.
That's when I discovered Python (NumPy, SciPy, Matplotlib, IPython). As for the actual learning process, these three things helped me the most:
1. http://www.pythonchallenge.com/
2. http://projecteuler.net/
3. the emergence of Stack Overflow. I asked and answered a bunch of questions there.
I wrote more about my reasoning here in an old post (2010): http://stevetjoa.com/305/
C++,Java,C#,VB - School. I have yet to be able to do anything useful or fun in any of these.
C in college and previous job doing kernel level programming.
Python in college to develop physics simulations. Fell in love with it and is one of my favorite languages today.
C++ due to my current job. I used it as C with generics for the past year, but am slowly learning the deeper features of the language. The more I learn, the more I hate it though :).
Go because I wanted to. Developed a simple proxy server to get an idea about the various language features. Actually, writing a proxy is a sweet way to quickly get a sense of many diverse features of a language. I love the documentation and focus on 'software engineering'.
Clojure because I wanted to. I am trying it out in the context of web.
Java in school but I haven't used it in about 2 years.