Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to teach yourself programming for the long term?

  1. Oct 31, 2014 #1
    No, I'm not asking what language to learn, etc. I started learning python last year and i was wrapping my head around the basic concepts and even making some nifty programs.

    However, one day I just got frustrated and gave up. I know frustration is common but I felt very stupid while programming because I had to look for a lot of help online and couldn't come up with the logic myself. I also couldn't properly install certain files.

    But now I'm looking to start over again. I'm thinking of using Java and the Stanford School of Comp. Sci. as a resource. But I'm looking for the steps to follow. I'll start off by learning the syntax but then what? Should I do problems online? Is it alright to see the answers of these problems if I can do them? What are the proper steps?
  2. jcsd
  3. Oct 31, 2014 #2


    User Avatar
    Gold Member

    (1) Write the simplest program you can think of ("hello world").

    (2) write a just slightly more complex program.

    Repeat step 2 over and over.

    Learning programming is exactly like learning to ride a bike. You do NOT learn it by reading about it, you learn it by doing it.
  4. Oct 31, 2014 #3
    I suggest you read a book of the language you like, learn the basic syntax to code simple programs first then the data structures (list, stack, queue, tree).
    My way to learn stuff is like this. I spend only 1-2 hours a day reading a book, then I observe my surroundings for similar things I just read, then continue to imagine what the rest of the book is about by reading chapter items and link what I see with them. I never finish the whole academic book myself. If my method interests you, go with it. Life is full of colors. But remember it doesn't always work. :D
    Anyway I think my method works best for those who want to learn about feature engineering.
  5. Nov 2, 2014 #4
    Imagine anyone trying to become a physicist would never look at other people's work but instead tried to come up with everything himself. There wouldn't be a single good physicist in the world. You have to learn from other people to get anywhere.
    To become good in a field you first learn from books/lectures/tutorials/examples etc. and then you go and play around with that new knowledge. Modify/combine the things you learned and in the process come up with ideas of your own. And of course you then repeat those two steps over and over again over many years.

    Of course it takes a long time to become a good programmer. And it is impossible to learn everything. Every professional programmer has to look up stuff online all the time because there is just so much information out there. You can't memorize it all.
    And looking at other peoples source code is of course perfectly fine. You can learn a lot by looking at code examples. But you should try and understand these examples and then modify and play around with them.

    Maybe the most important thing for you is to get motivated.
    For that it might make sense to start with a simple language that gives you fast feedback. Having to spent a lot of time learning before you can make anything interesting can be frustrating.
    You could look e.g. at App Inventor http://appinventor.mit.edu/
    With that you can create an android app within 5 minutes.

    One other thing that could be helpful is this lecture series from 1986.

    It really helps you to look at programming with a new perspective.
  6. Nov 4, 2014 #5
    Agreed. Also, after you write your beginner programs, and your code becomes more complex, looking for ways to improve and optimize code will help you learn new methods to writing code, as well enhancing your knowledge.

    Beginning to learn to code can be very frustrating, to the point of devastation that will make a lot of people quit before they even start. The trick is to slow down and read up on what is tripping you up and hands on experience to apply your knowledge.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook