# Funniest / most useless computer programming comments...

**URL:** <https://boards.straightdope.com/t/funniest-most-useless-computer-programming-comments/373689>\
**Category:** Miscellaneous and Personal Stuff I Must Share\
**Created:** [September 22, 2006, 10:21am UTC](https://boards.straightdope.com/t/funniest-most-useless-computer-programming-comments/373689 "2006-09-22T10:21:55Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![iamthewalrus\_3](https://avatars.discourse-cdn.com/v4/letter/i/258eb7/32.png) [@iamthewalrus\_3](https://boards.straightdope.com/u/iamthewalrus_3)\
**Post date:** [September 22, 2006, 9:11pm UTC](https://boards.straightdope.com/t/funniest-most-useless-computer-programming-comments/373689/21 "2006-09-22T21:11:37Z")

</div>

[QUOTE=DiggitCamara]  
I was BORN on that day!

And, funnily enough, some code I work on does have constants that seem to spring out of the same mind that wrote the two you show. It goes something like:

Global Const NUM\_ROW\_UNO = 1  
Global Const NUM\_ROW\_DOS = 2  
Global Const NUM\_ROW\_TRES = 3  
Global Const NUM\_ROW\_CUATRO = 4  
Global Const NUM\_ROW\_CINCO = 5  
Global Const NUM\_ROW\_SEIS = 6

(it’s in spanish. And it goes up to 28)… :rolleyes: and it’s for Visual Basic ☹  
[/QUOTE]  
Hey, this is global linguistically portable code. All you have to do is run a spanish to whatever translation program on all strings that match NUM\_ROW\_NUMERL, and the code can be instantly understood by someone who only speaks, say, Swahili.

My favorite comment (and code) block that I’ve seen in code I work with so far was

/\* Check for new format if building new version \*/  
#ifdef BUILD\_OPTION\_NEW\_VERSION  
if (state-\>new\_float\_format\_type) {  
#else  
{  
#endif  
}

I’m sure that _used_ to do something important.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [September 22, 2006, 9:30pm UTC](https://boards.straightdope.com/t/funniest-most-useless-computer-programming-comments/373689/22 "2006-09-22T21:30:00Z")

</div>

Ah yes, I just remembered my favorite comment that I’ve seen.

There was this one cellular phone game I had to port, and the entirety of it was in a single function that did all the key-down/key-up checks, redraw timing, and game logic in a single large loop, like this:

```auto

while (true) {
   try {
      do {
         ...timing code...
         ...key state code...
         if (state == MENU) {
            if (state2 == MENU1) {
               ...draw menu screen...
               break;
            }
            else if (state2 == MENU2) {
               ...draw menu screen...
               break;
            }
            ..etc.
         }
         ...draw main game background...
         ...game logic...
         ...etc.
      }
      while (0);
   }
   catch (Exception e) {} //Keep going
}

```

“Keep going” :dubious:

Looking at the code I was so afraid of removing that try catch statement; it wouldn’t have surprised me a bit that he had simply had too many divide by zero, accessing a null pointer, or whatever errors without knowing why or where, or feeling like debugging it. So he just made the thing keep going regardless… :rolleyes:

---

<div class="post-metadata">

**Author:** ![Bytegeist](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@Bytegeist](https://boards.straightdope.com/u/Bytegeist)\
**Post date:** [September 22, 2006, 9:37pm UTC](https://boards.straightdope.com/t/funniest-most-useless-computer-programming-comments/373689/23 "2006-09-22T21:37:52Z")

</div>

[QUOTE=Sage Rat]

```auto

   catch (Exception e) {} //Keep going

```

So he just made the thing keep going regardless… :rolleyes:

[/QUOTE]

Well now, he was just writing **fault-tolerant** code, don’t you see.

---

<div class="post-metadata">

**Author:** ![DiggitCamara](https://avatars.discourse-cdn.com/v4/letter/d/df788c/32.png) [@DiggitCamara](https://boards.straightdope.com/u/DiggitCamara)\
**Post date:** [September 22, 2006, 10:10pm UTC](https://boards.straightdope.com/t/funniest-most-useless-computer-programming-comments/373689/24 "2006-09-22T22:10:55Z")

</div>

[QUOTE=Sage Rat]  
Ah yes, I just remembered my favorite comment that I’ve seen.

There was this one cellular phone game I had to port, and the entirety of it was in a single function that did all the key-down/key-up checks, redraw timing, and game logic in a single large loop, like this:

```auto

while (true) {
   try {
      do {
    *snip*
      }
      while (0);
   }
   catch (Exception e) {} //Keep going
}

```

“Keep going” :dubious:

Looking at the code I was so afraid of removing that try catch statement; it wouldn’t have surprised me a bit that he had simply had too many divide by zero, accessing a null pointer, or whatever errors without knowing why or where, or feeling like debugging it. So he just made the thing keep going regardless… :rolleyes:  
[/QUOTE]

Sounds like the Visual Basic philosophy applied to C.

Only they make it easier for you there:

On Error Resume Next

---

<div class="post-metadata">

**Author:** ![Shodan](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Shodan](https://boards.straightdope.com/u/Shodan)\
**Post date:** [September 23, 2006, 2:39am UTC](https://boards.straightdope.com/t/funniest-most-useless-computer-programming-comments/373689/25 "2006-09-23T02:39:56Z")

</div>

One of my first programming gigs, I coded a genie named Rondar who lived in the computer.

I coded an internal array of threats that Rondar would issue periodically to the operators if the printer needed paper (“Feed Rondar, or Rondar will put your name on junk mailing lists”) or stuff like that.

The operators loved it, because it mostly ran on the midnight shift and they were bored. Trouble was, one of them liked it so much she nominated me for an internal customer service award, and my boss found out about it and made me remove it all.

This was the same boss who cussed me out for labeling the user interface subroutines Dr.-Doolittle. Because he could talk to the animals.

I only lasted there about a year.

Regards,  
Shodan

[Previous page](https://boards.straightdope.com/t/funniest-most-useless-computer-programming-comments/373689.md?page=1)
