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:
- Freestanding Proposal, Revision 3
- Leaving no room for a lower-level language: A C++ Subset
- Modules and Freestanding
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
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?
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:
- Internet-connected cranes with remote control radio vulnerability
- Two vulnerabilities could allow an attacker to take control of Wi-Fi APs with TI BLE chips. This affects Cisco, Meraki, and Aruba APs
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.
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:
- How Electronics Sourcing Practices Impact the Journey to Mars
- Mars Demands Component, Packaging, and Design Trifecta
Steve Branam revived an excellent interview from Jack Ganssle's archives, where Jack interviews James Grenning about TDD:
We made the following updates to the Embedded Artistry website:
- The Glossary was expanded with additional terms.
- Links were added to the Hardware References page.
- The C++ Casting, or: "Oh No, They Broke Malloc!" article was updated to improve grammar and clarify misleading wording about operator
We published the following articles in November:
- Musings on Supply Chain Vulnerability in Light of The Big Hack
- A Look at Ten Hardware Startup Blunders, Pt. 1: Process
- A Look at Ten Hardware Startup Blunders, Pt. 2: Schedule and Focus
- Missing /usr/include after updating to OSX 10.14? Try this fix
- A Look at Ten Hardware Startup Blunders, Pt. 3: Team
These were our most popular articles in November:
- Circular Buffers in C/C++
- Jenkins: Configuring a Linux Slave Node
- Installing LLVM/Clang on OSX
- C++ Casting, or: "Oh No, They Broke Malloc!"
- An Overview of C++ STL Containers
- Jenkins: Kick off a CI Build with GitHub Push Notifications
- Jenkins: Running Steps as sudo
- Implementing Malloc: First-fit Free List
- 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!