
We’ve discussed the importance of practice and the skills to focus on when practicing. Now let’s go into depth about making that practice time really useful. If I practice curling a 5 lb weight for ten minutes a day, that’s not enough of a challenge for me to grow. On the other hand, trying to curl 100 lbs would only hurt my back, my shoulder, and my pride, as I couldn’t lift it at all. There is an effective range between the two where I find I’m challenging myself enough to grow, but not so much that it’s completely beyond my abilities. How do we find that “sweet spot” in developing software?
First I have to decide what I want to practice. I can practice layups, or I can practice pushups, but I can’t practice both. What specific skill do I want to improve? Code reading? Refactoring? TDD? Touch Typing? Recognizing code smells? Using the shortcuts in your IDE? Whatever it is you want to get really good at, think about some of the things that are hard for you to remember. Or skills that you want to become second-nature. Then come up with something that you can practice that will stretch you, but not to the point of discouragement.
Let’s say you want to improve your code reading skills. Consider the language(s) you want to practice reading. Where can you find good examples of high-quality code to read? If you are a Java programmer, a great place to start is the JDK Sources. The easiest way to do this is to use your IDE. In IntelliJ, you can right-click on a class file and select “Go To -> Implementation” (or press Ctrl+Alt+B). In Eclipse you would use the “Navigate -> Open Type in Hierarchy” menu item (or Ctrl+Shift+H). This brings up a tab with the source of the object you had selected. If you’ve never done this, pick something simple first, like “Integer” (it’s only a little more than 1800 lines long!) Look at all of the ways an Integer can be used that you never considered. Look at that decode() function! Or divideUnsigned(). Why would someone use that? How does it work? Write some test functions to see if your assumptions are correct.
An alternative is to find an open-source project – ideally one you are familiar with. (Yes, I know Java is open source, too!) Try to get an understanding of the project layout. What does it take to build? What are the entry points? What is the general workflow? Find an interesting object and start digging into it. Look at the unit tests that exercise that object. If there aren’t any, maybe you could write some.
Time yourself to see how long it takes to get a reasonably complete understanding of the object and how things work. Move on to another object another day and start to collect timings and see how long it takes you to understand 100 lines of code. Do this exercise every day for at least 15 minutes. After a week or two see how your code reading speed has improved. We can only manage what we measure.
You can do this sort of thing for any skill you want to improve. It just takes some thought and creativity. If you’re trying to grow a skill and are stuck, just drop me a line below and I (or one of my smarter readers) will give you a few suggestions. The main thing is to practice one thing and do it a little bit every day. This is the whole idea of the “100 Days of Code” concept – commit to a little bit every day. If you improve 1% every day for a year, by the end of the year you’ll be more than 37 times better!
Figure out what you want to get better at. Start a daily practice. Tell me how things have changed by the end of the year! Do it!

