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…

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…

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…

How I Got Started with Haskell

Back in college, Haskell was just something I’d seen on mentioned Reddit and a few other places. I didn’t really have a good reason to look at it seriously — that is, until I needed a senior project topic. (If you’re still looking for a reason to learn Haskell, read Job’s recent post about how it made him a better programmer.)

College Project

I’d been kicking around an idea for an IDE (not unlike LightTable) with a different take on how to render code while it’s being developed.

I’d decided to try and build my software for some Scheme variant since it would be comparatively easy to parse and analyse. This, oddly enough, was the stimulus that got me into Haskell. I found a tutorial that walked me through using the Parsec parser-combinator library to parse a Scheme dialect. It was exactly what I needed, and it seemed to be a really good tutorial on the language overall.

Read more on How I Got Started with Haskell…