Why we should not use enums in databases.

The problem with enums in databases are many fold. They are tempting because it seems like they make your database more readable, however. I avoid using them and as of today I’ve never found a good use for them which doesn’t fall foul of one of the many problems that designing a database which contains enums leaves you open to.


Flash always ontop of page content.

I had this problem today with Flash (SWF) content appearing ontop of a JTip popup. I tried changing the z-index within the CSS, but it didn't work, it took me a long time to discover what needed to be done to fix it, but basically it was quite easy;

1. Add the following parameter to the OBJECT tag:

<param name="wmode" value="transparent">

2. Add the following parameter to the EMBED tag:



The dangers of global variables revisited because of PHP.

In 1985 after about two years of full time programming I had an epiphany; realising that global variables are a very bad idea. Roughly 20% of the bugs that I kept finding were down to abuse or misuse of global variables, so I stopped using them, apart from the time when you really should use one (e.g. for a pointer to global shared memory that never changes).

So here I am over 20 years later, and I've just realised exactly the same thing, except this time it's in PHP not 'CORAL' '66'.

The danger of the using words new latest and old updated newer in any names

The danger of using the words that relate to time and freshness in names, such as old,newer,latest and updated.

How to use alpha blending on websites to create cool looking effects

Alpha blending is now possible thanks to improved browser support for PNG images with an alpha channel.

In essence the alpha channel controls the visibility and I use this together with layering images atop each other to provide texture and colour to style page elements.

Syndicate content