What programming language has made you the happiest?
thomasalwyndavis.com
thomasalwyndavis.com
Perl.
Oh sure I detest Perl, now. It provides you with too many ways to make code that fails to express the problem clearly to another programmer, and I'm long past believing that code can survive having only a single mind contemplate it. But it came at a perfect moment for me.
I had spent my childhood dreaming of science fiction futures and tinkering with electronics and computers and always feeling like I was missing some last little a-ha that could make it click and put all the facts in my head together toward acts of creation. I hung out on BBSes with cocky BBS software authors and hackers and really wanted to be part of that crowd. I figured I would take a course at some point and they'd lead me by the nose and by some sort of socratic process I'd suddenly snap and be just like these folks.
So at this point C was being poo-poo'd in favor of C++, and C++ was rapidly on the rise as the premier industry OOP language par excellence. So I tried to learn it. I enrolled in a CS program that taught C++, and made some small progress, but not enough to work on the projects I found interesting. I raced ahead in the assignments and read ahead in the book and found myself in an inevitable slide down the terrible valley Louis Brandy once wrote about:
http://lbrandy.com/blog/2010/03/never-trust-a-programmer-who...
Further, no one had ever explained to me the true role of libraries in programming. I saw an entire empty field ahead of me, thinking I'd have to write my own pixel display routines and modem drivers and input handlers in C++ just to get to a point where I could BEGIN to express the problems I was trying to solve. All the textbooks bragged about how I could do my bone-stupid corporate spreadsheet applications in C++ and have them run on PCs and "mainframes" alike, and not one said "chillax bro, there's a bunch of libraries for the low-level stuff."
I entered into a serious depression, partly because this utterly absurd and inconsistent language just felt like something I'd never truly understand, and partly because working in it made me feel like I actually didn't have it in me to stomach coding.
At my university there was an install disk that wiped a PC and flattened it with a new OS image off of an NFS share or some such. I asked the author how he wrote it and he explained it wasn't hard bit-banging work but just making use of Unix's features, mostly emulated by the Perl 4 interpreter he'd included on the DOS boot disk. I looked into it.
Going from C++ to Perl was the single greatest ramp-up in ability I've ever had. Suddenly I was writing system scripts, games, Internet-connected BBSes, library database programs, and all sorts of things just to solve any problem I encountered. The two Perl books at the time, camel and llama, had great prose, great examples, and a catalogue of library functions that reassured any fears I had of having to re-invent the wheel. Even today I feel like those books do better than most for teaching new programmers.
Dynamic typing was one thing, rich core libraries yet another, but the goofy second-guessing nature of Perl syntax kept the house lights low long enough that I never felt incapable or insecure. It wasn't too long before I felt cocky and disdainful of C++. It just didn't feel expressive enough to me.
I think I must have stuck with Perl for five years before slowly jumping ship. On the bottom I was getting better at bourne shell and awk, and on the top I was getting better at Python. I was also finding my brain able to accept more novel systems like Lisp and Forth and Prolog.
I'll never use Perl again if I can help it, but I have it to thank for getting me out of a real crisis in my youth. That nutty Jackson Pollock painting of a language is responsible for all the programming happiness I've had since!
Nowadays I'd rather use C than C++ (typically with Lua), and have learned quite a bit from Lisp, Prolog, Forth, ML, etc. as well, but the sheer immediacy of Perl and vi was a revelation to a kid used to Borland Turbo C++ and its IDE.
And I agree, a lot of starting coders want to get something done. While quite a few programming courses seem to start from the other side of things, without even really explaining that they are doing so. The student sees the tasks they have in mind being months and months away and encompassing a quantity of detail that seems frighteningly overwhelming. By contrast, actually accomplishing useful things, and digging into the details as you need to, seems more motivating.
(However, it helps to concurrently receive and absorb a strong caution that you don't understand all the "magic" and should be careful of over-relying on what may turn out to be mistaken assumptions. Which reminds me, Perl seemed to imply, for me, developer testing: Don't just code it up, throw test cases -- and, if you can, live data -- against it and see what you get. Work some of the data through an alternate tool/methodology, and ensure that the results match. Continue to cross check as you move forward.)
"Programming Perl" was/is a great read. One of those books interesting not just in reciting, but in genuinely communicating with the reader.
Haskell really drilled in the concept of functional programming. As much as I struggle to write 'normal' code in it, the computational aspects are really fun to write.
However, after a while, I began to incorporate functional programming concepts into other languages, notably python & javascript.
Python already has functional elements built-in, such as map, reduce, filter, lambdas and list comprehensions. Its cool to replace for loops with long "one-liners"; it creates a different perspective of a list.
Javascript, on the other hand, is less blessed than python. Closures do help, however. Although JS 1.6 & beyond support Array.map, folds, and filters, it's hard to rely on them. After writing my own libraries enough times, I started using ( http://documentcloud.github.com/underscore/ ) Underscore.js, if not JQuery, in every project. By its very nature, looping over DOM elements lends itself very very well to functional style programming.
1. By now everyone knows of JavaScript's functional features, which I must admit are awesome, but many other languages share these. But what few languages share regarding these is they're a very common part of standard js programming. A lot of new python and even ruby programmers have never touched the functional features of the language, but even a copy & paste js 'programmer' has probably written a lambda function, used a first class function, and maybe even used a closure.
2. It's fundamentally different than most other other languages. I love Haskell and it's awesome type system, but I also love JavaScript and it's true rejection of a type system, even throwing out classed based inheritance for prototypical. It's also a world where events and asynchronous computing are completely commonplace. What's interesting about this is that it is related to number 1, in other words it is an extremely practical application of principles of functional programming. Having written my share of parallel C code, writing concurrent/parallel code is much more of a pain without basic features of a functional language. On top of this being able to easily implement things like currying is actually pretty amazing. At the same time the language is very, very simple at it's core.
3. The above 2 reasons are things I would expect from a less popular and therefore harder to distribute language. Common Lisp is definitely more interesting of a language than JavaScript, but if I want to share something I've done in Common Lisp with someone, they better also be a fan of the language. On the other hand if I make something really cool in JS I can easy share it with anyone, even people who think IE is the 'internet'. Also I'm pretty sure that more people of varying skill levels can read JavaScript than any other language. So if I want to demonstrate something, for a very general audience JavaScript is much better than C, and for demonstrating functional programming techniques it's worlds better than Lisp or ML.
Now: JavaScript.
Sometimes I feel like I'm the only person who is pretty happy with any language. They all have little quirks I don't like, and they all have things that I think makes them better than other languages.
For a while, I had a few languages I thought I hated. But as I learned them better, I came to appreciate them, too.
Much more recently, learning OCaml after many years spent coding C++ was like a long drink of cool refreshing water.
At the moment, I'm into Java for creating Android apps and having a good time with it. Before that, it was PHP. At one time it was ASP. Once it was Delphi/Pascal. When I was a kid, BASIC.
I don't think the language makes me happy, I think my situation makes me happy, so by association, I'm happy with the language I'm coding in at the time I'm happy. Or something like that.
I recently moved from a Python+Javascript project to a Java+GWT one, and while the project has been interesting, I must say I know that I will not be voluntarily using Java post this project - unless it happens to be something like Android, which I haven't yet taken on.
Python and Javascript are by far the languages that have pleased me the most: Python for its simplicity and terseness, and Javascript for the absolute fun stuff you can do with it(closures, prototypal inheritance).
Java comes off as being more boilerplate - not just the generated code, but the IDE my colleagues claim you need in order to minimize writing the scaffolding yourself. Not sure if this holds true - I keep hearing myths about how Emacs is a good Java editor and all that.
I generally get a kick of out writing tight code, and Java seems bloated by design. YMMV, and it obviously does.
I work daily with Python, various build script languages, C++, assembly (in various flavors and dialects), and C#, and at the end of the day it isn't the language that makes me happy but the libraries and ecosystem available. These days it's C# and .NET+XNA that makes me happiest.
Now it means Smalltalk and Seaside.
The one that has made the most money is PHP
Of course, liking the tool you're using can help, but it shouldn't be the defining factor.