Getting over myself and doing things the easy way
During the summer, I usually spend a lot less time working on the computer. I’m outside instead, taking advantage of the short Canadian summer to garden and soak up sun while it lasts. When I do work on something, I keep it light and try new technology that piqued my curiosity just for the fun of it.
This year, we also started keeping chickens, so my new project is to automate our chicken coop. The goal of this system is to automate the lights, and act as a weather station to collect information about the conditions inside and outside the coop. All of this will be controlled by a web application accessible from a smartphone. Ultimately, I’d like to automate the doors too, but it’ll require a bit more work.
It’s a fun project that allows me to dust up my neglected hardware skills. It’s been a few years since I’ve seriously worked with hardware: when I was last involved with microcontrollers and embedded computers, Arduinos were just starting to get popular. Since it’s been so long, it’s been interesting to see how my thinking has evolved.
Some background…
I have been a professional programmer all my working life, but I’ve studied electrical engineering AND programming. One could believe that all that theory from school would be useful, but it used to slow me down a lot: every time I would start a new project, I would first try to plan out how everything would go.
I would then start worrying about all the potential problems that could come up, get sucked down the rabbit hole and eventually quit working on it. If I didn’t knew much about electronics, I could have hacked things together until they worked and be satisfied, but I had the curse of knowing just a little bit too much.
Also, since I did spend a few years studying this, I felt an obligation to follow the “one true way” and make my own life as hard as possible. Why use Arduino and existing libraries when avr-gcc works just fine? Libraries are for wimps! If you’re not pouring over 100+ pages of datasheets, you’re not doing real electronics!
Getting over myself
All of this is completely ridiculous of course, especially if it’s a project you’re doing for fun. I’m thankful there are standards and good practices for commercial products: I don’t want my oven to set the house on fire or interfere with my smartphone. But if you’re just looking to learn and experiment, you can’t do much damage with a 5V circuit. Maybe you’ll burn a few components, but that’s life.
Looking back, I see a lot of similarities with how people are told to learn to program or to start using a new language, cramming in too many computer science patterns and practices before getting started. Trying to learn theory without balancing it with practical work on real software is a dangerous pitfall that will stop you from progressing. If you have too many things to keep in mind at once, you’ll start worrying about how your project will collapse under its own weight because of your spaghetti code, even if you’ve barely gotten started.
In the end, you’ll stop yourself from shipping projects even if you don’t have any users yet. You’ll start believing that you must understand everything to perfection before getting started, and that no shortcuts are allowed, ever. That makes it really hard to keep learning and growing.
As a programmer, you’ll learn where you can cut and where you must put more effort with experience. This can’t be learned from books and courses, you have to see it for yourself. There is a time and place for implementing things yourself because you wish to learn more or because it’s a critical part of your project, and another for using code someone else has written and that is good enough.
Thankfully, I’ve gotten over myself and I’m now more laid back about using hardware and code other people made. For this project, I’ve been using some great open source code from the Arduino community instead of trying to reinvent the wheel, and it’s been a blast. Hopefully, I’ll bring this one to the point where I can use it!