Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Getting Over Myself and Doing Things the Easy Way

DZone's Guide to

Getting Over Myself and Doing Things the Easy Way

Cindy Potvin discusses when simpler is better and the joys of using someone else's code.

· Agile Zone
Free Resource

See how three solutions work together to help your teams have the tools they need to deliver quality software quickly. Brought to you in partnership with CA Technologies

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.

Poule-smallThis 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 know much about electronics, I could have hacked things together until they worked and been 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!

Discover how TDM Is Essential To Achieving Quality At Speed For Agile, DevOps, And Continuous Delivery. Brought to you in partnership with CA Technologies

Topics:
learning

Published at DZone with permission of Cindy Potvin, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}