- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Awww... it's purty!
Admin
It's sort of like a modern art sculpture carved out of dried cow manure. It looks kind of pretty there in the museum, but at the end of the day, it's really just a big pile of sh*t.
Admin
If I'm not mistaken, this is the "Statue" programming pattern often taught at Easter Island Institute of Technology.
Admin
Am I the only one seeing a beautiful lady leaning on a wall?
Admin
Under the spreading B11CFee, I soldU and you soldB. There we lie and there EscB, under the spreading R5Fee.
Admin
It was an entry in the Obfuscated VBA contest. Which is why it is a slumping, flaccid mess.
Admin
I like how only the last variable on each line is given an actual type, the rest just empty/uninitialised variants.
Admin
...and the algorithm for arranging the variable declarations in this way is NP-complete, mind you.
Admin
Isn't it supposed to be a vase?
Admin
Isn't all VBA?
Admin
So this is what they mean when they say programming is an art?
(Also, this guy was obviously not paid per line.)
Admin
Poor Trent, may he rest in peace...
Admin
ProsDirty1 StripTot FER FedFee EnID soldU StringID GRat1
Admin
Against the long spreading rumour that the universe is constantly expanding I have to tell you it is not.
What we see here - wonderfully carved in VBA - is the plotted extension data starting from the Big Bang up until the present day.
Time increasing top to bottom, size increasing left to right.
Admin
No, some VBA is supposed to be two faces. And some is supposed to be a duck, and some is supposed to be a rabbit.
Admin
Admin
This technique takes software craftsmanship to a whole new level.
Admin
My first programming gig was much the same.
All the code in one module, took 15 minutes to open, all controls on the forms called checkbox12, checkbox15 etc etc. The front end alone was a mammoth 1/2 GB as the developer hadn't bothered to split his UI from his data.
Fortunately i had a sympathetic boss who let me bin it and start again from scratch.
Admin
If it is, she's only thinking about the money.
Admin
God dang it...you are displaying my art sideways again!
Admin
It sort of resembles a 90-degree rotated graph of something. Perhaps of the developer's likelihood of leaving that company to work elsewhere?
Also, good point Feng made about no Type on most variables! Obviously I've been writing far too much Delphi/Javascript lately! Maybe the guy only wrote Windows Script rather than VBA, and assumed 'they'll be the same...'?
Admin
I think somebody has already had plenty of quack.
Admin
Didn't anyone ever tell Mike? If you don't move your vowels, you get consonated.
Admin
Sort the lines by length, damnit!
Admin
Hit CTRL+A and it will shoot lasers out its eyes.
Admin
"Gubr2, GUBR1, GubrA, GubrB, GubrC, GubrU"
Hey, that's Obelix! Gubr Gubr Gubr Gubr!
Admin
Actually, this is beautiful from a maintenance perspective. Now Mike has a list of all of the global variables to use in his find-and-replace.
Admin
"Gubr2, GUBR1, GubrA, GubrB, GubrC, GubrU"
Hey, that's Obelix!
Admin
It's like a christmas tree!
Admin
Really? Yuck. So glad I've had so little exposure to VB/VBA.
Admin
Does anyone remember a poster from a computer software company in the mid-1980's where the backdrop looked like a "misty mountain range", but upon closer examination was a reclining naked woman????
If anyone knows of a reproduction (or even better has an original!!!) please contact me directly.
Admin
Admin
But I suppose explicitly writing all of the declarations would have interrupted the aesthetic flow of the code.
Admin
Someone help me out here, I can't find Waldo.
Admin
Admin
All I see is a haggard old lady.
Admin
I don't see what Merle Haggard's old lady has to do with any of this.
Admin
Twas brillig, and the soldZ TickerTal1s, Did Geta1ID and GubrU in the wabe: All Post3 were the PosandAllowd, And the RftUpPat2 GubrA
Admin
now reformatting my current project source code
Admin
I always try to arrange variable declarations by line length. We're talking about a handful of function-level declarations rather than a stinking mess of globals, but I always find myself putting them into some kind of natural order and it's normally by length (sometimes alphabetical if that looks more asthetically pleasing). It's not a code thing since every book I own is arranged in height order as well. If I washed a bit more often I would highly suspect OCD but as it stands I'm probably just time-wasting.
Admin
It's all about using the right tool for the job. In this case, they used a lathe.
Admin
It looks like Rageface side-on
Admin
More like a fright calculator...
Admin
Admin
You mean CDO. You should put the letters in alphabetical order like they belong.
Admin
I bet he doesn't!
Admin
I can see how this program would be difficult to maintain. Every time you create a new variable, not only do you have to come up with a name that concisely expresses the semantic purpose of the variable within the program, but you also have to make sure that the length of the name will fit properly with the aesthetic layout of the declaration list.
Admin
I see it, it's a sailboat!
Admin
Now we know how the Easter Island statues came to be...an ancient alien civilization programming in VB noticed this beautiful pattern in their global variables and decided to memorialize them in stone.
Admin
Actually, this could be a fun project, especially if it looks like you will be stuck with maintaining the Freight Calculator for the rest of your time at this company.
The goal would be to gradually eliminate as many global variables as possible, by replacing them with parameters that are passed from one function to the next (assuming this system has more than one function).
Start by picking a variable, seeing where it is used, then declare it as a local at the highest level of the stack, and change the function call(s) to pass it as an argument to the functions.
Little by little, you will transform the globals into locals, creating order and beauty in this labyrinth. Imagine the satisfaction and sense of accomplishment. In the process you will develop an understanding of the app, and add documentation throughout the code. Discover the beauty in the humblest of things.