Dear Sir

Today.... No Comments »

Thank you for your unencrypted wireless network.  It is going to make my stay in our apartment for this week most enjoyable.

Regards

Ray

Off to the Wedding

Today.... 1 Comment »

Time has become very short for myself.  I leave tomorrow for my wedding to my beautiful fiancee and will be out of contact until October.  Unless you’re coming to South Africa, I will be completely out of contact.  After the wedding, I’ll be completely out of contact for the honeymoon.  Sarah have you guessed where it is yet?

Cheers!

Back from the Stag

Life in London, Today.... No Comments »

Tired but happy.  More coffee please.  And Jon, can I please have the photos? :)

Note to Self

IT Chapters No Comments »

Never throw a paperclip at your fan on your desk.

SQL Server ORDER BY on Datetime without Time

IT Chapters, Tip 2 Comments »

Here is a small tip for SQL Server that I needed today.  We have a time based report of payments that we make for our clients.  This report is used to double check that all payments have been made and is required to be sorted by the date the payment was created and after that the client’s name.

However, on running the report we were getting weird orders in the query.  I tracked this down to the fact that we’re storing date and time for the date that the payment was created and our ORDER BY clause (ORDER BY DateCreated, Client.Fullname) meant that if the time changed, the ordering would restart for the Client.Fullname field.

So the obvious solution is to do an ORDER BY on the date portion only of the DateCreated field.  Since SQL Server stores the datetime records as 2 4 byte integers, we can do some math magic to strip the time.

The first 4 byte portion holds the days since the 1st of January 1900, with the second portion storing the number of milliseconds since midnight.  This means that we can simply convert the datetime field to a float value, run floor() which will strip the digits after the decimal point and then convert back into datetime.

Which works wonders.  Here is the SQL ORDER BY clause that we are now using in the system:

ORDER BY cast(floor(cast(DateCreated as float)) as datetime), Client.Fullname

Snapped

Life in London, Today.... No Comments »

I received a nice present on Friday.  After much deliberation, Sarah went and bought me/us a Canon 350D for our wedding present.  Wow, what a camera.  I haven’t finished the degree you seem to require to get through the manual but the photos that come out of this beauty are fantastic.  The quality and clearness are fantastic and the camera has such a brilliant shutter speed, I can’t wait to test this thing out properly.

Below is a photo I took of Sarah and Charlie this morning.  Click through to see the full sizes. 

Just the two of Us

Thoughts on the Past Week

IT Chapters 1 Comment »
  • Using caching properly in web apps makes for a striking speed difference.  As long as you keep the balance between memory usage and DB/File system calls, it makes your life a ton easier.
  • Microsoft Support, even though they are expensive, are worth their weight in gold.  There is no comparison to helping you through a problem.
  • Make sure your testers are doing a proper job.  Never give them the program and leave and expect to get the bug reports.  Check up on them to make sure the program is being worked through properly.
  • Never ever trust Access.
  • Don’t be afraid to ask for help.  Its the first step into a hell that you will never get out of.
  • Be prepared to stand your ground on your principles no matter the cost.
  • Drink less coffee. ;)

Thats the end to my working week.  Hopefully some time this week there will be time for some work on my pet project that is so close to a first pre beta release.  14 days until I leave for SA!