Create A Neat UUID

For any seasoned ColdFusion developer you will be well aware of the CreateUUID() function in ColdFusion that generates a unique string.

Here’s something that I use on a regular basis, just to neaten up the generated string:

<cfset request.thisUUID = Replace(CreateUUID(), "-", "","ALL") />
 
<p><cfoutput>#request.thisUUID#</cfoutput></p>

This then produces a 32 digit string.

Another way of generating a custom uuid is:

<cfset request.dateUUID =
    "#DateFormat(Now(),'YYYYMMDD')##TimeFormat(Now(),'HHMMss')#" />
<cfset request.2digitUUID = RandRange(10,99) />
<cfset request.myUUID = "#request.dateUUID##request.2digitUUID#" />
 
<p><cfoutput>#request.myUUID#</cfoutput></p>

This then produces a 16 digit string. The thing I like about the above example is if it is used for say order id’s then just by looking at the UUID you know when it was made.

Ensuring An Intelligent Government

Here’s a little joke that was just emailed to me:

President Mbeki meets with the Queen of England. He asks her, “Your Majesty, how do you run such an efficient government? Are there any tips you can give to me?”

“Well,” says the Queen, “the most important thing is to surround yourself with intelligent people.”

President Mbeki frowns. “But how do I know the people around me are really intelligent?”

The Queen takes a sip of tea. “Oh, that’s easy. You just ask them to answer an intelligence riddle.”

The Queen pushes a button on her intercom. “Please send Tony Blair in here, would you?”

Tony Blair walks into the room. “Yes, my Queen?”

The Queen smiles. “Answer me this, please, Tony. Your mother and father have a child. It is not your brother and it is not your sister. Who is it?”

Without pausing for a moment, Tony Blair answers, “That would be me.”

“Yes! Very good,” says the Queen.

Back in Cape town, President Mbeki asks to speak with vice president Zuma.

“Answer this for me. Your mother and your Father have a child. It’s not your brother and it’s not your sister. Who is it?”

“I’m not sure,” says the vice president. “Let me get back to you on that one.”

Zuma goes to his advisors and asks every one, but none can give him an answer. Finally, he ends up at the V&A Waterfront and bumps into Evita Bezuidenhout. Zuma looks around to see if anyone can overhear then whispers, “Evita! Can you answer this for me? Your mother and father have a child and it’s not your brother! or your sister. Who is it?”

Evita whispers back, “That’s easy. It’s me!”

Zuma smiles and says “Thanks!”

Zuma goes back to Parliament to speak with President Mbeki. “Sir, I did some research and I have the answer to that riddle. It’s Evita Bezuidenhout.”

Mbeki gets up, stomps over to Zuma, and angrily yells into his face, “No, you idiot! It’s Tony Blair!

I hope that put a smile on your face.

Dreamweaver 8.0 Code Wrapping

If you are finding the default setting for Dreamweaver’s code display where it wraps lines of code automatically very frustrating then here’s how to solve it:

View > Code View Options > Word Wrap

Thanks to Michael van Leest for this tip.

EMS SQL Manager 2005

Anyone who has had exposure to Microsoft’s Enterprise Manager for SQL Server will know just how awful the software is to use. I got so frustrated with it recently I went on the hunt for an alternative…

EMS SQL Manager 2005 does what Enterprise Manager should do, by default. With EMS SQL Manager you can view databases (whilst hiding the system bits that you’ll never need to access), print out useful stuff (tables, fields, stored procedures, triggers, views etc) and so much more. The interface is very user friendly and well thought-out.

I can highly recommend this software to anyone using SQL Server.

TemplateMonster Wordpress Themes

Just noticed that TemplateMonster is offering a few FREE themes for Wordpress.

Go check ‘em out now, they’re actually quite good! Update: they’re not good at all. These are fine examples of someone trying to code like accessible-aware coders, but not understanding the reasoning behind why it is done.

José González - Veneer

After seeing the Sony Bravia LCD TV commercial on television (the one with the 250,000 coloured balls bouncing down the street) I had to find out who did the song featured. After some Googling I found out that it was recorded by a Scandinavian (of Argentinian descent) and appears on his album called ‘Veneer‘.

‘Veneer’ is a quality album that even after a few dozen plays, will still feel good to come back to whenever you’re thirsty for something sombre and beautiful.

Travel Sickness

I’ve just placed an order for the ‘Travel Sickness’ boxset, released by Hymen records.

This exciting release is strickly limited to 500 and is presented as 8 3″ cds in a wooden box. The contributing artists are Lusine ICL, Solarx, Lowfish, Gridlock, Psi Spy, Snog, Hecq, and Mad EP.

I had a look on a UK music site and to order the boxset (incl postage) would have been £50, but after a quick email to the record label in Germany I’ve managed to get the boxset for £30 including postage.

I can’t wait for it to arrive.

FilmFour for the masses

Channel 4 have annouced that from July of this year FilmFour will become the UK’s first free digital film channel.

This is all wonderful, but only if the digital tv providers sort out their ‘bandwidth’ problems we have recently been experiencing. Recently we’ve had to resort to view terrestrial tv due to constant problems with receiving the free-to-view digital channels via the freeview box.