Rent-a-founder

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

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