0x20 Lessons Learned as a Professional Developer

I’ve been a professional software developer for about 6 years (three of those at Atomic Object!). During that time, I’ve learned some important things:

On Personal Growth

  • What I know is way less interesting than what I don’t.
  • The hard part of the project is knowing when I’m done.
  • People problems are more important than technical problems.
  • Sunshine, sleep, and water are important.
  • There is such a thing as too much coffee.
  • What I learn from mastering a weird language is useful even if I never use it on the job.
  • I have biases I’m not aware of, and I will act on those biases.
  • I had way more help getting to where I am than I think I did.
  • It will take less time if you put the problem down right now and address it in the morning.
  • It’s okay to play video games.
  • Learn empathy.
  • Learn to be wrong.

Read more on 0x20 Lessons Learned as a Professional Developer…

2 Ways to Use Single-Member structs in C

I love C’s structs. There’s a lot of weirdness in C but, for the most part, structs are predictable, useful, and easy to understand.

Structs, for those not familiar with C, are collections of data. An example of a struct is a point on a Cartesian plane:

struct point {
  int x;
  int y;

Normally, structs are used to associate two or more pieces of data. As the title suggests, I’m going to demonstrate why you might want to use a struct with a single element. Read more on 2 Ways to Use Single-Member structs in C…

What Exactly Is “Experience”?

I’ve recently had a few experiences where I ignored my first instinct because I knew it would result in a dead end. In each case, I could later identify the underlying principle and some of the events that helped me understand it. But in the moment, I wasn’t consciously thinking “That instinct was wrong during [past event], so I should distrust it now.” I just knew to keep looking.

In the same way, I’ve also recognize some decisions made by less-experienced people that I would have made if I lacked the experience I have now. Seeing this frustrates me because I want to share a specific piece of experience or single event that gets the idea across, but that’s impossible. It’s often too abstract, too complicated, or fundamentally different from the event that molded me.

All of this has me asking, what exactly is “experience,” and how can I pass it on (in less time than it took me to learn it)? Read more on What Exactly Is “Experience”?…

Discovering the Globally Active Mouse Cursor Icon in Windows

For a video streaming project, I had to retrieve the active icon type and the coordinates of the mouse cursor in a Windows environment. While discovering the coordinates of the mouse cursor wasn’t too awful, discovering which of the possible mouse icons was currently active was anything but a pleasurable experience.

Read more on Discovering the Globally Active Mouse Cursor Icon in Windows…

Ways to Ward off Firmware Development Insanity

Software takes on entirely new levels of complexity when it’s being deployed onto custom hardware environment that hasn’t been used hundreds of thousands of times before.

Frankly, every time I have a bit of hardware that doesn’t interact correctly with the world, I have a minor fit of panic: “How will I be able to tell what’s broken? How will I know when it’s fixed? How can I hope to keep this thing working in the future? How can I have any certainty at all that my fix for one thing didn’t break all the timing requirements for a different feature? This box is a claptrap of side effects and there’s no way I can wrap my head around that much complexity in any reasonable amount of time! Aagh!

The answer is to address sustainability issues early on when developing a software-in-custom-hardware product. For you own peace of mind, put these things in place before too much is implemented.

Read more on Ways to Ward off Firmware Development Insanity…

4 Reasons Clang Is Becoming My Go-To Compiler

Over the last year, I’ve begun to use Clang for more of my day-to-day work. Often times, Clang isn’t available for the target I’m interested in, but I’ve begun to use it to compile my tests instead of GCC*. Here’s a few reasons why.

1. More Helpful Diagnostics Messages

Clang provides the best diagnostics messages I’ve seen on a C compiler. One of the ways it excels is by helping the user navigate through problems in macros.

Sorting through problems in preprocessor macros can be absolutely infuriating because of the difficulty in sorting out which macro the error came from or if it came from a macro expansion in the first place. Turns out, Clang has a way to handle that pretty nicely. Let’s use this snippet as an example:

Read more on 4 Reasons Clang Is Becoming My Go-To Compiler…

7 Ways to Reduce Developer Friction on Embedded Projects

If you want something to get done, make it easy.

On of the first things I do on any new project is work out what I need to do to reduce my own friction when performing any given task.

What is developer friction? I define it as anything that gives me a reason to be hesitant about performing a task. This hesitation may be rooted in several things:

  • The task is time-consuming.
  • The task is hard to perform correctly.
  • The task is not hard, but it’s non-obvious and is not often performed.
  • I just don’t want to do it right now because my attention span is approximately that of a racoon in the presence of many shiny baubles.

Anyway, what in particular are some things that can be done to reduce developer friction in embedded projects? I’ve chosen the following items because I’ve found that reducing friction in these areas makes it easier for me to do the right thing.

Read more on 7 Ways to Reduce Developer Friction on Embedded Projects…

Users and the Impact of Leaky Abstractions

If you read nothing else, take this away: abstractions impact users even if they’re using the abstraction through several layers of indirection.

Lately, I’ve worked on software that lives inside of some sort of custom device with an industrial purpose (software not destined for a broad consumer audience). It seems that this domain is most likely to assume that any user interface questions aren’t relevant. The thinking often goes: a human user won’t be directly exposed to this software, so how it’s designed doesn’t matter.

Unfortunately, non-trivial abstractions leak. That is, the implementation details of specific software will often times impact how someone can use software.

Abstractions Leak Up

The primary “user” of my industrial software design has actually been two other developers. These two developers were doing distinctly different tasks. But their needs directly impacted design decisions inside my application.

Read more on Users and the Impact of Leaky Abstractions…

An Alternative to the Layer Model in C Project Design

Organizing a project’s architecture into layers is a common strategy. But I’ve noticed, over the course of my relatively short career, that a layered architecture becomes counter-productive when a project reaches a certain age or size (I’m not sure which).

When the Layer Model Works

The idea behind a layered approach is nice: any particular layer of the software should be interchangeable with another layer that implements the same interface. This helps to drive the code base to a certain level of reuse.

In general, the layers are stacked. The rules are that a layer may only depend on the layer below it. It may not call into the layer above, and it cannot call into any layers other than the layer underneath it.

In simple cases, this model works out well. There’s a cleanly defined system that’s easily modeled in our minds.

Read more on An Alternative to the Layer Model in C Project Design…

Technology Has Become Mundane, and that’s Amazing

Last night, I took a picture of what I made for dinner. It wasn’t anything spectacular — a salad, some grilled chicken, and a glass of Left Hand Milk Stout. Yesterday, someone brought their new puppy into the office. A large chunk of the office spent an appreciable amount of time looking at this puppy through the LCD screen on their phone. I, myself, snapped several pictures.

Read more on Technology Has Become Mundane, and that’s Amazing…