One of the most hotly contested points of my article on database design was the suggestion that developers drop the use of ENUM and use something else instead. Lots of people argued in favor of ENUM; however, there are several good reasons why developers should reconsider ENUM and use it sparingly.
There are three core reasons why ENUM is a data type that should be reconsidered.
Wednesday, November 25th, 2009 @ 1:00 am |
Comment (19) |
Categories: Technology, Best Practices, Databases
Tags: data types, Databases, data structures, database architecture
Last week, I received an email from someone who told me how the Suhosin patch had created problems for their team, and suggested that I write about it here. I thought this was a great idea, for a number of reasons. Particularly, Suhosin is one of those PHP patches that alters the way PHP operates in a fundamental fashion, yet also is installed by default in many places (for example, Ubuntu compiles this patch in by default on their installation).
For starters, what is Suhosin? Suhosin is a PHP patch that “hardens” PHP’s security features. The makers of Suhosin describe it in this way:
Wednesday, November 18th, 2009 @ 1:00 am |
Comment (8) |
Categories: Best Practices, Security, Technology
Tags: php development, Suhosin, gotchas
A great feature of PHP is the ability to throw and catch exceptions. This feature was introduced in PHP 5, and has been around for years in other languages like Python.
Exceptions make it easy to interrupt program flow in the event that something goes wrong. They allow you to customize how a program handles errors, and gracefully degrades an application. This week, we will discuss various exception handling techniques, and today we will discuss the basic dos and don’ts for exceptions.
Monday, November 9th, 2009 @ 1:00 am |
Comment (9) |
Categories: Technology, Best Practices, PHP 5, Object-Oriented Development
Tags: exceptions, exception handling, throwing exceptions
Nearly a decade ago, Joel Spolsky came up with a method by which to evaluate software development shops that has come to be known as the Joel Test. This crucial test evaluates a software development company on the basis of twelve criteria points; Spoksly said that “a score of 12 is perfect, 11 is tolerable, but 10 or lower and you’ve got serious problems. The truth is that most software organizations are running with a score of 2 or 3, and they need serious help, because companies like Microsoft run at 12 full-time.”
Wednesday, November 4th, 2009 @ 1:00 am |
Comment (15) |
Categories: Technology, Best Practices
Tags: refactoring, joel test, Best Practices
Last week I wrote about some optimizations you can apply to your code that will improve the performance of your site significantly. I also mentioned that regularly an article pops up talking about ways to shave time off your scripts, and I talked about how these articles mostly are bunk. Like this one.
Monday, October 26th, 2009 @ 1:00 am |
Comment (9) |
Categories: Best Practices, Technology
Tags: PHP, micro-optimization, foolishness
Time and time again, I come across code that contains a variety of array-handling functions that too often duplicate the work that the PHP core team has done to develop built-in array functions. Since the built-in functions are inherently faster, trying to reimplement them in PHP will inevitably be a performance problem.
Here are five of my favorite array functions, along with their signatures and what they do.
Wednesday, October 21st, 2009 @ 1:00 am |
Comment (22) |
Categories: Technology, Best Practices, General PHP
Tags: array, internals, PHP
|« Older Entries|