Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. need suggestions on how to read other people code.

need suggestions on how to read other people code.

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
6 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Josef Manurung
    wrote on last edited by
    #1

    help.. because it can be the most boring thing to do. i really don't know anything to help it other than my curiosity. yes curiosity helps but i need to - grasp what the code does.. fast! - without breaking my head. (is this a joke? i'm asking myself) - get it done only with a cup of coffee.. lol (joke? yes/no? hmm)

    L G A 3 Replies Last reply
    0
    • J Josef Manurung

      help.. because it can be the most boring thing to do. i really don't know anything to help it other than my curiosity. yes curiosity helps but i need to - grasp what the code does.. fast! - without breaking my head. (is this a joke? i'm asking myself) - get it done only with a cup of coffee.. lol (joke? yes/no? hmm)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      JoeMan wrote:

      grasp what the code does

      Read it and re-read it. Compile it and step through it with the debugger to see how things work. There is only one way to make progress: practice, practice, practice.

      MVP 2010 - are they mad?

      J 1 Reply Last reply
      0
      • L Lost User

        JoeMan wrote:

        grasp what the code does

        Read it and re-read it. Compile it and step through it with the debugger to see how things work. There is only one way to make progress: practice, practice, practice.

        MVP 2010 - are they mad?

        J Offline
        J Offline
        Josef Manurung
        wrote on last edited by
        #3

        debugger... never thought of it thanks a lot

        L 1 Reply Last reply
        0
        • J Josef Manurung

          debugger... never thought of it thanks a lot

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          JoeMan wrote:

          debugger... never thought of it

          :omg: :wtf: :rolleyes:

          L u n a t i c F r i n g e

          1 Reply Last reply
          0
          • J Josef Manurung

            help.. because it can be the most boring thing to do. i really don't know anything to help it other than my curiosity. yes curiosity helps but i need to - grasp what the code does.. fast! - without breaking my head. (is this a joke? i'm asking myself) - get it done only with a cup of coffee.. lol (joke? yes/no? hmm)

            G Offline
            G Offline
            Gary R Wheeler
            wrote on last edited by
            #5

            If I've got a piece of 'foreign' code I really have to understand, I usually make a copy of it and refactor it to my coding style and naming conventions. Doing this carefully, and stepping through the result in the debugger, usually gives me enough understanding to either use the code or rewrite it.

            Software Zen: delete this;
            Fold With Us![^]

            1 Reply Last reply
            0
            • J Josef Manurung

              help.. because it can be the most boring thing to do. i really don't know anything to help it other than my curiosity. yes curiosity helps but i need to - grasp what the code does.. fast! - without breaking my head. (is this a joke? i'm asking myself) - get it done only with a cup of coffee.. lol (joke? yes/no? hmm)

              A Offline
              A Offline
              Alan Balkany
              wrote on last edited by
              #6

              A good first step that's worked for me is to comment the code. First a header for each method that explains what the method does. Next comments on the variables of the class, explaining what they do and how they're used. It also helps to comment unclear blocks of code once you figure out what they do, so you don't have to solve the same problem again later.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups