I observed that I do not always practice what I preach. I don’t mean intentionally dropping but unintentionally as my mind is sloppy. I am not able to apply my known practices (like TDD, Test-First, Pair-Programming, …) at the right time as I don’t think about them at the moment. When I see a problem at a coworker’s task, I recommend the practice, which I wasn’t able to apply myself. This post is about being able to practice what we preach.

tl;dr It is fine not being able not always practicing what you preach. With enough reflection, while working, this has even positive effects. …


To get a high resilience, you can either code correctly or plan for the scenario. I’m terrible at first, so I do the latter.

Image for post
Image for post

When you introduce a supervisor, that knowns how to heals its children, you equal your resilience to the resilience of the supervisor. Now you are in a good position as you can use a technique for the supervisor that proved itself in the past.

I take the loop construct of bash. I trust it (why shouldn’t I?)!

$ cat keep_running.shuntil ./$1 ${@:2}; do
echo "crash! restaring $1"
done

The util is the loop, $1 takes the first argument as function, ${@:2} passes the rest of the args to the script in $1. So I can make my program…


Deploying incrementally with rsync is incredibly fast for apps that are not packed together — like a static website.

You can do this with

$ cat deploy.sh
rsync --exclude='.git/' --filter=':- .gitignore' -avzhe ssh ./ ssh-user@ip-address:/folder/on/server

This command ignores all files that are ignored by git, as well as git. I tested this script in production, however, make sure to understand all the parameters


  • Cartesian (rectangular) coordinate system is a framework to perform calculation in 3D space such as measuring locations, distances and angles
  • Continuous mathematics is an illusion as the universe is discrete and finite. But it is a useful tool: Trigonometry as example which involves real numbers as Pi.
  • In computer graphics: If it looks right, it is right (the purpose counts)
  • Possible axis orientations are “equal” in 2D because you can transform them between each other. This is not the case in 3D. Why?
  • Often: Problem easy to solve in 2D but difficult or undefined in 3D
  • In 3D we cannot rotate every coordinate system into each other. There are two types: left-handed and right-handed. (Make L to remember). We rotate inner-ward. Newer left-handed, traditional / math-oriented linear algebra right-handed. …

tl;dr You can the three rules of TDD, that you know from software development on the development of a startup (/-like company). The rules lead to a disciplined clear build-measure-learn cycle.

Image for post
Image for post

Assumptions are the most dangerous thread for startups and startup-like project.

A thing that is accepted as true or as certain to happen, without proof. — Lexico

It leads to walking blindly towards a goal you don’t know and feeling good while doing it. What we need are facts.

Image for post
Image for post
Assumptions to Facts

To come from an to a fact about a thing or an event, you have to deliver empirical proof.

I see a typical pattern in handling assumptions while developing software and writing software, as you have to assume stuff all the time in the latter. Therefore, I apply a common practice in software development — TDD — to the development of companies. …


Tested on Ubuntu and all the distributions where pdftk and enscript is available (should be almost everywhere).

You need:

$ sudo apt install pdftk    # for merging
$ sudo apt install enscript # for numbering

to create the script:

$ cat merge.sh#!/usr/bin/env bashpdftk "$@" output unnumbered.pdf #1number_of_pages=$(pdftk unnumbered.pdf dump_data | grep NumberOfPages | sed 's/NumberOfPages: //g') #2enscript -L1 -b'||Page $% of $=' -o- < \
<(for i in $(seq 1 $number_of_pages); do echo; done) | \
ps2pdf - | \
pdftk 'unnumbered.pdf' multistamp - output merged.pdf #3
rm unnumbered.pdf

It passes all arguments to “pdftk” (#1), which merges it into a new file (). “enscripten” creates a a PDF with the page-numbering and the same amount of pages (#2) and “pdftk” merges the created PDF and the numbered one (#3). …


Brutal Refactoring = Refactoring + TCR

tl;dr Refactoring requires small changes and always green tests. TCR ensures both. Together, they are Brutal Refactoring and a great fit.

Image for post
Image for post

TCR — test && commit || revert

With TCR You replace your test command with the Unix-style command “test && commit || revert” (TCR). In pseudo-code this means:

if tests are green:
commit code
else
reset to last commit

Every time my tests pass, the command commits my code. …


tl;dr A tool, that creates automatically a well-formatted tutorial (example below) from your TCR log. Edit and augment it and your tutorial can go online.

Image for post
Image for post

TCR

TCR stands for “test && commit || revert”. The Unix-style command says that your code gets committed every time your tests are green (code is correct syntactical and semantical) and reset to the last green state (commit) when the test fails. This leads to focused baby steps. This article is no intro to TCR, so for details see here.

Could you provide History?

When I’m giving TCR workshops, the first question after the seminar is: “Could you provide the Git-History?”. …


I am sure, I heard from Don Knuth this, but I can’t find it anymore (the search continues):

What makes a programmer a good one, is his ability to skip freely among abstractions. — Maybe Donald Knuth

Image for post
Image for post

However, I found this, which unfortunately doesn’t my experience like the first “quote”:

“The psychological profiling [of a programmer] is mostly the ability to shift levels of abstraction, from low level to high level. To see something in the small and to see something in the large.” — Jack Woehr. An interview with Donald Knuth. Dr. Dobb’s Journal, pages 16–22 (April 1996)

Skip freely among abstractions

Until today, I thought, I have to understand every layer of abstraction. From the electrical circuits to the logical gates, the processor architecture, the operating system, assembly, the language of the virtual machine, the virtual machine, the interpreters and the virtual machine-language itself. …


In day to day development, I already see various and try different techniques to measure and track my day to day work. Tracking and measuring are essential for me because, in this way, I can be proud of my work. My work not only consists of the resulting software but also of the path of getting there. Tracking and measuring provide many more advantages.

Parts and their Connection

Image for post
Image for post

Everything starts with a todo in a todo-list (within the todo-tracker). You write an automated test that represents this todo. This test The main-tool links this test to a todo.

You start your tomato-timer and begin implementing the todo, by example-driven development, which produces further unit-tests. Every 25 minutes a tomato is over, and you can edit the description of the last tomato. Per default, the test-cases you created in the tomato are the content together with commit-messages and checked todos. …

About

Thomas Deniffel

Programmer, CTO at Skytala GmbH, Software Craftsman, DDD, Passion for Technology

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store