Chapter 5. 5 functions and abstraction: Getting Functional

Image

You already know a lot. Variables and data types and conditionals and iteration—that’s enough to write basically any program you’d ever want to. In fact, a computer scientist would tell you it’s enough to write any program that anyone could ever conceive of. But you don’t want to stop now, because your next step in computational thinking is learning how to create abstractions in your code. That may sound complex, but it’s actually going to make your coding life simpler. Creating abstractions gives you leverage; with abstraction, you can more easily create programs of increasing complexity and power. You can put your code in neat little packages that you can reuse over and over. And you can forget all the nitty-gritty details of your code and to start thinking at a higher level.

Get Head First Learn to Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.