Tuesday, June 2. 2009
Upcoming posts - keep watching
Just a quick note on what is going to be posted in the next few weeks – I’ve got a few significant pieces in mind for various topics – including:
- Doing the work elsewhere – asynchronous queues
- Mail queuing, on a vast scale
- Self stubbing mocks
Finally, I’m going to be doing my ZCE exam in the next week or two – quite possibly on Thursday 3rd June. Keep a close eye here, and on my Twitter @topbit for the results, and a follow-up.
Monday, March 24. 2008
Always have up to date documentation, part #2
see my previous post on the topic, #1.
My last post ended up more as a how-to than what-to. This time, I’ll say why you should have local copies of the documentation for most of the tools you use. I’ll also tell you the sort of things I always have handy as well.
Getting a local copy of php.net – and getting installed as an apache vhost and updated (probably weekly) is some effort, but well worth it. I’ve said it before, but PHP.net is the best language reference site that I’ve seen. It’s kept up to date (sometimes ahead of the code releases in fact) and while the notes that are added to it can sometimes confuse, as much as help, when they do help, they will really make the difference.
I don’t tend to buy many PHP books, because what can they do besides re-iterate what is is already there?
The most important thing to bear in mind though is not to just have the documentation there to read – you have to know what is available. Projects like PHP, the Zend Framework and PHPUnit have a lot of parts – and knowing that they have things – even if you don’t know how they work right now, can save you days or weeks of effort.
It’s for that reason that you need to at least scan over all the the docs you have – and indeed for all the libraries and tools that you use. Even I don’t read everything and expect to remember it all – but I remember enough to recognise that a paticular tool might have something to help – maybe PHP has something to search the values in an array (http://php.net/array-search), or can use Oracle, or Ldap, or Memcached, or that Zend Framework can let you easily loop over maildirs (or an mbox) to get each mail from within it. If you don’t read the manual – at least skimming over it, you would never know that functionality exists, and you inevitably end up reimplementing other people’s already debugged code. That’s a waste of your time.
So, take an hour now, and assemble a directory to put these docs into, and read through them – not everything, but at least look at headers of every section, just to get an idea of what is available and maybe go back and read up some more on things that may be useful to you. If something isn’t so interesting to you now, do bear in mind, your next project, or job, might change that.
Above all, keep learning. Never stop.
Continue reading "Always have up to date documentation, part #2"
Monday, March 17. 2008
Know thy tools first of all
Just a quick tip here, and I’ll expand on it below the cut.
When you have a library, like PEAR or Zend Framework – or ven just the whole PHP language library – it’s absolutely vital you know what it can do.
What you don’t know can cost you weeks of effort and pain. I found this out (again) today, but it’s not my pain – it’s an employee who was too busy deciding that the Zend Framework wasn’t suitable for a simple cron-script task, he has spent most of the last few weeks duplicating something that is not as good as what I could write – with ZF – in about an hour.

Comments
Wed, 28.10.2009 20:56
Multiple workers running is no t a problem – Beanstalkd will keep the jobs separate even if multiple ones are reser [...]
Wed, 28.10.2009 19:47
Is there any way to run more t he 1 worker (bash script) at a time?
Fri, 26.06.2009 00:13
Hi, What kind of beanstalk client library do you use or h ave you written your own? Is i t in PHP space or a C ex [...]
Mon, 22.06.2009 21:28
Hi, Good post. I am also pl aying with beanstakd and I am waiting for the rest of your p osts. Greetings, Alf [...]
Mon, 24.03.2008 19:30
Sun, 16.03.2008 23:45
Sun, 16.03.2008 21:31
Although example shown was usi ng Windows (my desktop) there is no reason why this can’t be used on Linux or as we [...]