Programming hints everyone could use
Moderator: Thanas
Programming hints everyone could use
Actually, I was kidding. Never use any of these practices in real life. An interesting and funny read though.
I am capable of rearranging the fundamental building blocks of the universe in under six seconds. I shelve physics texts under "Fiction" in my personal library! I am grasping the reigns of the universe's carriage, and every morning get up and shout "Giddy up, boy!" You may never grasp the complexities of what I do, but at least have the courtesy to feign something other than slack-jawed oblivion in my presence. I, sir, am a wizard, and I break more natural laws before breakfast than of which you are even aware!
-- Vaarsuvius, from Order of the Stick
-- Vaarsuvius, from Order of the Stick
- InnocentBystander
- The Russian Circus
- Posts: 3466
- Joined: 2004-04-10 06:05am
- Location: Just across the mighty Hudson
I know the feeling. For my company to get hired I had to take an evaluation test where they gave us heavily obsfucated code and had us figure out the output value.InnocentBystander wrote:That lisp code made me cry.
I am capable of rearranging the fundamental building blocks of the universe in under six seconds. I shelve physics texts under "Fiction" in my personal library! I am grasping the reigns of the universe's carriage, and every morning get up and shout "Giddy up, boy!" You may never grasp the complexities of what I do, but at least have the courtesy to feign something other than slack-jawed oblivion in my presence. I, sir, am a wizard, and I break more natural laws before breakfast than of which you are even aware!
-- Vaarsuvius, from Order of the Stick
-- Vaarsuvius, from Order of the Stick
- NecronLord
- Harbinger of Doom
- Posts: 27384
- Joined: 2002-07-07 06:30am
- Location: The Lost City
This is just wicked...
Really now.
Really now.
Superior Moderator - BotB - HAB [Drill Instructor]-Writer- Stardestroyer.net's resident Star-God.
"We believe in the systematic understanding of the physical world through observation and experimentation, argument and debate and most of all freedom of will." ~ Stargate: The Ark of Truth
"We believe in the systematic understanding of the physical world through observation and experimentation, argument and debate and most of all freedom of will." ~ Stargate: The Ark of Truth
- Manus Celer Dei
- Jedi Master
- Posts: 1486
- Joined: 2005-01-01 06:30pm
- Location: I need you to relax your anus.
Devious!Åccented Letters
Use accented characters on variable names. E.g.
typedef struct { int i; } ínt;
where the second ínt's í is actually i-acute. With only a simple text editor, it's nearly impossible to distinguish the slant of the accent mark.
"We will build cities in a day!"
"Man would cower at the sight!"
"We will build towers to the heavens!"
"Man was not built for such a height!"
"We will be heroes!"
"We will BUILD heroes!"
[/size][/i]- Tinkerbell
- Jedi Master
- Posts: 1487
- Joined: 2004-10-24 01:04pm
- Location: Neverland
Obscure film references
Use constant names like LancelotsFavouriteColour instead of blue and assign it hex value of $0204FB. The color looks identical to pure blue on the screen, and a maintenance programmer would have to work out 0204FB (or use some graphic tool) to know what it looks like. Only someone intimately familiar with Monty Python and the Holy Grail would know that Lancelot's favorite color was blue. If a maintenance programmer can't quote entire Monty Python movies from memory, he or she has no business being a programmer.
That made me happy
Darth Wong wrote:The American "family values" agenda is simple: alter the world so that you can completely ignore your child and still be confident that he is receiving the same kind of Christian upbringing that you would give him if you weren't busy.
- SirNitram
- Rest in Peace, Black Mage
- Posts: 28367
- Joined: 2002-07-03 04:48pm
- Location: Somewhere between nowhere and everywhere
Tehy froogt my faovirte tirck: MIT dsicovreed taht if the frist and lsat lteters are rgiht, and the lnegth is crorect, you wlil raed it.
In other words, if every one of your functions is mispelt under those rules, people will automatically correct the spellings and break things.
In other words, if every one of your functions is mispelt under those rules, people will automatically correct the spellings and break things.
Manic Progressive: A liberal who violently swings from anger at politicos to despondency over them.
Out Of Context theatre: Ron Paul has repeatedly said he's not a racist. - Destructinator XIII on why Ron Paul isn't racist.
Shadowy Overlord - BMs/Black Mage Monkey - BOTM/Jetfire - Cybertron's Finest/General Miscreant/ASVS/Supermoderator Emeritus
Debator Classification: Trollhunter
Out Of Context theatre: Ron Paul has repeatedly said he's not a racist. - Destructinator XIII on why Ron Paul isn't racist.
Shadowy Overlord - BMs/Black Mage Monkey - BOTM/Jetfire - Cybertron's Finest/General Miscreant/ASVS/Supermoderator Emeritus
Debator Classification: Trollhunter
- InnocentBystander
- The Russian Circus
- Posts: 3466
- Joined: 2004-04-10 06:05am
- Location: Just across the mighty Hudson
- Darth Paul
- Sith Apprentice
- Posts: 52
- Joined: 2002-08-22 11:44pm
- Location: Canada
A classic. You may also enjoy http://thedailywtf.com/.
The sad thing is, after maintaining some (rather expensive) legacy code for awhile, I have seen way too many of these, uh, techniques employed for real.
I don't need to test my programs. I have an error-correcting modem.
The sad thing is, after maintaining some (rather expensive) legacy code for awhile, I have seen way too many of these, uh, techniques employed for real.
I don't need to test my programs. I have an error-correcting modem.
- Admiral Valdemar
- Outside Context Problem
- Posts: 31572
- Joined: 2002-07-04 07:17pm
- Location: UK
You used a combo of VB and Pascal? You used VB for anything besides a GUI?
[CluelessBlond]Ewwwwwwwwwwwwwwwww........................[/Clueless Blond]
Otherwise, I'm suddenly grateful the code I have to decipher is only lazy, not malicious. Force these guys to use Perl for a month, they'd learn how to document code.... *grumbles*
[CluelessBlond]Ewwwwwwwwwwwwwwwww........................[/Clueless Blond]
Otherwise, I'm suddenly grateful the code I have to decipher is only lazy, not malicious. Force these guys to use Perl for a month, they'd learn how to document code.... *grumbles*
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.
Periodic Pwnage Pantry:
"Faith? Isn't that another term for ignorance?" - Gregory House
"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House
"This is usually the part where people start screaming." - Gabriel Sylar
Periodic Pwnage Pantry:
"Faith? Isn't that another term for ignorance?" - Gregory House
"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House
"This is usually the part where people start screaming." - Gabriel Sylar
- Admiral Valdemar
- Outside Context Problem
- Posts: 31572
- Joined: 2002-07-04 07:17pm
- Location: UK
Yeah, but still....
What part of "VB is for GUI's" did your instructors not understand? Or did they not know how to link em? It's the reason VB.NET is utterly and completely useless(VS2005 already gives you GUI capabilities for C#).
Oi, never mind my snobbery. I just dislike VB.....
What part of "VB is for GUI's" did your instructors not understand? Or did they not know how to link em? It's the reason VB.NET is utterly and completely useless(VS2005 already gives you GUI capabilities for C#).
Oi, never mind my snobbery. I just dislike VB.....
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.
Periodic Pwnage Pantry:
"Faith? Isn't that another term for ignorance?" - Gregory House
"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House
"This is usually the part where people start screaming." - Gabriel Sylar
Periodic Pwnage Pantry:
"Faith? Isn't that another term for ignorance?" - Gregory House
"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House
"This is usually the part where people start screaming." - Gabriel Sylar
- Admiral Valdemar
- Outside Context Problem
- Posts: 31572
- Joined: 2002-07-04 07:17pm
- Location: UK
It's not a bug, it's a feature, dammit!It actually worked somewhat, just, er, not as in the brief.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.
Periodic Pwnage Pantry:
"Faith? Isn't that another term for ignorance?" - Gregory House
"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House
"This is usually the part where people start screaming." - Gabriel Sylar
Periodic Pwnage Pantry:
"Faith? Isn't that another term for ignorance?" - Gregory House
"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House
"This is usually the part where people start screaming." - Gabriel Sylar
- Ace Pace
- Hardware Lover
- Posts: 8456
- Joined: 2002-07-07 03:04am
- Location: Wasting time instead of money
- Contact:
Is that what you tell those above you when your program fucks up?Faqa wrote:It's not a bug, it's a feature, dammit!It actually worked somewhat, just, er, not as in the brief.
That list shall be put into operation as soon as I figure out how to make it work
Brotherhood of the Bear | HAB | Mess | SDnet archivist |
Hey, if they can't appreciate pondering patience while waiting for a page to get through redundant server checks, they're not worth my time
Most of that list is C++ in-jokes, Ace. Your course doesn't cover that unless I'm mistaken.
Most of that list is C++ in-jokes, Ace. Your course doesn't cover that unless I'm mistaken.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.
Periodic Pwnage Pantry:
"Faith? Isn't that another term for ignorance?" - Gregory House
"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House
"This is usually the part where people start screaming." - Gabriel Sylar
Periodic Pwnage Pantry:
"Faith? Isn't that another term for ignorance?" - Gregory House
"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House
"This is usually the part where people start screaming." - Gabriel Sylar
There's a reason why my high school CS teacher had rules to contradict these. Like no goto, break, or global, among other rules.
Gratuitous use of goto in a tightly packed program is best (hell even one, very obscure goto in the middle of the progam is good). Add or remove just one line in a program can royaly fuck it over. Using labels reduces 99% of this, so the moral of the story is never use labels with any goto statement.
Gratuitous use of goto in a tightly packed program is best (hell even one, very obscure goto in the middle of the progam is good). Add or remove just one line in a program can royaly fuck it over. Using labels reduces 99% of this, so the moral of the story is never use labels with any goto statement.
My brother and sister-in-law: "Do you know where milk comes from?"
My niece: "Yeah, from the fridge!"
My niece: "Yeah, from the fridge!"
We did some relatively complex stuff, but we were always encouraged to find ways around using break (and in most loops, using the test variable is sufficient). The switch statement was an exception as it's very difficult to use without break sometimes.
My brother and sister-in-law: "Do you know where milk comes from?"
My niece: "Yeah, from the fridge!"
My niece: "Yeah, from the fridge!"
- Dennis Toy
- BANNED
- Posts: 2072
- Joined: 2002-07-20 01:55am
- Location: Deep Space Nine
- Xenophobe3691
- Sith Marauder
- Posts: 4334
- Joined: 2002-07-24 08:55am
- Location: University of Central Florida, Orlando, FL
- Contact:
Dammit man, you're telling me! I got my program all nice and set, only to discover that there's no exponent operator in that language.Dennis Toy wrote:I heard that VB was actually used for Human Genome Project. The super-computers ran using VB codes.
Man oh man do i HATE Java! that shit is so hard and needlessly complex that i totally gave up trying to program in it.
And it doesn't make creating one easy, as well. God Damn Java...