Skip to content

Enjoy Kaizen

Barnstormin

Tests per commit, TPC project lifetime graphs

Listen in:

H-moy6QRSYk@youtube.com

Listen in:

4frsNBDhpEs@youtube.com

(2004) R.A.T.M.

9. I’m Housin’
10. Sleep Now in the Fire
11. People of the Sun

Post Type

Status Kind

Listen in:

vlZi_PyX5ls@youtube.com

The Test First Mindset

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.

What if …

… 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.

Lost a Tree

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.

(2019) Dom Ino – Deviant Royalty

06. Gone Clocky
07. Supertranscendentalistic
08. Karma

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.

(2006) Fugato – 02. Walk On By

(2007) Fugato – 08. Do What ‘Cha Gotta Do

Installing a PHP Extension Outside Home

FEATURING: mf2 for PHP by cj.w6k.ca!

Have you seen similar?

cjw@buster201908:~$ []

You may recognize tilde hanging out there in the prompt:

... :~$ []

The tilde ~ 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 /usr/local:

... :~$ cd /usr/local
... :/usr/local$

Make an empty folder here with the name phpext-mf2:

# 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 /usr/local/phpext-mf2/.

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

Activate it:

$ 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$

1948; Free and Equal in Dignity and Rights

My Buster 2019-08

Who Changed the Name?!?

The Universal Declaration of Human Rights has og:title Universal Declaration of Human Rights.

The Whole Farm Waiting at Scarcity

Hold my beer.