Coding Step 1 - Hello World and Makefiles

Stephen Friederichs February 10, 2015

My previous article discussed how to install GCC and the make utility with the expectation of writing and compiling your first C program. In this article, I discuss how to use those tools we installed last time. Specifically, how to use GCC to compile a C program and how to write a makefile to automate the process.

While there are many other tutorials out there covering roughly similar ground, I hope that you (a novice with some background in programming) find this tutorial to be more useful and approachable than...

Important Programming Concepts (Even on Embedded Systems) Part V: State Machines

Jason Sachs January 5, 20156 comments

Earlier articles in this series:

Oh, hell, this article just had to be about state machines, didn’t it? State machines! Those damned little circles and arrows and...

Coding - Step 0: Setting Up a Development Environment

Stephen Friederichs November 25, 20142 comments

You can easily find a million articles out there discussing compiler nuances, weighing the pros and cons of various data structures or discussing the  optimization of databases. Those sorts of articles are fascinating reads for advanced programmers but completely leave in the dust many others. Others asking very basic questions such as ‘How do I use a compiler?’ or ‘How can I code without an IDE?’ These basic questions deserve good answers because they represent the absolute first step that everyone has to take before they can become a veteran programmer:...

Important Programming Concepts (Even on Embedded Systems) Part IV: Singletons

Jason Sachs November 11, 20142 comments

Earlier articles in this series:

Today’s topic is the singleton. This article is unique (pun intended) in that unlike the others in this series, I tried to figure out a word to use that would be a positive concept to...

The CRC Wild Goose Chase: PPP Does What?!?!?!

Jason Sachs October 23, 20142 comments

I got a bad feeling yesterday when I had to include reference information about a 16-bit CRC in a serial protocol document I was writing. And I knew it wasn’t going to end well.

The last time I looked into CRC algorithms was about five years ago. And the time before that… sometime back in 2004 or 2005? It seems like it comes up periodically, like the seventeen-year locust or sunspots or El...

Important Programming Concepts (Even on Embedded Systems) Part III: Volatility

Jason Sachs October 10, 2014

1vol·a·tile adjective \ˈvä-lə-təl, especially British -ˌtī(-ə)l\ : likely to change in a very sudden or extreme way : having or showing extreme or sudden changes of emotion : likely to become dangerous or out of control

Merriam-Webster Online Dictionary

Previous articles in this series:

You Will Make Mistakes

Jason Sachs September 28, 20141 comment
</scorpion>: FAIL

Anyone out there see the TV pilot of Scorpion? Genius hacker squad meets Homeland Security in a fast-paced thriller to save hundreds of airplanes from crashing after LAX air traffic control software upgrade fails and they didn’t save a backup of the old version (ZOMG!!!) so thousands of people are going to die because the planes… well, they just can’t land! They just can’t. Even if the weather is sunny and calm and there could quite possibly be some good old fashioned...

Introduction to Microcontrollers - Ada - 7 Segments and Catching Errors

Mike Silva September 22, 20144 comments

7 Segments the Ada Way

Here is the Ada version (I should say AN Ada version) of the 7 segment multiplexing code presented in the last installment.  The hardware now is the STM32F407 Discover board, which is a Cortex M4F board.  There are lots of differences in GPIO and timer setup, but if you understoold the previous code in C you should not have much trouble understanding this code in Ada.

As interesting as the Ada approach to the task is the Ada ability to detect runtime errors, as demonstrated in both planned and unplanned ways, described...

Important Programming Concepts (Even on Embedded Systems) Part II: Immutability

Jason Sachs September 14, 2014

The previous article in this series discussed idempotence. This article will discuss immutability, and some of its variations in the topic of functional programming.

There are a whole series of benefits to using program variables that… well, that aren’t actually variable, but instead are immutable. The impact of immutability on software design can differ quite a bit, depending on the type of computing platform, and especially whether dynamic...

Important Programming Concepts (Even on Embedded Systems) Part I: Idempotence

Jason Sachs August 26, 20144 comments

There are literally hundreds, if not thousands, of subtle concepts that contribute to high quality software design. Many of them are well-known, and can be found in books or the Internet. I’m going to highlight a few of the ones I think are important and often overlooked.

But first let’s start with a short diversion. I’m going to make a bold statement: unless you’re a novice, there’s at least one thing in computer programming about which you’ve picked up a bad habit.

Whether you’ve been programming for 4 months or 40 years, once...