# “Uncle” Bob Martin – The Future of Programming

Here is yet another interesting video. The title is chosen badly, though, as the content is not really about the future but the history of programming. But on the other hand you need to understand the past, if you want to avoid repeating its failures.

# FreeNAS Upgrade from 9.2.1.7 to 9.10.2-U2

I have been an extremely satisfied user of FreeNAS for many years, but had not updated my system for quite a while. Having a free Sunday was the perfect opportunity to do just that.

There were two steps involved: First go to 9.3.1 and then to 9.10.2-U2. As my box sits in the basement and is headless, I opted for update via GUI and it went extremely well.

The only issue was that on 9.10.2 the jail template list was empty. A quick online search revealed that this was, unfortunately, expected. But on the other hand, in such a case there is a good chance, that someone else has already found a solution.

But it all proved a bit more challenging than expected. And  nothing I found worked completely. So I ended up with a combination of things from other people (in particular this link) and my own discoveries:

• I deleted the ZFS volume .warden-template-standard via the web UI
• Then from the command line the ZFS was re-created with
zfs create zpool/jails/.warden-template-standard
• Deleted the template
warden template delete standard
• Re-created the standard template
warden template create -nick standard -tar http://download.freenas.org/jails/10/x64/freenas-standard-10.3-RELEASE.tgz

At this point everything should have been good – but it was not. Still no template showed up when I tried to create a new jail. So I added a jail template in the web UI, too.

The URL is exactly the same as for the command line above.

With this I was able to create a new FreeBSD jail.

# Choosing a Technology

I recently started a new hobby project (it is still in stealth mode, so no details yet) and went through the exercise to really carefully think about what technology to use for it. On a very high level the requirements are fairly standard: Web UI, persistence layer, API focus, cross-platform, cloud-ready, continuous delivery, test automation, logging, user and role management, and all the other things.

Initially I was wondering about the programming language, but quickly settled for Java. I have reasonable experience with other languages, but Java is definitely where most of my knowledge lies these days. So much for the easy part, because the next question proved to be “slightly” more difficult to answer.

Looking at my requirements it was obvious that developing everything from the ground up would be nonsense. The world does not need yet another persistence framework and I would not see any tangible result for years to come, thus loosing interest to soon. So I started looking around and first went to Spring. There is a plethora of tutorials out there and they show impressive results really quickly. Java EE was not really on my screen then, probably because I still hear some former colleagues complain about J2EE 1.4 in the back of my mind. More importantly, though, my concern was more with agility (Spring) over standards (JEE). My perception with too many Java standards is that they never outgrow infancy, simply because they lack adoption in the real world. On the other hand Spring was created to solve real-world problems in the first place.

I tend to avoid convenience layers, unless I am 100% certain that they can cope with all future requirements.

All to often I have seen that some first quick results were paid for later, when the framework proved not to be flexible enough (I call this the 4GL trap). So this cautioned myself and I more or less went back to the drawing board: What are the driving questions for technology selection?

• Requirements: At the beginning of any non-trivial software project the requirements are never understood in detail. So unless your project falls into a specific category, for which there is proven standard set of technology, you must keep your options open.
• Future proof: This is a bit like crystal ball gazing, but you can limit the risks. The chances are bigger that a tier-3 Apache project dies than an established (!) Java standard to disappear. And of course this means that any somewhat new and fancy piece must undergo extreme scrutiny before selecting it; and you better have a migration strategy, just in case.
• Body of knowledge: Sooner or later you will need help, because the documentation (you had checked what is available, right?) does not cover it. Having a wealth of information available, typically by means of your favorite search engine, will make all the difference. Of course proper commercial support from a vendor is also critical for non-hobby projects.
• Environment: Related to the last aspect is how the “landscape” surrounding your project looks like. This entails technology but even more importantly the organization which has evolved around that technology. The synergies from staying with what is established will often outweigh the benefits that something new might have when looked at in isolation.

On a strategic level these are the critical questions in my opinion. Yes, there are quite a few others, but they are more concerned with specifics.

# Leadership Lesson from a Nuclear Submarine

The video linked below is a quick summary of how the captain of a US Navy nuclear submarine turned his crew into the best evaluated ever. It is a remarkable story and reiterates in a very comprehensive and compact way what I have experienced myself many times (on the giving as well as the receiving end).

I was made aware of this video by a post from Torsten Bittlingmaier. Thorsten, thanks a lot!

# The power of introverts | Susan Cain on TED Talks

A fascinating talk in my view and something every manager should see.

# ESP8266 Management Platform

There is an awful lot of people doing hobby projects with the ESP8266. I did not want to come up with the 47th incarnation of something, so the question came up, what an interesting project could look like. In the end I decided to develop a solution for managing a multitude of ESP8266-based devices. From a high-level perspective this will include the following components:

• CMDB: holds information about all devices
• Bootstrapper: prepares the raw module for all further work
• Security Manager
• Lifecycle Manager: Reference processes “from cradle to grave”

In my professional life I have been doing a lot of work on SDLC (Software Development Lifecycle) and configuration management, so the above project choice seemed a natural fit. It also happens that I am deeply interested in both topics and strongly think that poor application of them is often responsible for IT project failures.

# Lego Mindstorms: A Paper Cube

Here is yet another nice video of a Lego Mindstorms factory.

# Arduino: Ethernet with ENC28J60

The two main approaches for connecting an Arduino to an Ethernet network are the “normal” Ethernet shield or a module based on the ENC28J60 chip. While the Ethernet shield is easier to start with, it is comparatively expensive and also of little use for the smaller Arduino models (e.g. Arduino Nano or Pro Mini).

In contrast the ENC28J60 modules are cheap, small, and universally connectable. This comes, however, with the small downside that they are not supported by the Arduino IDE out-of-the-box. Of course, there is a myriad of web pages out there that deal with it in one aspect or another. There are two reasons why I add yet another:

• My ENC28J60 module (bought from AliExpress) is slightly different from the one usually seen. It does not need 3.3 volts but 5 volts, so the product description is wrong in that respect. Also, unlike all the other modules I have seen, it does not come with 10 but 12 connections.

• The usual recommendation for the library is EtherCard, but this did not work for me.

What finally worked for me was using the UIPEthernet library, which can also replace the standard Arduino Ethernet library. I connected the ENC28J60 module with a recently purchased Arduino Nano v3 clone using the following connections

Arduino Nano ENC28J60
SS (Pin 10) CS
MOSI (Pin 11) SI
MISO (Pin 12) SO
SCK (Pin 13) SCK
5V 5V
GND GND

The Arduino Nano pin layout can be found here. The ENC28J60 module module offers a few more connections, as can be seen on the photo below. However, I used only the “usual suspects”.

The next step is to put this thing to use. I am currently planning some kind of data logger for 433 MHz signals, that are typically used for entry-level remote control purposes.

# LaTeX: Hyphenation of \texttt

I have been using $\LaTeX$ since I was 17 and still love it. But one thing has been bugging me for a long time. For a while I had been manually tweaking documents to get proper linebreaks when using the \texttt{} macro. Now I had finally come to the point where this did not work any longer. A search gave me this snippet:

\renewcommand{\texttt}[1]{%
\begingroup
\ttfamily
\begingroup\lccode~=/\lowercase{\endgroup\def~}{/\discretionary{}{}{}}%
\begingroup\lccode~=[\lowercase{\endgroup\def~}{[\discretionary{}{}{}}%
\begingroup\lccode~=.\lowercase{\endgroup\def~}{.\discretionary{}{}{}}%
\catcode/=\active\catcode[=\active\catcode.=\active
\scantokens{#1\noexpand}%
\endgroup
}`

It works great!