10 software tips for hardware engineers
Jacob Beningo - January 28, 2013
Tip #1 – Flowchart First, Implement Second
When an engineer first steps into the realm of developing software, there is an intense temptation to jump right in and start writing code. This mindset is the equivalent of trying to lay out a PCB before the schematics have been completed. It is critical when sitting down to develop software that the urge to start writing code be ignored and instead an architectural diagram of the software be developed using flowcharts. This will give the developer an idea of the different parts and components required for the application much like how a schematic tells an engineer what hardware components are required. By doing this the program overall will stand a better chance of being well organized and thought out which will save time and headaches in the long run by decreasing debugging time.
Tip #2 – Use State Machines to Control Program Flow
One of the great software inventions of the 20th century was the state machine. An application can often be broken up into multiple state machines each of which controls a specific component of the application. Each of these state machines has their own internal states and state transitions that dictate how the software reacts to various stimuli. Designing software using state machines will ease in the development of software that is modular, maintainable and easy to understanding. A wide variety of resources exist that demonstrate state machine theory and algorithms.
Tip #3 – Avoid the Use of Global Variables
In the old days of functional programming, function came before form with the programmers’ sole goal being to make the program operate as expected as quickly as possible without regard for program structure or reusability. This programming paradigm held no apprehension about using variables that were global in scope that any function within the program could modify. The result was an increased chance of variable corruption or misuse of variables. In the new recommended object-oriented paradigm, variables should be defined in the smallest possible scope and encapsulated to prevent other functions from misusing or corrupting the variables. It is therefore recommended that you limit the number of variables that use a global scope. These variables can be identified in the C language by the use of the extern keyword.
10 tips for maximizing battery life
10 steps to selecting a microcontroller
The Secrets to Becoming a Great Programmer
10 C Language Tips for Hardware Engineers
Function pointers - Part 3, State machines
10 software tips for hardware engineers
Function pointers - Part 2, Task Scheduling
Function pointers - Part 1, An introduction
Wise words from Einstein, Tesla, Spock, and others
Accidental engineering: 10 mistakes turned into innovation
Gears are discovered on the Antikythera mechanism, May 17, 1902
The case of the resistor turned strain gauge
6 famous people you may not know are engineers
If you’re an engineer, thank your mom
Wise words from Einstein, Tesla, Spock, and others
-40°C to +85°C or 25°C only. What temp range is this part truly guaranteed over?
The case of the resistor turned strain gauge
If you’re an engineer, thank your mom
10 tips for maximizing battery life
Skylab launches into space, May 14, 1973
Intelligent LEDs will dramatically improve nighttime driving
