Tests per commit, TPC project lifetime graphs
I was introduced to the concept of Test-Driven Development in 2012 by Steven R. Baker. I really, really didn’t get it. He was a passionate voice in the local developer community, while I was/am a rural guy, self-taught in programming and very accustomed to being the only one in the room who likes to make computer programs as a hobby.
We clashed big time, not fierce but sharp. Would it have been collaboration instead of confliction, the past six years could have been more spending-money and less priceless-life-experience for at least this one of us, to be sure. Six years later and I’m uncomfortable when I think about it. I haven’t been to a single meeting of those local developers in all this time. I’m not sure if I will ever get there.
I paid for training in TDD from J. B. Rainsberger. It was altogether too little time on the topic, so he should take no credit for any success of mine nor any blame for my foolish hackery. Sometimes you need to do whatever it takes to make the pleasant acquantaince of people you want to learn from and reason with.
It was just in and around this time that I started the Universal Enigma Machine Simulator project, using a TDD approach. I firstly wrote a failing test, then the code to make it pass. As the software grew in complexity approaching that of the machine under simulation itself, I refactored the code I had written earlier to make it easier on the eyes and mind. These changes were validated each time I reran the suite of tests and I continued along in this way with great ease and little worry until the project was completed.
I may not have taught myself TDD -it’s debatable- but I certainly developed the discipline to practice something like what I think TDD is meant to be, successfully. I’m quite proud of this!
A few years later and I applied TDD to my mf2 for PHP project. mf2 is an extension, written in C, for PHP, which provides a parser for consuming the microformats embedded in HTML documents. I have another little thing to do there before I get into the next phase, where the tests will pay some dividends as I refactor for performance.
Today I read about the Ada programming language via hackernews. It’s about the same age as I am and is more-or-less the official programming language of the U.S. Department of Defense. You may imagine as I do that it requires a great deal of discipline to write the programs driving the fly-by-wire electronics in modern stealth fighter aircraft, in satellites, in nuclear reactors, etc. I am admittedly surprised I have been at it this long without knowing this origination story of Ada.
I soon found myself doing background study on the Ada build tools and libraries. Then, searches for any articles on practical TDD with Ada. I found one mention to AUnit, with a link that went to a YouTube channel of non-test related tutorials. That wasn’t much use.
This was the first interruption in the study and the first time I went back in the searching I was doing. I realized I have yet to see the actual Ada code itself. The syntax is not nearly the most important thing I need to consider in evaluating the language and its accoutrements.
There it is! It’s six years gone and I am considering the tests, first. Okay, first-ish.
… the mistakes of auto-correct are a cash-grab orchestrated by the cell-phone manufacturers and telecoms hoping we send follow-up texts with manual corrections and spend more pennies?
And that’s why they got rid of the penny! So we couldn’t keep track.
It landed on a car but didn’t break the windshield.
Weather seems to be calmer now in C1N than it was a couple of hours ago.
Track 11, Deviant Royalty, is extremely NSFW! Track 12, Rockin, includes references to drug use. Pay $ 10.79 USD for instant access to the complete 12-track digital download with SHA256.
These are from 2004 sessions, release for the first time to the public in 2019.
FEATURING: mf2 for PHP by cj.w6k.ca!
Have you seen similar?
You may recognize tilde hanging out there in the prompt:
... :~$ 
~ is where the current directory name is written.
When you first login to your server, you’ll be chillin’ at home in $HOME circa ~. Change your current directory to
... :~$ cd /usr/local ... :/usr/local$
Make an empty folder here with the name
# don't forget sudo or you get pneughed ... ... :/usr/local$ mkdir phpext-mf2 mkdir: cannot create directory ‘phpext-mf2’: Permission denied # with sudo ... :/usr/local$ sudo mkdir phpext-mf2
Now is a good time to take ownership with your login handle and default group, so you don’t get pneuged again. Use the
chown command on
From here, it’s time to clone the mf2 repo from code.cjwillcock.ca (or wherever):
... :/usr/local$ git clone https://code.cjwillcock.ca/php-extensions/mf2.git phpext-mf2 ... :/usr/local$ cd phpext-mf2 ... :/usr/local/phpext-mf2$ 
phpize is required next. It’s with the php-dev package:
... :/usr/local/phpext-mf2$ sudo apt-get install php-dev
Now the instructions from the mf2 README.md, but not in a rush like that. Run the 153 tests and decide if it will probably work for your server.
... :/usr/local/phpext-mf2$ phpize ... :/usr/local/phpext-mf2$ ./configure ... :/usr/local/phpext-mf2$ make ... :/usr/local/phpext-mf2$ make test
If everything passes, then install it!
... :/usr/local/phpext-mf2$ sudo make install Installing shared extensions: /usr/lib/php/20180731/
From here, installation is equivalent for any destination. Our prompt for the purpose of demonstration simplifies to
Make available for activation, your new extension:
$ echo "extension=/usr/lib/php/20180731/mf2.so" | sudo tee -a /etc/php/7.3/mods-available/mf2.ini
$ sudo ln -s /etc/php/7.3/mods-available/mf2.ini /etc/php/7.3/cli/conf.d/mf2.ini
Did it work?
$ php --ri mf2 mf2 Microformats2 support => enabled cjw@buster201908:/usr/local/phpext-mf2$
The Universal Declaration of Human Rights has
Universal Declaration of Human Rights.
Hold my beer.