Lesson 2. Basic principles of learning a programming language

 

After reading lesson 2, you’ll be able to

  • Understand the process of writing a computer program
  • Get a big-picture view of the think-code-test-debug-repeat paradigm
  • Understand how to approach a programming problem
  • Understand what it means to write readable code

2.1. Programming as a skill

Like reading, counting, playing piano, or playing tennis, programming is a skill. As with any skill, you have to nurture it through lots of practice. Practice requires dedication, perseverance, and self-discipline on your part. At the beginning of your programming career, I highly recommend that you write out as much code as possible. Open your code editor and type up every piece of code that you see. Try to type it out instead of relying on copying and pasting. At this point, the goal is to make programming become second nature, not to program quickly.

This lesson serves as motivation to get you in the mindset of a programmer. The first lesson introduced you to the “Thinking like a programmer” boxes that will be scattered throughout this book. The following sections offer a big-picture view encapsulating the main ideas of those boxes.

2.2. A parallel with baking

2.3. Think, code, test, debug, repeat

2.4. Writing readable code

Summary

sitemap