33 points · by ritchiea · 12y ago · 51 comments
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?
I 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
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.
I'm beginning to think my most marketable language is still going to end up being PHP, or VB/C#.
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 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.
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.
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".
Erlang for me was a developing interest in distributed systems, which I think is of growing importance. The Riak source code, and associated projects, have been great for advancing towards such goals. Erlang the language is pretty easy to pick up and I've spent more time on distributed computing concepts than needing to parse out language details.
Haskell is my favorite language. I like it because it fits my mental models very well and I thoroughly enjoy functional programming. Snap is my web framework of choice and working with a Haskell/Snap/Riak stack has been awesome for a project I'm currently working on.
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 :)).
Recently, I've started using Clojure and think it'll rapidly become my go-to language (actually wrote about why just yesterday[1]).
TL;DR is that I went looking for a faster alternative to Ruby, tried Go, ended up happy with Clojure for being dynamic, fast and functional.
In the past I suppose the least common language I ended up with was TCL, about 9-10 years ago. The reason was that I wanted to develop a GUI application, but my attempts to learn GTK or Qt or Swing natively proved too complicated for me at the time. There was in fact a great TCL wrapper for GTK that turned out to be really easy to use.
I ended up using TCL for several years and still have a fond memory of it. The coolest feature I remembered was being able to package up TCL into native, distributable packages - Starpacks[2] - complete with libraries, interpreter and app code in a single binary. Around 2000, this was amazing to me, and I was stunned more people weren't using it. I suspect one of the main things holding TCL back was in fact their lagging GUI support at the time. Mention TCL and people would wince at their memories of using Tk GUI apps.
First was the use of atoms. I am not too proud to say it, but when I as a beginner I used lots of "magic strings" in my code. I found them a lot more easier to understand.Stuff like
if(a="run") //some piece of code here
was common in my code. Of course the best practice was to use a bool run, but I had to train myself to stop using magic strings when I found out that it was bad practice.
In erlang however it is very common to use literal values which are known as atoms. So for instance an atom "blue" is blue. It does not have anything associated with it(well internally it is represented as an integer). You can't perform any operations on it, you can't change it etc. And it immediately clicked with me
The second thing was pattern matching
You have got to use pattern matching to see how awesome it is. It allows you to make your programes much more readable by dividing your function into a group of clauses. A clause will be executed only if a corresponding pattern matches to it. If you use it well you can grasp the flow of your program in a single reading.
There was other really cool stuff about erlang like otp, concurrency etc but when I started with it the only things that I cared for were atoms and pattern matching.They got me started with erlang. Now that I have used erlang a bit more I find things like gen_events and gen_fsm behaviors invaluable for the stuff that I am trying to do.
That is all.
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 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.
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/
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/
The first step to developing native apps for the PSP (in C++) was a 1GB+ download of Cygwin, an SDK, and a toolchain. It was early 2007, and my even-then-outdated internet connection wouldn't have it.
Enter LuaPlayer: http://en.wikipedia.org/wiki/Lua_Player
I started messing around with this and teaching myself Lua. I wrote a variety of simple little games and proofs-of-concept, and eventually made my tower defense game. I've had a soft spot for Lua ever since.
Neat kicker: the guys who made Desktop TD and Flash Element TD later paired up and founded what has become Kixeye.
I started playing with Go this year 'cause there's really great introductory material/tools out there (seriously: boosters of any relatively obscure programming language ought to be outright cloning {tour,play}.golang.org, the readable spec and other introductory docs, etc.) and I had an idea for a fun sideproject that involved some bit-slinging that would've been hard to do efficiently in portable Python. (Much earlier I'd started another such proj in C++, but honestly the going was slow enough, and the frustration dealing with unsafe threading and memory access was great enough, that it eventually didn't really seem worth it.)
How I started on Perl may make a better story: I didn't know a dang thing about it, as I recall, when during college I became a summer intern for a nonprofit with a surprisingly-advanced-for-the-time-and-context mod_perl site. (I had been hacking C/C++ for school and fun, and had played with QBasic and MS Visual Basic as a kid.) I mostly picked it up by the seat of my pants, initially writing low-stakes backend things and then filling their actual infrastructure with horrible regexps (I hadn't yet grasped that there are many tricks you can do but shouldn't, maybe). I still do work for that client and Perl now seems a bit crazymaking, but I was impressed at the time with how straightforward it made a lot of the basic tasks of running dynamic Web sites. Fun times.
(Nowadays Python and JavaScript are the languages providing most of the daily bread, as they probably are for many folks here.)
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.
I later decided after doing a fair amount of front end design work for friends and family that I'd try and learn back end development, so I tried python again, using the flask microframework. I did a few small projects with that, then I found sinatra on ruby and ended up really enjoying ruby more than python. I ended up working pretty much entirely in ruby for any back end dev stuff (although it wasn't very much), and slowly improved my javascript skills.
During Uni, I have also learned enough C# to make my way around. In my second year, I got a job doing front and back end dev, and made my first big project using sinatra and I loved it.
Later on we needed to write some software that interfaced with a label printer, and the best library we could find was for java, which none of us knew (nor did we want to learn). I had been reading about clojure and liked the look of it (and heard that it had great java interop) and I made my first (very dodgy) clojure app to interface with the printer.
I got hooked on functional programming then, and in the past year and a half, I've learned up on a few different languages. I have vastly improved my Javascript skills after using Backbone.js and then Angular.js. I also improved my Clojure skills, by re-writing my first work sinatra app using compojure, as well as a few side projects. I also took an interest in Erlang and Elixir after hearing about both on HN, and I learned the basics by reading 'Learn you an Erlang', and trying to make a few small project in both. I'd love to use Elixir some more, but I don't have a good project idea that suits it's use-case. Just recently I also learned C in a uni subject.
I'm always looking to expand my programming knowledge, I just have trouble coming up with ideas of what to program!
Then I got an iPod and started learning/programming iOS apps in Objective-C.
Then one day I need to write some server code and came across Ruby. I really liked/enjoyed it. More than any other programming language.
And now I have to create a web front-end so I am learning Javascript. So far, it's OK.
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.
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. :)
Now do full-stack Rails development for a startup.
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 Postgres, it wasn't too bad to get working. The community is really great, maybe as a testament to its size, but I've been impressed by how helpful they are.
Deciding to use Racket over Clojure was a tough decision. Ultimately it came down to the fact that there was less cognitive load for me in how Racket worked when I didn't also have any of the Java infrastructure underneath. I think one of Clojure's greatest strengths is that it gives you all the interoperability with the Java ecosystem (which I think is one reason for it's adoption); but I've never programmed in Java, so all of that familiarity isn't present for me; it just seems like an albatross. Even all the tooling around builds and deployment seemed like a lot to get acclimated to, although I'm sure if I had just gone ahead and used Clojure, I'd have figured all that stuff out.
I'm envious of the fact that a lot of Clojure's libraries seem to be created by people solving concrete problems, and in general I like the pragmatism of that community. Maybe eventually I'll move from Racket to Clojure, but I haven't yet tried to do anything in Racket that makes me regret having chosen it.
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.
C++,Java,C#,VB - School. I have yet to be able to do anything useful or fun in any of these.
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.