TLDR: There are so many programming languages and frameworks out there... and there is so little time :( Which one would you learn just for the fun of it?<p>I have some experience with a bit of Pascal, C++ and C# from highschool but not much (I was mainly learning algorithms and concentrating less on actually building software). During uni I did some Java and continued with C# (+XNA). In the meantime I played a bit with PHP. After I graduated I got a job as a PHP developer (PHP, Javascript, CSS, HTML).<p>Now, after 2 years of work, I realise I need something else. I want to learn a new programming language, or continue learning one I started in school, something that will compensate for the lack of algorithms in my work (building websites with PHP can be tedious sometimes). I want to learn it in my spare time and I want to be able to build something with it, a small application of some sort... not really important what, but I want to use those algorithms I learned several years ago.<p>This brings me to my question ... what should I learn? What is the best programming language for a hobbyist. The kind of programming you do on weekends just because it's cool, because it keeps your brain moving and because it's fun and rewarding. What's the programming language that puts a smile on your face? :-)
Another point to consider: Would you want to be able to easily show off what you created? Then you should likely do HTML5/CSS/JavaScript so you could put it on your phone. Who knows? Maybe you will come up with an app idea that's commercial and you'd be set.
That really depends on what's exactly your "Hobby".
I'm a hobbyist myself, but I'd like to study Computer Science (I actually like the SCIENCE in computing.) and become a Software Developer.<p>But I'm not in College yet, so I'm a "hobbyist", people are suggesting Python: I'd say it's a great language, specially as first language or language for scripting... but you should try other ones too.<p>Given that you are a hobbyist you want to have fun, learn new things: Try Prolog, Scheme, Haskell, whatever.<p>I'm not a big fan of Ruby myself: Python does better in the desktop and I like Django (Python web framework) more than Rails. Although Ruby is nice as language too.
I'm going to swim against the tide here and suggest that you might want to go back and play with Pascal some more. Pascal was the third programming language I learned (after machine language and Algol) and after all these years (including decades of working professionally with C, C++ and Ada) Pascal is still the language I have the fondest memories of. I loved it because it was simple and elegant and I could get my mind all the way around it (something I was never able to do with Ada).<p>There are still implementations of Pascal available, including Free Pascal and GNU Pascal. For more information about implementations, check out the Wikipedia article on "Pascal programming language".<p>Alternatively, if you want to get a solid foundation in Computer Science and algorithms, I would suggest you work your way through "Structure and Interpretation of Computer Programs" (abbreviated SICP). This was the textbook used for years at MIT for their introductory computer programming course, and the course materials are still freely available as part of MIT's Open Courseware program. I personally prefer the original version that used the Scheme programming language, but you could also go with the updated version that covers the same material using Python.<p>Edit: There are easier courses out there, but I think this one is the best if your are serious about getting a solid foundation in Computer Science.
I know a lot of people are going to say Python, which I would normally agree with. In this case though, I would almost say that some kind of Lisp might be a good idea. The lack of a complex syntax means you can just get started hacking around, and it would definitely "keep your brain moving," as you say.<p>Some kind of Scheme would probably be best. Racket, especially, is supported cross-platform, has a nice little IDE, and has plenty of libraries and community support.
What's your hobby? If web development I'd look at Python, Ruby or JavaScript.<p>If systems type stuff then Python, Perl or C. If you wanna be a hobby kernel hacker then C.<p>If games, well. I don't know.
You write <i>"I want to learn a new programming language, or continue learning one I started in school, something that will compensate for the lack of algorithms in my work"</i><p>If that is all you want, almost any language will do. Maybe, you want to take on a new one every month or so for a while to get a broader view on what's out there. Your experience, it seems, is only with Algol :-), so I would pick something different like lisp, Haskell or Forth.<p>Having said that, I think you should first think more about whether there is a deeper reason why you want to program. It might not even be the programming itself, but the learning itself. If so, reading about programming languages (or maybe even on computing history, physics, linguistics, history,...) can be a better idea. On the other hand, if, in the back of your head, you have this idea to write something to solve problem X, that could direct you in your choice of language.<p>In other words: what is your itch?
Others have said Python and I'd back that up, but if you're looking at Windows only, then have a look at Visual Studio 2012 Express - a free & decent IDE. It supports C#, C++ and VB.
The language which moves my brain the most is Lisp. It's built around pointers and memory locations but garbage collection, cons, and car take away the tedium I associate with C. The REPL provides the instant gratification of instantaneous frustration while pondering the possibilities of macros offers a mental infinite loop.<p>But what is really great about Lisp when it comes down to it is the literary tradition. I just haven't seen another language which comes close. There isn't a Richard Gabriel for Fortran.
Why not do some competitive programming? That should utilize the algorithms you learned and you could use any/all of the languages you already know (Pascal, C++, Java,C#)<p>Here are some good sites you might enjoy:<p><a href="http://www.spoj.com/" rel="nofollow">http://www.spoj.com/</a><p><a href="http://community.topcoder.com/tc" rel="nofollow">http://community.topcoder.com/tc</a><p><a href="http://codeforces.com/" rel="nofollow">http://codeforces.com/</a><p><a href="http://projecteuler.net/" rel="nofollow">http://projecteuler.net/</a> (Math Focused Problems)
I've learned Python exactly same purposes as a hobbyist. Although it depends on your learning curve, Its easy to start and continue. You can find tons of examples for every level. Also if you interested with web developing, Django (Python web framework) can be good solution. If you are total beginner, this lesson will be very useful: <a href="https://www.udacity.com/course/cs101" rel="nofollow">https://www.udacity.com/course/cs101</a>
Ruby - because it is a little bit different to what you already know - which would be the entertainment factor and also might change how you write code elsewhere.
Beware of people suggesting their personal favorite language. There are many languages worth knowing. My personal favorite is the Lisp family and particularly Clojure. Pick up a book like SICP or any of the Clojure books. It can really give you a new perspective.<p>I suggest buying the Seven Languages book by Bruce Tate. There is no wrong choice, because learning any language will make you better.
Depends on what the project is. If I'm building a web app, then Ruby or Python. A mobile app is Java (android). A local script that does not need to be blazing fast or light is done with Python. If I need to deal with a lot of text then Perl. And I just want to get something done and have fun with it then Common Lisp.
C# - it just keeps constantly evolving. Supports dynamic/static, functional/imperative, OOP and language-integrated asynchronous programming models. It gives you a nice balance between performance and features like introspection. Also ReSharper + Visual Studio will give you the best IDE in the world.
Python, I think.<p>Because it has a lot of easy-to-use 3rd party library, its community is great and fun to write.<p>You can start with Dive into Python free-online course.