Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. GUIDs

GUIDs

Scheduled Pinned Locked Moved The Weird and The Wonderful
performancequestionsaleslounge
25 Posts 14 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C chayaphum

    really X| And i thought I saved capitalism and the world by stoping my college ;P OK back to work using GUIDs. I am creating a lot of them nowadays X|

    Imports System.Runtime.InteropServices

    _
    Public Class xxxxx
    Implements xxxxx

    COM, yes COM seems to be popular again :-D xxxx just for hiding my true identity ;P ;P

    F Offline
    F Offline
    Florian Rappl
    wrote on last edited by
    #11

    The beauty of numbers is that you can always add 1 :rolleyes: The sad life of any programmer is that memory is limited :((

    1 Reply Last reply
    0
    • OriginalGriffO OriginalGriff

      I think it's Hamster sarcasm: it used to be called "Coding Horrors" :laugh:

      Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #12

      Never understood hamsters...

      I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      OriginalGriffO 1 Reply Last reply
      0
      • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

        I can't see the wonderful part of it... :-D

        I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

        T Offline
        T Offline
        thatraja
        wrote on last edited by
        #13

        Herebefore there're two forums. Coding Horrors & Clever Code[^]. Hamsters merged those two to current one.

        thatraja

        Code converters | Education Needed No thanks, I am all stocked up. - Luc Pattyn When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute

        1 Reply Last reply
        0
        • C chayaphum

          really X| And i thought I saved capitalism and the world by stoping my college ;P OK back to work using GUIDs. I am creating a lot of them nowadays X|

          Imports System.Runtime.InteropServices

          _
          Public Class xxxxx
          Implements xxxxx

          COM, yes COM seems to be popular again :-D xxxx just for hiding my true identity ;P ;P

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #14

          chayaphum wrote:

          And i thought I saved capitalism and the world by stoping my college

          Nope, probably not. A Guid is 128 bits, with 6 of them reserved: 2 for variant, 4 for version, so there are 2122 or 5,316,911,983,139,663,491,615,228,241,121,400,000 possible GUID values you can generate. Even if your colleague's software was creating 1,000,000,000,000 per second, and running on every computer connected to the internet (and the latest figure for that I can find is 4 years old - 1,966,514,816) it would take 85,734,504 years to generate them all...

          Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          A 1 Reply Last reply
          0
          • C chayaphum

            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, so I asked him. ;) ;) What is this source code about? :omg: This thread is only costing performance doing nothing. It could cause the garbage collector to throw out of memory exceptions. :wtf: and the program will be dead :(( And anyway this strange combination of public and private seems odd to me. :omg: 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: 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: It's a timebomb against capitalism. :) This is why I am running this code on many computers. Just to destroy capitalism. ;P I agreed on the point that destroying evil captitalism is a good thing to do. But I said: If you continue your evil work, not only banks and capitalists are effected. Also good institutions like health care are effected. Rescue services can't operate anymore because they are also using GUIDs and they will certainly run out of GUIDs if you continue your evil work. :confused: Emergency numbers won't work without GUIDs. I few hours later I got an EMAIL from my college stating rhat he removed the code because of the great sideeffects. Yes, he agreed that rescue services need GUIDs to store medical data. And that the revenue department needs them too, so they can store financial transactions originating from the Cayman Islands and fight tax offenders. Instead he will run for parlament in the next general elections. The good sideeffect is: He will earn tons of money , because members of parlament earn much more money than programmers do. :laugh:

            J Offline
            J Offline
            JimmyRopes
            wrote on last edited by
            #15

            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,

            Typicle of VB programmers! :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.After a few years running my code on as many computers as possible, there are no GUIDs left in this world,

            Typical of VB prorammers! :doh:

            chayaphum wrote:

            I few hours later I got an EMAIL from my college stating rhat
            he removed the code because of the great sideeffects.

            Typical of VB prorammers! :doh:

            The report of my death was an exaggeration - Mark Twain
            Simply Elegant Designs JimmyRopes Designs
            I'm on-line therefore I am. JimmyRopes

            1 Reply Last reply
            0
            • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

              Never understood hamsters...

              I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

              OriginalGriffO Offline
              OriginalGriffO Offline
              OriginalGriff
              wrote on last edited by
              #16

              Hamsters are easy to understand: they are a "parent annoying device". The principle things you need to know about Hamsters are twofold: 1) They breed like...well, hamsters. "Copiously" is a good word. Children seem to like this. 2) They die. Normally on Christmas Eve, and this leads to the True Purpose of the Hamster: It must be replaced with an identical model before the child notices. Hence the timing of deceasement: to cause maximum inconvenience to the parent, given that the pet shop closes in 30 minutes...

              Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

              1 Reply Last reply
              0
              • C chayaphum

                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, so I asked him. ;) ;) What is this source code about? :omg: This thread is only costing performance doing nothing. It could cause the garbage collector to throw out of memory exceptions. :wtf: and the program will be dead :(( And anyway this strange combination of public and private seems odd to me. :omg: 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: 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: It's a timebomb against capitalism. :) This is why I am running this code on many computers. Just to destroy capitalism. ;P I agreed on the point that destroying evil captitalism is a good thing to do. But I said: If you continue your evil work, not only banks and capitalists are effected. Also good institutions like health care are effected. Rescue services can't operate anymore because they are also using GUIDs and they will certainly run out of GUIDs if you continue your evil work. :confused: Emergency numbers won't work without GUIDs. I few hours later I got an EMAIL from my college stating rhat he removed the code because of the great sideeffects. Yes, he agreed that rescue services need GUIDs to store medical data. And that the revenue department needs them too, so they can store financial transactions originating from the Cayman Islands and fight tax offenders. Instead he will run for parlament in the next general elections. The good sideeffect is: He will earn tons of money , because members of parlament earn much more money than programmers do. :laugh:

                J Offline
                J Offline
                JimmyRopes
                wrote on last edited by
                #17

                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! :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: 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: It's a timebomb against capitalism. :)
                 
                This is why I am running this code on many computers. Just to destroy capitalism.

                Typical of VB programmers! :doh:

                chayaphum wrote:

                I agreed on the point

                Typical of VB programmers! :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! :doh:

                The report of my death was an exaggeration - Mark Twain
                Simply Elegant Designs JimmyRopes Designs
                I'm on-line therefore I am. JimmyRopes

                1 Reply Last reply
                0
                • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                  Jörgen Andersson wrote:

                  college

                  colleague - FTFY...

                  I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

                  J Offline
                  J Offline
                  Jorgen Andersson
                  wrote on last edited by
                  #18

                  Read the OP once more. :)

                  Wrong is evil and must be defeated. - Jeff Ello[^]

                  1 Reply Last reply
                  0
                  • C chayaphum

                    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, so I asked him. ;) ;) What is this source code about? :omg: This thread is only costing performance doing nothing. It could cause the garbage collector to throw out of memory exceptions. :wtf: and the program will be dead :(( And anyway this strange combination of public and private seems odd to me. :omg: 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: 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: It's a timebomb against capitalism. :) This is why I am running this code on many computers. Just to destroy capitalism. ;P I agreed on the point that destroying evil captitalism is a good thing to do. But I said: If you continue your evil work, not only banks and capitalists are effected. Also good institutions like health care are effected. Rescue services can't operate anymore because they are also using GUIDs and they will certainly run out of GUIDs if you continue your evil work. :confused: Emergency numbers won't work without GUIDs. I few hours later I got an EMAIL from my college stating rhat he removed the code because of the great sideeffects. Yes, he agreed that rescue services need GUIDs to store medical data. And that the revenue department needs them too, so they can store financial transactions originating from the Cayman Islands and fight tax offenders. Instead he will run for parlament in the next general elections. The good sideeffect is: He will earn tons of money , because members of parlament earn much more money than programmers do. :laugh:

                    T Offline
                    T Offline
                    Tim Carmichael
                    wrote on last edited by
                    #19

                    So, if he destroys capitalism, who will create the computers he wants to use? While capitalism may not be a perfect system, do we want to live without ANY capitalism? Consider the implications of that..

                    C 0 2 Replies Last reply
                    0
                    • T Tim Carmichael

                      So, if he destroys capitalism, who will create the computers he wants to use? While capitalism may not be a perfect system, do we want to live without ANY capitalism? Consider the implications of that..

                      C Offline
                      C Offline
                      chayaphum
                      wrote on last edited by
                      #20

                      Hey, My original post was intended as a joke, because I was a little bit bored creating GUIDs for my com interfaces. So I thought write something funny with GUIDs as the subject. Like others said. There is no way that somebody can destroy captitalism by reserving GUIDS, because there is no authority which issues or saves GUIDs. The number is so huge that it is not possible to generate all the possible GUIDS and even if it would be possible, it would not matter because my college, who does not exist, does not save them anyway. He does not use the GUIDs for a COM interface or something else so it is going > null, it does not matter how many GUIDs he creates, it only costs electricity nothing else. I personally wonder why it was moved to this forum. Again I just liked to make a joke and no discussion about capitalism or a discussion over the code, especially not about visual basic. I thought visual basic is easy for everybode to understand, so I did not code it in c++ or c#. computers can be created without capitalism, thats a fact. I used to work in eastern europe and we produced computers :omg: :confused: But this is not the point in my small story. The joke I intended was to describe something "which is absolutely impossible". I did not plan a story about capitalism or communism. So chai yen, yen (Thai for keep cool) Chayaphum

                      1 Reply Last reply
                      0
                      • C chayaphum

                        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, so I asked him. ;) ;) What is this source code about? :omg: This thread is only costing performance doing nothing. It could cause the garbage collector to throw out of memory exceptions. :wtf: and the program will be dead :(( And anyway this strange combination of public and private seems odd to me. :omg: 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: 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: It's a timebomb against capitalism. :) This is why I am running this code on many computers. Just to destroy capitalism. ;P I agreed on the point that destroying evil captitalism is a good thing to do. But I said: If you continue your evil work, not only banks and capitalists are effected. Also good institutions like health care are effected. Rescue services can't operate anymore because they are also using GUIDs and they will certainly run out of GUIDs if you continue your evil work. :confused: Emergency numbers won't work without GUIDs. I few hours later I got an EMAIL from my college stating rhat he removed the code because of the great sideeffects. Yes, he agreed that rescue services need GUIDs to store medical data. And that the revenue department needs them too, so they can store financial transactions originating from the Cayman Islands and fight tax offenders. Instead he will run for parlament in the next general elections. The good sideeffect is: He will earn tons of money , because members of parlament earn much more money than programmers do. :laugh:

                        P Online
                        P Online
                        PIEBALDconsult
                        wrote on last edited by
                        #21

                        This forum is not for posting jokes.

                        This space intentionally left blank.

                        1 Reply Last reply
                        0
                        • T Tim Carmichael

                          So, if he destroys capitalism, who will create the computers he wants to use? While capitalism may not be a perfect system, do we want to live without ANY capitalism? Consider the implications of that..

                          0 Offline
                          0 Offline
                          0bx
                          wrote on last edited by
                          #22

                          Capitalism had it's uses, but no social economic paradigm is meant to last forever. Industrialization anno 2014 has created a world where people only have to work 19 hours a day to have a modern life standard, but capitalism has caused a reality where this hasn't happened yet. As technology progresses even further, this will become unsustainable because people will eventually feel entitled to receive an unconditional income because modern technology will be able to provide it.

                          .

                          1 Reply Last reply
                          0
                          • C chayaphum

                            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, so I asked him. ;) ;) What is this source code about? :omg: This thread is only costing performance doing nothing. It could cause the garbage collector to throw out of memory exceptions. :wtf: and the program will be dead :(( And anyway this strange combination of public and private seems odd to me. :omg: 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: 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: It's a timebomb against capitalism. :) This is why I am running this code on many computers. Just to destroy capitalism. ;P I agreed on the point that destroying evil captitalism is a good thing to do. But I said: If you continue your evil work, not only banks and capitalists are effected. Also good institutions like health care are effected. Rescue services can't operate anymore because they are also using GUIDs and they will certainly run out of GUIDs if you continue your evil work. :confused: Emergency numbers won't work without GUIDs. I few hours later I got an EMAIL from my college stating rhat he removed the code because of the great sideeffects. Yes, he agreed that rescue services need GUIDs to store medical data. And that the revenue department needs them too, so they can store financial transactions originating from the Cayman Islands and fight tax offenders. Instead he will run for parlament in the next general elections. The good sideeffect is: He will earn tons of money , because members of parlament earn much more money than programmers do. :laugh:

                            V Offline
                            V Offline
                            Vladimir Svyatski
                            wrote on last edited by
                            #23

                            A new nasty virus? It's so terrifying, that it can easily beat Skynet. The machines will terminate us all :((

                            I have 4 words for you: I love this company! Yes!

                            1 Reply Last reply
                            0
                            • OriginalGriffO OriginalGriff

                              chayaphum wrote:

                              And i thought I saved capitalism and the world by stoping my college

                              Nope, probably not. A Guid is 128 bits, with 6 of them reserved: 2 for variant, 4 for version, so there are 2122 or 5,316,911,983,139,663,491,615,228,241,121,400,000 possible GUID values you can generate. Even if your colleague's software was creating 1,000,000,000,000 per second, and running on every computer connected to the internet (and the latest figure for that I can find is 4 years old - 1,966,514,816) it would take 85,734,504 years to generate them all...

                              Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

                              A Offline
                              A Offline
                              Adam R Harris
                              wrote on last edited by
                              #24

                              Well we better get started then.

                              Don't comment your code - it was hard to write, it should be hard to read!

                              1 Reply Last reply
                              0
                              • C chayaphum

                                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, so I asked him. ;) ;) What is this source code about? :omg: This thread is only costing performance doing nothing. It could cause the garbage collector to throw out of memory exceptions. :wtf: and the program will be dead :(( And anyway this strange combination of public and private seems odd to me. :omg: 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: 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: It's a timebomb against capitalism. :) This is why I am running this code on many computers. Just to destroy capitalism. ;P I agreed on the point that destroying evil captitalism is a good thing to do. But I said: If you continue your evil work, not only banks and capitalists are effected. Also good institutions like health care are effected. Rescue services can't operate anymore because they are also using GUIDs and they will certainly run out of GUIDs if you continue your evil work. :confused: Emergency numbers won't work without GUIDs. I few hours later I got an EMAIL from my college stating rhat he removed the code because of the great sideeffects. Yes, he agreed that rescue services need GUIDs to store medical data. And that the revenue department needs them too, so they can store financial transactions originating from the Cayman Islands and fight tax offenders. Instead he will run for parlament in the next general elections. The good sideeffect is: He will earn tons of money , because members of parlament earn much more money than programmers do. :laugh:

                                D Offline
                                D Offline
                                DaveAuld
                                wrote on last edited by
                                #25

                                I bet he could have formatted his code block on CodeProject properly though...... :rolleyes:

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups