Programming Related Comic

Discussion in 'OT Technology' started by Incubusalec, Oct 5, 2003.

  1. Incubusalec

    Incubusalec Guest

    Gave me a laugh or two: :rofl:


    [​IMG]
     
  2. Rob

    Rob OT Supporter

    Joined:
    Jul 6, 2002
    Messages:
    88,614
    Likes Received:
    36
    Location:
    Atlanta, GA
  3. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
  4. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
  5. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    anymore?
     
  6. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    I have two problems with this cartoon
    1. The program will print all the text jumbled together. The girl should have put a \n in the printf statement to make sure it prints on a different line each time
    2. Who da hell uses printf anymore? She should include <iostream> and do cout. That is all
     
  7. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    HAHAHAHAHAHAHHAHAAHAHAHHAAHAHHAAH that ROCKS!
     
  8. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    it would of been nicer if she declaired the var in the for loop too!
     
  9. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    Somebody hasn't programmed with C before.

    The program is valid C/C++, but its written in the style of C. You are correct on your first point that there's no carriage return being given and the lines will bleed together. The joke did not pivot around "\n" and I'm guessing the average cartoon readership wouldn't have noticed if it was there or not.

    If the program is authentic C, printf() would have been the way to go. You can mix and match now, but I believe (and I could be wrong) iostream.h was introduced with C++. Stdio.h was C's version of iostream.h and printf() was the way strings were printed. Printf() has its uses and some tricks available to it.

    As for the "int count" being declared outside of the for() is because C prefers its variable declarations to be before any code. It forces a somewhat strict programming style. The compiler will complain that count is being used without declaring it even if you define it in the for(). So...

    Good:
    Code:
    int count;
    for(count = 1; count < X; count++)
    {
    }
    
    Doesn't compile:
    Code:
    for(int count = 1; count < X; count++)
    {
    }
    
     
  10. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
  11. inferno8ball

    inferno8ball 190 proof Everclear + MD Amped energy d

    Joined:
    Sep 10, 2002
    Messages:
    5,477
    Likes Received:
    0
    also tahts not a girl, its jason fox of fox trot...hilarious comic
     
  12. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    no i have programmed in C before, that was my first language, like you said you can mix and match now.... so might as well just use cout, no real point of using printf in that example (unless like u said it's authentic c program)
    :)
     
  13. Jericho

    Jericho Active Member

    Joined:
    Oct 21, 2002
    Messages:
    34,140
    Likes Received:
    0
    I'm guessing that the average person would have an easier time figuring out what something like printf("gfgfgfg"); would do over cout << "dfdfdfdfdfdf";
     
  14. BlazinBlazer Guy

    BlazinBlazer Guy Witness to The De-Evolution of Mankind.

    Joined:
    Jul 24, 2002
    Messages:
    18,783
    Likes Received:
    0
    Location:
    Lansing, MI USA
    :rofl: only true geeks would argue the syntax of code written into a COMIC STRIP!!! :rofl:

    :cool: comic...

    :cool: kid....
     
  15. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,918
    Likes Received:
    10
    Location:
    Los Angeles
    Why use cout? Printf is faster.
     
  16. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    it's true, it's true :rofl: :rofl: :rofl: :rofl: :rofl:
     
  17. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    yeah.

    ive never programmed in c, but i have done a few courses in c++. all my textbooks say to declair ur counter in the for statement.... :hs:
     
  18. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area

    :cool:
     
  19. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area

    you again :eek3:
     
  20. Scn64

    Scn64 Guest

    I don't think the average cartoon reader (who hasn't studied programming) would get the joke at all. I know my parents would be staring at it like :ugh: :confused:
     
  21. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,918
    Likes Received:
    10
    Location:
    Los Angeles
    It's just a fucking comic strip anyway. Leave it to someone like digital to point out the specifics and still not know what he's talking about.
     
  22. Dommi

    Dommi Guest

  23. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area

    everything i said makes sense.....1 way or another :squint:
     
  24. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    STFU you two
     
  25. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    :werd: I don't think half the guys in my C++ class from last year would understand it actually (lots of really stupid people in that class).
     

Share This Page