Like Tree12Likes

How you guys learn programming?

This is a discussion on How you guys learn programming? within the C Programming forums, part of the General Programming Boards category; I mean, do you learn it chapter by chapter or straight away into reading source codes and from there if ...

  1. #1
    Registered User
    Join Date
    Jun 2012
    Posts
    82

    How you guys learn programming?

    I mean, do you learn it chapter by chapter or straight away into reading source codes and from there if encounters any syntax not known to you/not understand then you look for the right chapter and start reading it?

    Chapter by chapter in this case,
    C Tutorial - Learn C - Cprogramming.com

    From top to bottom. Ascending order.

    Read source codes directly, jump from chapter to chapter

    And one more, any good starting point for learning the concepts for programming? I found a link Teach Yourself Programming in Ten Years
    (Teach yourself programming in 10 years) in a thread. Something like this.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,283
    Short answer: hard work.

    There are several things I've done, including ...

    Reading books, some several times. Sometimes I jump around chapters, sometimes read from front to back.

    Reading journal articles, some several times.

    Examining good and bad source code written by other people.

    Examining good and bad code in open source projects.

    Writing code to solve problems (that's where the fun is )

    Reusing code I've previously written to address new problems (more fun!).

    Modifying code I've previously written to address new problems (more fun!).

    Debugging code I've previously written (which can, actually, be a lot of fun).

    Reusing, modifying, and debugging code written by other people.

    Reading standards, and grappling to understand them.

    Contributing to development of some standards.

    Teaching and mentoring people who are trying to learn how to develop software.

    Formally and informally assessing small and large bodies of code written by other people.

    Answering questions in forums, and getting my answers right.

    Answering questions in forums, and making mistakes.

    Entering debates with other people who, like me, are trying to learn how to develop better software.

    Writing compilers.

    Writing formal reports about software development.



    With all that, the main thing I have learned about programming, and software development in general, is that there is always more to learn.
    Last edited by grumpy; 06-15-2012 at 09:52 PM.
    Right 98% of the time, and don't care about the other 3%.

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    2,331
    Everyone has their own way of learning. If you can figure out the way that best suits you ... then you are already ahead of the game.

    Assuming you're starting with absolutely no experience:

    1. Get a good book. Read it, try to understand it, and do every single example that's given. It's tempting to skim over it with the eye and say, "Okay, this makes sense." But actually punching it into the keyboard and compiling it will give you a better understanding of the code, and make you more used to writing actual code.

    2. Tweak what you learn. Take the example code, analyze it, and try to fully understand it. If you have a question about it, don't ask right away, but actually try it and see what happens.

    3. Programming is a passion. If you drill through the text, only compiling the sample code, you likely won't learn as much as if you decide to take what you've learned so far and try to code something that is all your own. Yes, much of it (in the early stages of learning) has no practical value for day-to-day things - but you'll learn a lot more this way, and familiarize yourself with programming much more.

    4. Help others. Programming is like putting up a wall in some respects - you'll align your sheet rock straight and screw it in proper, but there will always be gaps. By helping others, you'll uncover the gaps in your knowledge and fill it in (code spackling, it should be called).

    5. Programming is much more than writing code. As you might imagine, writing code is very important for a programmer. But it's not everything. There is also problem solving and troubleshooting (debugging, in this context). I once wrote a tic-tac-toe program. The mechanics were easy - printing a grid with 'X's and 'O's. But then I had to determine how the computer would "think" - this is where the real challenge of the program was.

    The best way to learn is by doing. The most difficult obstacle I've faced is finding programs within my ability to code that have practical value. Fortunately, this very site offers intriguing challenges that the programmer will benefit from learning.

    Like everything else in life, practice makes perfect. If you're passionate enough to really want to learn something about programming, then just do it. Do it whenever and wherever you can.

    From top to bottom. Ascending order.
    You're already thinking like a 'C' program, so you're on the right track =)
    Last edited by Matticus; 06-15-2012 at 09:55 PM.
    xeon321 likes this.

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    2,331
    Note: grumpy used the word "fun" several times, and I didn't use it once. Therefore, I defer to grumpy's post and recognize I did a much worse job explaining programming than they =)

  5. #5
    Registered User
    Join Date
    Jun 2012
    Posts
    82
    Reading journal articles, some several times.
    Hmm, articles...about what? Security issues? Example : buffer overflow?
    Can give me some? I like reading these. I found some on this site but already finished reading =(

    Examining good and bad source code written by other people.
    Hmm, I did that, But the standards are way beyond my level. Enjoyed reading the comments though.

    Writing code to solve problems (that's where the fun is )
    Yeah, it is fun when you're cracking your head to figure out how to solve problems. But too bad, most of the 'problems' are self-imaginary(in my case, validating user input). And after writing the program, cracking your head AGAIN to think up of an even better & efficient solution

    Debugging code I've previously written (which can, actually, be a lot of fun).
    Uhh, it is ONLY fun after you have successfully debugged the program. The process , is frustrating though. Things get funny when you discovered you're only lacking a semicolon after hours of thinking.

    Reusing, modifying, and debugging code written by other people.
    Haven't try this. Standard still too low to debug other people's code. =(

    Reading standards, and grappling to understand them.
    Yup!

    Entering debates with other people who, like me, are trying to learn how to develop better software.

    It's so hard to find people that are willing to do this =(
    Most of em aren't on my standard. In my class, people are just not interested in learning or having a deeper understanding.

    With all that, the main thing I have learned about programming, and software development in general, is that there is always more to learn.
    Yes, that's very true indeed!

    That's a list very helpful suggestion! Thanks for sharing, appreciate that a lot

  6. #6
    Registered User
    Join Date
    Jun 2012
    Posts
    82
    Hmm, my way of learning is :
    For example, I learnt chapter 1 to 3.
    I will write a program based on the knowledge I gained on chapter 1. Another for 2 , 3. After that, combine all 3 chapter and write a program again.

    Understand the basic concepts to develop basic understandings.
    Search up for articles like what to and what not to (can only find some) like, not to use gets, goto etc. It's damn hard to find these articles.
    Learn from chapter to chapter.

    The problem I facing now is, I don't have an idea where to start for getting deeper into each chapter. Like pointers, any clues? ><

    5. Programming is much more than writing code. The mechanics were easy - printing a grid with 'X's and 'O's. But then I had to determine how the computer would "think" - this is where the real challenge of the program was.
    This is nice! Need more 'injections' like this

    Fortunately, this very site offers intriguing challenges that the programmer will benefit from learning.
    You mean the printing pyramid those kind of stuffs?

    Like everything else in life, practice makes perfect. If you're passionate enough to really want to learn something about programming, then just do it. Do it whenever and wherever you can.
    Yes indeed.

    You're already thinking like a 'C' program, so you're on the right track =)
    Uhh, I'm becoming a machine. That's bad xD

  7. #7
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,689
    Quote Originally Posted by Matticus
    But then I had to determine how the computer would "think" - this is where the real challenge of the program was.
    And then you never won a game of tic tac toe again.

    Quote Originally Posted by xeon321
    The problem I facing now is, I don't have an idea where to start for getting deeper into each chapter. Like pointers, any clues?
    I personally am against the idea that everything in programming is a deep, dark, musty cave that needs to be explored. If you are having trouble understanding what pointers are for or how they work, you can find answers to those questions. But really, in my case, after learning the syntax and usefulness of pointers, they ceased to be an interesting subject.

    What people seem to wax on endlessly about is objects and object oriented programming. The depth of that topic rivals Lake Superior.
    rags_to_riches likes this.

  8. #8
    Registered User
    Join Date
    Jun 2011
    Posts
    2,331
    And then you never won a game of tic tac toe again.
    Touché, I mastered the stalemate.

  9. #9
    Registered User
    Join Date
    Jun 2005
    Posts
    6,283
    Quote Originally Posted by xeon321 View Post
    Hmm, articles...about what? Security issues? Example : buffer overflow?
    Can give me some?
    When I say "journal articles", I mean articles in professional and academic publications. Some examples (relevant to those interested in C or C++) would be C/C++ User Group, Dr. Dobbs Journal, C++ Report. More generally, there is a multitude of publications associated with organisations like the ACM (Association for Computing Machinery), IEEE (Institude of Electrical and Electronic Engineers), Elsevier publishers, and others.

    Unfortunately, I can't just send you the articles ... most of the journals are subscription based, and I'd be breaching copyright laws if I did. And I can't be sure that the topics I read about would be relevant to you. There is an investment - of both time and money - in accessing publications.

    Google scholar is a useful resource for at least finding published articles that are online, although - if you want the published articles rather than drafts, abstracts - you will need to subscribe to (or get your employer to subscribe to) relevant journals.
    Right 98% of the time, and don't care about the other 3%.

  10. #10
    Registered User
    Join Date
    Jun 2012
    Posts
    82
    Hmm, maybe, maybe not. Not sure since I just into programming. I do found answers regarding what is, how pointers work. But I have not found any regarding to "If you use pointers like this, there will be bla3 issues in a more complex program". Like the usage of fflush(stdin), when I am taught using this by my lecturer. He has not said a word that fflush(stdin) is actually wrong. Wish to avoid this kind of problems at the early stage so it won't become a root.

    As well as other syntax/references in the C library. I think not all of them are listed out right?
    Last edited by xeon321; 06-15-2012 at 11:50 PM.

  11. #11
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,689
    Quote Originally Posted by xeon321 View Post
    Hmm, maybe, maybe not. Not sure since I just into programming. I do found answers regarding what is, how pointers work. But I have not found any regarding to "If you use pointers like this, there will be bla3 issues in a more complex program".
    I'm actually not quite sure what this is supposed to mean. If you stick to using pointers for these things:
    • acquiring memory
    • pass by pointer semantics in functions
    • making data structures like arrays, or self referential structures like lists and trees

    You will get the usefulness out of pointers and stay away from cleverness of questionable importance. You will still make mistakes with pointers of course, but trial by fire can be the best way to learn what not to do. And with practice, it sinks in and you just make more advanced mistakes. But by then you learned how to debug!

    Like the usage of fflush(stdin), when I am taught using this by my lecturer. He has not said a word that fflush(stdin) is actually wrong. Wish to avoid this kind of problems at the early stage so it won't become a root.
    Well it's a good thing that you have a quality reference right?

    Another thing is that you might as well actually correct him.

    As well as other syntax/references in the C library. I think not all of them are listed out right?
    Actually, that stuff is laid out rather technically in the standard. From what I have seen, the standard library and syntax sections are the easiest parts of the standard to actually read. Anyway, people still rely on other things too, such as desk references or man pages, and even compiler documentation.
    Last edited by whiteflags; 06-16-2012 at 12:14 AM.

  12. #12
    Registered User
    Join Date
    Jun 2005
    Posts
    6,283
    Quote Originally Posted by whiteflags View Post
    Another thing is that you might as well actually correct him.
    If you're going to correct a lecturer, learn some tact first. Lecturers have their quirks too. Some don't respond well to being corrected by students, so it is a brave act for a student to correct them, even if the correction is justified. Some are quite happy to be corrected, as long as you make your case. Saying "someone on the internet told me" is not usually a good case. A quote from a reputable textbook is a fair case. A quote from the C standard is definitive ......
    Right 98% of the time, and don't care about the other 3%.

  13. #13
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,243
    Post: #2
    O_o

    Nope. Nothing to do here...

    Soma

  14. #14
    Registered User
    Join Date
    Jun 2012
    Posts
    82
    @whiteflags
    I'm actually not quite sure what this is supposed to mean. If you stick to using pointers for these things:
    • acquiring memory
    • pass by pointer semantics in functions
    • making data structures like arrays, or self referential structures like lists and trees

    You will get the usefulness out of pointers and stay away from cleverness of questionable importance. You will still make mistakes with pointers of course, but trial by fire can be the best way to learn what not to do. And with practice, it sinks in and you just make more advanced mistakes. But by then you learned how to debug!
    Hahaha, nevermind. I found a site that Matticus mentioned in my previous thread. That's an awesome list!
    Hmm, I see. Sure , will play around with pointers until I mastered them.

    Well it's a good thing that you have a quality reference right?
    Yup, it is. It's actually on this site.

    Actually, that stuff is laid out rather technically in the standard. From what I have seen, the standard library and syntax sections are the easiest parts of the standard to actually read. Anyway, people still rely on other things too, such as desk references or man pages, and even compiler documentation.
    Hmm, will read into them when I have finished studying all the chapters
    Well for desk references, man pages or compiler documentation. No idea what is that, won't be bothered with them for now.

    @grumpy
    If you're going to correct a lecturer, learn some tact first

    Nah, don't worry. I'm sure he's gonna teach it in the future. Appreciate your advice still

  15. #15
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    A nice thing to remember when trying to learn Computer Programming, (or anything technical):
    Quote Originally Posted by ???
    If you understand what you're doing, you're not learning anything.
    So, learn and do something new whenever you get an opportunity...and don't get comfortable with a particular level of knowledge.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How do you guys go about programming when you don't feel like programming
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 03-04-2003, 04:36 AM
  2. How old are you, and when did you learn programming.
    By ammar in forum A Brief History of Cprogramming.com
    Replies: 61
    Last Post: 12-16-2002, 06:18 PM
  3. Just to let you guys know about a new Programming Newsletter
    By webmaster in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 12-26-2001, 09:58 PM
  4. How do you learn programming?
    By meka in forum C++ Programming
    Replies: 2
    Last Post: 11-08-2001, 08:04 PM

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