Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. /*
  2. The CEO of the company (and my former boss) sold the company
  3. leaving me free to comment the code as I should have. The
  4. former CEO of the company will be referred to as Dip Shit, or DS for short.
  5.  
  6. DS thinks he is a software developing genius. Unfortunately for
  7. me (the maintenance programmer) I spent too much time cleaning
  8. up Dip's Shit.
  9. DS is a daredevil developer. Like Evel Knievel his code uses
  10. the GOTO statement frequently jumping daringly from a code
  11. module into the middle of an IF...THEN structure in a different
  12. module that has nothing to do with the first module.
  13. Speaking of IF structures DS loves them. He has no idea what a
  14. CASE or SWITCH logic block is. Instead, I get to play code
  15. archaeologist, and dig though a massively nested (and un-
  16. indented) IF...THEN...ELSE logic blocks.
  17.  
  18. DS thinks of himself as clever, and this shows though with the
  19. variable names he chooses:
  20.  
  21. global i=0;
  22. global dateMyWife = 1;
  23. datesAreAFruit = '12/12/98';
  24. giveDatesToMyWife = datesAreAFruit + dateMyWife;
  25. if (someStuid)
  26. {
  27. giveDatesToMyWife = false;
  28. }
  29.  
  30. // Ryan. Why does this sometimes crash?
  31. if (giveDatesToMyWife) goto :hotTub
  32.  
  33. // Well, DS because you changed giveDatesToMyWife data type,
  34. (also, adding an integer to the string -- which the compiler
  35. warned you about)... Anyway in a weakly typed language you
  36. obtained drain bramage by conditionally changing the data type
  37. from a string to a Boolean, so that when the
  38. if(giveDatesToMyWife) executes, when the variable is a string
  39. the program correctly crashes -- because a string is not a
  40. conditional bool type. Also, since someStuid is global, the
  41. invisible pink unicorn only knows where this value is set, or
  42. where and in what modules it gets changed.
  43.  
  44. DS only knows how to scope variables as global. Stating when he
  45. "tried using local, or private, my programs would always error
  46. with variable not found error, so it's just easier to make
  47. everything a global."
  48.  
  49. I could go on, but as you dig though this flying-spaghetti-
  50. monster nightmare code you will see what I mean.
  51. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement