We wouldn’t have been able to design, much less understand, any of this if it weren’t for the generous tutorials made by the open-source hardware community — particularly by Adafruit Industries, pioneered by Limor “Lady Ada” Fried.

Here are some of the things I learned throughout this process.

Designing “clean code” is crucial

Trying to design “clean” code is very important when you’re trying to build a robot that you’ll love not only to interact with but also build upon.

I’ve learned to be thoughtful when writing code for this robot, as inspired by code craftsmanship books by Robert Martin and Sandi Metz. I’m not a veteran in writing well-crafted code, but I try my best.

When you do code maintenance in a robot, you can really “love” or “hate” a person that you do not even know just because of the code they have written.

Messy code almost always goes hand in hand with lower productivity, lower motivation, and a higher number of bugs. Countless hours and significant resources are lost because of poorly written code, but it doesn’t have to be that way.

Clean code is something that’s been on my mind for a while. A year ago, I spoke at Python Conference Philippines about how I made a robot hexapod dance in the effort to practice writing clean code. I spoke about my guiding principles for thoughtfully written code.

Even earlier, I wrote about things I think about when I decide to write my own classes. It’s part of my effort to apply an object-oriented design philosophy to make my code clean.

I still have these principles and thoughts at the back of my mind whenever I write code in general, and in particular when I wrote the code for Robbie.