writing code on paper

This is a discussion on writing code on paper within the C++ Programming forums, part of the General Programming Boards category; hi guys i have a huge problem i cant write code on paper actually i can, but im not good ...

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    72

    writing code on paper

    hi guys i have a huge problem

    i cant write code on paper

    actually i can, but im not good at it

    this year i took 2 exams on C and C++ programming where i coded using a compiler, I took two A's

    but now i took an exam where I thought there would be just theory, not again coding and that's because this is how this exam is called ("theory in programming") well he put 3 problems, each of them wanted us to code a C/C++ program

    i had in my mind the algorithm for each problem, but i couldnt write it on paper

    i think i didn't do well

    because i had only 2 sheets of paper, and i needed space for the code, whenever i forgot to declare a variable, i needed to erase the code and rewrite it again, so frustrating

    can you please suggest me, any technics, advice etc that would help me learn how to write proper code on paper?

    Thanks in advance
    Last edited by nik2; 06-29-2010 at 06:24 AM.

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Learn the language.

    Seriously, I can think of 2 reasons you can write code on a compiler properly:
    1. You look up everything on the internet, maybe even copy code from others.
    2. You compile a lot, the compiler shows you the errors, which you solve.

    Well, everybody has "2" more or less. I think it's good practice to compile often, and even experts will make mistakes often enough. But if you use it too much, it will impact your grade.

    So you tell use, which of the two is true? Or did you just happen to have a full black-out at the exam? I think you should just learn the language better...

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    72
    nothing of the above

    when i took these 2 exams using a compiler we had no internet access, and no reference with us

    i told you why i can hardly write code on paper

    and this why im asking for advice

    it's not that i dont know the language, it's just the way i use to code in the compiler

    for example sometimes when i forget to declare something or make a stupid mistake or need another line, i just go and add it without any problems, well this is a problem when you use just a paper

    learn the language better, yes that's true actually, it would help, I mean even if you dont know something, using a compiler is easy to figure it out, but i dont think i didnt know something in this exam, nevrmind thanks for the advice
    Last edited by nik2; 06-29-2010 at 07:39 AM.

  4. #4
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    for example sometimes when i forget to declare something or make a stupid mistake or need another line, i just go and add it without any problems, well this is a problem when you use just a paper
    -Double space on paper
    -Abuse whitespace rules (or lack of them);-You can put all your declarations on one line if it really comes to that
    -Does your prof. let you use scratch paper? He probably does. Write out the general structure of the program and list what you need to declare based on that.
    Consider this post signed

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,494
    Code on paper is a guide, not an answer.

    It depends what your professor is after. A demonstration of your thought processes is one thing, a page of syntactically valid code is another.

    If it's the former, then forgetting to declare a loop variable, or missing a ; or not quite matching the braces is just fluff. What matters is that you know enough about the problem to express something in code.
    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.

  6. #6
    Registered User
    Join Date
    Feb 2010
    Posts
    72
    Quote Originally Posted by bernt View Post
    -Double space on paper
    -Abuse whitespace rules (or lack of them);-You can put all your declarations on one line if it really comes to that
    -Does your prof. let you use scratch paper? He probably does. Write out the general structure of the program and list what you need to declare based on that.
    actually no he doesn't, I know it seems weird, but he doesn't give any scratch paper and even if you ask him to give one like one of my class mates did he gave nothing, because he said that the space required is enough

    i hope he gets the logic right though, I have the logic correct everywhere, I hope he appreciates that

    but anyway, thanks guys for your advice, I will try to work it out, so that next year I will have no more problems related to this

    it's all practise I guess, I just never had to write code on paper this year, and this was just too much for me, especially when you wait something more that has to do with theory instead of writing code again

    I will practise this summer though and try to get better

    thanks for your help

  7. #7
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I can't imagine having to write 100% syntactically correct code on paper. Man, I don't even require interview candidates to do that on a whiteboard.

    I think Salem has it right that your prof. probably just wants to see that you understand the concepts, algorithms, and in general just wants to see your thought process. Syntax is just sugar and I cannot imagine getting graded on pure syntax.

  8. #8
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    I hate interview coding tests where you have to code in pencil. Ugh. You have my sympathies.
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  9. #9
    Registered User
    Join Date
    Feb 2010
    Posts
    72
    i hope it is like this, i will just wait and see

    the problem is that it's not just me, i ve asked many students and all are very dissapointed with the exercises, because we expected to have plain theory, with small coding exercises that require to create simple functions, show what the result is for example you have an exercise with pointers etc functions and show what the results would be

    usually this is what he puts in these kind of exams, we already had coded using a compiler and took grades for that, and we were just expecting theory, and this is what we get again

    maybe wrong syntax is ok, but at least it would be good if he specified what he really wanted

    but nevermind, this has already passed, i will just try to prepare myself better for the next time

  10. #10
    Third Eye Babkockdood's Avatar
    Join Date
    Apr 2010
    Posts
    352
    Coding on paper is brutal. Sorry, dood

  11. #11
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,181
    I don't mind coding on the whiteboard for interviews. I think it's better because I can think out loud, and it's usually the thought process that gets me the job.

    Just leave lot's of space between lines.

    They don't really care about syntax anyways. Everyone knows the syntax. I usually go half C half pseudo-code even. Probably not a good idea on tests, though.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. what is the best way of tracing code on paper
    By transgalactic2 in forum C Programming
    Replies: 8
    Last Post: 03-29-2009, 05:06 PM
  2. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 03:17 PM
  3. professional programmers, do you spend more time writing or modifying code
    By Terrance in forum A Brief History of Cprogramming.com
    Replies: 29
    Last Post: 11-25-2002, 09:54 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

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