DEV Community

Josh Cheek
Josh Cheek

Posted on

Learn programming in 1 hour a day

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.

Latest comments (15)

Collapse
 
okejiri_emmanuel_32722d4c profile image
Okejiri Emmanuel

Read our guide and learn how to improve your iPhone battery health. This will allow you keep your phone healthy and away from phone spy

 
tiffany profile image
tiff

@ben spam

Collapse
 
tiffany profile image
tiff

Spam @ben

Collapse
 
tiffany profile image
tiff

Spam @ben

Collapse
 
rafaelcg profile image
Rafael Corrêa Gomes

I've heard about Katas strategy before, but I never knew how to apply it and how to use it. After reading your post I'm excited to use this strategy with your thoughts!
Thank you for sharing it!

Collapse
 
madhadron profile image
Fred Ross

The important thing to know is that no one is going to agree on the best way to learn to code. For example, I would certainly not tell someone to go learn keyboard shortcuts. I went that route twenty years ago and now I steadily re-mouse more and more of my workflow.

I always recommend How to Design Programs and its companion software as a first programming course, since the folks who put it out actually spend lots and lots of time teaching beginners.

Collapse
 
joshcheek profile image
Josh Cheek • Edited

I also taught beginners professionally (ie as a teacher) and unprofessionally (ie because people were interested in learning). I found that actually interacting and writing code is the most important thing. That said, I looked at the table of contents for the book, and if that's what someone feels more comfortable with, then I'm cool with them using it. Just looked at a sample page and it looks like the book is using a lisp, I'm guessing Racket, based on the red and blue lambda icon. Racket seemed like a pretty cool language when I played with it, but I don't know how many resources are out there for new people, how many libraries exist for it, how many jobs are hiring for it, etc. One thing I do like about lisps is they love their REPL, which is a great habit to be in.

WRT typing, knowing how to use your tools is important because it reduces the overhead between thinking and doing. Practice your tools so that your tools aren't a constant impediment. When working with students, if I didn't show them the keybindings and quiz them, then I'd see them months later, still spending 30 seconds stumbling to do something that should have taken one or two seconds. By the time they finally get it, they forgot why they were even trying to do that. Practicing keybindings is about reducing the cost of the interface. Even a little bit of progress here can lead to big wins. The process stops being frustrating and starts being fun (and that's incredibly important for new people). When the interface begins to melt away, you begin to become fluent in the language, and you can start thinking in high-level goals instead of low level implementation details.

Collapse
 
vikasyadav72 profile image
Vikas Yadav

I have been going around in circles for the last couple of months. This is quite helpful to get my head straight

Collapse
 
heatherlaurenco profile image
heatherlaurenco

Love this. I think I’m going to try using this format for my coding sessions.

Collapse
 
joshcheek profile image
Josh Cheek

Awesome, report back (if you have the time), can amend it based on what does and doesn't work well.

Collapse
 
ewoks profile image
Beeblebrox

Great advices!!! Thanks

Collapse
 
codinggrunt profile image
Reynaldo Veras

Wow my mind is just blown right now! I feel like I just dived into the matrix in my learning journey. I never herd of hard and soft skills nor would the idea of katas have ever came up in my google searches. I am a veteran and I am definitely going to take advantage of that unicorn opportunity! So far I tried learning all the different things I can do with my editor and I find it amazing how much I can customize my experience on the editor. Thank you for all the information. I highly appreciate it and it's been a real big help.

Collapse
 
joshcheek profile image
Josh Cheek

Of course _^

Collapse
 
maestromac profile image
Mac Siri

This is such a great write-up for a reasonable guideline. Thanks for sharing!