Software Engineering

I think of myself as an electrical engineer first and programmer second, perhaps because I started as a hardware engineer.  Yet my clients have relied on me for decades to create mission-critical code.  And due to the changing nature of technology, more and more of my time is spent on software.  Clients call me to fix programs that other consultants or their in-house staff have written.  I have managed several software departments, including stepping in as a temporary manager for clients.  And I was a sought-after programming instructor, teaching hundreds of students all over the country at organizations like Lockheed-Martin and the NSA.

Whether you need firmware or software to work with the electronics I design or have a software-only project, I can probably help.  I have worked at all levels, from carefully hand-crafted assembly language where every microsecond mattered, to large business applications.

Here are different classes of software projects I’ve been involved with, along with some examples: 

Firmware

Firmware programming requires a very different mindset.  The term firmware means that the code is stored in memory that is difficult or impossible to edit (such as Flash memory or ROM), or may be unreachable, so reliable operation over years or decades is critical.  (You would not be happy if your car or washing machine or TV remote required as many updates as your phone apps!)  And it involves a direct and intimate interface to the hardware that it is controlling, so a deep understanding of the microcontroller and surrounding circuitry is required to be successful.

With firmware, efficient and compact coding is important since memory and processor resources are limited.  Many firmware programs have to fit in just a few thousand bytes and may only have a few hundred bytes of RAM available.  And response times are measured in millionths of a second.  I generally write firmware in C or C++, with some time or size critical sections written in assembly language.

Some examples of the scores of firmware projects I’ve been involved with:

  • home appliances
  • laboratory instruments
  • BIOS for laptop computers
  • thermal printer
  • bicycle power meter
  • control systems
  • set-top boxes
  • display controllers
  • communications modules
  • automotive engine controls

Digital Signal Processing (DSP)

Digital Signal Processing is an exciting area for me because of the amazing things you can do with it.  DSP code is used both in firmware and software.  At the firmware level, specialized DSP processors or hardware may be used to speed up the operations.  Examples of this are audio and video players that use DSP to reconstruct and enhance the A/V signals from heavily compressed files.  Digital Signal Processors are found in your iPod, smartphone and Bluetooth headset and speakers.  (I worked on one of the early MP3 players years ago.)  DSP is used for other heavy-duty mathematical calculations such as video game graphics and encryption.

I have also used DSP coding without special hardware for less demanding applications like filtering and enhancing signals in instrumentation.  Properly designed DSP filters can work magic compared with the typical filters that most programmers use.

I design my DSP filters and algorithms using MATLAB and then convert to C, C++ or assembly language for greater speed.

Desktop Applications

Unlike firmware, desktop applications have tons of memory and processing power available.  And they sit on top of an operating system that provides tremendous resources such as communications, storage, graphics and so forth.  I have developed applications on Windows, Linux, and Mac OS.  My preferred languages are C++ and Delphi/Pascal.

Some of the applications I’ve developed were hosts to talk to the electronic devices I’ve created, providing a graphic interface to communicate with the device.  For example, some programs were used for in-house factory testing, configuration, and calibration,  while others were end-user applications sold along with the device.

Business applications include accounting, cost estimating and tracking, and personnel management.  The screenshot below shows a program I wrote for a large national temp agency:

Payroll and Billing Application screenshot
Payroll and Billing Application

Mobile Apps

Mobile applications generally target either the Apple iOS or Google Android platforms, and will not work on the other platform or Windows, Mac or Linux.  But there are techniques and cross-platform development environments that make it easier to cover all (or more of) the bases with the majority of your code.  This can potentially save development time and cost, but there are significant tradeoffs in performance and usability.  This is a complex topic and the best approach and choice of development tools depends on the project.

The following video demonstrates an iPhone/iPad app that I worked on.  The app talks to smart indoor bicycle trainers (like my favorite, the Wahoo Kickr) through Bluetooth to simulate a ride based on actual rides recorded from around the world.  The load the rider feels is based on a physics model I developed for the rider, bike, wind, and terrain.  The video speed automatically adjusts based on how hard the rider is working, making them feel like they are actually on the road they see.

Web Applications

Standard applications run their code completely in the environment they were designed for (mobile device or Windows, Mac OS or Linux).  If they access remote data it is by talking to another independent program somewhere else like a database server or web server.  No browser is needed because the application provides the user interface, along with all the computing.

A web application, on the other hand, runs in a browser using the same technology that is used to serve up web site pages.  Typically, a client-server arrangement exists where some local code (e.g.- Javascript) is running locally in the browser and communicating with a web server that is serving up both the user interface (in the form of web pages) and data.  The data is streamed back and forth between the client and server programs, allowing dynamic changes to the local user interface without having to keep reloading the page.  Dynamic web pages such as Google Maps or a web page with a live stock ticker are simple examples of this.  But the name “web application” is usually reserved for pages that look and function more like a desktop application.

In fact, some mobile applications are really web applications running in an embedded browser.  By removing the frame and menus of the browser, it looks like a normal application but with more generic buttons and so forth.

One of the big advantages of this is the universal nature of a web page.  All of the web code (HTML, CSS, Javascript…) will run on any device with a browser.  So this is one way to create part of what you need for cross-platform apps.

And the Internet doesn’t need to be involved.  If you are worried about privacy, the web server and all the clients could be limited to a private local network.  See this blog post for an example:

Networking Products with Embedded Linux

Databases

There are a lot of options for database storage.  The best choice depends on the application.  I have worked with a wide range of database types, and can help you decide what is best for your needs:

  • file-based systems like dBase in the 1980’s
  • modern variants of SQL client-server systems
  • specialized XML based data storage
  • embedded databases where the database is integral to the program
  • non-relational databases like NoSQL

Software Tools

Finally, I use modern code and project management tools such as Subversion, Git, and Jira for my own work, and have set up comparable systems for clients.


See the blog Software category for software related articles.