Nichts darf, aber jede Menge kann schief gehen.
Read more...IATA SSIM Flight Schedule Parser
This post likely doesn’t affect most readers of this blog. But since I also write to document my work, this announcement will go here.
I implemented a new commercial software tool which can read IATA SSIM Flight Schedule files (Chapter 7). SSIM files follow a sophisticated fixed-width format and are used to describe an airline’s flight schedule over a specific period of time (usually 365 days into the future). These files are used to exchange schedule information among a large number of airline systems, some of which include:
Read more...How to Count the Characters of a String (Unicode)
You would think that maintaining a mildly popular package such as tview
would consist mostly of adding cool new features, maybe with the odd bugfixing sprinkled in. You would be wrong. If I had to guess, I would say 70% of my work on it was dedicated to making Unicode characters work. It’s all very simple when you just have to support the English language. But with the first requests for Chinese, Thai, Arabic, or emoji support, I realized I was in for a lot of trouble. (And I dread the day when users will ask for Hebrew which is written from right to left.)
Making a Christmas Pyramid
Every now and then, I work on a project that doesn’t involve any electronics. A recent trip to the German Ore Mountains (“Erzgebirge”) inspired me to make a Christmas pyramid myself:
Golang: Append Modifies Underlying Slices
Even after four years of programming in Go, there are still things I didn’t know about the language itself. The following example illustrates behaviour that surprised me. My (false) assumptions actually led to a bug which was very difficult to find as it happened only rarely and repeated reviews of the code didn’t turn up anything unusual. Here it is:
Read more...My Go Package Reaches 1.4K Stars on GitHub
Terminal-Based User Interfaces in Go
My Gopher Academy Blog Post on Web Sessions and User Workflows
I’ve released two new Golang packages on GitHub: github.com/rivo/sessions and github.com/rivo/users. They will help you write web apps in Golang.
Read more...Graceful Server Stop and Restart in Go
Laser-Cutting Custom Fidget Spinners
The iPhone 7 Headphone Jack
Textured Gradients in Pure CSS
We’re going to create a background like this in pure CSS:
Maintaining a Secure Server
Having to run your own server, whether it’s in the cloud or rented as a physical machine in a data center, is inevitable once you try to do more than just host a few HTML files. It seems easy at first: Install Linux and the LAMP stack and you’re ready to go. But even with the best intentions, chances are you will quickly find that your server has been hacked and is now serving porn to the world and emailing viruses to unsuspecting internet users.
Read more...Generating Colour Palettes for Charts
I recently had to find a way to generate colours for charts. Specifically, the series in a chart — typically visualized using bars, lines, dots, or areas — are often distinguished using different colours which, for the most part, should be generated and assigned automatically. And while d3.js (on which the chart code was based) offers some pre-defined colour schemes which consequently happen to be used in most d3.js-based projects, they were quite limited for what I needed.
Read more...Visualizing Data Using d3.js (With Examples)
The web browser has become our preferred user interface of choice. But even in 2015, I bump into fellow developers who view the web as nothing more than a bunch of companies’ online presences. Surely, a native Windows client or a Java SWT app must be more powerful than your average web browser. I would have agreed in the days of Internet Explorer 6 (which, by the way, already supported AJAX requests) but luckily, we are long past IE6 and there are now so many web technologies available to us it’s even hard to keep up.
Read more...