Category: 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: function test($what, $where) { if (!empty($where)) { if (!empty($where[$what])) { return $where[$what]; } else { return ”; } } else { return ”; } } When I had a look at this function I immediatlly tought: Test? What does it test? Thankfully there’s the $what argument! And look! A…
-
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…