1 Jan
Moving From Herding Elephants To Handling Snakes
Since the summer, something had been bothering me about PHP. I couldn’t put my finger on it but over the holidays I finally figured out what was wrong. After ten years of working with PHP, I’m bored with it. Every professional programming job I’ve ever had has involved PHP as the main language, with a smattering of things like SQL, Perl, Ruby and Javascript. But it’s always PHP at the core.
So what is there left for me to do with PHP? I’m not about to write my own PHP framework as I have one I already like, one that I use for my simulation baseball league’s web site. I’m not a C programmer, so diving into the internals of PHP to contribute that way is a no go. No, it’s time to put PHP aside (so to speak) and pour my energies into something else.
A while back I tried the Rails thing. I liked it…because it was so different from PHP. Ruby has such elegant syntax, reading like English in many ways. I even got asked to create a training course for Ruby on Rails, but never got far with it (sorry Marco). Once I started poking around more about Rails, I started to see things that made me uneasy about it: issues about performance in high-traffic environments, the attitude of some of the more senior “core” guys in Rails, and the zealotry displayed by users of it.
Slam PHP all you want for it’s syntax ($object->chaining->looks->weird()), it’s inconsistency in function parameter order, the still-ongoing debate about how to implement namespaces, and the combo of powerful functionality combined with a low barrier of entry (thereby infuriating programming snobs). But it gets shit done, plain and simple. That’s how Rasmus Lerdorf started off using PHP, that’s how it will always be. Elegance in code and proper programming techniques are the domain of the developer, not the language in my not-so-humble opinion.
Sure, Ruby is nice and Rails has all those cool magic functions but some stuff I read by Zed Shaw (the creator of Mongrel put into words a lot of what I had felt about Rails: just not for me, I guess.
So what’s left? Not gonna go the Java route: too much pain and suffering lies down that path. So, I’m left looking at a language that is rock solid, has a great object model, has a good web application framework to help me get up to speed and lots and lots and LOTS of great documentation and tutorials: Python.
I won’t be giving up getting PAID to do PHP code any time soon because I have a great job with a great bunch of guys, and I get to work from home. But I just feel it’s time to focus my energies on something else. Python is very similar to Ruby, and let’s be honest here: I’ve got enough programming experience that there shouldn’t be much of a learning curve for me to figure out Python. Python code just looks nice and clean, less writing to get more done. That’s what I’m really looking for these days.
The simball web site continues to grow and get new features, so I will be leveraging CakePHP to the hilt in that respect. It’s an exciting time for CakePHP as they are heading towards 1.2 and preparing for 2.0. But I am not sure what my contribution to the project will be any more, which hasn’t been much lately but I am interested in helping push the CLI tools forward as not only can they help me, they can help other developers as well. But it is time for a change. Maybe one of these days I find a job programming in Python, or even manage to push Python in through the back door where I currently work. But the time is absolutely right for me to start learning Python and make it a tool I want to use on a regular basis instead of it continually being on my list of “things to do when I feel up to it”.
I’ve got my copy of “Dive Into Python” in PDF, been going through the Python tutorials (wow, the interactive interpreter is great) and getting ready to bust out a Django install. But make no mistake: PHP pays the bills, but it’s time to start using other people’s tools to get the job done. Time to quit fooling myself that I’m going to make some sort of earth-shattering contribution to PHP, and save my brainpower for learning Python the way I’ve learned PHP.
Wish me luck!
Article Tags >> PHP || Python
Posted by Brian D. on 01.01.08 at 10:35 pm
I’ve also been floating the idea of learning Python. I think it would be a good language to learn for the reasons that you listed and many more besides. Do you think you’ll blog about learning it? If you create a hobby project in Python, where would you host it? I’m so accustomed to the ease of finding PHP hosting that I wouldn’t even be sure where to start looking for Python hosting (Google, I guess).
I’m still reading “Hacking Vim” but after I finish that I want to start working on a new language. I’ve got a friend that has almost convinced me to try my hand at C# (I have a Java background) just to do a complete 180 degree turn from the PHP world.
I do think it’s important for developers to familiarize themselves with multiple languages. HR peeps don’t realize how important it is to get a good developer, as opposed to a good “PHP programmer.” But that’s a whole ‘nother topic.
Posted by J Wynia on 01.01.08 at 10:35 pm
“I started to see things that made me uneasy about it: … the attitude of some of the more senior “core” guys in Rails, and the zealotry displayed by users of it.”
Hmm. Those are, ironically enough, some of the same misgivings that your own behavior in CakePHP circles has given me about CakePHP.
Posted by Chris Hartjes on 01.01.08 at 10:35 pm
@J Wynia
Oh, I’d say that I am not typical of the senior core people in CakePHP. You don’t have to like *me* to like what Larry, Garrett and Nate have done with CakePHP.
I also think you are confusing “loud-mouthed, opinionated idiot” with “zealot”. I don’t cram CakePHP down people’s throat, I just tend to yell quite loudly when expressing my opinions in mailing lists. Sometimes I’m right, sometimes I’m wrong, but I’m right more than I’m wrong.
Say, you’re not the person maliciously rating all my posts on the CakePHP mailing list to be 1 out of 5, are you?
Posted by Pablo Godel on 01.01.08 at 10:35 pm
Chris,
I tried a few times to make the switch because I felt bored with PHP. I learned C# (which I like) and some other stuff. But I could not make the entire switch since I didn’t have a job in that new area, so I always came back to PHP. Also, I think what it bored me was the projects I was doing with PHP. Once I started doing some cool stuff with Ajax, Flex and other integrated technologies, everything got more interesting..
Just my 2cents.
Keep blogging, Pablo
Posted by Chris Hartjes on 01.01.08 at 10:35 pm
@Pablo
I’ve never really “left” PHP because it’s always been what I get paid to do, but I’ve gotten to the point where I need to branch out and try some other stuff. Python looks like it’s a good fit for my programming style and desire for a minimalist approach to things.
Ajax? Done that. Flex? Got the book but I’m no Flash jockey so who knows if I will ever drop the coin on a copy of FlexBuilder and make something. I just feel like I’ve done everything I’m going to do with PHP and it’s time to investigate some other tools to see if there really can be a life for me beyond PHP.
I just need to get smarter about my work: stop reinventing the wheel, leverage the tools I have and focus on doing things right instead of just doing them.
It’s not about the projects because, really, I have an attention span of about 6 weeks for a project and then need to find a way to be internally motivated to keep going past that. Luckily, where am I now I’m able to have release cycles that are right around 6 weeks in length so it never becomes truly boring.
And don’t worry, I won’t stop blogging any time soon.
Posted by kabturek on 01.01.08 at 10:35 pm
We’re on the same wagon Chris. Python is indeed a great language. Bu I myself have choosen Pylons as my framework of choice right now.
Posted by J Wynia on 01.01.08 at 10:35 pm
@Chris: You actually only tied zealotry to the *users* and mentioned the “attitude” of the senior developers. It was the latter that I was comparing to your own behavior.
It matters little whether your behavior is “typical” of other senior CakePHP developers given that it is the most *visible* of that category of behavior. Visible behavior gets extrapolated to be viewed as representative in many situations.
I do find it telling that in every single interaction I’ve had with you thus far, you assume that I’m someone else who’s already wronged you in some way. I’ve got much better things to do than vote someone’s posts to a mailing list down.
I only posted a comment here because I saw this post in my feed reader. I subscribe to your site in spite of your being a “loud-mouthed, opinionated idiot” because there’s enough signal for me to be willing to deal with the noise.
I have, however, also created a filter in my email client to kill your postings to mailing lists for the reverse reason: too much noise for the signal.
I can do both and have no emotional investment in either.
I spoke up, as I have in other situations, when I found a statement particularly ironic or otherwise worthy of note.
And, someone who is a self-described “loud-mouthed, opinionated idiot” with a high profile as a part of a software platform mistrusting another platform because of the attitudes of that platform’s senior developers is an instance of that kind of mildly amusing ironic cognitive dissonance.
Posted by Chris Hartjes on 01.01.08 at 10:35 pm
@J Wynia
Woah…lots of hostility in that comment. While I do tend towards being a loudmouthed idiot, well, some of what you said here is just flat out wrong.
1. I’ve never assumed you are someone who has already wronged me. I assign those labels based on what people say to me AFTER I start talking to them.
2. Glad you find the info on my blog useful. Don’t know how much “noise” there is here to distort the “signal”.
3. It’s shame you filter out all my postings to the mailing list, because others will tell you what I say to them has lots of value. Not every one of my responses degenerates into flames.
4. We’re all hypocrites in one form of another. Often you become the very things that you hate, but I think it’s a stretch to paint me as some sort of CakePHP zealot.