Click here to Skip to main content
15,891,951 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.

 
JokeRe: [Solved] Why Do Computer Counts from Zero. Pin
Keith Barrow23-Apr-13 0:37
professionalKeith Barrow23-Apr-13 0:37 
GeneralRe: [Solved] Why Do Computer Counts from Zero. Pin
kburman623-Apr-13 5:05
professionalkburman623-Apr-13 5:05 
GeneralRe: [Solved] Why Do Computer Counts from Zero. Pin
jsc4223-Apr-13 22:59
professionaljsc4223-Apr-13 22:59 
GeneralRe: [Solved] Why Do Computer Counts from Zero. Pin
svella24-Apr-13 3:58
svella24-Apr-13 3:58 
GeneralRe: [Solved] Why Do Computer Counts from Zero. Pin
jsc4224-Apr-13 4:37
professionaljsc4224-Apr-13 4:37 
GeneralRe: [Solved] Why Do Computer Counts from Zero. Pin
svella24-Apr-13 6:09
svella24-Apr-13 6:09 
GeneralRe: [Solved] Why Do Computer Counts from Zero. Pin
DarthDana24-Apr-13 5:28
professionalDarthDana24-Apr-13 5:28 
GeneralRe: [Solved] Why Do Computer Counts from Zero. Pin
KP Lee24-Apr-13 20:45
KP Lee24-Apr-13 20:45 
It was also handy back in the days when only single array indexes existed and you wanted dual indexes because everything mathematically matched up really handily without taking extra steps.
for (i = 0; i < 10; i++)// Not at all like the format of older languages!
{
for (j = 0; j < 10: j++)
{
ind= i + j * 10;
val[ind] = some value
}
}

Or the other way around, find the two indexes from the current index:
for (ind = 0; ind < 100; ind++)
{
j = ind/10;
i = ind - (j * 10);
}
GeneralMessage Closed Pin
20-Apr-13 5:39
Member 1000120220-Apr-13 5:39 
GeneralRe: waht is this code means in web programming t=login%3CScript%20%3Ealert(%22HelloSIG%22)%3C/Script%3E t=%3CScript+%3Ealert%28%22HelloSIG%22%29%3C%2FScript%3E] d=hTNonAxS6pSg7xdyL1eUirZ8bPjtkz-rbl6VNlqYedqYrHs_bDcid9Hlixt8Y2moR5bKlpB-ULt3A_ Pin
R. Giskard Reventlov20-Apr-13 5:47
R. Giskard Reventlov20-Apr-13 5:47 
GeneralRe: waht is this code means in web programming t=login%3CScript%20%3Ealert(%22HelloSIG%22)%3C/Script%3E t=%3CScript+%3Ealert%28%22HelloSIG%22%29%3C%2FScript%3E] d=hTNonAxS6pSg7xdyL1eUirZ8bPjtkz-rbl6VNlqYedqYrHs_bDcid9Hlixt8Y2moR5bKlpB-ULt3A_ Pin
RedDk20-Apr-13 8:27
RedDk20-Apr-13 8:27 
GeneralRe: waht is this code means in web programming t=login%3CScript%20%3Ealert(%22HelloSIG%22)%3C/Script%3E t=%3CScript+%3Ealert%28%22HelloSIG%22%29%3C%2FScript%3E] d=hTNonAxS6pSg7xdyL1eUirZ8bPjtkz-rbl6VNlqYedqYrHs_bDcid9Hlixt8Y2moR5bKlpB-ULt3A_ Pin
PIEBALDconsult20-Apr-13 18:06
mvePIEBALDconsult20-Apr-13 18:06 
GeneralMessage Closed Pin
20-Apr-13 4:52
Member 1000120220-Apr-13 4:52 
GeneralRe: Can anyone help me identify the strange condes that I have in my webserver log files( asp.net application) and what to do to protect my data Pin
PIEBALDconsult20-Apr-13 5:05
mvePIEBALDconsult20-Apr-13 5:05 
GeneralRe: Can anyone help me identify the strange condes that I have in my webserver log files( asp.net application) and what to do to protect my data Pin
Member 1000120220-Apr-13 5:21
Member 1000120220-Apr-13 5:21 
GeneralRe: Can anyone help me identify the strange condes that I have in my webserver log files( asp.net application) and what to do to protect my data Pin
Thomas Daniels21-Apr-13 3:32
mentorThomas Daniels21-Apr-13 3:32 
RantYet another Subversion rant Pin
jim lahey19-Apr-13 5:00
jim lahey19-Apr-13 5:00 
GeneralRe: Yet another Subversion rant Pin
ZurdoDev19-Apr-13 5:24
professionalZurdoDev19-Apr-13 5:24 
GeneralRe: Yet another Subversion rant Pin
QuiJohn19-Apr-13 5:34
QuiJohn19-Apr-13 5:34 
GeneralRe: Yet another Subversion rant Pin
ZurdoDev19-Apr-13 5:39
professionalZurdoDev19-Apr-13 5:39 
GeneralRe: Yet another Subversion rant Pin
James Lonero25-Apr-13 8:01
James Lonero25-Apr-13 8:01 
GeneralRe: Yet another Subversion rant Pin
QuiJohn26-Apr-13 2:33
QuiJohn26-Apr-13 2:33 
GeneralRe: Yet another Subversion rant Pin
LloydA11119-Apr-13 5:46
LloydA11119-Apr-13 5:46 
GeneralRe: Yet another Subversion rant Pin
OriginalGriff19-Apr-13 5:55
mveOriginalGriff19-Apr-13 5:55 
GeneralRe: Yet another Subversion rant Pin
Nemanja Trifunovic19-Apr-13 6:48
Nemanja Trifunovic19-Apr-13 6:48 

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.