Slashdot Mirror


Ask Slashdot: How To Start Reading Other's Code?

BorgeStrand writes "I'm reviving an open source project and need to read up on a lot of existing code written by others. What are your tricks for quickly getting to grips with code written by others? The project is written in C++ using several APIs which are unknown to me. I know embedded C pretty well, so both the syntax, the APIs and the general functionality are things I wish to explore before I can contribute to the project."

7 of 254 comments (clear)

  1. The only way by Anonymous Coward · · Score: 2, Funny

    Look straight at the code for a few hours without moving an inch. After that its details should be printed into your brain.

  2. Read someone elses Perl code first by jd2112 · · Score: 4, Funny

    Everything else will seem simple after that...

    --
    Any insufficiently advanced magic is indistinguishable from technology.
  3. Re:Test and Break by Anonymous Coward · · Score: 3, Funny

    If there's a lot of documentation, interpret it like your favorite religious text. Try to hit up some of the old developers from the VCS.
    Also, I'd like to help :)

    The Great Programmer commanded his bytes to carry their bugs to the bitstream and drown them, or 7 years of seg faulting would follow.

    Join the Church of Emacs today!

  4. Try some good quality marijuana by stevegee58 · · Score: 4, Funny

    It won't help you understand the code but you'll stop worrying about it so much.

  5. Re:Test and Break by ichthus · · Score: 5, Funny

    And lo, yea though ye shifteth right 8 bits, counteth not thy sign as verily carried henceforth unto the int8_t.

    --
    sig: sauer
  6. Re:Maybe. by Anonymous Coward · · Score: 3, Funny

    That's when you start reading tea leaves.

    Well, at least that's better than reading JavaBeans...

  7. hard to say by bloodhawk · · Score: 3, Funny

    I always find this greatly depends on the quality of the code, which varies greatly from well written and documented and just involves some boring reading and tracing through of execution paths too the absolutely appalling where you can sometimes only understand why the fuck they did something when you change the code and see how it breaks. The former I usually rely on a quiet room and lots of caffeine, the later requires swearing, loads of code changes to trace what is actually happening and cursing the original author, their relations and the goat you are sure they must have been molesting while writing the code.