Recent Articles

Mar 2005

1, 1, or 1, or if you really want, 1

by in Feature Articles on

It's a two-for-one day today that, despite the title, doesn't actually have to do much with ones. Or twos for that matter. No, it's more a case of redundancy in redundant cases. Oy, I'm gonna stop narrating after that one ... here's the first sample from Tristan Harmer


Just Try Clicking it Again

by in Feature Articles on

Have you ever wondered why it sometimes takes two or three clicks of the button for your request to "go through?" Wonder no more: Valentin Valchev has discovered the root of the problem was checked into his source tree all along:


Obvious Datetime Storage

by in Feature Articles on

Unlike Blake Sterzinger, not everyone is willing to own up to a software development mistake they've made, especially knowing full well that their mistake could be posted on this blog for all to see.

I came across this a little while ago when a client asked for some enhancements. No one else wanted to touch this, so it was all on me. Fair enough. After all, I did write it a few years back when making the transition from purely client-side HTML/Javascript to ASP/IIS/SQL ...


Encoding Your Way To (Highly Paid) Consultantcy

by in Feature Articles on

It's story time! James Watson shares a little tale about his experience behind an up and coming highly-paid consultant ...

A while back, I was responsible for doing maintenance programming and my coworker was responsible for new development. Even though we were around the same age, and even though I had the Computer Science degree and he had the Civil Engineering degree, I assumed he must of been pretty smart, or they wouldn't have given him this responsibility. Right?


Boolean Bits

by in Feature Articles on

What could be simpler than a bit? It's either a One or a Zero. True or False. Yes or No. On or Off. High or Low. Whatever you call it, it can only one thing or another. Yet somehow, there are some programmers who still have a hard time grasping this concept. Let's take a look at their attempts at mastering this beast.

First, there's Rob Henry's senior (as in title, not age) colleague, who seems to have a problem with the fact that "True" and "Not False" are one in the same:


theInfamousI and The Responsible Guy

by in Feature Articles on

Instead of looking at bad code today, I think it'll be fun if we look at bad coders. Well, I mean, not at their pictures or anything, but look at their code. But not their bad code, just the code that makes 'em ... err ... bad. Ugh. My explanation obviously isn't working, so lets just dig right in ...

Brian found this while searching through a former developer's perl scripts. Their company runs a fairly important batch process very late at night that this particular coder was responsible for. As it turns out, "responsible" may not have been the appropriate word ...


Switched on Loops

by in Feature Articles on

Long time readers may remember a post from a few decades ago (in Internet time) entitled The FOR-CASE Paradigm. Since originally posting that, I've received quite a number of similar submissions but have avoided using them simply because it would feel like a duplicate post. There's really only so much you can say about a for-switch loop.

Wait, let me repeat the key part of that last paragraph: I've received quite a number of practically identical submissions. That's right. This is just not an isolated incident of WTF but is actually a standard coding practice for quite a few. Following are two of the most recent submissions (both from the past few weeks).


2B Or Not B2B

by in Feature Articles on

Ouch. That's a really bad pun. Sorry. My hope is that you will completely forget about it after reading this story from Rick Harris (yes, the same Rick Harris who brought us ISwissArmyKnife and other weird interface implementations).

Enjoy ...


IsOdd()? Yes, Is Very Odd.

by in Feature Articles on

I'm really at a loss of words over this code that Scott Wickham sent. I honestly can't think of anything to possibly say to augment this very, very odd way of checking for odds and evens, so here goes ...


Friday Java Jumble

by in Feature Articles on

Last week's Friday Smorgasbord seemed to work out fairly well, so here's another go at it. But unlike last week, this all comes from one person (Koumynyka) who has collected these Java snippets from code reviewes and by purising the source tree. Names changed to protect the guilty and wrapped in a class for fun ...


The Meteorological Station In Hell

by in Feature Articles on

I'd have to say out of all of these months of posting to this blog, the most memorable post came from Nikolay Simeonov who not only survived, but single-handedly maintained the Hotel Reservation System From Hell (part 2). I've heard reports of developers changing professions after just seeing that post. And I'm pretty sure that most among us would be so awestruck with working on that system that we'd fear even thinking about looking at another computer again.

But not Nikolay; he's a programmer's programmer. No, he's a programmer's programmer's programmer. Not only did he go to Hell and back, but he returned to do a little bit of consulting ...


A Dash of Comma Spice

by in Feature Articles on

Yesterday we saw the old, today we see the obscure, maybe obscure is a bit strong, Dennis G sent me this rather interesting pattern he came across in a product he was maintaining, I didn't quite get it ...


A Vintage WTF

by in Feature Articles on

To give you fair warning, today's example from rpresser is old. Reeaaaallllyy old. We're talking from the-age-of-dinosaurs old. No, seriously; computer-animated dinosaurs debuted in Jurrasic Park that year (1993). Anyway, the author of this code figured out a rather unique way to querying data from a RS/6000: stack the keyboard buffer (like SendKeys) with commands to use the interactive file transfer tool "ASTFT11", export the data file to the PC disk, read it from disk, and then finally query it:


Payback is Still Hell

by in Feature Articles on

A couple months back, we had the opportunity to peek into into an application (ironically named Payback) that Colin A. Bradley inherited. Although the jury is still out on what exactly Adam did to deserve maintaining this, I'm guessing it had to do something with lots and lots of ALTER statements in a previous COBOL life. Any way, it's time to check in with Adam ...

Hello there, again.


Friday Smorgasbord

by in Feature Articles on

With a title like that, what else could you expect?

Most of us test if a number is less than zero to see if it's negative. But not John's colleague ...


I Think I'll Put It ... Here

by in Feature Articles on

In the .NET world there's quite often discussion on the most what the appropriate container is for a set of objects. That's probably because we've got so many to choose from: Stack, ArrayList, ListDictionary, HashTables, and so on. I'm sure there's just as many in Java to choose from, but since I'm not a Java guy like David Shay (who discovered today's example), I really couldn't enumerate them.

But no less, I'm still pretty sure that using a JList (like a select/dropdown box) is not the appropriate place to store objects for a middle tier (non-UI) component ... and even if it is ... I'm not sure that's the right way to do it, either ...


IS THERE A TUTORIAL AVAILABLE?

by in Feature Articles on

It's time for yet another fun user / tech support story from Jason Mauss. Interestingly enough, Jason provided another tech-support as material for the second post here. So for all those directly dealing with the end user, this is for you ...

My company, (Knowledge Relay) has a data visualization tool we call "EVS" (Enterprise Visualization Suite). One of the features is a "feedback" feature that allows the users to send us feedback on the product via a simple little web form. To access to the feedback form, the user had to click on the "Help" menu, then go to the "Feedback" item under Help:


Scalable Scalability

by in Feature Articles on

Last week we learned how to make really, really dynamic websites. That's great and all, but how to you make sure your really, really dynamic website will stand the test of time? With DB Include Files, that's how!

It's quite simple really. First, in every one of your pages, include a file like this (from an Anonymous reader) at the top, before any of your code ...


Cascading in Style

by in Feature Articles on

I hope I'm not being unfair by picking on, of all things, Cascading Style Sheets (CSS). After all, they're not technically "code" and they often are often used by some fairly non-technical people. But as soon I read this CSS from Jeff S, the post title popped in my head. And far be it for me to let such a clever (yet obvious) pun go to waste ...


The Ingenious DBox with the Double Trim

by in Feature Articles on

I suppose this VB6 code from Daan Davidsz doesn't truly elicit the "WTF" reaction from me. No, it was more the adjective choice that made me chuckle. I mean, I could see describing a function that did a simple character replacement as "handy," "useful," or "helpful." But "ingenious"?


Just Call Me Mr. Dynamic

by in Feature Articles on

When I have clients who need to easily add and modify the content of their website, I'll usually just set them up with Macromedia Contribute. If a more robust solution is needed, I'll go third party Content Management Systems or just build a custom setup.

I suppose this is why I don't have the nickname "Mr. Dynamic." No, that moniker goes to Miki Watts' predecessor, who came up with this database-driven solution for a customer who needed a way to easily modify content.


Implement This

by in Feature Articles on

Rick Harris sure is on a roll. Not only did he discover the Swiss Army Knife of interfaces, but he has come across a rather interesting way of implementing ... or nonimplementing ... an interface ...

We have a standard class library that includes an interface for a shipment and includes a getter and setter for a Bill Of Lading Number:


Database Ch-Ch-Ch-Ch-Changes

by in Feature Articles on

Today we've got a fun story from OneFactor about some Database Change Migration Procedure ...

Developers often need to add columns to database tables in order to support new functionality, so before we deploy to test and production databases, each dev team sends some change scripts (mostly full of alter table statements and generated painlessly by Enterprise Manager). The DBA "runs" them on the test database and if testing goes well, the DBA then "runs" them on the production database. So far so good?