Recent Articles

Mar 2007

Brevity Is Important

by in Error'd on

Paul likes brevity, so he was discouraged when he received a really long and confusing error message. For those unfamiliar, "brevity" is defined by Merriam-Webster as a shortness of duration, or a shortness or conciseness of expression. To elaborate, it is the ability to describe a potentially complex idea in as quick a way as possible, leaving out extraneous details that would serve only to confuse the listener. If extra details are needlessly left in, listeners' eyes will glaze over and they'll stop paying attention to your message, which is why it is of the utmost importance that an idea be expressed clearly and quickly. Also, be sure to phrase your message in simple language. Overly uburbulous words will klologe readers if they have deblionic vocabularies. When trying to write humor, knowing when to end a joke is important, too. God damnit, here's your screenshot.


The Longest Way to Zero

by in CodeSOD on

It was a pretty standard scenario: Lindsay F took over a small project from another department, and that project had a lot of “fun” surprises. Despite accomplishing a fairly simple task – reading in a fixed-width datafile, cleaning up a few things, and inserting it into a database – the application managed to be incredibly complex. Personaly, I blame the language they used: Java.

You’d think that the developers of Java would provide a simple way to convert a string, say "000000028000", into a number, say 280.00. At least Java does provide the System.out.println method. As the comments show, that proved to be an invauable tool in solving this almost impossible string-to-number conversion task ...


The Document Management Ambassador

by in Feature Articles on

Document management is tricky. Personally, I'm anal about keeping documents organized in the most intuitive way I possibly can. In practice, though, that means I spend hours wringing my hands and ultimately wind up saving documents wherever I feel like saving them.

I'm only in charge of documents for one person, though: me. Dave's coworker, who we'll call Alessa, was responsible for document control throughout their company. With the best of intentions, she set out to build the best document management system ever.


convertSingleQuoteAndDoubleQuoteAsciiToCharacters

by in CodeSOD on

Today's code snippet was discovered by Dave Conrad inside of a large production web application in its fourth year of life. As you might imagine, projects of such size are rather difficult to sum up in a brief article, but I believe that today’s Javascript function is a wonderful representation of said system.

convertSingleQuoteAndDoubleQuoteAsciiToCharacters is supposed to convert strings that have ' and " in them into ordinary strings containing single and double quotes. For instance, if you pass it "O'Malley", it will return "O'Malley". If you pass ")'Malley''s Irish Pub" it will … actually, never return.


Saving a Few Minutes

by in Feature Articles on

As we learned last week, G.R.G. has had a whole lot of experience in the IT industry. He’s even had the opportunity to work on a bona fide supercomputer. In fact, that’s where he got his start: he was one of twenty-five programmers that worked on one of the world’s most powerful computing machines. This supercomputer was capable of processing – brace yourselves, readers – several million instructions per second. Each and every second.

Of course, that kind of power did not come cheap. Not only did the supercomputer cost several million dollars, it required a round-the-clock staff of dozens to maintain and consumed enough electricity to power a small neighborhood. You might very well be wondering, what could anyone possibly need such incredible computing power for? The answer is simple: it was partitioned off and resold for $2 per CPU second. Or in today’s dollars, $10/second.


Paging Dr. Null

by in Error'd on

Michael found his doctor by doing a search with no parameters. Of course, Dr. Null (which is a real last name) is not set to an instance of Dr., so occasionally patients are referred to Dr. File Not Found. I got a million of 'em!


Maybe NOT_TODAY

by in CodeSOD on

Recently, time has been an issue on the minds of many people. Unfortunately, as far as I can tell, only about half of them installed the software required to deal with the new Daylight Saving schedule. This means that for about three weeks, people trying to share appointments and events will have trouble, at least sometimes.

The real problem is that these intermittent issues will probably only last three weeks and will thereafter be forgotten. Until October. Then, no one will be expecting it. As the poet should have written, time is not on my side.


That's Not Totally What I Meant

by in Feature Articles on

Ahh, to be young and in IT. In my younger days I was full of big dreams of being like the tech guys in action movies. You know, opening a socket to download a protocol so I can run a core dump on the secret agent's wristwatch.

As a "trainee programmer," Robert B. was enduring the typical crushing of his dreams that most of us went through early in our careers. He was responsible for technical tasks such as making tea and coffee, picking up sandwiches, ordering printer cables, and sending software update disks to customers. Robert was working at a successful company in the UK that built software for managing vehicle fleets. Customers ranged from leasing companies with thousands of vehicles to tracking lawnmowers at Clem's Lawnmower Rentporium.


Checking Your Digits

by in CodeSOD on

Since the invention of the printing press made dime-store novels a commodity, as intended, distribution has always been a problem. With places like "The House" on "The Street" in "The Empire" on which "The Sun" never sets, postmen have their work cut out for them. Luckily, postmen are very clever and have come up with systems for describing how to route mail.

Like programmers, postmen are also lazy; they'll give you discounts for making their job easier if you utilize the cleverer parts of their system. For instance, in the United States, you can make postal workers happy by printing a simple barcode on your item. This barcode includes a check digit.


Sprite Threading

by in Feature Articles on

Sometime near the end of the previous millennium, Neinhalt Sieger accepted a programming at a small software company that built Java-based games. Although today we realize that Java wasn't quite the ideal platform for videogames, back in the 90's it was all the rage. If your game wasn't made in Java, it might as well have been with made out of wood and rolled with a stick.

Neinhalt was brought on specifically to work on a game called "Machine Man." The game's concept was completely original and nothing short of revolutionary: the player controlled a hero with a gigantic mouth that was trapped in surreal maze inhabited by four rather non-friendly ethereal types. The goal was to consume a vast amount of small, dot-like pills (the larger ones which made the hero able to consume the enemies as well) while avoiding the ghost-like ... err, ghosts. The only problem with Machine Man was the computers that wanted to run it. They were far to slow, leading to low frame rates, poor input responses, and skipping sound. And Bob, the lead developer of Machine Man, was no longer around to fix it.


Apple, Simple and Elegant

by in Error'd on

Apple's new ad campaign has done a lot to educate consumers about the differences between Macs and PCs. The bumbling, nerdy PC fumbles to get through a sentence about gray bar graphs (because he doesn't understand colors). That is, if he manages to go without crashing every 3 seconds! The suave, Keanu Reeves-esqe Mac outputs the most elegant, easy to understand dialog box in the history of computing. Even though it poses a yes or no question to the user, Rob L. knows there's only one answer: Apple. I mean "OK."


Refactoring History

by in CodeSOD on

Refactoring is a trick that managers play on us, to waste our time and break our spirits. Just because they can't wrap their tiny minds around large chunks of similar code doesn't mean that you are unable to wield these weapons. Sometimes, however, we are forced to do things we don't want to do. If you have to refactor: do it late and infrequently.

As a case example, take the code John is being forced to slice into mortal-sized chunks for managerial consumption. It's "classic ASP" and the decision to refactor was made at a critical tipping point: 4381 lines of code, most of it in a single procedure.


Guest Article: Our Dirty Little Secret

by in Feature Articles on

Hi, I'm Jeff Atwood from Coding Horror.

Alex offered me the opportunity to write an article for The Daily WTF while he was away on vacation a few months ago. Unfortunately, the scheduling never quite worked out, and the tone of the resulting article was different enough from The Daily WTF format that it never quite fit in. But now that the site has been relaunched, it’s a perfect time to revisit the question that has nagged at me ever since I wrote the original article. What are we all doing here?


Now Hiring SQL Injectors

by in Error'd on

Dice.com has done some ridiculous advertising in the past and, as Robert B. points out, they're still doing ridiculous advertising. Now they're targeting SQL developers. If this is actually how you do job searches on their site, they may want to add a disclaimer; Please do not enter the following in either field: ";DELETE FROM JOBS;SELECT * FROM JOBS WHERE "1" = "1


The Insanity Defense

by in CodeSOD on

Those Internet folks just don't get it: content is valuable, but with all this hippie talk about "openness" and "collaboration" and "cooperation," they forgot to build in content rights management! For anyone that does run a website with valuable content, it's inevitable that pirates will come after your work and you'll need the best defenses to protect it.

Now Fran's website definitely has valuable content and they've been protecting it for years, only allowing known customers with fixed IPs to access it. "How," you may ask, "does their code stop the pirates?" A secret buried deep in ASP, they're now ready to share this technology with the world.


Fixing It Would Break It

by in Feature Articles on

Upgrading database server software is scary. I worked at an organization that spent just shy of a year upgrading Oracle 9i to Oracle 10g. But that's Oracle, and we don't like Oracle 'round these parts.

Micro$oft $QL $erver (ha, take that, Micro$oft!) i$ al$o a $cary upgrade. Updating it, on the other hand, is pretty simple. I've installed service pack updates, and they've just worked. I don't mean to imply that this is trivial for a large organization, but for a small-to-mid-size organization like the shop that C. D. works at, it shouldn't be a big deal.


Third Time's a Charm

by in CodeSOD on

Starting a new job is usually exciting but also frightening. Adjusting to a new code base --- styles, idioms, and all --- can be daunting. Luckily, for Sam, all the important code is kept in a single file: MyStuff.asp. Despite the name, the functions in that file belong to everyone.

Weighing in at only 1k lines of code, it's included by every script on the company website and contains a treasure trove of helpful functionality. It contains just about anything a web developer could want. If what you want to do is not in "The File" and it might be useful for other developers, add your function at the end. It's that simple.


Emulating the 8080

by in Feature Articles on

Our good friend G.R.G. has shared some fun stories from his decades of working in the industry. Insecurity Doors, Mystery of the High Test Scores, and Twelve on a Line are among my favorites. Today, G.R.G. takes us back with a neat anecdote from the goold ol' days of the 8080 ...

Not too long ago, there was mainly just one operating system for 8080-based microcomputers: CP/M. It didn’t totally suck -- it could store files, load code into memory, run code in memory -- really, what more could one possibly need from an operating system? Well, when the 8086 CPU came out, it presented a small problem: CP/M (and all of the wonderful CP/M applications) could not run. Different CPU architectures, don't you know? In a brain flash, I thought: Why don't I create an 8080-emulator for the 8086! It could then boot to CP/M and run all of that wonderful CP/M software!


Don't Wait Till the Last Minute

by in Error'd on

I'm on year 4 of my free 30-day WinZip trial. I've really gotta register that thing. Brenda likes to be prepared, and appreciated a 50,504,432,782,230,120-year advance warning that her PGP key was expiring.


Another Brick in the Wall

by in CodeSOD on

Compilers are just too picky: on one hand, they'll accept just about anything; this encourages us to feed them just about anything. On the other hand, they complain ceaselessly. Luckily, you can just pipe away your troubles to /dev/null and everything is sunshine and lollipops again. (Or fluorescent basement lighting and Pop-Tarts, take your pick.)

All is not well for AJ, however. In his world, they discovered the -Wall and --- instead of shying away --- actually use it. What's more, they actually fix warnings, like the following "unused variable warning."


6 to 8 Weeks If You're Lucky

by in Feature Articles on

Remember being a kid, collecting Bazooka Joe wrappers to get a sweet knife that you could use to have dangerous, life-threatening fun with your friends? Then waiting by the mailbox for an agonizing six to eight weeks?

In this post-9/11 world, I'm sure that Bazooka Joe isn't sending knives to kids in the mail anymore (based on a combined zero hours of research between Alex and me). Their prizes still take six to eight weeks to deliver, though, and Todd C. now knows why. Todd brings us a WTF from his daughter, who we'll call Yvonne. And just to get it out of the way, no, I don't have any pictures of her. Perverts.


Special Coders

by in CodeSOD on

Recently, Craig was digging through some "old 3D code," intending to chop it up and port it to some foreign language. What he found was some very special code, written by a very special coder; and folks, when you come across something like this, it's a crime against humanity to do anything but put it in a museum.

We are that very special museum. Step up, one and all! On to the exhibition!


Twice Annual About Security

by in Feature Articles on

The days of manual deployments to network PCs are almost gone. Tools like SMS, Group Policy, and One-Click Deployment make it a lot easier to apply updates and deploy software to client PCs on a network.

Pete's company either doesn't trust or isn't aware of such tools, however. Pete works at the company responsible for Annual About Security. That's right, this is the same company that had users reset their passwords by email a few months back. In short, Network Operations had requested that all users reply to a companywide email with their desired new passwords, each of which would then be manually entered, one by one, by the network administrator.


Science Fiction Tried to Warn Us!

by in Error'd on

Remember that science fiction movie/book/video game/epic power metal album where the computer/robot/spaceship had such advanced AI that it became power-hungry and enslaved humanity? Well, I hope you're ready to be suspended in life-sustaining fluid so your body can be harvested for energy. Nick captured this terrifying messagebox, showing that computers are beginning to make primitive attempts at sarcasm. Soon computers will computationally generate insults, then they'll develop a hatred of humanity, and before you know it we'll be facing the robocalypse.


Net Shift

by in CodeSOD on

As far as I'm concerned, both Al Gore and Vint Cerf can be fathers of the Internet; it's just that they can't get married in most states. This crazy bastard child we all know and love really did cause a paradigm shift by shrinking the world. When it comes down to it, the Internet is a pile of money and equipment combined with a bunch of standards and peering agreements; if that's not love, I don't know what is.

However, all is not well. Equipment gets old and money dries up. Bugs and clever coding can stop standards in their tracks. Peers don't always play nicely. Some people might blame the Internet's family, but it has a lot of baggage.


Mixed Messages

by in Error'd on

Max wrote down his password and shortly afterward felt guilty about doing so. Maybe this is a tough love lesson from cPanel. Maybe cPanel is challenging Max to think for himself. Or maybe the copy editor was lazy.


Unique Ways to Play Catch

by in CodeSOD on

Normally, we don't write up submissions that come from code websites or open source projects. This policy is partially because F/OSS projects are supposed to already have many eyes and partially because I don't want to get beat up. When the submitter is afraid of getting fired, anonymity kicks in. As for code websites that take themselves seriously, I just feel sorry for the people that write those.

That's why Alvin should be ashamed of himself, especially because this code and its coder aren't hurting him in any way. However, the snippet he sent in was just too good to pass up. I won't mention where the code came from but I have faith y'all'll figure it out.


The Network Batch File Virus

by in Feature Articles on

The early 90s were exciting. Tim Berners-Lee invented HTML and created the first of the many internets we have today. A bunch of dancing dudes in foil costumes built the first Pentium processor. And who can forget Eritrea gaining independence from Ethiopia? Well, I could, but I wasn't following Ethiopian politics so much those days.

At the time, Chilton W. was working at a company that provided software that auto insurance companies used to keep track of users, policies, cars, etc. Things were going great, too. They had sold their software to one third of all auto insurance providers in the U.S.


The Pyramid of Error

by in CodeSOD on

The ancients knew the power of pyramids. Placed on power points around the globe, they allow mankind to channel mysterious, transcendental energy from across the void. Now, the wise folks that figured this out also realized that much of this power is derived from mystery; thus, they made sure that the power of the pyramid would evade any attempt to quantize or otherwise capture it as data.

This power is still with us today. You might that this would prevent these forces from interacting with computers, which are all about quantization and data, but this is not the case. It is said that Kernighan and Ritchie first channeled the C specification at one of these points of power under a blue moon. This, perhaps, is why a portable assembly language has been so successful.


What Do I Do Here?

by in Error'd on

Robert S. sent in                       was missing      ,      confusing     alienating users. Settings     only    changed       Spy++.


//TODO: Uncomment Later

by in Feature Articles on

What was your worst production failure?

Mine was a missing WHERE clause in a certain DELETE query that resulted in the deletion of all 6,000+ rows instead of just one. Whoops. Of course, my blunder only resulted in several hours of lost work, a painful data restore, and one really embarrassed junior developer (me). I'm sure, had I been in an environment like Adam's, I would have deferred to someone with more expertise or, at the very least, been much, much more careful.


Big Math, Little Snippet

by in CodeSOD on

Computer scientists have always been jealous of mathematicians. Much of the strife in this ancient conflict is derived from the fact that math guys take large numbers for granted. Silicon can't handle arbitrarily large numbers as elegantly as paper and many computer languages realize that only really bad programmers would ever need numbers that need more than 32-bits.

But computer science is not about judgement. Thus, good programmers condescend to help out by writing BigInt[eger] packages, usually as part of an undergraduate "Intro[duction] to Data Structures" course. To show our gratitude for their hard work, the rest of us should make every effort to use their code whenever we can.


Failing the Turing Test

by in Feature Articles on

Congratulations, reader, you're now an IT "expert!"

IT is a field that is full of "experts." An "expert" is any old IT guy (or gal (ok, fine, guy)) that meets the minimum requirement for being called an "expert" — he refers to himself as one. The nice thing about calling yourself an "expert" is that all non-IT people will believe you! An "expert" is different than an Expert, though. An Expert is a real expert, while the cocky knownothing guy sitting next to you is an "expert." Jeffrey worked with an "expert."


Shooting XML

by in CodeSOD on

As we know from Brooks' essay, in software engineering there is no such thing as a silver bullet; at least, not one that doesn't come in a 12oz can. That's why XML is suspicious: no one should have spent the time to develop a single, consistent methodology for data interchange when any possible effort could only be in vain. It is unfortunate that this so-called panacea has caught on: it's so easy that companies feel like they can get away with hiring developers instead of engineers.

To take this article down another notch: engineers usually understand the project triangle: good, fast, cheap: pick two. If you don't understand what I'm talking about, just say "XML should work" when anyone asks you a question and you'll be fine. The real problem with XML is transforming it into something more usable. It'd be really nice if someone came up with a transformation language for XML, but I suspect that this would fail for the reasons stated above.


Techno by Accident

by in Error'd on

D. D. never cared much for breakcore until hearing some that Winamp accidentally generated. Personally, I like track 27: iframe>');. It's the one that goes TCHHH SKREEE TCHHHHHHHHHHHH RRRCHHHHHHH RRRRRRRRRRRR TCHHHHHHHHH.


We'll Optimize Later

by in Feature Articles on

The Rules of Optimization are simple. Rule 1: Don’t do it. Rule 2 (for experts only): Don’t do it yet.

These rules were coined by Michael A. Jackson (no, not that Michael Jackson; yes, that Jackson of the "Jackson Diagram") in his 1975 book, Principles of Program Design. It’s an interesting and depressing read that reminds us how much we knew about good software development then, and how little we follow that knowledge today. In fact, three decades and almost infinitely more computing power later, many programmers still fail to remember these rules on optimization. And among those that do remember, many have no idea what "optimization" means.


SQL Four Joy

by in CodeSOD on

When the CEO is the ex-developer of the company's flagship product, it probably means that the other developers were just hired to add features the CEO was now too busy to be bothered about. Obviously, it is impossible that the design of the system could be imperfect in any way. As technology changes, however, it sometimes becomes necessary to do drastic things like change software platforms.

As the product had grown --- "Organically, like a weed." --- more and more logic was shared between the SQL database and the application.That's where Trent came in: it was his job to discover and recreate all the nuances of this dance on the new platform.


Moderate Traffic Impact

by in Error'd on

Dave was disappointed to find that his commute will be a little longer due to construction. He was even more disappointed when he found out that the construction would be lasting over 3,000 years. Evidently, the pharaoh's slaves are constructing a pyramid near Sandplant Hill. Still, it's fortunate that the construction will only have a moderate impact on traffic.


Announcement: Free Sticker Week Conclusion

by in Feature Articles on

Just wanted to give you all an update/conclusion on the Free WTF Stickers.

A total of 668 of you managed to get into the free sticker form between the hours minutes of 12:00P EST and 12:03P EST each day before the day’s 100 stickers were gone. And yes, I realize that 100 * 5 != 668; I coded the form to check the day’s count before loading , not after submitting. A bunch of you (337) also sent postage-paid requests through the mail and PayPal. Props to Michael V for mailing in a printout of a picture (taken on a wooden table, of course) of a screenshot of his word processor software with text asking for a sticker. Here’s a picture of that (taken, of course, on my wooden table):


Generating Secure P455w0rd5

by in CodeSOD on

It's tough to generate good passwords. Users can't remember the hard ones, anyone can figure out the simple ones. We live in a world where two of the most common passwords are abc123 and password.

That why we have tools to generate passwords for us. Take, for instance, the following PHP, sent in by Dmitriy.


Pointy Haired (Em)Boss

by in Feature Articles on

Y2K. Second only to The Epoch, and maybe third to Y10K (when all software will break again), Friday, December 31, 1999 was a day that still strikes fear into any geek's heart.

In 1999, Twisti (hey, don't look at me, he insisted on being credited as "Twisti") was serving a year of social service, as required by German law. Alternatively, he could've chosen to serve in the army. Twisti lucked out by scoring an IT position in a large hospital among long haired hippies and geeks that also didn't want to serve in the army. This was a popular program, so the hospital was greatly overstaffed. Hippies, long hair, overstaffing, and no fear of being fired made this a laid-back, fun environment. That is, until late summer rolled around and Twisti's pointy haired boss heard about Y2K.


Cabbage Based Authentication

by in CodeSOD on

Security is a big deal. The days of open mail relays and anonymous file upload sites are long gone. No one executes binaries they find in an email inbox. If only.

That's why when Gabriel was asked to take a look at a PHP application on which her school relies --- an application that stores student's name, grades, and social security numbers --- she expected top-notch security. Here's what she found.


Autocorrect is Grate

by in Error'd on

See if you can spot the autocorrect mishap sent in by Ron below:

All,
 
We apologize for this repeat message, however, it has 
come to our attention that there is a typo in the 
outage table below.  The second entry for "Sunday", 
May 18th should be read "Thursday", May 18th.  Again, 
we apologize for any incontinence this may cause.

Sincerely,
Sprint - Business Implementation Management

SQL on Trial

by in Feature Articles on

I like to think that you can learn something about frugality by reading Worse than Failure. And if you'll pardon me while I put on my question mark suit, I'll tell you how to save a whole heap of money on SQL Server 2000 licenses with a method used by the insurance company Gordon (as we'll call him) interned at.

Most Fortune 500 companies have a certain "budget" allowed for "legal SQL Server licenses" that are "within license compliance" for "database servers." Few take the time to investigate all of the licensing options available and even fewer know about this amazing insider secret.


The Counter of And

by in CodeSOD on

With all the shiny client-side browser toys out there, many people forget about the dark underbelly of the web. As neat as it is that you can make a web brower act like a windowing system, dynamic sites are still powered by back-end applications; which is to say, powered by evil.

Now there are different levels of evil. Ruby is normally elegant but resource intensive. PHP was designed as an example of how not to name functions. Perl has its own special circle, ancient and full of strange characters. If you want real evil, though, you have to find a web application written in C.


Tool Blame

by in Feature Articles on

If you’ve worked in this industry long enough, you’ve probably gone down a road I like to call Tool Blame. I know I sure have. Tool Blame is that final, last-ditch act of desperation where one simply refuses to admin that he’s wrong and concedes to “working around” the “deficiencies” of the “pathetic” tool he chose to use in the first place. My absolute favorite example of Tool Blame is a tirade from a developer I once worked with: “what do you mean .NET can’t parse an empty string into a DateTime? My whole middle-tier is designed around strings! It’s going to take me at *least* a week to work around Microsoft’s bumbling incompetence!!!”

Though I might tell that story someday, today I’d like to expand on an article back from the WTF University series. For those unfamiliar, last year we all took a trip back to our favorite alma mater for a programming course, a security course, a web development course, and even a work-study on one of the college’s critical information systems. Enric Naval, the student who worked on that system, wrote back and gave an update on his experience and his trip down Tool Blame Lane.


JavaScript Hacks

by in CodeSOD on

The advent of JavaScript has made it really easy to write web pages that interact with you. Really, it's insanely easy. The barrier to entry: way too low. It's not that all JavaScript is bad, just that most JavaScript is not written with simplicity, correctness, consistency, or completeness in mind.

The worst part is that many "Coder 2.0s" don't have a background in other languages so they don't know what sorts of functions to expect from their language. Maybe that's why I don't feel any sympathy for Piotrek, who was looking for calendar code on the web and found this really fantastic way to detect leap years.


Very, Very Well Documented

by in Feature Articles on

Just about all of the systems I’ve written about here share quite a few things in common: they are poorly designed, poorly coded, and even more poorly documented. Today, I’m happy to share with you a system that doesn’t quite fit in with all the rest. It’s actually very sound software and, most of all, it’s well documented. Very, very well documented.

George Nacht is a software engineer in certain a Post-Communist European country. In the mid-1990’s, his government decided that it was time to replace their foreign, Soviet-era fighter jets with modern, less expensive aircrafts of domestic design. And since they were modernizing their fleet, they decided to modernize their pilot training as well. This meant that new, interactive flight-simulator software needed to be developed.


Mounting and Screwing

by in Error'd on

Jason W. recently ordered a bulky server, and I mean that literally — the thing was 82 lbs and required specialized screws to mount. Having no luck finding the screws he needed, he called Dell and asked for some. Dell apologized and overnighted the screws in several foam padded boxes. You know, so the screws wouldn't get damaged in transit.




Putting It All Together

by in CodeSOD on

When management caught on that one of their lead developers was only good at talking about being a good programmer --- not at actually being one --- he was let go and Jimmy inherited the orphaned code-base. In order to cope, they've put up a bulletin board on which they post code that should never have been born. All of it is from the wake of this single developer.

Here's one of Jimmy's favorites. While he doesn't explicitly mention what language it is, I only know of one widely used language that goes out of its way to insult variables by calling them "dim." From the submission: "The idea is simple. Prompt the user for a file to import; pass this filename to a callback that will load and parse the file."


Utter Garbage

by in Error'd on

If you don't have anything nice to say, you shouldn't say anything at all. For instance, I may think a piece of software is garbage, but I'm not going to say what software it is. If I thought said software sucks because it installs a bunch of desktop shortcuts with GREAT OFFERS for FREE INTERNET ACCESS, installs an unnecessary system tray application, tries to reset all file associations for all media files on my computer each time I run it, adds a Quick Launch button and top-level Start Menu shortcut, and installs a useless IE toolbar, I should keep it to myself. Instead I'll let Gabe R.'s submission do the talking.


Visual Basic Triple Play

by in CodeSOD on

Instead of reinventing the wheel, the company Ramirez works for decided to use a framework to build their Web Framework. Unfortunately, they may have made a poor choice. When they found out it does "crazy things" like saving reports as PDFs (which are stored locally) and then routing them through an IIS web service, they decided to take a closer look at the code.

Without giving too much away, Ramirez identified (in the following code) three reasons he drinks. Consider it a Rorschach test: what do you see?


The Complicator's Bicycle

by in Feature Articles on

Back in January, I posted The Complicator's Gloves, which was an example of what happens when Complicators get a chance to design something other than software. Recently, a reader pointed me to a fun article on the BBC about a software engineer who decided to “solve” the 150-year old “problem” of the bicycle. I couldn’t resist sharing it with all of you …


1: The back cog drives the back wheel chain, which unlike on a normal bike can turn either way when the back handlebar is steered.
2:Back handlebar which steers the back wheel and has a rear light.
3:Front handlebar which steers the front wheel and has a light and rear-view mirror.
4:Pedals are at right angles to the wheels.
5:The seat is shaped like an upside-down crescent.
6:This frame goes over the lap of the cyclist, but can go under if preferred.


Hacking Made Easy

by in Feature Articles on

Hopefully after getting out of college, most of us have matured past drawing dude parts on passed-out roommates. Now, I don't mean to imply that I've matured beyond that point, just that I hope you have.

It seems I'm in the same boat as Bryan F. and some of his coworkers. A new guy who we'll call Bob had recently moved into the cube right next to Bryan's. Bob was a nice guy, but he had one fatal flaw: he'd always walk away from his computer without locking it.


Getting Better Sleep

by in CodeSOD on

Reporting from the field, Zak tells us the sad story of a sysadmin who has been forced out of his comfort zone. When your sysadmin writes a bunch of scripts in Perl and then your company decides to switch to .NET, the job of converting the scripts will almost certainly fall to none other than the sysadmin. This will be the case even if said sysadmin doesn't know .NET.

When this happens, you will learn two things. The first is that the new .NET code will be structured as though it were Perl code, even where inappropriate. The second is that some functions that the sysadmin is used to will be unavailable, in a different namespace, or otherwise renamed.