Salem, you might wanna help me

This is a discussion on Salem, you might wanna help me within the C Programming forums, part of the General Programming Boards category; Salem, you've had a look to my code and you saw it was kind of a mess. I have to ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    207

    Post Salem, you might wanna help me

    Salem, you've had a look to my code and you saw it was kind of a mess. I have to hand it in in a few weeks (about the 10th of december).

    The question is, should I start all over again, or should I try to modify it?

    I've tried to modify it, but it's not worth even a look, believe me.

    What do you think?

    I appreaciate your help

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,434
    > The question is, should I start all over again, or should I try to modify it?
    I think you should put it to one side, and practice parameter passing on a much smaller sample.

    Almost every post which has code attached on this board has functions which demonstrate this, you would be well advised to start paying attention to how its done.

    After that, I think you need to write down (on paper), what each function should do, the parameters it needs, and the results it provides (its interface). Only when you've done this should you even begin to try and write this much code again.

    You've got a month, so
    1 week practicing small function parameter passing
    3 days to design the solution to your real problem
    the rest is code and test

    And for heavens sake, compile and test as you go along - don't write it all and hope it will all compile on the first attempt - it won't.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    > And for heavens sake, compile and test as you go along - don't write it all and hope it will all compile on the first attempt - it won't.

    Ah, the best advice a programmer could get/give. Did you ever try to write a long program (especially Windows), without previously compiling, and then compile it all at once? Oh man, you come up with, like, 37 errors and 58 warnings (mostly just typos). It really crushes your self-confidence as a programmer. So, take Salem's advice and compile as you go.

    --Garfield the Programmer
    1978 Silver Anniversary Corvette

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    The worst was doing MIPS assembly language. I had to go across campus to the only lab that would have the MIPS simulator on it and vie for time to get on one of the machines. So I usually just wrote each function, went to the lab, waited, tested each one once, write down any errors, went home, made changes, went back to lab the next day, etc.

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    207
    Thanks guys!!

    Hey The V., then at least I should be happy to compile from my own computer


    Salem: are you in the business of teaching? Because you should, as a "natural born teacher". But not teacher as "an old person who goes to school to kick some little but and get paid for it", but as "a nice fella who TEACHS".

    Thanks again

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Salem - makes it into the news
    By risby in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 09-22-2006, 07:23 AM
  2. RePhrase: Wanna join a DEV team?
    By Kilo in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 05-01-2005, 06:42 PM
  3. Salem
    By unanimous in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 08-09-2003, 11:39 AM
  4. I wanna start gfx!!!
    By Flikm in forum C++ Programming
    Replies: 19
    Last Post: 09-19-2001, 01:51 PM
  5. I wanna be a moderator
    By stupid_mutt in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-31-2001, 06:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21