Current Reading

Recent Comments

The Others

Categories

Subscribe to my feed!
a long series of disappointments - quiet despair

Archive for the 'code' Category

Interfacing With Another Species 7.2 Ksecs Too Early

I’ve been scheduled for a conference call without my input on the time for more than 7Ksecs before I usually resume consciousness.  In the past this has usually resulted in disaster for the other involved parties, as I typically can’t resume from standby that early, let alone speak in coherent sentences or form what humans [...]

September 29th, 2008

A little regex in php for fun

So after working thirteen hours in a row I came home and thought of a handy function to bandaid some legacy code that returns a url with double slashes after the TLD. I realize this is a worse solution than fixing the code in question, but my regex-fu could use work so I though I’d [...]

August 14th, 2008

Warning: SQL Statement is Missing SQL

I found some great code at work today I’d like to share. I’ve omitted anything that might qualify as a trade secret or proprietary information. I’ve also changed the names of the innocent variables to make it more readable. Also, this won’t be funny if code makes your brain hurt.
Here’s the error I kept finding:
Warning: [...]

March 26th, 2008

In which a system administrator is an idiot

I recently did some freelance work for a friend of mine. It was extremely basic, just adding some includes so he didn’t have to manage a hundred different navigations for each page he had made. Well, I did it fast and I skipped some basic checking in my script. My code would work unless you [...]

March 9th, 2008

To copy a file

Recently a friend asked me how I would go about copying a file on his Windows machine to the same directory but append the date to the filename in the standard ISO 8601 format (YYYYMMDD) with the leading zeros, of course. At first I gave him the following answer for a windows batch file:

SET [...]

September 21st, 2007

the nature of

xml is not the solution to everything. nor are massive arrays that dynamically build content based on business logic. I’m paying for this even though I didn’t write the code which I’m now fixing to address the client’s whims. I accept that, I can even solve it. Database administration I’ve learned but an eighth of, [...]

October 4th, 2006