Script Wrappers in PHP

24th February 2011

Tags : .htaccess, Apache, Bodges, Code Examples, Idiocy, Linux, PHP, WHM/cPanel

I'm guessing that most web developers with a few years of experience have at least one nightmare client. I'm currently struggling with a total arse of a project. This one in particular was originally built some years ago by a predecessor of mine who, to be fair, was fairly lazy in a lot of respects.

Continue reading "Script Wrappers in PHP"

Stupid Client Quote of the Day

22nd February 2011

Tags : Clients, Idiocy

During a meeting with one of my clients, she noticed that the mouse and keyboard we were using were wireless. I guess she'd never seen a wireless mouse before:

"Oooh, this mouse has no ropes!"

I honestly have no idea how I kept a straight face.

MySQL and the Importance of Indexes

22nd February 2011

Tags : Basics, MySQL

One of my clients has a rather large shop, with in excess of 40,000 products over a couple of thousand multi-tiered categories. Recently the company's website started to run slowly, seemingly at random times of the day. The reason was surprising.

Continue reading "MySQL and the Importance of Indexes"

Stupid Client Quote of the Day

26th February 2010

Tags : Clients, Idiocy, Rants

"I want the logo changing of course... I want it to... Umm", (looks blankly for a few seconds), "umm... web two point zero".

Thank God it's Friday.

Developer Says 'No'

3rd February 2010

Tags : Clients, Idiocy, Rants

I've just had an interesting discussion with one of my accounts managers which raised the question: when do you say 'no' to a client's request?

Continue reading "Developer Says 'No'"

MySQHell

12th May 2009

Tags : MySQL, Rants, Windows, Linux

I've just had a nightmare of a development problem. In a nut-shell, I've had to import data, (specifically content articles), from one server to another.

This is normally not a problem, but in this instance the source database had each article's content split into multiple 'page' rows. Also, the source database was developed and hosted by another company. They refused to install PHPMyAdmin, (for "security" reasons), and would not give me FTP access. All I had to work with was a terrible database admin system which they'd cobbled together.

My plan was to dump the data into a new database on our server, manipulate it there, then move the shiny clean data over to the live system. Things did not go to plan...

Continue reading "MySQHell"

Web Designers

15th November 2008

Tags : Rants, Web Design, Random

What it is with web designers and gradients? Oh yeah, rounded gradient edges, they're the worst. Bloody designers, I ask you...

Alternating Row Colours

30th October 2008

Tags : Javascript, DOM, Code Examples

I like to use alternating row columns in tables. If the tables in question are static HTML then updating the row colours, (when adding/removing/shifting rows), can become a real chore.

Using some of the wonderful W3C DOM Methods within Javascript I came up with a simple function to do all the work for me.

Continue reading "Alternating Row Colours"

Ubuntu Vs. Broadcom

2nd September 2008

Tags : Linux, Vista, Bug Fixes

I have a Compaq Presario F500 laptop, which comes with a built-in Broadcom wireless network adapter. Vista Home Premium came pre-installed, but the system only has 1Gb of RAM, which is the it's maximum.

Vista is so power-hungry that things were never going to go well. The straw which broke the camel's back came one Sunday afternoon when I was surfing the web while listening to music on WMP. I navigated to a site with an embedded flash video and the system froze, completely. I rebooted and tried again but got the same problem, the system was totally maxing out. It's worth mentioning that I already had Aero and all the fancy, (read sparkly; pointless), effects turned off. I came to the conclusion that Vista had to go.

Continue reading "Ubuntu Vs. Broadcom"

Array Looping in PHP

2nd September 2008

Tags : PHP, Code Examples, Basics

I remember back when I as learning PHP I had to write a directory "spider" function to list the contents of a directory. (Including sub-directories).

The approach I took involved reading the initial contents of the base directory into an array. The plan was then to loop through the array adding any sub-directories, (and their files), recursively.

Continue reading "Array Looping in PHP"