Sunday, February 22, 2026

Legacy hardware persists

I develop firmware for small embedded devices with ARM CPUs.  Most of these devices run some flavor of Linux.  An important device for Linux machines is the console interface.  Older PCs had physical serial ports available.  Modern PCs lack serial ports but they usual direct the console interface to the monitor/keyboard combination.  Small embedded systems usually don't have a dedicated monitor or keyboard and they often don't have a physical serial port.  The devices I work with have a USB serial interface which provides a serial interface over a USB A to USB micro cable.

Once in a while it becomes necessary to interface via a physical serial port, often using a DB-9 connector.  When that's the case, I'm always asked to make it work since none of the younger engineers have much experience with older technologies while I spent a few years at the beginning of my lengthy career as a field engineer for mini and mainframe computers where serial ports were common.

Last week, one of the younger engineers was hooking up a couple devices via DB-9 serial connectors and wanted to hook 2 male DB-9 connectors (the ones where the pins are visible) together.  He came to see me because my office tends to be a graveyard for old cables and connectors as well as test equipment.  He asked about whether a null modem cable would be required.  I took a little time to explain when null modem cables are required but it quickly became obvious that I was providing more information than needed and that he just wanted to solve a problem.  My theory has always been that I can solve problems faster if I develop a mental model of how a given technology works.

I was trying to explain that null modem cables allow terminal type equipment to be connected together.  There are two types of serial equipment, data terminal equipment (aka DTE) and date circuit-terminating equipment (aka DCE).

On some of the smaller devices, there's only a serial port available for data transfer.  In those cases, I choose ZMODEM to securely transfer binary data files between machines.  Back when I used to connect to bulletin board systems (aka BBSes), terminal emulator programs which supported ZMODEM used to be plentiful but now there's only a few options.  I've been using Tera Term because I find its ZMODEM implementation easier to use.  Here's what a file transfer looks like using it.


 

 

 

Saturday, February 21, 2026

Darts and hanging out with friends after work

A few days ago while doing some neck exercises given to me 8 years ago by a physical therapist to help prevent pain from bone spurs in a neck vertebra, instead of stopping at 50 repetitions as I usually do, I continued to 51 by mistake.  That triggered the thought that 51 is 3 x 17 which made me think of playing darts where landing a dart in the triple 17 ring is desirable.

I started playing darts around 1985 or so.  At the time, I was working at GE Information Systems in Rockville, MD at the time and commuting there from Northern VA.  At GE I became friends with a Brit named Dave there who organized weekly lunch outings to area ethnic restaurants.  Those outings were a welcome distraction from the repressed corporate atmosphere at GE.  Dave left GE about a year after I met him and he started working at Sprint International in Northern VA.  Few recognize the name Sprint International.  It's what was left of Telenet which used to run one of the largest packet switched networks in the world.

Since Dave lived in MD and was commuting to Northern VA, we had commutes which were close to the opposites of one another.  He and I missed chatting and we figured out that McLean would be roughly halfway if we wanted to meet for a beer after work.  He found a great little place called McKeever's Pub which had a great atmosphere as well as featuring a couple dart boards and we began meeting once a week there.

Dave was quite skilled at darts.  With practice I became a mediocre player but only for about an hour or so when the beer I consumed balanced out the residual caffeine from my workday which tended to leave me too jittery to have much accuracy.  At some point, my skills started waning as the caffeine lost the battle and I relaxed too much.  We usually played either Cricket or 301.  Despite not being very good, I enjoyed playing darts unless forced to play against someone who was too competitive.  

The strange train of thought which began with my 51st repetition next had me wondering what happened to the owners of McKeever's Pub.  I had heard a rumor that it it had closed about 10 years ago which made me a little sad but still nostalgic for the many evenings spent there chatting with friends and trying not to embarrass myself at darts.  It turns out the rumor of the pub closing was true and I discovered that one of the patrons had loved the place so much that he bought up the furnishings and recreated it in his basement.  Those of us who enjoyed the McKeever's Pub's welcoming atmosphere and excellent food (I still miss their bacon cheeseburger and home fries) can understand the impulse to keep it alive.  Then I discovered that the owners had opened a vineyard and restaurant on their farm in Leesburg, VA.  It's called EagleTree Restaurant and Winery and judging by the menus I looked at, it sounds amazing.  I think a visit may be in order at some point.

I hope everyone finds a happy place to meet friends to unwind after work.  I've had a few since McKeever's including Old Dominion Brewpub, Dogfish Head Alehouse, and Leesburg Public House.  Discussions outside of the office tend to let you find interests you may have in common and can make work friendships closer.

Saturday, January 24, 2026

Our not-so-new 60 pound lapdog

We had the sad experience of losing 2 dogs to different forms of cancer in 2023.  First we lost Bandit, an 80 pound lab shepherd husky pit mix we had loved for 10 years, to bone cancer which had spread to his lungs. We lasted 3 weeks before the house became unbearably quiet and we adopted Greta, a sweet 50 pound pit bull.  We lost her to lymphoma after having her for only 7 months.  This time to prevent the empty nest syndrome, we immediately adopted Kya, a 60 pound pit bull, who has kept us busy ever since.

 


A mere 3 days after we adopted Kya, she gave us a scare by getting very sick.  She stopped eating and drinking due to a severe gastrointestinal bug of some sort.   We had to drop her off at the vet where they kept her overnight to administer IV antibiotics and fluids.  When we picked her up the next day, we had to sit on the floor with her to coax her to eat and drink before the vet would let us take Kya home.  The picture above is from Thanksgiving at my mother's house which was 4 days after we brought her home.  She still wasn't feeling 100% when this picture was taken.

She was suffering from FAS (Fear, Anxiety, Stress) syndrome when we adopted her.  I think that's probably because she had been in the shelter twice before we adopted her.  She has relaxed quite a bit in the past 2 years but she can still be a bit reactive at times.

After she recovered from her GI issue, we discovered that at 3 years old, Kya had a lot of energy and is quite athletic.  She gets 1 or 2 long walks per day as well as several play sessions on long leash while playing catch.


 

We've had Kya for a little more than 2 years now and she continues to be an absolute joy. She's affectionate, protective, and very enthusiastic. It never gets old having her rush up the stairs to check on me when she gets home from her morning walk and I never get tired of seeing her antics when I take her out for multiple daily play sessions which makes us both happy.

As you can see from the picture below, she's got me totally wrapped around her paw.  She also has us convinced that at 60 pounds, she's not too large to be a lap dog.  She turned 5 in December.  We're hoping to have another 10 years with her because she makes every day better.




Sunday, January 04, 2026

Computing setup, software focused

Windows

My company gives software/firmware developers a very capable Windows laptop.  It's got 32 cores, 64 GB of memory, and a 500 GB SSD to which I was able to add another 2 TB SSD.  There are a couple downsides to this machine -- it's kind of heavy and the corporate IT team has this laptop very locked down.  All software installed on it must be on the approved software list which I understand.  It makes it harder to use my corporate laptop as a good development environment though.  I compensate by using Linux machines for the actual development work and relegating the Windows machine to acting as a terminal plus using it for web browsing and corporate communications tasks such as email, Teams, and Slack.  I was able to install VMware which allows me to use the laptop to run Ubuntu Linux VMs which are used for occasional software builds and to host some FPGA development tools to program the firmware I develop onto the embedded hardware it targets.

  • Vim - I've been using Vi/Vim as my editor of choice since I took a job which gave me a Sun workstation on my desk.  I've got friends who love various editors such as Emacs, Visual Studio, Notepad+, Atom, and a few others.  I've occasionally experimented with other editors but it's really hard to overcome the muscle memory which comes from using Vi for 35 years.  The benefit is I'm still using a few macros I created that long ago.  I prefer GVim, the GUI version of Vim for its ability to resize windows.
  • Putty - I've got Putty profiles for all the Linux machines which I connect to regularly.  Each includes X11 forwarding which gives me the ability to launch X11 apps on any of the Linux hosts I access.  I know that Wayland is more modern but most of the Linux machines I'm accessing run old enough versions of Linux to make Wayland too much trouble to try to use.  Putty supports both SCP and serial connections, making it a handy way to connect to serial console ports.
  • WinScp -  This is a great little network file transfer program which supports the SFTP and SCP protocols.  I often use one Linux host to build my software and another to install it so being able to easily transfer files is a necessity.
  • VcXsrv -  Since so many of the tools I use require an X11 connection, I need to run a X11 server on Windows.  I actually petitioned our IT group to add this to the approved software list.  It can be a little buggy at times but getting free software approved is always much easier than asking for commercial software be added to the budget.
  • TeraTerm -  Believe it or not, sometimes I need to transfer files to an embedded machine which only offers a serial connection.  TeraTerm supports ZMODEM transfers which makes exchanging binary files much easier in that case.
  • Kdiff3 -  Capable free GUI file/directory comparison tool and one of the few allowed on my work laptop.
  • Microsoft Outlook - Outlook seems to work adequately for basic email and scheduling needs.  It has a terrible search feature which makes it difficult for me to find past emails I need to reference.
  • Microsoft Teams - I have never cared for Teams but it's a necessity to allow me to join meetings while working from home.
  • Slack - Most of the time this is okay but it's very quirky.  It's a necessity to allow easy connections to people while I'm working from home. 
  • Google Chrome - It's the browser chosen by our corporate IT team.  I guess it's a necessity since it's captured the majority of the browser market but I must admit that I've never really cared for its UI. 
  • Windows Calculator -  Having a calculator capable of hexadecimal and binary operation is a necessity at times.

 Linux

All of the embedded devices I work with run some version of Linux.  Some actually have multiple copies running on different CPUs.

  • Vim - Vim comes preinstalled on all the Linux machines I need to access.  I do often still install Gvim to make it easier to edit files over an X11 connection.
  • Putty - I manually install Putty on Linux machines.  It makes it easy to connect to devices on the Linux machine which use a serial port.  It's also handy to do that via an X11 connection.
  • GNU Screen - Screen makes it very easy to maintain a persistent connection to a machine which is necessary as some of the firmware builds take over an hour and network hiccups used to kill the build before it was done.  Screen allows me to reconnect after the network issue and see the build continuing as if no interruption had occurred.
  • Exuberant Ctags - I've been using ctags to make navigation through unfamiliar code easier for 30+ years now.
  • Ack - Ack allows me to do a recursive search for files which contain some string and to limit that search to source files or some other category such as Bitbake files.  I use the ack executable which is implemented as a single perl module which makes it trivially easy to install on Linux machines.  I know there are faster source search tools available but this one is easy to use and works well for me.
  • Kdiff3 -  Capable free GUI file/directory comparison tool.
  • xxd -  Sometimes I need to examine binary files and this tool is readily available on Linux machines.  It can also help transfer binary files in a pinch by converting a file to its hexadecimal ASCII equivalent, transferring it, and using xxd to convert it back to binary.
  • bash - I rely on the bash shell along with awk, sed, grep, find, and other standard GNU Linux tools for the vast majority of my scripting and interactive use needs.  I rely heavily upon bash scripts to help automate much of my development process.

Apps for both Mac & iOS

Here are the apps I run on both the Mac and iOS.

  • Music - Sometimes I like to have background music playing to help mask out distracting sounds while I'm working from home.  I have a few playlists which work well for this purpose.  I buy most of my music in MP3 form from Amazon or Bandcamp and import the MP3 files into the Music app.
  • Apple Mail -  It's free on Apple devices and does a reasonably good job of keeping my mail accounts in sync between my Mac and my phone.
  • Apple Numbers -  Even though this is a spreadsheet, it can also function as a lightweight database app.  I use it to keep track of audio books and e-books I own and which I've read.  I have quite a few of these lightweight databases.  I used to use a great database app called Bento made by FileMaker which had versions for Mac and iOS.  It was discontinued in 2013 and I haven't found a replacement I like better than Numbers although I do occasional search still. 
  • Google Calendar - I like it because it seems to be the most flexible in scheduling recurring events.  For example, you can choose the 3rd Saturday of each month or the 21st day of each month.
  • Microsoft To Do -  A reasonably good cross platform to do app.

Mac 

My old Intel Mac Mini is getting long in the tooth but still manages to support some of my work and all of my personal computing needs.  Here are some of the apps I run on it.

  • ChronoSync -  I've been using ChronoSync for backups for quite a while now and I've very happy with it.
  • Little Snitch - I insist on running a top notch firewall program and Little Snitch fills the bill nicely.
  • GnuCash - Since I pay most bills electronically, GnuCash lets me keep track of my checking account easily.  I really like its ability to change the sorting from ascending to descending dates since that makes it much easier to compare with my bank's statements.
  • Waterfox browser -  I've always liked the Firefox browser for how easily its UI can be customized and for the rich set up plugins which allow safer browsing.  Firefox lost me as a user when they started on their quest to shove AI in every aspect of the browser.  Waterfox is a reasonable fork of Firefox which does not include the unwanted AI features.  I use this for all my general purpose browsing.  I also use the Chrome, Safari, and Vivaldi browsers each for a special purpose.  It limits having to worry about whether cookies from financial or social media accounts are being seen by other websites.
  • Vim - The command line version of Vim comes preinstalled on Mac machines.  I still install MacVim to make it easier to edit files and to be able resize windows.

iOS

I use the cheapest iPhone available whenever I need to replace my phone as my personal device.  I've got iOS software I depend upon to make life easier.

  • iTunes Remote - This allows me to easily select the playlist from the Mac's Music app.  I used to also use it for pausing music when I had an incoming call but now I rely upon an Anavi Macropad 10 for that purpose which allows me to pause songs without fumbling to bring up an app on my phone.
  • PCalc -  Having a calculator capable of hexadecimal and binary operation is a necessity at times and I'm not always near my Windows laptop.
  • Overcast - This is my favorite podcast app.  It has the best UI of any iOS app I can think of.
  • Audible - Listening to audio books keeps me sane when commuting to work or in warmer weather when I'm doing 3-4 hours of yard work. 
  • Libby - App which makes it easy to borrow library books.  Mostly e-books but they also have audiobooks.
  • Hoopla -  App which makes it easy to borrow library books.  This seems to have more audiobooks and graphic novels than Libby does.  They also let you borrow and stream digital movies and tv content.
  • Two factor authentication apps -  I enable two factor authentication for any website which supports it and apps such as Authy, Google Authenticator, and others make that possible.

Thursday, January 01, 2026

Computing setup, hardware focused

Since I work from home the majority of the time and my job involves writing software and firmware for multiple small embedded ARM based devices, my computing setup tends to be a bit more complicated than normal.  I'm also cheap so I've gotten almost everything on sale.

 

The picture above shows some of the equipment at home which makes it easier for me to switch between the many devices I need to use both for work and my personal computing needs.  The red surface everything rests upon is a grounded anti-static mat which is a necessity as I often need to use bare circuit boards for easy access to JTAG connectors.

  • Philips 4k monitor.  I often have ssh sessions with anywhere between 2 and 5 Linux systems simultaneously.  That many terminal windows take up a lot of screen space so the fact that a 4k monitor has 4 times as many pixels as the HD monitor I'm stuck using at the office has made working so much easier.  I got this at a good price thanks to a Black Friday sale 3 years ago.
  • IOGear KVM switch.  I usually switch between my work laptop, my Mac Mini which is mostly for home use, and a Raspberry Pi 5.  Since this is a 4 port KVM switch, that leaves an extra set of cables to connect to other devices as needed.  I had a cheaper KVM but the move to a 4k monitor forced me to upgrade to one which supported the higher resolution.
  • Mechanical keyboard.  I opted for a cheap mechanical gaming keyboard with a PC key layout and which uses Outemu Blue switches (Cherry MX Blue clone).  I find it much easier to use a PC style keyboard on a Mac than the other way around.  Since I often connect to Linux and Windows machines, it just makes more sense for me.
  • Technical Pro rack mount power supply.  This allows me to easily power on or off any individual device in my setup as needed. 
  • Raspberry Pi 5.  This is a great development device as there are much better free development tools available for Linux than there are for Mac or Windows.  That provides me with a lot of flexibility in my development and debugging tasks.  It's my favorite computer to work with.
  • Anavi Macropad 10.  This device comes with CircuitPython installed which makes it very easy to configure the key codes it can to send to my Mac.  I like this one because it's also got a rotary encoder (which can be used to easily change the volume) with a button on top to pause the music.  I often use my Mac Mini to play background music while I'm working.  Being able to pause music playback, skip to the next song in the playlist, rewind to the previous song, or adjust the volume on the Mac while my keyboard and monitor are switched to my work laptop via the KVM is very handy.  The situation which this keypad helps with most is when I get a call from someone at work and need to quickly pause the music in order to take the call.
  • Canon PIXMA G6020 All-in-One Megatank Printer - It's affordable, reasonably fast at printing, doesn't use proprietary ink cartridges, and has copying and scanning capabilities as well.  We've had it a year and are still on the original ink bottles supplied with the printer.  I think we've been through about 6 reams of paper during that time, most of it double-sided.

 

The picture above is an EDID (Extended Display Identification Data) HDMI adapter.  It causes the computer which it's plugged into to continue thinking that the 4k monitor is still plugged into the computer when it's actually switched to another computer via the KVM switch.  The EDID HDMI adapter shown above is connected to my work laptop.  I've got another one plugged into my Mac Mini.  This prevents the windows on whichever machine from being rearranged when the monitor configuration changes via the KVM switch.  More expensive KVM switches sometimes include this capability without requiring an external adapter like this.

 

 

Saturday, December 06, 2025

Things which make C/C++ source code easier to understand

I end up reading a lot of C/C++ source code from various sources in my role as an embedded firmware engineer.  There are a few rules I try to follow to make my code easier for others to decipher.

  • Include explanations for any acronyms you use in function or variable names and even in comments.  Don't assume that everyone has the same background as you do.
  • Don't ever use magic numbers.  When I'm looking for all code which writes or reads a bit within a register, I don't want to have to try to grep for every hex value which includes that bit and even worse, sometimes people define register values as decimal which makes less sense to low level programmers like me.  Just define it with a mnemonic name and use the boolean or operator "|" to define the set of bitmasks required.  Think of the poor sod who gets stuck maintaining your code.
  • Start your functions with an open brace starting in column 1 after the function name/parameters.  End functions with a close brace in column 1 for the same reason.  It makes it easier to search for function names within a source file.  In an editor which uses a vi style user interface, the command "/^{" (without the quotes and followed by the Enter key will find the first instance.  Then "n" will find the next one and can be repeated as many times as desired.
  • Emulate whatever indentation style you found in the code if you inherited it from someone else.  It's irritating to have a mix of tab and space characters with no hint of what tab stops the author used.

Saturday, November 15, 2025

Whiteboard coding during interviews

I recently responded to a writer I follow on Mastodon and Bluesky who was looking for input for an article she was planning to write about interviews for embedded systems positions.  Since I enjoy her writing and I have loads of experience with embedded systems, I responded to her request.

The act of recalling various interview questions I had been asked or had posed to others made me remember some questions which I disliked intensely.  The type of question I dislike most is being asked to write code on a whiteboard to solve some problem.  I generally enjoy coding and the problems are often interesting but coding on a whiteboard is so different from writing code on computer using a good editor that I've grown to hate it.  I'd almost rather go back to the bad old days of using a keypunch to generate punched cards as source for my program.  When programming I like to start with an outline of the program and fill it in as ideas occur to me which is nearly impossible when stuck with a more linear coding environment such as whiteboard or a sheet of paper.

I've had two memorable experiences responding to requests to code on a whiteboard.  The first was the most absurd question I believe I have ever been asked in a job interview.  Apparently the company I was interviewing with had guidelines for technical interviews and the engineer asking the questions was hellbent on sticking to these guidelines.  He asked me to write an assembly language program for him.  I asked which assembly languages he was familiar with since I was comfortable with about 5 at the time.  Once I discovered that we had no assemblers in common, I pointed out that it made little sense for me to write a program in a language he wasn't familiar with but he insisted on me completing this task so he could check it off on his interview form.  In addition to it being ridiculous to write a program which cannot be evaluated, it's also frustrating trying to write a meaningful assembly language program on the tiny whiteboards available in cubicles since assembly programs tend to be much longer than those written in higher level languages.  Apparently I passed muster as I ended up getting the job.

The second whiteboard coding experience which came to mind ended far more positively.  I was asked to solve a problem in C but ended up needing to keep adding lines which is no problem on a computer but presents a huge obstacle when stuck using a whiteboard and marker.  I managed to come up with an incomplete and messy solution before they called time on me.  Once I got home from the interview, I was still bothered by my performance.  I was able to quickly code up the solution on my computer at home and emailed a working program to the VP of Engineering I had been interviewing with at the time.  He was so impressed that I had followed through with solving the problem that I was offered the job and ended up staying at that company for 9.5 years.  I still hated the initial request for whiteboard coding but was pleased that it resulted in me getting the job.

I'm hoping that the days of being asked to code on whiteboards are relegated to the past.  To tell the truth, since I'm at my last job before retirement. it won't have a huge impact on my life either way but I hate the thought of others being subjected to this absurd practice.