Click here to Skip to main content
15,912,205 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralAnother loop bites the dust PinPopular
_Maxxx_24-Jun-08 13:49
professional_Maxxx_24-Jun-08 13:49 
GeneralRe: Another loop bites the dust Pin
SomeGuyThatIsMe24-Jun-08 14:47
SomeGuyThatIsMe24-Jun-08 14:47 
GeneralRe: Another loop bites the dust Pin
_Maxxx_24-Jun-08 14:57
professional_Maxxx_24-Jun-08 14:57 
GeneralRe: Another loop bites the dust Pin
PIEBALDconsult24-Jun-08 16:29
mvePIEBALDconsult24-Jun-08 16:29 
GeneralRe: Another loop bites the dust Pin
_Maxxx_24-Jun-08 16:39
professional_Maxxx_24-Jun-08 16:39 
GeneralRe: Another loop bites the dust Pin
Brady Kelly24-Jun-08 21:49
Brady Kelly24-Jun-08 21:49 
GeneralRe: Another loop bites the dust Pin
_Maxxx_25-Jun-08 12:28
professional_Maxxx_25-Jun-08 12:28 
GeneralRe: Another loop bites the dust Pin
PIEBALDconsult25-Jun-08 4:01
mvePIEBALDconsult25-Jun-08 4:01 
maxxx# wrote:
the programmer assumed


See, there's the problem. Big Grin | :-D


But if the spec says to do that, then it's OK and you can blame it on the monkey who wrote the spec.

Ideally, the programmer would ask for clarification (in an email), and then take a break awaiting a response, however long that takes.

But this is clearly a case in which while is the proper construct.


Oh...

maxxx# wrote:
why would you want to select to print zero copies


To just save the file on disk. I seem to recall this in a system I had to support a bunch of years ago. The PRINT program would generate a report file, which it could then print. Oh, right, it was a VAX/VMS system, so the file got spooled to a print queue, not sent to the printer directly. As I recall, saying 0 for copies, or 0 for paper type would indicate that you didn't want to print it.


Bonus: Even though VAX/VMS allows a print job to specify the number of copies as 1 to 255, this PRINT program only allowed up to 20 WTF | :WTF: . One of the users needed 80 copies of a particular report, so she ran it four times, each time having to get the input just right. Eventually I realized what she was doing. Because we had the source code (VAX BASIC Dead | X| ) I was able to change the program to allow the full 255 copies.
GeneralRe: Another loop bites the dust Pin
_Maxxx_25-Jun-08 12:33
professional_Maxxx_25-Jun-08 12:33 
GeneralRe: Another loop bites the dust Pin
PIEBALDconsult26-Jun-08 5:28
mvePIEBALDconsult26-Jun-08 5:28 
GeneralRe: Another loop bites the dust Pin
_Maxxx_26-Jun-08 11:29
professional_Maxxx_26-Jun-08 11:29 
GeneralRe: Another loop bites the dust Pin
SomeGuyThatIsMe25-Jun-08 2:04
SomeGuyThatIsMe25-Jun-08 2:04 
GeneralRe: Another loop bites the dust Pin
Derek Bartram25-Jun-08 1:05
Derek Bartram25-Jun-08 1:05 
GeneralRe: Another loop bites the dust Pin
QuiJohn25-Jun-08 2:07
QuiJohn25-Jun-08 2:07 
GeneralRe: Another loop bites the dust Pin
SomeGuyThatIsMe25-Jun-08 2:17
SomeGuyThatIsMe25-Jun-08 2:17 
GeneralRe: Another loop bites the dust Pin
leppie25-Jun-08 2:27
leppie25-Jun-08 2:27 
GeneralRe: Another loop bites the dust Pin
Yusuf25-Jun-08 16:51
Yusuf25-Jun-08 16:51 
GeneralRe: Another loop bites the dust Pin
_Maxxx_25-Jun-08 17:00
professional_Maxxx_25-Jun-08 17:00 
GeneralRe: Another loop bites the dust Pin
PIEBALDconsult26-Jun-08 5:21
mvePIEBALDconsult26-Jun-08 5:21 
GeneralRe: Another loop bites the dust Pin
_Maxxx_26-Jun-08 11:27
professional_Maxxx_26-Jun-08 11:27 
JokeRe: Another loop bites the dust Pin
Spacix One28-Jun-08 5:20
Spacix One28-Jun-08 5:20 
GeneralClever For-loop Pin
Oyvind Bratland24-Jun-08 3:04
Oyvind Bratland24-Jun-08 3:04 
GeneralRe: Clever For-loop Pin
James Simpson24-Jun-08 3:37
James Simpson24-Jun-08 3:37 
GeneralRe: Clever For-loop Pin
Oyvind Bratland24-Jun-08 3:51
Oyvind Bratland24-Jun-08 3:51 
JokeRe: Clever For-loop Pin
leppie24-Jun-08 6:06
leppie24-Jun-08 6:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.