Terrible C/C++ code



  • <FONT face="Courier New" size=2>I'm working on a college project and today I received the last piece of code that I needed.
    It give me 54 errors. The project is due on next Wednesday, so that leaves me very little time to rewrite it since I can;t work on it in the weekend (2 birthdays and the 1 year anniversary with my gf)
    The guy who made it is also our project leader, so kicking him wouldn't be very smart.</FONT>

    <FONT face="Courier New" size=2>The source code can be found here: http://home.zonnet.nl/TheSorcerer/dynsec.cpp</FONT>

    <FONT face="Courier New" size=2>At Gamdev.net they already had a good laugh over it. So I hope that you can enjoy is as well.
    Atm I can't really laugh.</FONT>

    <FONT face="Courier New" size=2>Sorcerer</FONT>



  • nice, clear and well documented... oh and nice variable names - so descriptive!

    by the way: why is the text idented like this? looks like someone accidentally pressed space here and there... and most comments start from position 1, not where the code is... I think I could go on and on but kicking the guy wouldn't be bad idea, but make sure he won't be able to speak during the presentation - from the code I see you better go off without him...



  • "int G1,G2,G3,G4,G5,G6,G7,G8;"



    Heh heh heh heh heh.



    Good luck.



  • Sooo, it's next wednesday. What are the results?

    Drak



  • This reminds me of a person I once knew. He programs that way ;)



  • Anyone who codes like this deserves a spanking, no matter if he's your project leader.

    But is this actual production code ?!? It looks like a program written by a first year IT student.

    Especially since it's about traffic lights, I had an assignment like that in software class.

    At least now we know why he became a project leader... [:#]



  • He should redo it in Javascript.



  • @SnipeZ said:

    Anyone who codes like this deserves a spanking, no matter if he's your project leader.

    But is this actual production code ?!? It looks like a program written by a first year IT student.

    <FONT face="Courier New">'I'm working on a college project and today I received the last piece of code that I needed.'</FONT>

    <FONT face="Courier New">I don't think it is production code [;)]</FONT>

    <FONT face="Courier New">Drak</FONT>



  • @Sorcerer said:

    <font face="Courier New">I'm working on a college project and today I received the last piece of code that I needed.
    It give me 54 errors. The project is due on next Wednesday, so that leaves me very little time to rewrite it since I can;t work on it in the weekend (2 birthdays and the 1 year anniversary with my gf)
    The guy who made it is also our project leader, so kicking him wouldn't be very smart.</font>

    <font face="Courier New">The source code can be found here: http://home.zonnet.nl/TheSorcerer/dynsec.cpp</font>

    <font face="Courier New">At Gamdev.net they already had a good laugh over it. So I hope that you can enjoy is as well.
    Atm I can't really laugh.</font>

    <font face="Courier New">Sorcerer</font>

     Why is it that when you want something gone from the Internet, you realize it is impossible...but when you look for something, wanting to find it - you find that it is indeed gone?????



  • Necrooooooo



  • @TheCPUWizard said:

    Why is it that when you want something gone from the Internet, you realize it is impossible...but when you look for something, wanting to find it - you find that it is indeed gone?????

    Did you know when you necro a post from 7 years ago, CS's RSS sends it out as if it's a brand new post? Did you know I hate you? I hate you.



  • @TheCPUWizard said:

    @Sorcerer said:

    <FONT face="Courier New">I'm working on a college project and today I received the last piece of code that I needed.
    It give me 54 errors. The project is due on next Wednesday, so that leaves me very little time to rewrite it since I can;t work on it in the weekend (2 birthdays and the 1 year anniversary with my gf)
    The guy who made it is also our project leader, so kicking him wouldn't be very smart.</FONT>

    <FONT face="Courier New">The source code can be found here: http://home.zonnet.nl/TheSorcerer/dynsec.cpp</FONT>

    <FONT face="Courier New">At Gamdev.net they already had a good laugh over it. So I hope that you can enjoy is as well.
    Atm I can't really laugh.</FONT>

    <FONT face="Courier New">Sorcerer</FONT>

     Why is it that when you want something gone from the Internet, you realize it is impossible...but when you look for something, wanting to find it - you find that it is indeed gone?????

     Did you really expect to find it there after 7 years ?

     



  • @Cbuttius said:

    @TheCPUWizard said:

     Why is it that when you want something gone from the Internet, you realize it is impossible...but when you look for something, wanting to find it - you find that it is indeed gone?????

     Did you really expect to find it there after 7 years ?

    You seem to be missing the first part of my statement. I have often wondered what would happen if "the internet" had a purge system. If you page has broken links for a period of time, then your page is deemed stale, and also removed. While the discussion I picked was deliberate, the situation of doing a search looking for information, only to find pages which mention the topic and have "for details see..." and a dead link is horribly frustrating.


  • Discourse touched me in a no-no place

    @TheCPUWizard said:

    @Cbuttius said:

    @TheCPUWizard said:

     Why is it that when you want something gone from the Internet, you realize it is impossible...but when you look for something, wanting to find it - you find that it is indeed gone?????

     Did you really expect to find it there after 7 years ?

    You seem to be missing the first part of my statement. I have often wondered what would happen if "the internet" had a purge system. If you page has broken links for a period of time, then your page is deemed stale, and also removed. While the discussion I picked was deliberate, the situation of doing a search looking for information, only to find pages which mention the topic and have "for details see..." and a dead link is horribly frustrating.

    http://web.archive.org/web/20050410022636/http://home.zonnet.nl/TheSorcerer/dynsec.cpp


  • Yeah, the number of times I google for something, get a search result, see something in the summary but when I follow the link the content is different and what I searched for is no longer there. In the old days you could look at the archived page to see what was there but I don't see that feature in google search anymore.

    I don't think there is a "the internet" authority to just remove pages on it, only ISPs can remove pages that are hosted on their servers, and Government authorities can put pressure on ISPs to do this, if the content is illegal in some way, but I would hardly say a broken/stale link is a good enough reason.

     



  • @TheCPUWizard said:

    You seem to be missing the first part of my statement. I have often wondered what would happen if "the internet" had a purge system. If you page has broken links for a period of time, then your page is deemed stale, and also removed. While the discussion I picked was deliberate, the situation of doing a search looking for information, only to find pages which mention the topic and have "for details see..." and a dead link is horribly frustrating.

    It has a purge system, it goes like this:

    1) Topic is unread for 7 years

    2) TheCPUWizard raises the zombie and whines that the link from 7 years ago is gone

    3) We all gather around TheCPUWizard and beat him to death with a chain for being such a fucking idiot

    There, all purged.

    Hey guys, did you know how great TheCPUWizard is? I mean, sure he can't read timestamps on forum posts. But did you know he founded his own business? And that Intel gives him testing CPUs before they give them to the general public? Did you know TheCPUWizard lives in New York City? He is so great! It almost makes up for his utter inability to use fucking simple forum software.



  • @blakeyrat said:

    @TheCPUWizard said:
    You seem to be missing the first part of my statement. I have often wondered what would happen if "the internet" had a purge system. If you page has broken links for a period of time, then your page is deemed stale, and also removed. While the discussion I picked was deliberate, the situation of doing a search looking for information, only to find pages which mention the topic and have "for details see..." and a dead link is horribly frustrating.

    It has a purge system, it goes like this:

    1) Topic is unread for 7 years

    2) TheCPUWizard raises the zombie and whines that the link from 7 years ago is gone

    3) We all gather around TheCPUWizard and beat him to death with a chain for being such a fucking idiot

    There, all purged.

    Hey guys, did you know how great TheCPUWizard is? I mean, sure he can't read timestamps on forum posts. But did you know he founded his own business? And that Intel gives him testing CPUs before they give them to the general public? Did you know TheCPUWizard lives in New York City? He is so great! It almost makes up for his utter inability to use fucking simple forum software.

    As I said, the post I picked was deliberate [I even highlighted it for you in the quote above! The underlying issue had nothing to do with how I chose to provide the sample. In fact, I scanned multiple ancient posts on this very forum until I found one with a broken link, and then used a reply to that. Perhaps I could have started a new thread, and simply quoted material with a broken link,but I did not.



  • Oh come on! Stop deluding yourself. Just admit it: you fucked up, you replied to a zombie thread accidentally.

    Trying to make it into some, "oh hay guyz I wasn't replying to a zombie thread I was making a DEEP PHILOSOPHICAL POINT about how sometimes over time links become 404 errors guyz! Srsly!!!" is really pathetic.

    I know you're the Great and Powerful TheCPUWizard, with your business in New York City and all that, but maybe admitting to making a mistake wouldn't kill you, huh? Just maybe?


  • Trolleybus Mechanic

    @blakeyrat said:

    Hey guys, did you know how great TheCPUWizard is? I mean, sure he can't read timestamps on forum posts. But did you know he founded his own business? And that Intel gives him testing CPUs before they give them to the general public? Did you know TheCPUWizard lives in New York City? He is so great!
     

    Huh, that's pretty darn good. You're right, TheCPUWizard is neat. I'm impressed, Blakey, this is much nicer than your usual vitriol. These fine social skills and "get along" attitude will help you with your upcoming job search. (Again, on behalf of the forum, sorry for getting you fired. But it'll work out the best for you, given how stressful your old job was).

     



  • @TheCPUWizard said:

    In fact, I scanned multiple ancient posts on this very forum until I found one with a broken link, and then used a reply to that.
     

    You pored over tons of evidence until you found the one occasion that supported your non-point?

    Good job, zealot.



  • @Cbuttius said:

    Yeah, the number of times I google for something, get a search result, see something in the summary but when I follow the link the content is different and what I searched for is no longer there. In the old days you could look at the archived page to see what was there but I don't see that feature in google search anymore.

    Mouse over the >> next to the search results.


Log in to reply