Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Roosevelt
Jul 18, 2009

I'm looking for the man who shot my paw.

context: forums poster nbv4 posts a thread

this guy replies:

quote:

I work as a programmer coding software for an automatic sewing machine that runs entirely on cow manure to be used primarily by wives of cattle farmers (not even kidding). Despite how it sounds, we somehow have a steady stream of consumers and the software itself is surprisingly complicated -- the machine manages all different kinds of needles and threads, switching between them via a simple interface and it alerts the user when spools are running low, etc. It's not exactly the most fun work I've done, but it's unique and it pays well.

Anyway, the code-base is absolutely garbage and it makes heavy use of factories for creating any and all objects. What's even worse is that the coding standard here for factories is to use all single letter identifiers that consist of the first letter of the word that they represent. The exception to this rule is that if you want to represent something that is two or more words long, you use the first letter of each of those words (I.E. the generic factory for creating objects that represent "Needles" is a global object simply called "n" and the factory that produces objects that represent "Tatting Needles" is called "tn" ). Furthermore, we have a strict versioning convention where you append "v#" to any new factory name that is a revised version of another factory where # is the version number). For instance, at some point early on in development before I got here, the type for representing upholstery needle's was totally revamped and a new type was created -- rather than reuse the same factory name, the old one still exists, but if you want the new type, you have to use the "unv2" factory, where "unv2" stands for upholstery needle version 2. Couple this with the fact that there are pretty much no comments and you get impossible to read code that you have to analyze to figure out what it's supposed to be doing.

Case in point, we have different factories for threading needles that work with different internal types based on whether the machine is running on cow manure or bull manure or a combination, so there is a factory "nc" for "no cow" if it is trying to thread a needle when running strictly on bull manure, "cb" if it is trying to thread a needle while running on cow and/or bull manure, and "nb" if it is trying to thread a needle while running on just cow manure. What's worse is, these factories are constantly being revised so seeing an expression like "cbv3()" for "cow and bull version 3" is way too common.

To make a long story short, one afternoon back in 2002 I was making updates to the threading functionality and when I tested my changes on the actual machine, everything seemed to work fine except that whenever I went to work with strictly bull manure, all the spools were getting covered in feces! I looked back at my code but because it was a long day I couldn't figure out what the problem was so I just started a new version of the "no bull" code and increased the version count to 5.

Everything works fine now if you use the latest factory, but to this day, nbv4 produces nothing but lovely threads.

Adbot
ADBOT LOVES YOU

Roosevelt
Jul 18, 2009

I'm looking for the man who shot my paw.

  • Locked thread