FlySwat's blog

We are all a little guilty of WTFCode

Like many people, my first experience programming was with Quickbasic. I was about 12 years old, and was obsessed with the console based role playing games of the time.

Not content to just play Dragon Warrior and Final Fantasy, I wanted to also make my own.

After a few weeks of hacking away at Quickbasic, I released a little demo of the game engine on the internet. I found it the other day, and the memories of this game are what prompted this post.


A common practice for handling small online forms is to simply e-mail the form content to someone. This is usually done for simple forms that will not receive much load. Note that I am not referring to using "MailTo" in the form action, but actually having the server send an e-mail.

I was recently asked to write one for my company with one minor caveat... They wanted the ability to upload a file with the form and attach it to the e-mail sent.


People who use Twitter know that the shorter a TinyUrl is, the more text they can fit on their message. For months the defacto standard has been Tiny Url, but somehow, someone managed to find and register a shorter URL.

Take a look at I23.org.

Sadly www.com is taken :(


While browsing Dzone, I stumbled upon this blog article:

Indian outsourcing is killing IT

While the article itself was a good thesis ruined by faulty logic and gross over generalization. It does warrant enough truth for me to want to comment on.

First off, I'm a software contractor, and because of that, I do work with a lot of people who were originally from India. Some of them are excellent, some of them are not so great. A few of them are downright horrible. What makes the difference?


This is the first of a multi part series that will cover designing and building a blog backend from the ground up. The goal of this series is to have a fully functional (albeit simple) blog backend as the final product of the series. We will focus more on good programming technique and design and less on the actual coding of the blog, writing just enough to make a functional example.

This series is not about creating the next MySpace, or Drupal, or any other CMS system. Instead I hope to use this to teach good database design and programming technique.


Today while surfing I stumbled onto this site:

Stripe your tables the OO way.

After reading it, I realized that it was hopelessly overcomplicated for what it needed to do, so I thought I'd write a better one. I borrowed the style sheet and table from his page, and wrote the following javascript:


The online community has been buzzing about the rumors of the Google Phone.

Supposedly, Google has contracted HTC (Manufacturers of smart phones such as the Dash, Wing, and MDA) to create a custom Linux based smart phone for them to market.


tabObject 0.0.1 is done.

Yes, my javascript tab control is done. You can go play with it at:

My example page!

Yesterday, I got 130 page views and nobody downloaded it. That makes me sad. :(


We have all seen it, you surf to your blog and find comments posted advertising god knows what to your readers. Not only is it a hassle to keep your comments clean, it also makes your blog look bad.

For the past year or so, Captcha's (Having a message hidden in a scrambled image) have become the defacto standard of protecting your comments from spam. However, they are annoying, sometimes hard to read, and build a barrier between you and your reader.


I've been buried over the last two weeks writing and reviewing code for my company, as we gear up for a major release.

A coworker who works under me who happens to have a masters degree in CS was working on a new promotional page.

The logic checked the selected device for capability to support a feature. If the feature was supported, then it would display a small link on the page about it.