The Pragmatic Programmer: After PHP, what's next?

I'm reading The Pragmatic Programmer and I'm on the section where the authors suggest that we learn a new language every year. I'm currently a PHP developer and I'm wondering, what should I learn next?

I'm looking for a language that will help me improve my skills and help me with my daily tasks. Something useful.

Any suggestions?

[Edit] Awesome answers guys! Thanks. I'm still contemplating your answers and I'm leaning on studying Python or a functional prgoramming language as you guys have suggested (maybe Lisp).


Python and Ruby seem to be a relatively painless transition to/from PHP.

Going for the option of learning something new, rather than something a bit like what you have done before.

C++ or C
A low level language that requires manual memory management and teaches you how things work at a lower level. Good community base and is one of the languages that a programmer should learn.

I would suggest one of these over assembly as although assembly is even lower level it is pain to produce a project. Learning a language like C or C++ will have the bonus of allowing you to learn assembly very fast if you ever want to do it, as there are relatively few new concepts compared to going from Java to assembly.

A purely functional language that totally changes the way you look at some problems. It takes a lot of effort lean if you are already used to a imperative style of writing code.

It has the great advantage of teaching you the joys of recursion, and even if you are never payed to write a line of Haskell it should impact the code you write in other languages, allowing you to see better and cleaner solutions.

Java or C#
If you don't use PHP in an Object Oriented way (Not just using classes, but features like inheritance as well), then these languages force you to write in a OO style. I wouldn't recommend these if you are happy with OO programming.

I'd go for Java or C#, so you learn something that is not another scripting language.


And I mean really learn it, not just "enough to get by" the way the trend seems to be. I've seen otherwise-great (on the server side) web developers that can waste 2 days on a trivial JavaScript problem because they don't understand it at all.

I don't think there is a language that a developer will come across more often than JavaScript, and when you need to use it, you need to use it: you won't have the freedom of picking some other language to run on the clients browser. The good news is that it shouldn't take very long to grasp when compared to some other programming languages.

A good place to start is with JavaScript:The World's Most Misunderstood Programming Language

I believe it would be strongly beneficial for you to try and pick up on one of the popular functional programming languages as they require a completely different mindset and methodology for solving problems. They really allow for you to program elegant yet minimalistic solutions to difficult problems. Some of the more common languages include:

  • Erlang
  • Haskell
  • Lisp

Whilst I agree learning a new language is a good idea - make sure you are learning them and not just collecting them. For example - I come from a Java background and I keep catching myself writing in other languages in the way I'd write something in Java and not taking advantage of the new language's facilities. I'm sure you wont - but just be aware that it's a natural thing to do so keep an eye out for if you start doing the same!

As for which I'd learn; I'd second learning Ruby (plus optionally Rails if you want to do web apps) - it's a very nice language and quite an easy transition from PHP. The "Pickaxe" book from pragmatic programmers is a good place to start.

If you have access to a Mac - I very much recommend learning Objective-C and Cocoa. I certainly learnt a lot by studying these - I think more than any others I felt that understanding these made me a better all round developer. As for books - start with Kochan's "Programming in Objective-C" for the language side, then progress on to Hillegas' "Cocoa Programming for Mac OSX" for the GUI side.

Good luck!

I started off learning PHP after C. Then I discovered Perl and I never looked at PHP again. The reasons? Perl, like PHP, was dynamically typed, but far more modular. The Camel book about Perl was a delight to read. Running a Perl script from the command line was far quicker than PHP which needed all possible libraries loaded - Perl permitted me to choose what extra functionality I wanted at run-time keeping simple scripts light-weight. The Perl community is relatively advanced compared to other languages. The Perl language lets you program in a variety of styles, from procedural, to OO.

Functional languages seem to be gaining interest I'm planning on looking at F# primarily because I'm working with the Microsoft stack most at the moment.

I'd also recommend looking at topics that aren't language specific such as improving OO skills, using design patterns, and anything else that helps refine your skills as a developer to make you more of a craftsman rather than collecting languages that you won't get to use on substantial project and therefore will never really master.

Python + Django if you want to stay in scripting.

C if you want to understand how it works behind the scene.

C (as in C, not C++) would be my suggestion. It will instantly make you appreciate just what interpreted or higher level languages actually do for you (or save you from, depending).

It is also the first logical stepping stone to C++, though I know a lot of people who just dived into C++. Learning C first will (as above) either make you appreciate, or hate C++ even more.

To be a really well rounded programmer, you need to deal with managing types on your own, as well as managing memory without the safety net of a garbage collector. It used to be that those two were prerequisites for being a programmer at all.

Besides, think of all the fun you could have writing your own PHP extensions :)

This could turn into a debate.

My suggestion is to learn a new language that has something to do with your existing skills.

My "first language" was C, which brought me to C++ and Visual C. When I took on consultant jobs I enter the realm of PHP.

Starting from here, I am collecting skills in Javascript and jQuery, since they are tightly coupled with PHP. (DOM, CSS, and HTML aren't languages, so they don't count here.)

Or maybe you want to take another direction and go for SQL.

Choices is yours and crossroads are everywhere.

Not sure if you are programming PHP under the MVC model? But if you are not that is another good methodology to learn.

Examples: Zend or CakePHP

It totally depends on what you want to do. I don't think anyone can say what you should learn next, but rather share you with our experiences that will help you make your mind. After all, the decision for your next language should be based what what kind of applications you want to develop (desktop, mobile, web, etc).

I'll share you with my experience. I used to be a PHP programmer and I faced the same question, what do I want to concentrate on. I ended up to learn Java and I've been happy with my choice. Here are some of the reasons why I think it was a good choice

  • Java is a widely used language in the corporate world. This means that with good Java skills you'll be likely to find (more easily) a (better) job, more so than with Python or Ruby skills (disclaimer: this can of course vary between regions and countries, this was the case in my area)
  • I had done lots of web sites and applications with PHP and I've loved the web as an environment. Still, I felt that PHP wasn't quite the language to create full blown enterprise applications - that was something I also wanted to do - to be part of making large enterprise applications. Luckily, with tools like GWT or Vaadin I've been able to create enterprise applications which run in the web environment - all in Java. That was like a win-win for me, I was able to create large software for the web.
  • Java has forced me to think more Object Oriented, something I've benefited when writing PHP as well.
  • Java is multi-platform, so it is easy to write applications for linux/mac/windows or even for mobile devices (Java ME)

My two cents.

It depends on your motivation for learning the language.

If you want to learn a new language to do your day-to-day work more effectively I would suggest Python or Ruby. They are popular languages that are both highly productive to work in, and can be applied to a wide range of programming tasks. As someone else has pointed out there are versions for both the JVM (Jython and JRuby) and for .Net (IronPython & IronRuby) so if you want to learn either of those platforms they are a good way to start. They are also both easy to learn and fun to use. My preference is for Python, but that is probably because I have been using it for many years.

If you want to increase your employment options then go with the most popular languages used in business - this means either Java or C#.

If you want to expand your mind then I suggest a version of Lisp. I recommend Clojure - it is a dialect of Lisp that runs on the JVM and gives access to all the Java libraries. There is an excellent introductory book in the Pragmatic Programmers' bookshelf.

  • JavaScript (preferably through jQuery and Ext.js)
  • RegExp (preg_match flavour)
  • SQL (MySQL, PostgreSQL, SQLite dialects)
  • XSLT (and XML)

Each is very different. Each serves different purpose and each is very useful for PHP web developer.

If you want to try something different I'd go with

  • ActionScript (great opportunities)
  • C# (great IDE)
  • Python (complex ideas, misleadingly simple syntax)
  • Rebol (fun of having strange constructs work flawlessly on first guess)


(Or some other functional language.)

I coded in PHP for years and then took a (functional) Lisp class. It was four weeks of wtf %@f pain and then pure joy. Understanding functional programming, and especially recursion, really gives you and edge when coding PHP (or any other solution-oriented business language).

Category:php Time:2009-11-30 Views:1

Related post

  • Did the authors of The Pragmatic Programmer forget about YAGNI? 2010-07-31

    The Pragmatic Programmer is highly recommended by many people. I've just finished reading it, and I can see why people recommend it, although I would point out that Code Complete covers almost all of the same material in much more depth. However, one

  • Pragmatic programmer code generation exercise 2010-08-10

    I am reading the The Pragmatic programmer and doing the following exercise in .net world (Chapter 3 - Code Generators) The Exercise "Write a code generator that takes the input in Listing 1, and generates output in two languages of your choice. Try t

  • Exercise 19 of The Pragmatic Programmer 2011-11-04

    This is taken from Exercise 19 of The Pragmatic Programmer. A quick reality check. Which of these "impossible" things can happen?: A month with fewer than 28 days stat("." ,&sb) == -1 (that is, can't access the current directory) In C++: a = 2; b

  • Source code listing something like the pragmatic programmer books with LaTeX? 2010-07-17

    When I read Pragmatic Bookshelf's books, it has the following format How can I do that with LaTeX? Line numbers at the left side, coloring source code, and grayed source name. What's the tools for source code listing with LaTeX? Added Following Thoma

  • What does a good programmer's code look like? 2008-12-14

    I am a hobbyist programmer (started with VBA to make excel quicker) and have been working with VB.NET / C#.NET and am trying to learn ADO.NET. This is my first post and I apologise for the subjective nature of the question. A facet of programming tha

  • What Skill set should a low level programmer possess? 2009-07-07

    I am an embedded SW Engineer, with less than 3 yrs of experience. I aim to "sharpen the saw" continuously. I was wondering if there was anything specific to low level programming that C/C++ coders should be proficient with. What comes to my mind is f

  • I'm a .NET Programmer. What are specific uses of Python and/or Ruby for that will make me more productive? 2009-08-30

    I recall when I first read Pragmatic Programmer that they suggested using scripting languages to make you a more productive programmer. I am in a quandary putting this into practice. I want to know specific ways that using Python or Ruby can make me

  • What are the list of Patterns and Principles a programmer must/should know? 2010-06-01

    I have been coding for a few years and still feel that my knowledge is not broad enough to become a professional. I have studied some books related to design patterns, but I know there are many others. So could somebody list the patterns and principl

  • Becoming a better iOS and MacOSX Programmer 2011-12-15

    I've started using Project Euler to improve my objective-c coding and have worked through some of the problems. I think it's great so far for wrapping my head around different concepts. Unfortunately, I don't really see any uses in applications I hav

  • How to notify the programmer of a null argument? 2012-02-21

    So, I'm working on designing a class wherein if certain arguments to certain methods are null, either the method (or the object as a whole) won't work. I know that it'll throw a NullPointerException once it receives the null object and attempts to us

  • Compact Framework - Is there an MVC framework/library available? 2008-08-25

    I've found an article on this subject by a Microsoft employee, but has anyone implemented a more robust framework for this? Is there a lightweight framework for WinForms that could be ported easily? I'd like to get up to speed fairly quickly and avoi

  • How do I begin using SVN? 2008-08-30

    I am ready to start using SVN, but I have NO (as in the money required for free beer) experience with source control. I have installed subversion on my server (that was easy, 'apt-get install subversion') but now I don't know what to do, how to confi

  • Practical Experience using Stripes? 2008-09-06

    I am coming from an Enterprise Java background which involves a fairly heavyweight software stack, and have recently discovered the Stripes framework; my initial impression is that this seems to do a good job of minimising the unpleasant parts of bui

  • Developing on your own 2008-09-08

    In my company each developer is given a project to work on his own, so there is hardly any teamwork. I've been building software like this, without the discipline of a good methodology of development, for a year. The results were ok but I would like

  • What should I do to advance my knowledge of rails 2008-09-11

    As it stands now, I'm a Java and C# developer. The more and more I look at Ruby on Rails, the more I really want to learn it. What have you found to be the best route to learn RoR? Would it be easier to develop on Windows, or should I just run a virt

  • Design by coding, its wrong but easier to visualize 2008-09-12

    I'm sure others agree, when code hits the pavement it is much easier to think of all the elements that will go into your application. Meaning, once you get going, you think of the what's next because you have reached a point where you have to design

  • In a Scrum project, should testing and peer reviews be worked into each sprint as individual tasks? 2008-09-12

    This seems to be a point of contention where I work. Some complain about the lack of verification structure in Scrum projects, while Scrum purists say it's not what Scrum is about. Both sides bring up great points, but I would like to see what people

  • Does generated code need to be human readable? 2008-09-15

    I'm working on a tool that will output an interface and a couple classes implementing that interface. My output isn't particularly complicated, so it's not going to be hard to make the output conform to our normal code formatting standards. But this

  • What alternatives are there to the MATLAB Editor? 2008-09-17

    Some things that I personally find as shortcomings in the MATLAB Editor: virtually no code completion available does not run OS native (on MacOS) - but in X-Environment (shortcuts, copy&paste problems, keymappings, non intuitive window-managing)

Copyright (C), All Rights Reserved.

processed in 0.368 (s). 13 q(s)