CommitLog Problem

CommitLog Problem
math_problem

This is a description of an interesting problem presented as a test of programming and design competence.  The basic question is: If you were creating a program to write to and read from one or more "commit logs," how would you do it?  The only constraint was that it needed to be done in Java.

Jumping straight to my proposed solution, it is in operation here. It looks like this:

ScreenShot

Or, on a mobile screen, it looks like this:

ScreenShot_01

The code for the "Meat" of this proposed solution is located at: https://github.com/ted-collins/commit-demo.gitThe ".jar" file with the compiled version of this project is in the "/build/jar" directory, called "commit.jar".  This can be run from the command line with /usr/bin/java -cp ../jar/commit.jar com.happytrout.commit.main.WriterCmd -fname=<FNAME> -cid=<CID> -msg=<MSG>and /usr/bin/java -cp ../jar/commit.jar com.happytrout.commit.main.ReaderCmd -fname=<FNAME> -cid=<CID>This compiled version of the project assumes that your local java version is 1.8.

One other remark before diving into details.  Why do a practice Java problem?  It might be to show off that I can write Java, or the rest of the tech in the proposed solution.  It is rare that I don't spot some ego in my work.  But it is a concrete way of stating one of my most dearly-held management axioms.  The axiom has two parts.  First, if I thought I could do your job better than you, then I'm an idiot for hiring you.  Second, if I cannot do your job at all, even with considerably more time and with more mistakes, then I haven't earned the ability to lead you.  I have written elsewhere that one should manage processes, and lead people; since managing people is absurd.  If I want to lead in the software industry, I have to fit between the two parts of the axiom above.  I cannot spend my time trying to do others' jobs.  And I cannot spend time making decisions about issues I don't understand.  That's my answer to "why?"  I need to demonstrate (only to myself) that I fit within the axiom.

Formal Statement of Problem

Proposed Solution (Architecture)

Proposed Solution (Implementation Details)

Proposed Solution (The Meat)

Proposed Solution (The Tests)