Friday, 8th October 2010
Wednesday, 6th October 2010
Tips for Working With Dates in PHP
I've often found dates in PHP to be a bit of a pain to manage. A variety of similar functions in the language make it unnecessarily complicated to do what you need to do. Getting the current date is one thing, but how about adding a set number of days to a date in the future? It's possible, but not particularly intuitive. Here are a few tips to…
Error Reports: How to Isolate a Bug
Whether you're a tester reporting bugs or a developer who's trying to clarify a bug report, isolating bugs can be something of an art. Some bugs are really obvious, such as if you go to a site and every page is down with a server error. Other bugs are much harder to report, as they only occur in certain circumstances. Here are some tips for…
Monday, 4th October 2010
How To: Build Features That Work Really Well
You've been asked to build a jump box that will allow users to type into a box and search for a customer id. This is a really simple feature - so how do you build it? The trick is to build the basic functionality, and then try it out. See what you've missed, then go back and make some tweaks. This isn't so much about fixing a bug or two - it's…
Database Planning: Avoid Missed Fields
Back when we showed you how logging can save you, we touched on the subject of listing fields prior to building your database. Once you've been building software for a while, you may find yourself jumping into the development stage before you're ready. In some cases this may work just fine, but if you end up missing some critical functionality…
Wednesday, 29th September 2010
How To: Speed Up the WordPress Admin Panel on a VPS
A few weeks back, I gave some tips for how to speed up WordPress on a VPS. Several readers suggested using WP-SuperCache. This is a good suggestion, but in my case, it didn't work. After a bit of investigation, I discovered that the load issues appeared to be coming from the WordPress admin panel. As far as I'm aware, WP-SuperCache won't help…
Rollyo: A Fast Way to Make a Searchable Aggregator
Rollyo is a simple way to "roll your own search engine". You can get started by choosing a few pre-defined categories - these contain a list of URLs that you can add to. It gets a bit more interesting though if you add your own URLs though. From the homepage, click "Create Searchroll" and you can build a custom search engine.
Monday, 27th September 2010
Error Messages: Help Users to Understand What Went Wrong
Error messages. Not the critical ones that require admin intervention, but those informative bits of text telling you that you missed a field on a form. Chances are, you won't see a 100% success rate when people fill in a form on your site. The more complex the form, the more likely it is that people won't reach the end. Forms should be easy to…
Friday, 24th September 2010
Developer Discussion: Do You Use Helpers?
It's Friday, so it seems like a good opportunity for a discussion post. Today we'll be talking about helpers - basically, any kind of tool that makes your life easier as a developer. As the name suggests, helpers can be quite helpful. Apparently, developers are lazy, so anything that makes life easier for us is good. Right?
PHP Security: Sanitizing Strings, Validating Values, and Interrogating Integers
Trust no-one. Not just a tag-line for The X-Files, it's also sound advice when dealing with data supplied by users. Whether a user is trying to do something nasty or they've just hit an unfortunate combination of keys, you shouldn't assume that what you're saving is trouble-free. Here are some tips for validating input in your PHP application.