8 Jun 2007
event

Got the invite and now wondering what on earth I’ve let myself in for. Panic time.
Friday afternoon update
It’s almost here. I’m not ready at all. I’ve booked an hotel (I’m too old to crash out on the floor in a sleeping bag), checked maps and train timetables, bought some little oranges to see me through the day and started panicking. I’m now having visions about 500 programmers, all of whom know each other, and all of whom know what they’re doing. And I’ve just realised that I do not have a digital photo of myself anywhere, so I’ve updated my backnetworkprofile with evil Alice.
My big problem is thinking of something to do – I can take other people’s ideas and run with them, and build an application which works, but I’m not great on inspiration from a standing start. I need an inspirer. Or (honest to God, I didn’t make this word up), some idearation
7 Jun 2007
freelance, time management
Advice on personal productivity from Marc Andreessen (co-founder of Netscape):
… don’t keep a schedule … By not keeping a schedule, I mean: refuse to commit to meetings, appointments, or activities at any set time in any future day.
When someone emails or calls to say, “Let’s meet on Tuesday at 3”, the appropriate response is: “I’m not keeping a schedule for 2007, so I can’t commit to that, but give me a call on Tuesday at 2:45 and if I’m available, I’ll meet with you.”
Of course, this advice comes with lots of caveats, and apparently it doesn’t work for everyone (you don’t say), although it does work for that well-known guru of business productivity, Arnold Schwarzenegger.
I’m still boggling.
5 Jun 2007
design
I loved this – www.noonebelongsheremorethanyou.com Breaks soooo many rules about web design and accessibility blah-blah-blah, but I loved it. Essentially an online ad, but such a witty one.
subversion, working
I’m getting serious about using source control (although you can call it version control if you want to) for my projects.I’ve been using subversion for about a year now, and have had a few applications under source control, but since I’m a sole developer there’s never been the urgency you get in a shared environment. In other words, I’ve never had the kind of major disaster which really convinces a development team to take source control seriously. (Usually happens after one programmer realises that their code has been overwritten and tries to murder the culprit.)
But even on my own I’ve found it very very useful.
- I like the separation between the repository and my working folder
- I like being able to get a historical list of changes made. And yes, I do log sensible comments, not just ‘code updated’
So, from now on, all live projects are going into source control.
Eric Sink on Source Control
4 Jun 2007
php
I’ve recently been using Php Swift Mailer and will now be using it for all my php applications which require email.
The initial impetus was I needed to send mail via a SMTP server which required authentication, and I also wanted to setup and post multipart (text + html) messages and messages with attachments. Swift Mail does both of these very nicely.
It also checks for mail injection attacks, which php mailer doesn’t, so I’ve ditched my own message checking code in its favour. This matters, because I’ve been noticing a LOT of mail injection attacks / site hacking attempts on one of my php sites recently.
1 Jun 2007
debugging, php, programming
One of the problems I’ve always had with PHP error handling is catching the fatal errors. If a php script encounters a fatal error it stops, and the desired error handling code does not get executed.
So the user will (usually) be confronted with a blank screen and, worse still, since the error isn’t logged I don’t know about it and therefore can’t fix it.
It’s a rare and confident user who will report a blank page or other such glitch; people are so used to working with a certain level of pain when using a computer that they just assume it’s unavoidable or that it’s been caused by their own inadequacy in some way.
Anyway, (thank-you PHP London user group) I now have a solution using the register_shutdown_function()
<?
register_shutdown_function('cleanExit');
// ... go and do all sorts of exciting stuff ...
$running = false;
function cleanExit() {
if ($GLOBALS['running'])) {
// script is still running - it's an ERROR
// tell Bronwen about the error
// tell user it's not their fault
}
}
>