Learning a new language can also be a supplement, say learning haskell in such a way that you improve your math ability and critical thinking at the same time. Or attempting to write a project in a new language would be far more interesting say if you are burned out from a job in a certain programming language. New and different things can be very refreshing!
I've been learning Prolog over the summer* , and while I'm not convinced I will make much use of the language directly, it has some really interesting ideas, which are largely usable in Scheme and Lua. For example, I also have a much better understanding of how unification, type inference, etc. work now -- Prolog is a DSL for that sort of thing, and having a good notation helps, much like knowing regular expressions changes the way you think about patterns.
* Via Sterling and Shapiro's _The Art of Prolog_ (which is an excellent text, IMHO) and the relevant chapters of CTM (all the more so).
(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.
3. I decided to learn a language I could use on the Java platform using Java APIs, rather than on the _nix C platform using C APIs. Partly this is a matter of wanting to escape C's shortcomings; partly it's because I have my eye on a couple of upcoming projects at my company for which the Java libraries will be extremely helpful.
2. I want to learn a language that will allow me to use functional idioms and help me learn a more functional style, yet allow me to get the job done even when my functional-fu falls short. I don't want to learn a language that expands my mind but then becomes a fond memory. I hope that for many years to come Scala will be the first language I reach for when I need to get something done on the Java platform.
1. I want to master a modern yet practical language with a strong static type system. I don't do much programming that calls for a dynamic language, and I'm pretty satisfied with Python. I write a lot of code in C++; C++ and Java are the only statically typed languages that I have really mastered, and I'm dissatisfied with both of them.
Runners-up:
Clojure: not statically typed. Maybe my next language after Scala -- I really enjoyed using Common Lisp but hated the library situation.
O'Caml: great for the _nix C platform, but not for Java. Also possibly too pure to be a "go-to" language (heh.)
I like Scala quite a lot so far. The main pleasure of Haskell or Ocaml over Scala is that they can deduce all your types (even function arguments), whereas Scala supports overloading and can't.
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.
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 found this too. Once I started reasoning with lazyness, Python's generators felt a lot more natural. The itertools module is very useful.
F#
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):
html_button("Delete item", {
delete_item(value);
return list_items();});
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:
(html-select (cons {:id 0 :name "- No account -"}
(filter #(:is-account %) @users))
:selected (:account brief)
:onchangefn #(do
(passoc briefs (:brief %)
:account (Integer/parseInt (:value %)))
(return-from briefs (:brief %))
:onchangeparams (str "&brief=" (:id brief)))
And this really is all of it. No html, no sql, nothing.Best language I ever used and I was programming in Fortran iv on 80 column punch cards in 1972...
All of them, really, for pleasure. Python because I want to learn to program, Processing for image processing, Java to bypass CS 101 requirements, and HTML & CSS for web design.
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).
One thing let to another and I ended up buying a bunch of books and downloading the mit video lectures.
Or is a "close enough" guess at the usual suspects (with an option for 'Other') good enough?
If I ever find myself wanting to program at a low level again, I can see myself learning D.
I can never stick to one thing.
- Some CSS, HTML and Jquery
- English :)