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. The Lounge
  3. Funny code again

Funny code again

Scheduled Pinned Locked Moved The Lounge
6 Posts 6 Posters 2 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.
  • L Offline
    L Offline
    Liam OHagan
    wrote on last edited by
    #1

    Got some more code that I found amusing :) For example... {$DEFINE NoBeepCosItShitsDaveWhenListeningToMP3s} (that's delphi code by the way...) Senior Test Engineer GLI Australia www.gli.com.au

    C R S R 4 Replies Last reply
    0
    • L Liam OHagan

      Got some more code that I found amusing :) For example... {$DEFINE NoBeepCosItShitsDaveWhenListeningToMP3s} (that's delphi code by the way...) Senior Test Engineer GLI Australia www.gli.com.au

      C Offline
      C Offline
      Chris Maunder
      wrote on last edited by
      #2

      LOL! cheers, Chris Maunder

      1 Reply Last reply
      0
      • L Liam OHagan

        Got some more code that I found amusing :) For example... {$DEFINE NoBeepCosItShitsDaveWhenListeningToMP3s} (that's delphi code by the way...) Senior Test Engineer GLI Australia www.gli.com.au

        R Offline
        R Offline
        Rick York
        wrote on last edited by
        #3

        One of my all time favorites was in the default windows procedure (DefWndProc I think it is). The author used a goto and the target label was : ICantBelieveIActuallyUsedAGoto I laughed pretty hard when I saw this. :-D

        1 Reply Last reply
        0
        • L Liam OHagan

          Got some more code that I found amusing :) For example... {$DEFINE NoBeepCosItShitsDaveWhenListeningToMP3s} (that's delphi code by the way...) Senior Test Engineer GLI Australia www.gli.com.au

          S Offline
          S Offline
          sahn0
          wrote on last edited by
          #4

          Well, here is my favourites (found in my current bug-fixing project) 1) if (bVar1==FALSE) { bVar2=TRUE; } else { bVar2=FALSE; } 2) CChangesCacheListChangeStateElement * pElement=new CChangesCacheListChangeStateElement(); 3) aaand the greatest ! strPreparingString = CString("Datetime:") + tmTime.Format("%m/%d/%Y") + CString(" ") + tmTime.Format("%H:%M") + CString(" "); CString t_strTempTypeValue, t_strTypeValue; t_strTempTypeValue.Format("%x", btType); if(btType < 15) t_strTypeValue += "0"; t_strTempTypeValue.MakeUpper(); t_strTypeValue += t_strTempTypeValue; strPreparingString += CString("Type:0x") + t_strTypeValue; CString t_strTempUnitIDValue, t_strUnitIDValue; t_strTempUnitIDValue.Format("%x", wdUnitID); try { if(wdUnitID & 0xF000) throw 1; else t_strUnitIDValue += "0"; if(wdUnitID & 0x0F00) throw 1; else t_strUnitIDValue += "0"; if(wdUnitID & 0x00F0) throw 1; else t_strUnitIDValue += "0"; // if(wdUnitID & 0x000F) throw 1; else t_strUnitIDValue += "0"; } catch(...){ } t_strTempUnitIDValue.MakeUpper(); t_strUnitIDValue += t_strTempUnitIDValue; strPreparingString += CString(" Item:0x") + t_strUnitIDValue; strPreparingString += CString(" UnitName:") + strUnitName; ;P ;P ;P

          1 Reply Last reply
          0
          • L Liam OHagan

            Got some more code that I found amusing :) For example... {$DEFINE NoBeepCosItShitsDaveWhenListeningToMP3s} (that's delphi code by the way...) Senior Test Engineer GLI Australia www.gli.com.au

            R Offline
            R Offline
            Ralf Friedrich Hain
            wrote on last edited by
            #5

            As studends we were forced always to use a big header for every function, even if it had just one comand: /********************************************************************************/ /* */ /* Funktion : */ /* Klasse : */ /* */ /********************************************************************************/ /* */ /* Autor : */ /* */ /* Beschreibung : */ /* */ /* Vorbedingung : */ /* Nachbedingung : */ /* */ /* Parameter : */ /* */ /* Rückgabewert : */ /* */ /********************************************************************************/ /* */ /* V | Datum | KZ | Anmerkung */ /*------------------------------------------------------------------------------*/ /* | | | */ /* | | | */ /* */ /********************************************************************************/ My solution was: #include "headerToMyFunction.h" int MyClass::MyFunction( int xy ) { ... } :-) Friedrich

            M 1 Reply Last reply
            0
            • R Ralf Friedrich Hain

              As studends we were forced always to use a big header for every function, even if it had just one comand: /********************************************************************************/ /* */ /* Funktion : */ /* Klasse : */ /* */ /********************************************************************************/ /* */ /* Autor : */ /* */ /* Beschreibung : */ /* */ /* Vorbedingung : */ /* Nachbedingung : */ /* */ /* Parameter : */ /* */ /* Rückgabewert : */ /* */ /********************************************************************************/ /* */ /* V | Datum | KZ | Anmerkung */ /*------------------------------------------------------------------------------*/ /* | | | */ /* | | | */ /* */ /********************************************************************************/ My solution was: #include "headerToMyFunction.h" int MyClass::MyFunction( int xy ) { ... } :-) Friedrich

              M Offline
              M Offline
              malvik
              wrote on last edited by
              #6

              "Fishing" through UI code:

              if($bad===FALSE)//Good
              $HTML.=$this->data[$this->curr][3];
              else//Bad
              $HTML.="NOTICE: You would not specify width, height, or position in the div header, if you knew what was best for you.";

              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