Companies Deliver Crappy Software

Pieter Heerema is a skilled sailor currently taking part in the Vendee Globe, the world’s hardest race around the globe. It is a single-handed non-stop sailing race which lasts about 10 to 12 weeks.

Pieter had an unexpected severe problem with his auto pilot in the middle of the southern Indian ocean, 4500 kilometers away from the next harbor. The autopilot keeps the boat on track. Obviously, the autopilot is a very important piece because the skippers have to go to sleep during 10 weeks alone on a boat.

In a live interview in the Vendee Globe web TV live edition on the 15th of December 2016 he said:

“[…] …these companies that deliver this crap… […] …they just keep on pluging in new items and new software and new this and new that and it’s all nonsense. I mean, we don’t need all that stuff. We just need an straight up and down autopilot. It’s all this electronic designer geeks that really ruin a system. It’s so unstable! You don’t find all this crap on a fishing boat or a tug boat. It’s all way too advanced stuff that is designed behind a screen and a board and has nothing to do with seamanship or a seaworthiness.”

These are true words spoken by a man whose life depends on software. In my opinion this can be applied not just to companies writing software for boat electronics.

Here’s the original video. The interview starts at about 3:55.

Passing Arrays as Parameter in C

Short answer: you can’t but yes, you can!

This is an endlessly recurring question in many groups on the Internet. Today (2016/01/14) Google has 171 Million hits. This article answers the question and sheds some light on arrays in C. In the second part below I’ll discuss two-dimensional arrays as well.array_asm

IMO, arrays are the most misunderstood language construction of C, even more than pointers. Everybody knows that these mysterious pointers are somehow dangerous, thus people (beginners) tend to either avoid, or really try to understand them.

But arrays are something that every beginner quickly understands (in any language). But in C, arrays are actually hidden pointers which makes them even more dangerous than pointers.

Beginners may also read my articles about learning C part I, part II, and part III. Continue reading

Fractals And Intel x86_64 Assembler

fractasmSome time ago I wrote this article about using integer operations to calculate fractal images. Currently, I’m giving a course which prepares for malware analysis. Among other things we deal a lot with Intel assembler and how compilers create and optimize code.

The full code of everything discussed below (and also of the article referred to above) is found on Github at

One of the exercises was to write the integer version of the iteration function manually in assembler. Here is the original version in C: Continue reading

JPEG Support For Libcairo

cairo-bannerLibcairo supports several output file formats (PNG, PDF, SVG) and PNG as input format. But often it is necessary to read and write JPG files as well.

Libjpeg-turbo does all the JPEG stuff. All you have to do is to combine this with the Cairographics library. I implemented two functions in this small C source file. Most of the code is derived by the online code example of libjpeg and I modified it to fit into the Cairographics world.

Look at the comments in the source code for further information and have phun using it. Don’t hesitate to contact me!

-> Download source from Github <-

  • 2016/01/01: Code updated.
  • 2015/12/29: Code updated. On Hidden Service is now available on a Tor hidden service at http://7pd3i34noxnxolha.onion/.

Please be aware that this is experimental because it requires a lot of URL rewriting which is done by Apache’s mod_proxy, mod_proxy_http, and mod_proxy_html. I debugged it with Firebug and tried to fix all internal links. Please note that external links to other pages are not rewritten.

The main purpose is to be able to access completely surveillance-free (and for me to gain experience in proxying WordPress and mod_proxy_html 😉 )

The Administrator’s TLS Certificate Hell

640_data-webNowadays, a responsible administrator should never run any service without TLS anymore. Unfortunately, this makes life even more difficult for several reasons. This article discusses some problems associated to certificates, specifically in respect to web applications which interactively connect to secondary services.

On one hand TLS configuration requires a lot of knowledge to create a secure configuration. Pages such as give a good support. Continue reading

Calculating Control Points For Bsplines

bspline_0This article explains how to calculate the control points for B-Splines. The basic idea is that we want to interpolate a smooth curve into a set of points. B-Splines are a sequence of Bezier curves which solve that problem. But each Bezier curve is defined by four points: the start and end point and two control points which define the final appearance of a curve segment.

I wrote a sample program which can be downloaded directly here. If you quickly want to use it, simply look at the code and its comments. If your are interested in the background go ahead and read this article 🙂 Continue reading