Secondary Uses of Manufacturing Tests

31 May 2023 by Phillip JohnstonManufacturing tests and manufacturing firmware aren’t only useful on the production line. Your test stations, test scripts, and firmware can be leveraged to support additional activities without further burdening your software team. Here are additional uses to consider: Collecting Design Data Repair, RMA, and EFFA Processes Reliability Testing Certification Support Quality Assurance Collecting Design Data Your manufacturing tests are a prime data collection resource, and you should take advantage of that. You can get design data for every unit that you build. This allows you to look at performance/behavioral characteristics and distributions across your entire …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.

Need for Sleep: The Impact of a Night of Sleep Deprivation on Novice Developers’ Performance

21 October 2021 by Phillip Johnston“Need for Sleep: The Impact of a Night of Sleep Deprivation on Novice Developers’ Performance” describes a “quasi-experiment” (i.e., not a randomized, controlled study) that aimed to investigate a primary question: “To what extent does sleep deprivation impact developers’ performance?” Abstract (emphasis mine) We present a quasi-experiment to investigate whether, and to what extent, sleep deprivation impacts the performance of novice software developers using the agile practice of test-first development (TFD). We recruited 45 undergraduates, and asked them to tackle a programming task. Among the participants, 23 agreed to stay awake the night before carrying …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.

Dr. Deming’s 14 Points for Management

13 May 2021 by Phillip Johnston • Last updated 15 August 2023Out of the Crisis (archive.org scan) is a classic and influential work by Dr. Edwards Deming that changed manufacturing. It also should have changed the way that managers work, but in my experience his principles haven’t been widely adopted within software and hardware companies. Dr. Deming outlined “14 Points for Management” and organized the book around exploring these points, their rationale, their application, and their implications. These “14 points” serve as principles to follow for anyone that wants to transform their organization to produce higher quality products at lower …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.

A Software Development Idea Inspired by Mushroom Cultivation

In the previous article, I discussed the importance of spending time doing things outside of your professional field. By doing so, you expose yourself to new ideas, paradigms, patterns, and practices. Breakthroughs often come from taking an idea in one area and applying it to another. To help critical ideas spread across fields, we need …

Paper: Very Short Functions are a Code Smell

18 September 2020 by Phillip Johnston • Last updated 9 May 2022 It’s always good to review sources that challenge some of the ideas you hold dear. This is why I was intrigued to find a blog post called “Very short functions are a code smell – an overview of the science on function length”. One of the ideas that I operate under is that smaller function are superior to longer functions, primarily because they are easier to reason about. This is not a unique or new position; as the authors point out, we can find references as far back …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.

Case Study: Toyota Unintended Acceleration

18 August 2020 by Phillip Johnston • Last updated 13 September 2022 Unintended acceleration, or the loss of driver control over engine power, in Toyota cars is suspected in the deaths of at least 89 people and injuries to at least 57 more (with hundreds of additional cases being settled). Toyota, the Department of Transportation, the U.S. National Highway Traffic Safety Administration, and journalists cited “driver error” or “stuck acceleration pedals” due to floor mats as the primary cause. The official finding of the joint NHTSA and NASA investigation confirmed this opinion. NASA’s team did find one theoretical way for …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.

Engineering Lessons I’ve Learned from Working at the Japanese Tea Garden

Since September 2017, I’ve been volunteering at the San Francisco Japanese Tea Garden in Golden Gate Park. I work with the head gardener, seasoned bonsai devotees, and a master gardener to prune trees, mend fences, beat back bamboo, pull weeds, catch koi fish, and clean ponds. These tasks may not seem relevant to engineering teams, …

Embedded Artistry’s Continuous Integration Process

Most of our open source projects utilize continuous integration (CI) using Embedded Artistry’s Jenkins build server. Developers who are interested in contributing to Embedded Artistry open source software projects will benefit from understanding our CI process at a basic level.

If you think you need access to the build server, please contact Phillip.

Table of Contents:

  1. An Overview of the CI Process
  2. Jenkins Rules
  3. Common Tooling Requirements
  4. Quality Enforcement Processes
  5. Related
  6. References

An Overview of the CI Process

The Embedded Artistry CI process is automatically launched when:

  1. A pull request is opened
  2. A new commit is pushed to a pull request
  3. A new commit is pushed to master

The build server will report passing or failing status back to GitHub. Most projects utilize these status checks as a gate for merging.

The image below provides a high-level overview of the CI process on the Embedded Artistry build server.

In addition, we have a nightly versioned build for most projects. This build runs once a day, but only when new commits have been added to master. The same quality control checks are run. The main difference is that successful builds are tagged with a new version number. Some projects will also archive generated build artifacts (e.g., compiled libraries, documentation) for distribution.

Jenkins Rules

All projects store their CI project rules in a standard location within the project repository:

  • tools/CI.jenkinsfile represents the CI build for the project
  • tools/Jenkinsfile represents the nightly build for the project

You can see exactly what is happening for a given project’s CI process using these files. To see an example, we recommend libc:

If either of these files is missing, that process will not be run for the project

Common Tooling Requirements

Most Embedded Artistry projects use the following tools. We recommend installing them on your local system if you will be participating in Embedded Artistry projects.

  • A compiler should be installed in order to build the project (gcc + clang have been tested)
  • Meson is the primary build system
  • Doxygen for documentation generation
  • git-lfs is used to store binary files
  • make is required to use Makefile shims
  • cppcheckclang-tidy, and clang-analyzer are used for static analysis
  • clang-format is used to automate and enforce our source code formatting requirements
  • lizard is used for complexity analysis

Quality Enforcement Processes

We strive to include the following categories of quality enforcement processes in our automated CI pipeline. The tools we use for each process are described below.

  1. Cross-compilation
  2. Unit Testing
  3. Static Analysis
  4. Code Formatting
  5. Code Coverage Analysis
  6. Open-Issue Scanning
  7. Documentation Linting

Each project will have some minor variation on the general theme. Some will differ slightly in the processes or tools that are used. We are always trying to unify the process for each of our projects.

Cross-compilation

Many of our projects are intended for use on embedded systems. These projects will also run a cross-compilation step to ensure that there are no problems when building for another platform.

At this time, we primarily use gnu-arm-none-eabi for our cross-compilation checks.

Unit Testing

If unit tests are included in the project, they will be run. Both successful and failing results will be archived on the build server.

Tests are reported primarily through Jenkins. Many of our projects will also upload test results and code annotations to the GitHub pull request using Report.CI. This allows you to view test failures within the GitHub interface.

Static Analysis

For many of our projects, a combination of the following static analysis tools are used:

  • Cppcheck
  • Clang Tidy
  • Clang Analyzer
  • Lizard, which monitors for complex functions that should be refactored

Mature projects will automatically fail builds that introduce new static analysis warnings.

Code Formatting

The build server will reject pull requests which do not meet our formatting requirements.

You can auto-format your code to match the style guidelines by issuing the following command:

make format

Formatting is enforced by the Jenkins build server which runs continuous integration for this project. Your Pull Request will not be accepted if the formatting check fails. If you cannot install clang-format on your machine for some reason, please let us know and we can help you with formatting updates.

For more on our code formatting process, see the following articles:

Code Coverage Analysis

For some projects, test coverage is monitored using gcov.

Open-Issue Scanning

Our build server monitors comments which include phrases such as TODOFIXME, and WIP. Your pull request will be rejected if you submit partial work.

Documentation Linting

For some projects, documentation is linted using tools vale. Warning and error limits are enforced on a per-project basis.

References

February 2019: Bluetooth 5.1 and Peer Code Review

4 February 2019 by Phillip Johnston Last updated 18 August 2021 Welcome to the February 2019 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: The new Bluetooth 5.1 specificationPhil Koopman’s peer code review best practicesEmbedded news from around the web (there was a lot of activity this month!)Embedded job postingsUpdates to the Embedded Artistry Website Bluetooth 5.1 Released The Bluetooth SIG released Bluetooth version 5.1 in January. The Bluetooth 5.1 …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.

January 2019

7 January 2019 by Phillip Johnston • Last updated 18 August 2021 Happy New Year! Welcome to the January 2019 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: Highlights from 2018The Embedded Template LibraryA code “self-review” exercise Embedded news from around the web 2018 in Review We covered a lot of ground with our newsletter in 2018. We focused on four major topics: Improving QualityLightweight Processes to Improve QualityTesting Embedded …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.