Life Lessons From Coding – World-Building

It was kind of refreshing to see that our old high school lessons are up. The instructor has long since retired from teaching (note that I wrote that like he’s 1000 years old and neglected to mention that he decided to get back into the field), but he decided to keep all his teaching resources up. They are not open source, though.

forblog5

Hey, do you think I could call the flowchart above fair use? It is the best demonstration of an algorithm (and a good segue into loops) that I have ever seen, rolled into his introduction to algorithms lecture from here. Just as refreshing, the textbook we used is now open source.

Coding As World-Building

The book we used was called Java Methods, by Litvin and Litvin – the book is now licensed under Creative Commons. We read from the now outdated first edition, which is now only available piecemeal.

Why is it outdated? Maybe Gridworld, combined with all the other things we learned that are no longer relevant to the Java programming language. GridWorld was the instructor’s pitch to us on AP sign-up day. The pinnacle of the course, he explained, was the ability to implement a grid where different “software objects” with different attributes and behaviors could interact with each other.

That was the core analogy, the window we had that made coding feel a little more familiar. We were creating a world, a world with objects that we could interact with. I only wish we played Minecraft back then, because that was Java gridworld on steroids.

The Passage That Stuck With Me

After some searching, I finally found it

forblog6

Read the text here. To anyone who can’t read it, a paraphrase might go something like this:

If you could enter the world of software, you would find vast and beautiful structures, towers and cathedrals. But you would also find monoliths and monstrosities, unruly structures sometimes seemingly held together by duct tape. Change one tiny thing in one vast structure, and you may be surprised to find the entire thing collapses. For better or worse, software is often invisible, and if you learn to venture into this world with us you will find that it has many surprises!

I searched for that passage for a long time, sometimes considering the possibility that I had maybe imagined it. The movie Inception was big at the time, so before knowing any code the analogy stuck with me. Coding is like world-building, yes, but it also has this dreamlike quality in that small changes can make the entire thing collapse.

The full lesson is here. A class is a blueprint for an object. An object can be something physical, like a person, and an object like a person can have actions that it carries out and attributes that it possesses. Maybe a person has money. Maybe a person has the ability to interact with another object, a bank. The two entities, person and bank, can interact and this will impact money, the attribute, for both of them.

Dive long enough into the lesson and you will find a subset of people who despise object-oriented programming, but for us that was the access point into coding. Well, except for the annoying few who knew how to code before high school.

Leave a Comment

Your email address will not be published. Required fields are marked *