December 2018

Welcome to the December 2018 edition of the Embedded Artistry Newsletter! This is a monthly newsletter of curated and original content to help you build superior embedded systems. This newsletter supplements the website and covers topics not mentioned there.

This month we'll cover:

  • Update on Freestanding C++
  • A new C++ proposal: Extensions of Scoped Enumerations
  • Code cleanup sprints
  • Bloomberg's "Big Hack" follow-up
  • Embedded news from around the web

Update on Freestanding C++

Ben Craig has been heading up the Freestanding C++ effort, which we discussed in the June 2018 and August 2018 editions of the newsletter. We are excited about a Freestanding C++ subset, as we frequently write C++ code destined for embedded devices without an OS. For most embedded platforms, we have to hack the language apart to avoid problematic areas. An official subset would be a welcome change.

In November, Ben traveled to the WG21 San Diego meeting and posted a detailed update on Reddit. The Freestanding C++ proposal continues to be discussed and refined, and WG21 San Diego included a discussion around how Freestanding C++ might work within the scope of C++ modules. Ben also reports that companies are beginning to adopt the new terminology proposed in his Freestanding proposal.

These are the latest Freestanding-related papers:

Extensions of Scoped Enumerations Proposal

We’ve been working on our framework over the past few months and have found ourselves frequently wishing for the ability to extend enumerations. We’d like to provide baseline definitions in our framework, but allow users to extend those definitions according to their specific needs. Sadly, this is not possible with C++. There are multiple proposed workarounds, but we haven’t liked anything we’ve tried thus far.

A new proposal popped up in the SG14 discussion group which recently caught our eye: Extensions of Scoped Enumerations. This paper describes improvements to scoped enumerations (enum class), which includes the ability to extend an enum class definition through an inheritance-like mechanism. The proposal's author also released a source repository which has forked clang to demonstrate the changes.

This proposal is still in the formative stages, but we are looking forward to developments in this area.

Code Cleanup Sprints

In Timeless Laws of Software Development, Jerry Fitzpatrick talks about the need to continually revise our code. Writers never dream of submitting their first draft; my own articles and newsletters go through at least two rounds of editing. However, as developers we are rarely that diligent. Most of our code is published as a first draft and not revisited unless an issue arises that forces our hand.

After reading Timeless Laws, we instituted a monthly "code cleanup sprint" at Embedded Artistry. On the last Friday of each month, we spend the entire workday poking around our repositories, refactoring, fixing TODOs, improving comments, and making other small codenimprovements.

Every software project is a massive investment of time, energy, and knowledge. Like a garden, without proper tending, it grows out of control. The more we neglect our maintenance efforts, the more work it takes to beautify and restore order to our code base. Now we look forward to these cleanup days and the deep sense of satisfaction that comes from taking the time to improve our project’s overall quality.

We hope that your teams can also dedicate a full day or more each month for tending to your project’s code base.

Bloomberg's "Big Hack" Followup

Another month has gone by and Bloomberg still stands by their Big Hack story, which we discussed in last month's newsletter.

Likewise, the companies named in the story still deny the claims. Both Amazon and Apple have pulled ads from Bloomberg's website in response to the article, and Apple has banned Bloomberg reporters from their next event. SuperMicro told Congress that they found no spy chips during their internal investigations. They claim that the “test processes at every step are designed to alert us to any discrepancies from our base design”. This seems to be an exaggerated claim based on our experiences with electronics manufacturing.

The Washington Post, owned by Jeff Bezos, continues to fire shots at Bloomberg. The article claims that another Bloomberg reporter is performing a separate analysis to try to confirm the details of the story. Perhaps Bloomberg is close to crumbling?

On the technical front, Serve the Home describes why the Big Hack is improbable in this excellent article.

As we mentioned last month, we have to doubt the validity of the story given the lack of corroborating evidence or confirmation from any named parties.

Around the Web

The security flaws keep rolling in:

The US indicted Taiwanese foundry UMC and Chinese DRAM maker Fujian Jinhua with conspiracy to steal IP from Micron. Another article, "Knowledge Transfer, or IP Theft?", provides a deeper analysis at the situation.

Mohammad Afaneh updated his excellent introduction to Bluetooth GATT. Mohammad's website is a valuable resource for anyone working on a Bluetooth device.

IEEE Spectrum published "The Case Against Quantum Computing", which provides a sobering look at the difficulties underlying the technology.

EETimes collected links to Aspencore's Road to Mars Special Project. Two interesting articles related to embedded systems:

Steve Branam revived an excellent interview from Jack Ganssle's archives, where Jack interviews James Grenning about TDD:

Website Updates

We made the following updates to the Embedded Artistry website:

New Articles

We published the following articles in November:

  1. Musings on Supply Chain Vulnerability in Light of The Big Hack
  2. A Look at Ten Hardware Startup Blunders, Pt. 1: Process
  3. A Look at Ten Hardware Startup Blunders, Pt. 2: Schedule and Focus
  4. Missing /usr/include after updating to OSX 10.14? Try this fix
  5. A Look at Ten Hardware Startup Blunders, Pt. 3: Team

These were our most popular articles in November:

  1. Circular Buffers in C/C++
  2. Jenkins: Configuring a Linux Slave Node
  3. std::string vs C-strings
  4. Installing LLVM/Clang on OSX
  5. C++ Casting, or: "Oh No, They Broke Malloc!"
  6. An Overview of C++ STL Containers
  7. Jenkins: Kick off a CI Build with GitHub Push Notifications
  8. Jenkins: Running Steps as sudo
  9. Implementing Malloc: First-fit Free List
  10. Migrating from C to C++: NULL vs nullptr

Thanks for Reading!

Have any feedback, questions, suggestions, interesting articles, or resources to recommend to other developers? Simply reply to this email!

While you're waiting for our next edition, check out the website or follow us on Twitter.

Happy hacking!