So I recently started to learn how to program and one of my current jobs is "college prep tutor." Part of the approach that I teach my students is that if you study in the right way the test is easy. We've all have had the experience of zoning out reading a page of a book and realizing that you don't remember a single thing or getting to the test and realizing none of the questions were things that you studied. I don't want the equivalent of that with programming. So I want to share my current approach for learning how to code, specifically from programming tutorials and courses on youtube or udemy. My hope is that I can help other people to avoid that problem and if possible get feedback on my approach from more experienced developers.

So if I understand programming correctly my goal should be to be able to translate a "desire" into code that does that. By desire I mean both a feature request ("I want this button to look like it's pressed in when I click it") and a bug report ("the website is broken, fix it"). I also picture 3 large domains existing for programming skills:

  1. Technical position at a company
  2. Freelancing building projects for clients
  3. Startup

I believe that this goal prepares me for all 3 of these domains. If someone with more experience can contribute to say if that is the right goal or if I'm missing part of the equation I think that would help a lot because that would change my approach to learning.

If we assume that that is a good goal then let me share how I approach learning from tutorials.

Also as far as languages go I am using javascript for everything right now because I'm most interested in web and mobile development.

My Process for Learning Programming

  1. So first I start off with a desire for a computer to do something.
  2. Let's assume we're building a timer
  3. I start searching for tutorials on how to do that project on YouTube. If none exist I'll look up smaller parts of the project.
  4. I find a video like this on youtube
  5. I'll build what is in the video. I take notes by watching the videos writing down steps but not coding along. My notes are formatted into specific problem solving steps with the relevant solution in pseudocode.
  6. Get Text to Display on Screen
  7. Add <p> tag to body of HTML
  8. Change that Text with Javascript
  9. Add ID to HTML and select with Javascript
  10. Use document.querySelector(#id).innerHTML to select
  11. Link that text to a variable.
  12. Define a variable with let and then set the variable equal to the text
  13. Get that variable to count up every second
  14. Set a counter and use setInterval()
  15. Set interval put the function in first, then time interval (in ms)
  16. After going through the coding tutorial I'll run through and quiz myself how I'm going to break down the problem in that pseudocode by trying to reconstruct the steps from memory.
  17. Then I'll open the code editor and start on the video's project. I find myself getting stuck for one of 3 reasons: (1) I am applying the code in the wrong way or with the wrong syntax/organization; (2) I know what I want to do but I can't remember the solution; (3) I don't know what the next "desire" is.
  18. For each I'll try to reason my way through: (1) consulting blogs and docs to see working examples, googling error codes, or checking the output of smaller parts of the function, (2) I'll use a piece of paper to figure out what I want the computer to do in pseudocode (3) I'll look my notes for the next feature request, but not the solution.
  19. If I'm still stuck I'll consult my notes on the solution with the option to reference the video if I'm completely stuck.
  20. I'll finish the coding project from the video.
  21. Then I'll start on my project trying to implement what I learned towards the solution. If I get stuck here I'll consult my former code to help me out.
  22. I'll google solutions to smaller quirks along the way if I want to do something different than the video's project.

What I believe that the benefits of this approach are:

  1. I get a working project to tinker around with and add to my portfolio quickly
  2. I simulate the idea of a feature request and trying to reason my way through it. Which I believe simulates programming in the real world.
  3. I am working towards a completely unique program.
  4. I'm building a more general set of problem solving skills rather than brute force memorization.

Current problems with the approach:

  1. I find myself making the same syntax error over and over again. This happens because I don't understand a concept beyond that specific application. I have thought to work with the documentation more but I'm not sure what to do with it. Do you have any ideas around this?
  2. It is incredibly slow to work through a problem like this rather than copy and pasting code and reasoning my way through understanding it. How could this be sped up? Are any parts unnecessary? When, if ever, should I just copy and paste or use existing documentation?
  3. If no relevant tutorial exists I'm not quite sure what I would do. How do you solve problems that no one has shared a solution to? I assume you draw largely on past knowledge, so is this even a problem that I should worry about as a beginner? At what point should I do something like look at a feature in a website that I like and try recreating it in code?
  4. There is no "clear progression" from novice to expert. I have no idea when I would be considered intermediate or advanced and that leads to an imposter syndrome.
  5. Unknown bug reports and errors are still causing a lot of worry for me. I can read the error code but if I don't know the answer and there's no stack overflow answer I'm screwed.
  6. I see that my goal of "turn desires into code" might miss some larger picture goals like how to decide between different ways of doing something or organizing larger projects. Can I trust tutorials to teach me the best practices for that? Should I spend time studying code? When should I learn those larger topics?
  7. I can give myself just enough rope to hang myself. I can select a project that's too advanced for me and it can take me a week to go through it.
  8. I'm not sure how interview questions fit into this. If my goal is to be able to land a job at a big tech firm when should I start drilling those problem? Should that be part of my education or should I just save that for right before I start applying?
  9. I have a gut feel like grasping more fundamental concepts in programming may be useful at some point. I've heard that CS50 at Harvard is a great course but I'm not sure when it would be useful or how it would benefit my skills.

These are tough questions but I feel like they are critical for making sure that I'm not fooling myself or wasting my time. If you're new hopefully this helps you understand how you can learn more from your tutorials. And if you're experienced please share how us beginners could learn the right skills faster.

Summary

  • Find a problem in your life or an app that you like and work to code it yourself
  • Follow along with tutorials along the way
  • Go through some basic courses as you do so
  • Teach as you go