Natural Language Protocol Stack

I was in the lobby of F&I Express last week and one of the OGs asked me, “What was that network protocol that the old IBM mainframes used?”  I replied with SDLC, confidently naming the link level protocol.  “No, the other one.”  I moved up a level, to VTAM.

It turns out he was looking for System Network Architecture, which is not a protocol itself but the name of the stack.  This was IBM’s proprietary stack, competing with Open Systems Interconnect.  Where SNA had SDLC and VTAM, the OSI has Ethernet and IP.  It is easy to find a chart of your favorite communication stack … except this one:

Stacks

I learned about SNA on the job while studying linguistics at college, and I could not help noticing that natural language also uses a stack.

At the lowest level is phonetics.  This is the equivalent of the green light on your Ethernet port.  It means that you are successfully hearing the other person, although the grunts and squawks of human speech carry more data than binary bits.

The next level up is phonology, where different sounds (Greek allo-phone) are resolved into units relevant to the given language.  In German, for example, /ch/ is the same in “ich” and “ach,” even though the sounds are completely different.  Closer to home, English /p/ is sometimes aspirated and sometimes not, a distinction audible only to Professor Catford.

The next level up is morphology.  Yes, I might as well do the whole stack, now that I’m at it.  Morphology is the study of word parts that carry grammatical information, like –ing, -ed, and –es in English (and more exciting ones in other languages).

Once we arrive at the level of whole words, we can study them on their own, plus how they have changed in sound and meaning over time.  The fields of comparative, historical, and social linguistics are each fascinating in their own right, but I will stick with the stack concept for now.

Grammar in Western languages is easily understood as “how to put a sentence together,” using the appropriate numbers, genders, cases, modes, aspects, and tenses.  Other languages are not so straightforward, though, and the term from my day job, “message syntax” seems more correct.  I have, at the moment, just finished writing a two-thousand line message syntax specification using XML.

Once we have sentences, we can have a dialogue, or “discourse level grammar.”  This is the application level of the stack, and familiar to all software people.  Our trade is filled with terms like dialogue, request, response, and transaction.  My favorite such term, going back to my IBM days, is “pseudo-conversation.”  Yes, that means just what you think it means, whether you’re talking to a bored spouse or a teleprocessor.

Life (Credit Life) without Recursion

I was chatting with Tim Gill the other day about auto finance math, and the topic of recursion came up.   Tim is one of the few vendors in this space with his own “calculations engine.”  Otherwise, there are not many people who will talk to me about esoteric math problems.  That’s why I write a blog.

People commonly describe Credit Life as a recursive calculation or, more properly, an iterative one.  This is because the premium must cover the amount financed, and the premium is itself financed.  So, if we write the premium as CLP, a function of the amount financed, A, then:

Fig1This is generally how people solve it.  They run a few iterations, and CLP converges quickly.  This is a preference, however, not a requirement.  Assuming that the premium calculation is distributive over addition, which it is, we can just as easily set the problem up as:

Fig2… which can be solved analytically.  This approach will work for most of your popular recursive calculations, like GAP insurance.  For an example, let’s take a typical “cost per thousand” insurance calculation, where f works out to ten percent.  You could go the infinite series route, which looks like this:

Fig3

Or, you could simply work the algebra problem:

Fig4Now, I know what you’re thinking.  You’re thinking that credit life calculations are far too complicated for this approach.  You may also be thinking that the premium is based on the monthly payment, M, not A.  In fact, these complaints are related.  The payment is directly related to the amount financed, through the PV annuity factor, which combines the term and the APR into this handy relation:

Fig5

So, when you see a payment formula like this one:

Fig6The insurance carrier is actually helping you, by combining the calculations for premium and monthly payment.  By the way, the last time I checked, C# did not have the payment and related methods from VB and Excel.  You are much better off coding your own PV annuity factor, and using it as described here.

Now, if you are designing a calculations engine, you may still prefer to use iteration, for the same reason that you may not want to algebraically reverse all your tax and fee calculations.  It is better, though, to use your algebra and know your options, than to rely blindly on iteration.

Maturity Model for Software Startups

Software companies begin life at CMM Level One, and some of them die there. You may not be familiar with the Capability Maturity Model, but you will never forget your time at Level One. This is where the developers code all night because you need that next feature, to pay the rent. This is where you release new code and then spend all day patching it, in production.

“How many users do you suppose we’ll drop, if we reboot it right now?”

On the other hand, it is possible to have too much process control. I was at a Level Four company once where we had to three-bid a project to plan and initiate a second project that would develop the software. The chart above, from Ron Patton’s book, shows the levels as stair steps.

The model contemplates an otherwise stable company that has weak processes only for software. In a startup, all processes are weak and resources are limited. To be successful, processes must mature in step with revenue. In this article, I’ll illustrate holistic process maturity with some examples.

At Level One, you have limited HR capability, and therefore no diversity training or compliance. You have no benefits, no vacation policy, no travel policy, and no expense audits. Your exposure to liability is huge, for everything from “constructive termination” to respondeat superior.

“The reason for Brad’s separation from the company is a private matter which I am not at liberty to discuss.” 

I looked into this, and found that there is indeed a maturity model for HR. The first step, in my experience, is to crib an employee manual and make everyone sign that they have read it. At least then you can disclaim any actions that go against the boilerplate in the manual. You might also invest in an employment law poster.

At Level One, you also have no marketing function. The sales people roll their own presentation materials, talk tracks, and brand message. The first step is to hire a dedicated “marketing person,” to do sales support and organize your booth at NADA. Actual marketing comes later.

Entrepreneurs are good at tracking their sales and market share. People I work with look forward to their first thousand dealers, a public dealer group, or a big agency. Celebrate each milestone by notching up your process maturity.

I would say that you should be out of Level One (for software) after eighteen months. If you are already taking distributions, while the business depends on “heroes and luck,” then you are gambling. Raise some capital, hire a good manager, and get it fixed. My earlier article, Sales-Driven Development, describes what I feel is a reasonable level of process maturity for a young software company.

Baby Steps

I will close this post with a few pointers for leaving Level One. Basic stuff. Most readers should be able to skip this list.

  • Create a maintenance window and stick to it. Only move code to production at 6:00 AM on Wednesday. If anything goes wrong, people are in the office. It’s also not Saturday, our peak volume day. If you are constantly having “emergencies” that can’t wait until Wednesday, you need to look at that.
  • Implement a code control system with a rollback capability. If the latest build has a problem, at 6:10 AM on Wednesday, you do not start debugging. You push the rollback button.
  • Set up a reliable QA environment, and sync it with the production database. I don’t know how many times I have heard that the build worked in QA but some new data was encountered in production, and it crashed the site.
  • Create a division of labor, such that the developers stop fussing with the servers. Developers love to fuss with  infrastructure, which is not their skill set.  At all.  Hire a professional, or rent one from your cloud service provider.
  • Implement a work order tracking system. Planning at Level One is a “pushdown stack,” which means that yesterday’s panic is still simmering when it is superseded by today’s panic. Start by writing commitment dates on a bulletin board, so that everyone has visibility into the backlog.

Not Why They Hired a Linguist

We received a resume this week listing every language from PL/1 to PHP. This fellow has some good experience, and a degree in linguistics. Someone remarked that linguistics is the master skill for programming, and then I told my story about Greg Turner.

Greg was a linguist I worked with years ago in the Wayne County public schools. He had funding to develop speech prostheses for handicapped children. Think Stephen Hawking and his artificial voice.

In the 1970s, personal computers were just coming out. The county could never afford to help these kids, except that Greg was building custom gear from scratch. We would crack open a See ‘n Say, pull out the speech chip, and order the rest from the Motorola parts catalog. That’s how I remember it. I honestly don’t know how the stuff worked.

If you studied a foreign language at university then you probably have, next to your foreign language dictionary, a grammar reference. My French grammar is the Cours Superieur. For Greg, the chip catalog was a grammar reference. It told him which chips he could use with other chips, and in what context.

I was the programmer on this project. The third member of our team was an actual EE. “Unbelievable,” he said, shaking his head. Without any training, Greg would read the specs, order from the catalog, and then build these wonderful contraptions. Salvaged joysticks and homemade head pointers. We all agreed it was unbelievable. The children just said “thank you,” with their tinny, synthetic voices.