How do you read other peoples code

Started by
12 comments, last by low_rider_bunny 19 years, 10 months ago
I also suggest not to start with such a professional system like blender3d. the code is way to good optimised, as that you could really understand it as a nooby. Also, if you could get the sence of their code, you couldn''t really write for it, bc. as a beginner, you will never reach the necessary optimisation level.
Advertisement
Yes, VS6 has something like ctags built in. Ctrl-] does paren matching, ctr-k will jump to the enclosing #ifdef (if there is one). Right-click a function name and pick "Go To Definition" to find the definition of a function (don''t know the keyboard accelerator for that one). For VS6 to find a symbol, it has to show up in the project. The other one I use is find in files (I bind this to ctrl-shift-F).

When it comes to reading other people''s code, it''s not enough to understand the language. You have to start from the beginning and learn how the author programs. The way I prefer to do it is to first realize what the program does. What I then do is think of the different ways that I could make a program like that... the better you become at programming, the better you will become at this. Once I have a list (in my head.. I don''t spend more than half a minute on it), I look through the source for their implementation of these techniques.. everything else usually falls into place. Problems arise when I''m looking at things I''m not familiar with.. when it comes to that, I''ll either read up on the techniques that the game uses or try to crawl through the code and figure out what the heck the author was doing.
Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
quote:Original post by fooman
I also suggest not to start with such a professional system like blender3d. the code is way to good optimised, as that you could really understand it as a nooby. Also, if you could get the sence of their code, you couldn't really write for it, bc. as a beginner, you will never reach the necessary optimisation level.


HA AHA HAHHAH A HA HH AH AH AH HAhAH Sorry I just had to get that on print :D

The problem I have talked to with others is that Blender is rudely under optimised ,and commented at.
True though I will never get it understood, and might as well make my own shtuff by scratch instead as others tend to do. And then try my best to ram it in, sigh...

[edited by - low_rider_bunny on June 9, 2004 5:44:04 PM]

This topic is closed to new replies.

Advertisement