My Strategies for Learning to Code

When I first started learning to code, I didn’t have much of a strategy. I floated between podcasts, Codecademy, and talking to my friends who worked in the industry. It wasn’t a bad approach, but after taking a few months to learn some basics and look into code bootcamps, I started developing a more organized strategy.

Often, I have felt adrift in my learning process–not sure of what is most important and what I might be missing completely. But lately, I’ve been getting glimpses of the big picture: what code bootcamp will be like, and more distantly, what working as a programmer will be like. That’s given me some confidence in my approach and helped me use my time more productively.

Here are the strategies for learning to code and preparing for bootcamp admissions that have worked best for me:

  • Using a variety of learning tools to find the ones that work best for me (and to switch between when I need a change in scenery.) I’ve used W3Schools, Codecademy, Udacity, Codewars, Coderbyte, Codefights, and Flatiron’s free lessons on Learn.co, as well as podcasts, blogs, and Twitter.
  • Taking notes on anything that may be useful in the future. I created a .txt document so that I can easily add and search for bits of code. I also define terms, summarize concepts, and paste in websites that I may need to refer back to.
  • Being open to both long and short study sessions. Sometimes, I can get wrapped up in involving code challenges for a couple hours without noticing the time pass, but for tasks that I’m dreading, it’s tough to get motivated to push through them. I try to set aside 20-30 minutes to chip away at tricky or otherwise untempting tasks.
  • Identify recurring concepts and mastering them. Recently, I created a 24 problem “quiz” for myself that covered concepts, such as recursion, that I had encountered but not fully mastered. With help from Google, I solved (and then re-solved) the problems until the solutions came easily to me.
  • Trying to finish a study session on a high note; it’s a morale boost that makes it easier to get back to work later. (That said, if I get stuck on a problem that seems unsolvable, I take a break from it. More than once, I have returned to a coding challenge with fresh eyes and quickly noticed an easily fixable mistake.)

Eloquent JavaScript Ch 1-4

Finished reading the first four chapters of Eloquent Javascript this morning. I found it trickier to absorb concepts by reading about them than I have being guided through using them (such as in Codecademy) and trying to implement them in problems (CoderByte, CodeWars).

That said, Eloquent JavaScript filled in some knowledge gaps that I probably wouldn’t have intuited from solving practice problems. One example: “simple and elegant” solutions (such as using recursion instead of a loop) are often not the fastest or most “machine-friendly.” Another example: striving for “pure functions” (ones producing specific values that can easily be combined and used in new ways).

Closure: “being able to reference a specific instance of local variable in an enclosing function”

Recursion: function that calls itself

Mutability: “content of a value can be modified by changing its properties”

Map: “a way to go from values in one domain to corresponding values in another”

 

Breaking Down Complex Problems

Working on Udacity lesson 2.5 “How to Solve Problems” this week, which encourages taking a systematic approach to solving complex problems. The sample problem discussed throughout the lesson is to return the number of days old someone is, using their birthday and today’s date (or any other date, actually.) My first attempt mainly included frustrated stabbing in the dark with solutions that quickly became overcomplicated when I realized I needed to take in leap years, etc.

The Udacity lesson walks through some basic guidelines, which seem obvious in retrospect. Basically, it provides an organized approach to solving a problem, starting with determining inputs and outputs, working out some examples without code, and then deciding on the simplest system.

The instructor emphasizes breaking down the solution into manageable parts and testing each step to determine each part is functional and works as intended before continuing.

Seem like good practices to refer back to as the problems continue to get more complex.