Sign in to follow this  

learning habits/methods

This topic is 4034 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

what are good learning habits/methods? one example could be analyzing source code so: how does one efficiently analyze source code to learn from it? like carving out data structures,tracking functions,figuring the program structure,seeing optimizations etc... (regarding programs big enough to ask a question like this,for example Pure Data by Miller Puckette is an awesome program that i'd like to tear apart) i appreciate it if anyone would like to share their experience about this subject. and i'd like to hear other ideas,methods you find useful and efficient in learning,improving your skills thank you

Share this post


Link to post
Share on other sites
Purely my 2c here, but I think there is a limit to what you can learn from analysing other people's code. I think you need to be writing code to learn.

If you have a specific problem you are looking to solve, examining parts of other people's code can be invaluable, but I've never personally found much value in trawling through other people's programs for general learning.

There has been some interesting debate around here recently about the potential damage caused by our current "tutorial culture" of learning versus the use of documentation and references.

Opinion ends.

Share this post


Link to post
Share on other sites
Neither do I find reading others code much interesting. There may be a nice trick hidden there somewhere, but I'd rather read a well-formed article about design patterns or a specific algorithm. Code examples in such articles surely help, as these are often short and to the point. :)

Share this post


Link to post
Share on other sites
I agree with both.

In short : you _could_ learn invaluable tricks from other peoples code (the open sourced Quake series are an excellent example of this), but to truly learn HOW to program, and to truly understand the design, implementation and reasoning, you have to do it properly : read, do, read, do, etc.

I've always believed that the only way to truly master something is by doing (excercising). Reading code of others is not doing, but copying. As said, this isn't necessarily bad, and although it could teach you practical things, it does rely on common sense, common sense that you gain through traditional means. Moreover, I tend to study by seeing. If I see something that's new to me, I intend to look it up properly, if interesting.

I couldn't really express myself properly, so don't trash me entirely if you don't completely agree ;-).

Share this post


Link to post
Share on other sites
I agree with most of the above posts but i really think it depends exactly what your trying to learn and what type of code your looking at, for example, about a week ago i pulled one of the winning entries from the last IOCCC and spent about 6-8 hours turning it into readable code and i would have to say that i now have a far greater understanding of how much inline comments i should have in my code, how important descriptive variable names are and how evil macros are. That said its something i never want to do again ;).

Share this post


Link to post
Share on other sites
Most often I find reading others' code helpful merely for my self-esteem *grin*
But for me I tend to attack code procedurally. Start at main (or a particularly interesting function) and step through it looking at bits to know where they are and how they're used. It works... okay.


As for learning, I like to port personal projects into other languages to learn them. It helps me focus on the implementation rather than the design or the logic.

Share this post


Link to post
Share on other sites
i think i learnt a lot by staring at other people's code,especially about structures,macros and pointer to pointer operations.not their definitions of course,but the way they are used in many creative ways.this includes many other standard library functions etc.. that i was unaware of their existence.since im a beginner,anywhere i look offers something new to learn..and when things i find in a source file start to look familiar,thru time,i appreciate the time i wasted by staring at those files like a cow.
from the comments,i got a feeling that this could be an inefficient way to learn,in terms of wasting time.i should probably write programs to learn.this has got to do with me,the way i was introduced to programming,how i forced myself to learn computers from scratch in limited time.i thought inspecting source code would teach me faster.i have reasons to talk about 'time',all the time.
you can skip this part below,as it will be a short story of me and programming that i'd like to share.

i started learning computers from ground zero,i am currently studying audio engineering, i had nothing to do with computers except audio stuff,
less than a year ago,i started messing around with max/msp.i liked it,i 'patched' my first midi sequencer there,then my trial period was over,so i switched to ac toolbox.thats when i was introduced to lisp.i slacked around with for a bit,then decided to learn common lisp.i guess lisp opened my eyes.after 1-2 months,i was introduced to a nice guy that was doing web-apps and needed a hand.i told him i wasnt a programmer,all i could do was write simple lisp programs,but i could learn,so he gave me a week to learn ruby and show him some demonstration,i did,then i spent some time goofing around with ruby.in the end,i knew ruby and javascript good enough to support him.(i really appreciate him giving me the chance).
however,all this time,i didnt take programming seriously.i could never imagine myself in front of a computer,writing programs.i was programming from time to time(if you call it programming).then i realized i wanted to know how ruby language and hardware worked.so i delved into C to see the details.after seeing how powerful C was(my humble opinion for my humble purposes,at least it made me understand how computers work).
3-4 months ago from now,gba development attracted me,i was exposed to more C and assembly,and thats when i realized all i really wanted to do in my life was programming.major goal not being money,but self satisfaction.i enjoy learning fine details of things,so i spent last few months reading,learning,reading,learning.
i wasnt very organized,still not,i jumped from subject to subject,from cocoa to opengl,assembly to dos.which resulted in learning lots of things,but no implementations or whatsoever.i still find myself jumping around,because everything is so new to me,i get excited to see the guts of things.the drawback is,nothing is complete.im not good at anything except learning right now.
in the next months im planning to shape my life,so all i do will be programming.
i know i should stop switching subjects and focus on one,so im planning to stick to C and assembly,for msdos for now.i will also be working on rails development in an office soon(can't believe it),where im hoping to learn serious practices,most importantly,how to organize myself and manage my time.

i just wanted to share my story with you,which shows im in need of guidance to pull myself together to start my new life in the path of being a good programmer.i give myself 5 years to be able to write decent programs.im keeping my expectations at minimum,like im not expecting to create complex programs,or make a living out of programming before this deadline.all i expect is to take solid steps.after the deadline,i should be good,or people can call me a dumbass dreamer.
i think it would be nice to go to school for this,at least i would be forced learn essential things that im not currently interested in,to complete assignments,and learn to design programs,but i cant for many reasons.
i'll be racing against time and myself,be my own teacher on things i dont know about,and try to be better without losing my concentration.i cant lay back and trust someone to force me to learn(blame the education system).this is a self-discipline which i lack,but im willing to bend myself till it hurts.i dont know how to manage my time,which is already frustrating me.like trying to reinvent things,to prove to myself that i can do it,is costing me time,but it also motivates and gives me a solid understanding of things.

finally if i find myself unemployed,or lost by the end of this period,i truly wont regret i gave it a shot.

sorry for changing the topic,just couldnt help it,i dont have many people around me to talk about these things.
thank you very much for your comments,i would love to hear your opinions,tips,other stories,or anything that motivates.it could be about programming,practices,time management,forums,newsgroups,anything would help.
please do not fear to discourage me for i shall make a lesson out of it.
thanks again for reading this far :)

Share this post


Link to post
Share on other sites

This topic is 4034 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this