Click here to Skip to main content
15,887,267 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: GUIDs Pin
Kornfeld Eliyahu Peter2-Mar-14 0:40
professionalKornfeld Eliyahu Peter2-Mar-14 0:40 
GeneralRe: GUIDs Pin
OriginalGriff2-Mar-14 1:01
mveOriginalGriff2-Mar-14 1:01 
GeneralRe: GUIDs Pin
thatraja2-Mar-14 0:43
professionalthatraja2-Mar-14 0:43 
GeneralRe: GUIDs Pin
Jörgen Andersson2-Mar-14 0:22
professionalJörgen Andersson2-Mar-14 0:22 
GeneralRe: GUIDs Pin
OriginalGriff2-Mar-14 0:29
mveOriginalGriff2-Mar-14 0:29 
GeneralRe: GUIDs Pin
Kornfeld Eliyahu Peter2-Mar-14 0:35
professionalKornfeld Eliyahu Peter2-Mar-14 0:35 
GeneralRe: GUIDs Pin
Jörgen Andersson2-Mar-14 1:35
professionalJörgen Andersson2-Mar-14 1:35 
GeneralRe: GUIDs Pin
JimmyRopes2-Mar-14 1:11
professionalJimmyRopes2-Mar-14 1:11 
chayaphum wrote:
Recently I looked into the source code of one of my colleges.

 

He wrote:

 

Private Sub startdestroy()

Dim th As New System.Threading.Thread(AddressOf destroy)

 

th.Start()

 

End Sub

 

Public Sub destroy()

Dim uuid As System.Guid = Nothing

While True

uuid = System.Guid.NewGuid()

End While

End Sub

 

I didn't understand what he was trying to achieve

Typical of VB programmers! D'Oh! | :doh:

chayaphum wrote:
Tell me why you programmed this?

 

Very simple, told me my college. If I run this code on many computers, a lot of GUIDs will be created.

 

And capitalism relies on GUIDs . After a few years running my code on as many computers as possible, there are no GUIDs left in this world, and the capitalists cannot transfer money anymore, OMG | :OMG: because they need a way to identify each money transaction in a unique way . I fired this routine in an own thread so nobody will notice what evil thing is going on in the background. Laugh | :laugh: It's a timebomb against capitalism. Smile | :)

 

This is why I am running this code on many computers. Just to destroy capitalism.

Typical of VB programmers! D'Oh! | :doh:

chayaphum wrote:
I agreed on the point

Typical of VB programmers! D'Oh! | :doh:

chayaphum wrote:
A few hours later I got an EMAIL from my college stating rhat

he removed the code because of the great sideeffects.

Typical of VB programmers! D'Oh! | :doh:

The report of my death was an exaggeration - Mark Twain

Simply Elegant Designs JimmyRopes Designs

I'm on-line therefore I am.
JimmyRopes



GeneralRe: GUIDs Pin
Tim Carmichael2-Mar-14 1:47
Tim Carmichael2-Mar-14 1:47 
GeneralRe: GUIDs Pin
chayaphum2-Mar-14 2:48
chayaphum2-Mar-14 2:48 
GeneralRe: GUIDs Pin
0bx2-Mar-14 6:46
0bx2-Mar-14 6:46 
GeneralRe: GUIDs Pin
PIEBALDconsult2-Mar-14 5:28
mvePIEBALDconsult2-Mar-14 5:28 
QuestionRe: GUIDs Pin
Vladimir Svyatski3-Mar-14 8:24
professionalVladimir Svyatski3-Mar-14 8:24 
GeneralRe: GUIDs Pin
DaveAuld3-Mar-14 20:48
professionalDaveAuld3-Mar-14 20:48 
GeneralYet another "Treasure" Pin
Rob Grainger27-Feb-14 2:49
Rob Grainger27-Feb-14 2:49 
GeneralRe: Yet another "Treasure" Pin
Nicholas Marty27-Feb-14 2:59
professionalNicholas Marty27-Feb-14 2:59 
GeneralRe: Yet another "Treasure" Pin
thatraja27-Feb-14 3:05
professionalthatraja27-Feb-14 3:05 
GeneralRe: Yet another "Treasure" Pin
Brisingr Aerowing27-Feb-14 3:20
professionalBrisingr Aerowing27-Feb-14 3:20 
GeneralRe: Yet another "Treasure" Pin
thatraja27-Feb-14 3:27
professionalthatraja27-Feb-14 3:27 
GeneralRe: Yet another "Treasure" Pin
Rob Grainger27-Feb-14 3:29
Rob Grainger27-Feb-14 3:29 
GeneralRe: Yet another "Treasure" Pin
Richard Deeming27-Feb-14 4:28
mveRichard Deeming27-Feb-14 4:28 
GeneralRe: Yet another "Treasure" Pin
BillW3327-Feb-14 3:29
professionalBillW3327-Feb-14 3:29 
GeneralRe: Yet another "Treasure" Pin
mikepwilson27-Feb-14 3:38
mikepwilson27-Feb-14 3:38 
GeneralRe: Yet another "Treasure" Pin
PIEBALDconsult27-Feb-14 3:54
mvePIEBALDconsult27-Feb-14 3:54 
GeneralVB Date Nonsense Pin
Rob Grainger26-Feb-14 2:08
Rob Grainger26-Feb-14 2:08 

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.