Category Archives: Perils of Software Development

Form plan

Des Traynor talks about interfaces on this podcast and hit the nail on the head. You need a plan, a grand vision of things before writing software. Or at least know what tasks you want your users to accomplish. So let me tell you what happened while I was developing a gaming website based on […]

What does this function test?

A function wrote by a co-worker: 1 2 3 4 5 6 7 8 9 10 11 function test($what, $where) { if (!empty($where)) { if (!empty($where[$what])) { return $where[$what]; } else { return ”; } } else { return ”; } }function test($what, $where) { if (!empty($where)) { if (!empty($where[$what])) { return $where[$what]; } else […]

Required date and optional time fields, how to store it?

Say you have a form where your user can input a required date (MM-DD-YYYY) and an optional time (HH:MM). How do you store this? You can be tempted to store it as a timestamp (seconds since the Unix Epoch, for example) on your database, because it represents a date + time. But if your user […]