How and Why I started coding in PHP?
Lessee... July 2000 I started a new job as a web developer. The company boss had told me that the recruitment officer from the agency had told him that she'd seen me reading a textbook on SQL while I was waiting for my interview; apparently this "self-education" thing impressed him. (Helpful hint there, lads!)
A couple of days after first meeting the boss, he called to say I had the job. Monday morning I went in and met the other three developers; one of the two seniormost was preparing to move on, which was why the company was looking for new staff.
Their current big job - with the usual impending deadline - was for a major appliance manufacturer. The product sections of course were all database-driven, and I got some of these to do.
Now, let me make this clear: until this point I had never actually heard of PHP at all, and my knowledge of SQL was purely theoretical (in fact, based entirely on that book I'd been reading before the interview). But once I was sitting at my PC and staring at the source code on the first day of work I kinda felt it wouldn't be too smart to say so. At least until my probationary period was over....
Now my real computing background is thoroughly academic. And even the fact that it had anything to do with computing was somewhat incidental. I'd seen (as opposed to worked in) all sorts of odd languages (ranging from Pascal to brainf**k to some that never see the outside of CS departments) - and that was way back when computers easily cost millions and filled rooms. So: clench teeth, grin widely, say "I can do this", and begin figuring things out.
I mostly cut-and-paste bits of already-written parts without fully understanding what they did; saw the results; fiddled and saw what changed; and by the end of the week had written something that worked! And not only that, but that something was the script I'd been supposed to write!
Well, I was happy, the other developers were happy, the boss was happy, the manufacturer was happy and the employment agency was happy. Warm fuzzies all 'round. And that script is still outputting pages today.
Obviously, today I'd write it differently but for one thing this was in PHP3, and for another - well, the important thing is to get it up and running. If you can make it conncinitous in the available time, great, but so long as it doesn't spew errors or run like a dead haddock it should satisfy. You may be able to sneak in afterwards and do tweaks later. If they're happy first time around, they'll come back and ask you to add more features. While you're waiting for them to ask, you can tinker with a copy of their site and figure out what other improvements you can make at the same time as fulfilling their wishes. (And if such tinkering itself fulfills their wishes, you can even bill for it - and give very well-considered quotes into the bargain!) Know Thy Site.
I found php.net and started reading bits and pieces of the manual; found better ways of doing stuff; tinkered and experimented; found other better ways; rewrote the same bit of code half-a-dozen times in different ways. Clients came in with all sorts of weird and wonderful requirements, which meant all sorts of weird and wonderful programming tasks. The fact that web-based content administration was a standard feature of our products meant that even something that was little more than a photo gallery required sufficient coding that even a total computing neophyte could maintain it.
These days PHP programming is one of the skills I contract on at rates varying between - um - something like €20 - €80 an hour depending on circumstances. (And I occasionally dream in PHP...).
Ah, now that was a pleasant stagger down Memory Lane - hey, any good pubs at this end...?