Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- The CEO of the company (and my former boss) sold the company
- leaving me free to comment the code as I should have. The
- former CEO of the company will be referred to as Dip Shit, or DS for short.
- DS thinks he is a software developing genius. Unfortunately for
- me (the maintenance programmer) I spent too much time cleaning
- up Dip's Shit.
- DS is a daredevil developer. Like Evel Knievel his code uses
- the GOTO statement frequently jumping daringly from a code
- module into the middle of an IF...THEN structure in a different
- module that has nothing to do with the first module.
- Speaking of IF structures DS loves them. He has no idea what a
- CASE or SWITCH logic block is. Instead, I get to play code
- archaeologist, and dig though a massively nested (and un-
- indented) IF...THEN...ELSE logic blocks.
- DS thinks of himself as clever, and this shows though with the
- variable names he chooses:
- global i=0;
- global dateMyWife = 1;
- datesAreAFruit = '12/12/98';
- giveDatesToMyWife = datesAreAFruit + dateMyWife;
- if (someStuid)
- {
- giveDatesToMyWife = false;
- }
- // Ryan. Why does this sometimes crash?
- if (giveDatesToMyWife) goto :hotTub
- // Well, DS because you changed giveDatesToMyWife data type,
- (also, adding an integer to the string -- which the compiler
- warned you about)... Anyway in a weakly typed language you
- obtained drain bramage by conditionally changing the data type
- from a string to a Boolean, so that when the
- if(giveDatesToMyWife) executes, when the variable is a string
- the program correctly crashes -- because a string is not a
- conditional bool type. Also, since someStuid is global, the
- invisible pink unicorn only knows where this value is set, or
- where and in what modules it gets changed.
- DS only knows how to scope variables as global. Stating when he
- "tried using local, or private, my programs would always error
- with variable not found error, so it's just easier to make
- everything a global."
- I could go on, but as you dig though this flying-spaghetti-
- monster nightmare code you will see what I mean.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement