Learn programming in 1 hour a day

Josh Cheek - Jul 9 '18 - - Dev Community

This was initially a comment on "How long do you spend learning to code?", but I thought it made more sense to make it its own post.


Reynaldo says:

I can only dedicate about 1 hour of learning a night after my daughter is asleep. Until she is in daycare, this is my schedule. I feel like I'm moving a lot slower then most other self learners. I would love to try and adopt some one else's routine and see what works best for me.


Given the time constraint, here is my recommended schedule:

Take a deep breath

Center your brain, we've only got an hour, need to use it wisely. 10 seconds in, 10 seconds out.

Count them out.

3 to 30 minutes typing

If you type less than 80 WPM, spend half of your hour practicing typing. Otherwise spend the first 3 to 5 minutes practicing typing. If you're on a mac, I like the program TypeFu for this. Start with this almost ritualistically, it should help you put your brain into the "I must perform now" mode, give it a sense of urgency so that the rest of the time is better spent.

2 minutes practicing your editor

Now spend 2 minutes practicing your text editor (or IDE), here is an example.

Get a big list of useful things your text editor can do, which you understand. Maybe spend the first day making this list. You only have an hour, don't waste it on things you don't understand. Start simple and obvious, jump to the top of the file, the bottom of the file, move around by words or paragraphs. That sort of thing.

Just practice 5 to 10 of them at a time. As you start to really get those down, pull a few new ones from the list. Over time, your set of abilities with your editor will grow.

Make it a point to notice anything you use your mouse for, and then look for editor abilities that can replace the mouse. Programmers are power users, so learn your editor well. The mouse is ultimately a crutch that will hold you back, so wherever you use it is an indication of a missing ability.

Use this time to build your knowledge of your editor and strengthen your core editing skills.

While programming isn't really about text manipulation, at the end of the day, that is the primary way that you will interact with code. A bottleneck here, or in your typing will massively impede everything else you do. So spend just a few minutes at the beginning of each day to drill these into your head. While it is initially difficult, within a very short amount of time, your fingers will just do these things for you, and you won't have to spend conscious effort on them.

Rest of the hour: Kata

Spend the rest of the time performing a kata of some sort. Here is an example of me performing a Kata I made. Here are a few katas to get you comfortable with the shell (if you're on Mac or Linux). Initially it'll take you longer than an hour to do them, but after a bit of practice, and especially as you get better at typing, your editor, and thinking through the problem, you should be able to get these down to 20 minutes.

If you do Ruby, here are some you could do: 1, 2 3

If you don't do Ruby, you can create your own katas:

  • Find a tutorial of something you want to learn and follow along with the tutorial.
  • Initially it will take you over an hour. Just go for as long as you can that day. The next day, start over at the beginning and go as far as you can. Always start at the beginning. It'll be a better way to spend your time because you won't be doing the second half of a tutorial with a shaky understanding of the first half, which will reduce your clarity slow you down.
  • Each day you'll probably get a little further with it. If not, don't be discouraged, try again tomorrow. You'll start to remember how to do the pieces and you'll see them make more sense and take less time. Eventually, you'll get through the tutorial.
  • Once you have completed it, the next step is to internalize it: be able to do the entire thing without referencing the original tutorial at all. Each time you need to reference it, undo the solution to get back into the context you were in, and now do that piece again without looking at the tutorial. Repeat this until you can do it smoothly.
  • This will help you memorize the relevant pieces and it will address inaccuracies and deficits in your knowledge.
  • Once you can do it without referencing the tutorial. Then practice doing it with as few errors as you can. Can you get it exactly correct without making any mistakes?
  • Then practice doing it as quickly as you can. What steps are taking the most time? Is there something in your list of editor abilities that could help here? Maybe choose the next day's editor skills based on things that could help you do this more effectively.
  • Then practice doing it both correctly and quickly.

The kata will help you establish specific skillsets that you know you really have down solid. It'll give you a solid foundation for other knowledge to fit into. You could say that these things are "hard skills", they're specific competencies that you can practice. Some of the things others have suggested are "soft skills" which are more like intuitions and understandings. Since you've only got an hour, spend it on the hard skills like this. The hard skills will enable you to understand the soft skills. Too many people start with soft skills and they're not grounded. It's easy to read a blog or a book and think you know what you're talking about, better to spend that time actually programming. For any soft skill you want to learn, first make a kata of it manifesting in some concrete way. This will lay the foundation for that understanding. Eg don't waste your time reading about testing or OOP or Redux or whatever. If you want to learn those things, find a tutorial, turn it into a kata, master that tutorial, then move on to another one. There will be high overlap, the skills you acquire in any one kata will be relevant to others, as well. It will become easier over time.

Periodically go back and do katas you had previously mastered. You'll see that you're not as good as you were when you moved on. That's okay, put in the effort and remaster it. The effort will be much lower, and you may discover new insights that you hadn't seen before. The next time you come back to this, it will be lower again, this is called "spaced repetition" and after a while, you'll be able to come back to it and it will almost all be there.

Create your next katas based on what things you want to learn, or what tutorials you find that seem really good.

6 month adjustment:

After you do that for 6 months or so, you'll probably have a reasonable set of hard skills down. You'll probably lack a lot of valuable soft skills, but that's okay.

  • At this point, cut your kata time down to 20 minutes, which will leave you with 30 minutes left in the day.
  • For the katas, only do the ones you have already mastered, don't try to do new ones (or if you do, take the whole hour to practice that kata).
  • With the remaining 30 minutes, probably try to create a small project.

What project? Choose something that is interesting to you or has value to you or that seems within reach, given what you've learned while doing your katas. You shouldn't already know how to do it, but you should have a sense that it's only barely out of reach. This is the "sweet spot". Because it's only barely out of reach, you will have to stretch and think and learn, which means you will improve, but you won't have to do these so much that you won't understand what you're doing or why and because a lot of it will be skills you learned from the katas, this will help train your soft skills, where you'll see how you can weave the skills you learned from the katas in new ways to achieve new goals. Keep these projects small, with my allocation prescription, you only have 30 minutes a day to work on this. You want to play with lots of different ideas, so they shouldn't take more than a week. If one of them winds up stalling out and you don't make any progress for two days, then it's not in your sweet spot so set it aside and find a new project or a new kata. You can come back to it later when you've expanded your competencies more.


Influences

If you like my proposed schedule, it's influenced by many things:

  • I learned about katas while consulting through 8th Light. If you want competent consultants, start here.
  • I learned about hard and soft skills and the sweet spot from The Little Book of Talent. This is my favourite book, I've read it at least ten times and I've given away 80 or more copies of this book.
  • Some of the material I linked to was created while teaching at the excellent Turing School. I saw hundreds of learners enter programming through here. For those learning to code, I saw students just like you, I watched them make it, I've even worked with some of them professionally since then.
  • Some of the material I linked to was created while teaching at Code Platoon, if you're an American veteran learning to code... this is your unicorn opportunity.
. . .