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

 
GeneralRe: a minor horror Pin
Paul Conrad5-Oct-08 18:53
professionalPaul Conrad5-Oct-08 18:53 
GeneralRe: a minor horror Pin
BillW336-Oct-08 7:31
professionalBillW336-Oct-08 7:31 
GeneralRe: a minor horror Pin
Paul Conrad6-Oct-08 9:38
professionalPaul Conrad6-Oct-08 9:38 
GeneralRe: a minor horror Pin
BillW336-Oct-08 12:24
professionalBillW336-Oct-08 12:24 
GeneralRe: a minor horror Pin
Paul Conrad7-Oct-08 5:57
professionalPaul Conrad7-Oct-08 5:57 
GeneralRe: a minor horror Pin
sa_runner10-Oct-08 5:48
sa_runner10-Oct-08 5:48 
GeneralRe: a minor horror Pin
Paul Conrad10-Oct-08 7:14
professionalPaul Conrad10-Oct-08 7:14 
Generalevil hexadecimal numbers formatting Pin
Stefano Basili2-Oct-08 1:01
Stefano Basili2-Oct-08 1:01 
Working on an old vb6 project I found this treasure ...

Function conv8(number) As String
   If number = "" Then
      number = 0
   End If
   conv8 = Hex(Numero)

   Select Case Len(conv8)
      Case 1
         conv8 = 0 & 0 & 0 & 0 & 0 & 0 & 0 & conv8
      Case 2
         conv8 = 0 & 0 & 0 & 0 & 0 & 0 & conv8
      Case 3
         conv8 = 0 & 0 & 0 & 0 & 0 & conv8
      Case 4
         conv8 = 0 & 0 & 0 & 0 & conv8
      Case 5
         conv8 = 0 & 0 & 0 & conv8
      Case 6
         conv8 = 0 & 0 & conv8
      Case 7
         conv8 = 0 & conv8
   End Select

End Function


Obviously they wrote also a Conv1, Conv2, Conv4 ... and thank god there was no need for a Conv64 !!!! Smile | :)

Don't write code: generate it!

GeneralRe: evil hexadecimal numbers formatting Pin
CPallini2-Oct-08 1:53
mveCPallini2-Oct-08 1:53 
GeneralRe: evil hexadecimal numbers formatting Pin
PIEBALDconsult2-Oct-08 4:13
mvePIEBALDconsult2-Oct-08 4:13 
GeneralRe: evil hexadecimal numbers formatting Pin
Nagy Vilmos2-Oct-08 4:47
professionalNagy Vilmos2-Oct-08 4:47 
GeneralRe: evil hexadecimal numbers formatting Pin
Rob Grainger7-Oct-08 4:19
Rob Grainger7-Oct-08 4:19 
GeneralRe: evil hexadecimal numbers formatting Pin
jamie5502-Oct-08 12:53
jamie5502-Oct-08 12:53 
JokeRe: evil hexadecimal numbers formatting Pin
CPallini2-Oct-08 21:37
mveCPallini2-Oct-08 21:37 
GeneralRe: evil hexadecimal numbers formatting Pin
jamie5503-Oct-08 2:23
jamie5503-Oct-08 2:23 
QuestionRe: evil hexadecimal numbers formatting Pin
CPallini3-Oct-08 2:41
mveCPallini3-Oct-08 2:41 
AnswerRe: evil hexadecimal numbers formatting Pin
jamie5503-Oct-08 2:45
jamie5503-Oct-08 2:45 
GeneralRe: evil hexadecimal numbers formatting Pin
Paul Conrad3-Oct-08 6:24
professionalPaul Conrad3-Oct-08 6:24 
GeneralRe: evil hexadecimal numbers formatting Pin
Louis Cipher10-Nov-08 16:14
Louis Cipher10-Nov-08 16:14 
GeneralRe: evil hexadecimal numbers formatting Pin
Stefano Basili11-Nov-08 3:09
Stefano Basili11-Nov-08 3:09 
GeneralHorrible enough for you? Pin
dojohansen1-Oct-08 4:28
dojohansen1-Oct-08 4:28 
GeneralRe: Horrible enough for you? Pin
geoffs1-Oct-08 4:43
geoffs1-Oct-08 4:43 
GeneralRe: Horrible enough for you? Pin
dojohansen1-Oct-08 4:48
dojohansen1-Oct-08 4:48 
GeneralRe: Horrible enough for you? Pin
geoffs1-Oct-08 4:56
geoffs1-Oct-08 4:56 
GeneralRe: Horrible enough for you? Pin
BillW331-Oct-08 6:49
professionalBillW331-Oct-08 6:49 

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.