2015-10-21

The Mother of All Bugs

Summary: This is a story about the most elusive and sinister software bug I ever came across in my decades-long career as a programmer.

The Mother of All Bugs

At some point early in my career I was working for a company that was developing a hand-held computer for the area of Home Health Care. It was called InfoTouch™. The job involved daily interaction with the guys in the hardware department, which was actually quite a joy, despite the incessant "It's a software problem!" -- "No, it's a hardware problem!" arguments, because these arguments were being made by well-meant engineers from both camps, who were all in search of the truth, without egoisms, vested interests, or illusions of infallibility. That is, in true engineering tradition.

During the development of the InfoTouch, for more than a year, possibly two, the device would randomly die for no apparent reason. Sometimes it would die once a day, other times weeks would pass without a problem. On some rare occasions it would die while someone was using it, but more often it would die while sleeping, or while charging. So, the problem seemed to be completely random, and no matter how hard we tried we could not find a sequence of steps that would reproduce it.

2015-10-18

Computer telephony in C++ with MFC

Back in 1999-2000 the state of the art in computer telephony was called Interactive Voice Response (IVR).  Nowadays when we speak of "voice" we usually mean voice recognition, but all that those telephony systems did back then was to playback recorded messages and wait for the caller to press digits on their phone. Sometimes, we would ask the caller to speak on the phone, and we would record their voice, for a human operator to listen to later.

The hardware had special filters on it to recognize the DTMF digits, probably because the CPU was thought of as too wimpy to do it by itself.  I experimented writing WAV-file processing filters on my own, and discovered that it took less than 10% of CPU time per phone line to run such filters in software, so it could certainly be done, but then again there existed systems out there in configurations of 30 or even 100 lines per computer, and of course the CPU was not enough in these cases.  We only worked with configurations of four lines per computer, but still, since the filters were made available by the hardware, I made use of them for the work project, and I only re-invented the wheel at home, for fun.

My employer at that time managed to secure a number of computer telephony contracts for a couple of big clients; he gave me a rough description of what the projects were supposed to do, and he had my coworkers slide pizza under my office door for as long as it took me to complete them.  He probably charged his clients the equivalent of a dozen programmers for this, and it was all done by me.  The only external help that went into these projects was messages recorded by a professional at a recording studio.

What follows is some screenshots of the telephony application that I created to run these projects, in Microsoft Visual C++ using MFC and the Dialogic Telephony API.

All applets waiting to start. Click to enlarge.

Crossword Puzzle Compiler

Techniques demonstrated:

  • Solving an intractable problem using a scoring heuristic
  • Super-indexing data structures for ultra-fast domain-specific queries

Summary (just gimme the TL;DR)


This is old-style artificial intelligence in action, solving within seconds a problem that would normally take eons to complete.

You give it a crossword grid, and a long list of words, and it finds ways to mesh words into the grid so as to form a complete crossword puzzle.  The final working version was done in 2003 using C# version 1.2 with a minimalistic UI in WinForms. 

The following 30-second video shows the crossword compiler in action, filling multiple successive crosswords using a word list taken from actual crosswords that have been published on the interwebz by various sources through the years.  The video is in real time, showing that the crossword compiler is, in most cases, extremely fast.


2015-10-04

Portfolio

I added a page where I list posts on this blog that can collectively serve as my portfolio.

It can be found here:

Michael Belivanakis - Portfolio