Recent updates in 'Geek'

Ahhh… Javascript… (plus how to detect iPhone viewing of your site)

Ahhh... Javascript...  (plus how to detect iPhone viewing of your site)

The insult generation obsession renewed and continued…  I cleaned up the javascript code for both the classic and iPhone versions of the Textual Abuse page.  It was seriously ugly to get around some really old misbehavior of random numbers in Netscape and because I was a doofus when I originally wrote it.  Ok, still a doofus, but now at least one with some pride. Besides, de-dumbassing the code, I also added a method of emailing the insult, thus making this quite possibly the most useful application I’ve ever written. Now with just a couple of taps of your finger, you can send a classy message like this to your fat, ugly, stupid republican female friends in just seconds:

You vermin-ridden, Huckabee-loving, obtuse, bovine, vomit-inspiring, hog-humping hag!!!!      

 My next task is to actually improve the insults a bit, they’re still pretty lame and very much in the mentality of me as a 26 year old. I’m older and dirtier now… I also have to improve that icon…

I also spent some time researching a javascript method of detecting the iPhone (and iPod Touch) users when they come to the “classic” version of the Textual Abuse page.  Most methods I found depend on finding the string “iPhone” in the user agent string.  This is a problem now because of the iPod Touch users – certainly wouldn’t want to lock them out of the fun.  So the solution can be found at the Apple-hosted, open source WebKit development project, where they’ve put together a nice javascript library for just this purpose.  Apple has more info on this subject and the user agent at their developer site as well.

Late night activities

Late night activities

I now take a break from the day job to tell you about the night “job”.  I decided (and may regret later) to break-out some of the earliest code I ever wrote and play with it a bit…  Clearly bored and in need of some coding (waiting for contracts to be signed in day job, so no coding allowed yet).  When wife’s head hit the pillow at around 10:30pm last night, I started hacking…   The result (after about 3 hours of trying to understand HTML and CSS again) is a slight revival of the original crusty old Textual Abuse Page, and yes, of course, an iPhone version.  Same old ugly javascript code, updated slightly and a little less ugly through magic of CSS (and the nice open source iUI CSS and JS code on the iPhone version).   Will improve more on next sleepless night – betterworse language and better UI needed.

Why no PC for me (a rant)

I admit it. I’ve looked at the Circuit City and Best Buy ads and considered the $699 laptops and other PC’s and thought that maybe that would be the way to go for my next computer. My Powerbook is aging (3 years) and the HP nc6400 that I do my paid work on is admittedly speedy (and as a 2.33Ghz Core2 Duo it should be). But I can’t do it. I’ll buy another Mac even if it means waiting until I can afford it.Tonight was just one more episode that showed why. Not that I needed another, especially after slowing myself down with Vista (new software project, gotta have it) and suffering through it’s idiotic and never ending User Account Control dialogs (“A program needs your permission to continue…”). Nonetheless…
I’m out of town staying at Mom’s/Grandma’s with my daughter and she and I just want to watch a bedtime movie. I eye the 12″ Powerbook or the 15.5″ widescreen display of the HP. Obviously X-Men 2 will look better on the big screen so we go with it. Put in the DVD, nothing happens. Ok, no problem, I go to the DVD in My Computer and launch from there. The preloaded DVD player from HP comes up and we wait for a a bit until we get the first error message. Then the next error message (same message, DLL xxx failed to initialize), then the next. [Read more →]