I would like to know what languages my fellow HN readers are currently learning/investigating, in their free time, and the criteria for choosing which language to learn next.
after being a coder for 3 decades I finally got around to lisp, two things prompted me to do it, first the source code to HN, secondly a discussion with 'dtor' of the glusterfs project, a young indian coder that seems to be pretty gifted. I audited some code there and came upon a macro that took me a long long time to comprehend, he explained it was to give C continuations.
One thing let to another and I ended up buying a bunch of books and downloading the mit video lectures.
Erlang - why? after diving into threading in Java for a recent project, I wanted to see other ways of approaching the same problem - recommendations for other languages with powerful threading solutions?
Even though I complained about not being able to learn Haskell in another comment, this is the tutorial that got me the furthest. I found RWH pretty much worthless by comparison.
(1) Haskell, because I like functional programming, and this language seems very promising (I first looked at it 10 years ago, but I gave up because the implementations seemed immature. I took another look recently, and I'm amazed by how much it's progressed since then). I especially like the way that laziness and purity enable a concise, stream-processing paradigm through the use of maps, folds, and various combinators.
(2) Lua, because it seems like the Scheme of imperative scripting languages, while still being very practical and hackerish. It also has a neat game engine (Love2d) which I'm eager to try out.
Rather surprising to see PHP so high here since I rarely see PHP-related submissions on HN. How do people learn it? I've found that the best thing for me was finding StumbleUpon and reading up as much as I could about best practices in PHP and programming in general. Now I force myself to try a different language for my own projects to get away from PHP as a "comfort zone".
I'm a bit shocked to see any significant popularity here, as it seems to be a language most hackers avoid. I'd like to know why people are interested in the languages they're learning - not just PHP.
The OP asked about what you are currently learning. Many folks may actually be required to learn it for their job, rather than for professional enrichment.
I'm a bookworm, so I sought out well-regarded books on Amazon. I started with 'PHP and MySQL Web Development' by Welling & Thomson, and could not have been happier. It's hefty (nearly 1,000 pages for the latest edition), but was well worth the time. Next up was 'PHP in Action', which is similar to the later chapters in Mark Pilgrim's Dive Into Python (one hell of a book, btw) and was coauthored by Chris Shiflett.
I've since read two of Ullman's books (PHP for the WWW and PHP 5 Advanced), the Powers books (PHP Solutions and PHP Object-Oriented Solutions), and Shiflett's 'Essential PHP Security' (the PHPSec guide is required reading also).
The two Apress Pro books ('PHP Objects, Patterns and Practice' and 'Pro PHP'), 'Essential PHP Tools', 'PHP5 Power Programming' (Andi Gutmans is a coauthor) and 'Advanced PHP Programming' by Schlossnagle are up next, although I'm currently working through SICP.
(Note: I switched to Postgres since reading Welling & Thomson; there are basically 10x as many MySQL books as PostgreSQL ones, unfortunately)
Did you know OmniTI (employers of Shiflett and Welling, former employer of Thomson, and sister company to MessageSystems (Wez Furlong & George Schlossnagle) have an office in Brooklyn? I believe the main contributor to CakePHP works there too. If you're that interested in PHP, it might be something to consider being relatively close by.
I'm bookish in how I approach programming too, and among your list have read "PHP & MySQL Web Development," Shiflett's "Essential PHP Security," and "Advanced PHP Programming" when I was first starting out (I started out as a PHP programmer). If you're anything like me, the books get less exciting as the knowledge they contain gets more familiar, which is inevitable among a certain class of books. I now read more language agnostic books on algorithms, math, and some broader concepts. We'll see how that goes.
Sara Goleman has a book on writing extensions for PHP that you might like if you want to 'cross the threshold.' These sorts of things can be useful to know how it all works internally, even if you aren't writing a ton of extensions yourself. The Schlossnagle book has a chapter on that. I'm not sure how much movement PHP internals have (I'm out of that world now).
I didn't know OmniTI had an office up here. I definitely have noticed diminishing returns from all the PHP reading; I still find it satisfying, but I'm not sure how long that'll last. Thanks for the 'Extending and Embedding PHP' recommendation. Any other recommendations (especially non-PHP ones) are welcome. 'me' at the first domain in my profile.
I'm not learning any language right now, but have learned a fair share over the course of the past few years.
My general criteria is not to learn a language that is conceptually similar to something you already know unless there are professional advances to be had there. If all you know is Python, C might be good because it's lower level. Lisp or Haskell or O'Caml might be good because you'll have to program with different paradigms, etc. If I were coming from Python, Ruby wouldn't be my next choice unless I needed it for a job.
I am learning Clojure because I know lots of "traditional" languages and want to stretch my brain in new ways. I am also interested in new ways to write parallel programs, which is becoming a bigger and bigger issue. Clojure scores well on these two criteria. I chose Clojure over Scala and Haskell, because I believe in dynamic typing over static typing. This is probably more an issue of tase than anything and I also have a high opinion of those static languages. I am very impressed with Rich Hickey's design sensibility and his goals for Clojure align well with my own.
Just wanted to say it's hard. I'm definitely not the best programmer, truth be told I haven't even programmed full time for a while, but switching from java to clojure took me at least half a year.
I'm in the middle of my first (small) full app though, and I can tell it will be worth it. With java there was a wall in productivity I simply could not brake. I wrote pieces of code sometimes as fast as I could type (similar alterations to existing software), but still I felt I did the same thing over and over again. Now I'm at the first iteration of my framework and I can already tell a lot of the code I write won't be written again.
Just an example: one of the first things I did was to brake the old web convention of separating the app into writing html and processing requests. Most of the links I write now, including forms, have the action code right there. Something like (pseudocode):
I would not advise this style of programming, because it creates a very tight binding between the application logic and the interface. In fact, it's exactly the problematic style caused by GUI builders that generate event handlers and ask you to fill them in.
I think clojure's use of higher order functions is very well suited for this. With only a "#" in front the code becomes a lambda function. This pretty much makes the whole concept of handler functions void - or at least trivial.
But I'm not sure if it will work out in the end... and I mixed this with liberal use of metadata and thrown away SQL too... mostly I try to go as far as I can and see where I trip. It's fun.
And it does make for some terse code. This for example is the code for changing the person responsible for a brief:
Me to, knowing a little scheme definitely helped, watching all the SICP lectures last summer also helped(If you don't have time for the book, the videos are a good way to cheat).
Javascript. I've "known" it for 10+ years, but now I think is the time to take it seriously. The web stack is getting dumber as a lot of UI and logic moves to JS inside the browser.
Databases got dumber in exactly the same way -- do you know or care if your database has good stored procedure support? Eventually it won't matter much what the server is running.
I'm rewriting a card-game-playing environment written in Java. I originally wanted to use one of the Java implementations of Arc, but the low activity level of the forum (and my difficulty installing Rainbow a while back) makes me uneasy, so I'm learning Clojure. Sorry PG.
93 comments
[ 2.6 ms ] story [ 124 ms ] threadOne thing let to another and I ended up buying a bunch of books and downloading the mit video lectures.
Best language I ever used and I was programming in Fortran iv on 80 column punch cards in 1972...
(2) Lua, because it seems like the Scheme of imperative scripting languages, while still being very practical and hackerish. It also has a neat game engine (Love2d) which I'm eager to try out.
I've since read two of Ullman's books (PHP for the WWW and PHP 5 Advanced), the Powers books (PHP Solutions and PHP Object-Oriented Solutions), and Shiflett's 'Essential PHP Security' (the PHPSec guide is required reading also).
The two Apress Pro books ('PHP Objects, Patterns and Practice' and 'Pro PHP'), 'Essential PHP Tools', 'PHP5 Power Programming' (Andi Gutmans is a coauthor) and 'Advanced PHP Programming' by Schlossnagle are up next, although I'm currently working through SICP.
(Note: I switched to Postgres since reading Welling & Thomson; there are basically 10x as many MySQL books as PostgreSQL ones, unfortunately)
I'm bookish in how I approach programming too, and among your list have read "PHP & MySQL Web Development," Shiflett's "Essential PHP Security," and "Advanced PHP Programming" when I was first starting out (I started out as a PHP programmer). If you're anything like me, the books get less exciting as the knowledge they contain gets more familiar, which is inevitable among a certain class of books. I now read more language agnostic books on algorithms, math, and some broader concepts. We'll see how that goes.
Sara Goleman has a book on writing extensions for PHP that you might like if you want to 'cross the threshold.' These sorts of things can be useful to know how it all works internally, even if you aren't writing a ton of extensions yourself. The Schlossnagle book has a chapter on that. I'm not sure how much movement PHP internals have (I'm out of that world now).
I found this too. Once I started reasoning with lazyness, Python's generators felt a lot more natural. The itertools module is very useful.
My general criteria is not to learn a language that is conceptually similar to something you already know unless there are professional advances to be had there. If all you know is Python, C might be good because it's lower level. Lisp or Haskell or O'Caml might be good because you'll have to program with different paradigms, etc. If I were coming from Python, Ruby wouldn't be my next choice unless I needed it for a job.
I'm in the middle of my first (small) full app though, and I can tell it will be worth it. With java there was a wall in productivity I simply could not brake. I wrote pieces of code sometimes as fast as I could type (similar alterations to existing software), but still I felt I did the same thing over and over again. Now I'm at the first iteration of my framework and I can already tell a lot of the code I write won't be written again.
Just an example: one of the first things I did was to brake the old web convention of separating the app into writing html and processing requests. Most of the links I write now, including forms, have the action code right there. Something like (pseudocode):
I'm not saying it's the way to go with a webapp, only how easy it is to experiment with different paradigms.But I'm not sure if it will work out in the end... and I mixed this with liberal use of metadata and thrown away SQL too... mostly I try to go as far as I can and see where I trip. It's fun.
And it does make for some terse code. This for example is the code for changing the person responsible for a brief:
And this really is all of it. No html, no sql, nothing.Databases got dumber in exactly the same way -- do you know or care if your database has good stored procedure support? Eventually it won't matter much what the server is running.