Recent Articles

Jan 2005

Now *That* is a Way to do States

by in Feature Articles on

It's hard to believe, but a good seven months ago, I honestly thought that using an autonumber as the primary key (instead of OH, NY, etc) was a bad way of implementing a States table in a database. Of course, thanks to everyone who's submitted things over the months (you guys rock, by the way), tblState would simply have been tossed in the "not using best-practices" category. But I think we can all agree that this state-handling routine from Kurt Payne would definitely fit in the Whisky Tango Foxtrot category ...


End the Tyrany of the Client/Server Relationship

by in Feature Articles on

Justin sent in an example from a system that reminds me of a group of developers I used to work with. They felt very strongly that the Web-Server / Client Browser model was inherently unfair. A web server, one guy would say, is nothing more than a regular computer with a few hardware upgrades and a slightly different operating system. Then another would chime in, Yeah! Why should the server have to do all the work? Why *waste* all those megahertz to just display a stupid webpage?

They'd continue their tirade ad nauseam and claim that if they ever ruled the world, the client/server model would be no more. What's worse, they were actually allowed to architect web software. And since they didn't believe in XMLHTTP, they'd continuously invent these complex javascript object models running through hidden frames carrying data back and forth from the client. In fact, it looked kind of like this:


The Rumor is True

by in Feature Articles on

There's been a rumor flying around the blogosphere that it's actually possible to return more than a single value from a database query. I've done a little research on this, and from what I can tell, it's true! In fact, you can return a whole set of data. Even in Oracle!

I'll bet Steve Mitchell's colleague is pleased. He'll no longer have to build long strings with non-text characters as deliminters and pray it'll work in his text editor. Just look at all the trouble it was ... I'll even bet the little box character (in the second block ... the first is an image) doesn't even show up for half of you.


Code Commentary

by in Feature Articles on

A little while back, Caleb Tucker sent some fairly entertaining examples of a programmer not quite understanding the purpose of comments:


Like Yahoo!, only Cheaper

by in Feature Articles on

One of the "policies" I have here is that I don't post material from usenet, messageboards, or other places where "newbies" are actually trying to learn the trade. Unlike the Unix/Linux "RTFM" crowd, I'm all about spreading knowledge and best-practices.

So I really hope I'm not breaking policy by posting this bid request that Brian Lang found. It was from one of those freelance IT Project Portal sites. Besides, I think it's a nice compliment to a bid we saw a little while ago.


Object Disoriented

by in Feature Articles on

Michael Jervis shares another gem from his former employer (the place with the custom in-house "development" "tool"). At first glance, if may seem like a runner-up in the Nested-If competition. But it's far worse than that ...


Your Friday Paradox

by in Feature Articles on

As a software developer (or I suppose any type of builder), it's satisfying to see your work or design actually put to use and used by the intended audience. Perhaps even more so when the work is mission-critical and used in real-time financial processing. At the same time, it's a bit of burden to know that tens or hundreds of millions of dollars will be flowing through code that you wrote.

Some (especially the readers of this blog ... I hope) would see it as an important responsibility. But since I'm talking about it here, you know that not all think that way. Here's a small sample of a paradox system that processes $180M to $250M worth of transactions and revenue annually.


You Can Never Be Too Cautious

by in Feature Articles on

At least, that's what Subhash Gopalakrishnan's colleauge believes. He just simply does not trust the standard method of exception handling .... ever. Maybe he's had a bad experience with Java ... or maybe ... he knows something about Java that we don't ...


A Constant ... Constant?

by in Feature Articles on

We've seen some pretty pointless constants defined before. And again. So it shouldn't come as a huge shock to see Colin's colleague define a line break constant instead of using "\r\n". Or using Environment.NewLine. Or using a property to define the constant instead of ... oh ... say ... a constant. Or taking six lines to return a simple, two-character string. But naming it CRLF? 'Sup with that?!?


Who's Hard-Core Now?

by in Feature Articles on

Let me tell you, as a Visual Basic enthusiast it really pains me that so many of the posts here are in my programming language of choice. So whenever I post something from another language, I usually let out a little smirk. But today I'm beyond smirking. Oh yes, it's gloating time!

Why today?, you ask. Well, take a look at this ASCII to HEX function (written in C) from a CGI app that Kai sent in. Yes, C. C as in so-hard-core-I-shave-my-face-with-a-rock C. Or, the geek equivilant: so-hard-core-I-input-everything-in-binary-...-with-two-copper-wires C. It's even worse than the Worst Possible VB Solution. And it's in C!


You're Telling Me There's a Pattern?

by in Feature Articles on

Remeber those tests where you're given some sort of pattern (eg. 1,3,9,27) and you have to figure out the next item in the sequence by coming up with a formula? I wonder if Dan McKinley's colleague was ever able to figure those questions out ...


Some More Tech Support

by in Feature Articles on

It's time once again to pay homage to those in the front line of Information Technology. For those who work or (like myself) have worked in the area of customer technical support, here's something from Matt Ranlett just for you. Don't hesitate to share your own stories!

My job while in college was as sales and tech support for a local ISP back before everyone was bought up by Earthlink.  The "office" I worked in was actually three rooms in the back of a hair salon outside of Athens GA!  Most of the hair clients were older women, and "Blue-hair dye day" Wednesdays always flavored the air something awful!  But that's another story.


If at first you don't succeed ...

by in Feature Articles on

Don't ya just hate it when you query the database and it just refuses to return a result set? Ok, it's never happened to me, but it must happen all the time to the consultants behind a Cold Fusion (a TDWTF first!) project Jason Nussbaum got to work on. Not sure why they didn't follow the TTC (Third Time is the Charm) rule ... twice is never enough!


Zen and the Art of Programming

by in Feature Articles on

Today's post certainly is not one of those egregious, eye-piercing monstrosities we see every once in a while. No, I'd classify it as elegant ... maybe even artistic. This code (from Mike Bates' colleague) achieves in six lines what would take most of us zero. Now pardon me while I continue to bask its harmonious simplicity ...


Superfun Time Arithmetic!

by in Feature Articles on

Let's face it, specs can be get pretty boring sometimes: rarely do they deal with superheros and exotic cars. So, why not do what Julian Melville's predecessor does and spice up boring requirements like "store the number of minutes an event takes" with a little WTF? Sure it may be logical to store a time span as a DateTime or a Number, but look at how fun it is when you store them in "HH:MM" format. And, as an added bonus, this actually works with a small number of rows!


Payback Is Hell

by in Feature Articles on

And revenge is a dish best served cold. But we're not here to discuss adages; it's far worse than that. You see, Payback is the name of an application that Colin A. Bradley has the misfortune of maintaining. First, a look in to the database:


One2Pt20462262185th

by in Feature Articles on

I believe that we may have had a first yesterday; the coder behind yesterday's post offered a perfectly reasonable explanation: one-time use with a tight deadline. Fair enough. Now I really want to see Isaac's coworker offer some sort of explanation for this ... seriously ...


T-SQL "Random" Password "Generation"

by in Feature Articles on

In case you've ever wondered how cool random passwords like "rug1wh9p" are generated, you probably won't get much satisfaction from Alfred Whitehead's coworker's code. Actually, he shows you a great way *not* to generate random passwords. It is creative though. For extra fun, try guessing how many rows this will return without running the query.


Finally, some better code!

by in Feature Articles on

A couple months ago, Jani shared with us some code from a colleague who really didn't understand the concept of date/time formatting. Or, for that matter, loops. Good news is, our coder has finally understood the concept of loops. Well, sort of ...


Straight Shooter for Upper Management

by in Feature Articles on

In case you've ever wondered how your boss (or, more likely, boss' boss) made it through the ranks, Goff explains:

In 1999 or so I was working at a fairly large consumer software company. It was before the crash so good help was in short supply. As a result we ended up with some real winners. This one guy somehow convinced a VP and HR that he was a hotshot senior Java developer that wanted to transition into the project management side of the world.


What The Spec?!?

by in Feature Articles on

I've noticed that there have been a lot of IT Project Portals popping up over the last few years; you know, the ones where you post a project and get bids from coders and companies all over the world. If you've ever used these before, you may have noticed that some of the proposals are ... umm ... slightly less-than professional.

But I can honestly say I've never quite seen a proposal like this (as discovered by Péter Zoltán). It's for small software e-commerce site. Here are some excerpts:

  • "The server is gonna be at my home, connects to the internet through satellite with fix IP"
  • "Softwar downloadable by anyone before he is our customer"
  • And there will be a button like send order ner the catalog button
         Thiss will send the order for us"