Issue #36

Ralph Northman has released the largest triangle three buckets (LTTB) algorithm package and demo. With no description of what this is (I'm sure those who need it already know what it is), I was curious as to where this algorithm is used and why I might need that (of course I do).

Supposed you have lots of time-series data with thousands, or tens of thousands of points. And you need to draw this graph on a web page. What would you do? A naive approach would be to try and feed all of that data to your plotting library and hope that user's machine is powerful enough to render it. Another approach could be to plot the data in chunks, say in minute intervals, and let the user scroll left and right to see more data. But that would mean they won't be able to see the whole picture. Or we could downsample the data, which means we remove "non-essential" data points while retaining the curve similarity. There are various ways to achieve that, and LTTB algorithm described in Sveinn Steinarsson's thesis is one of those. Ralph's demo is great at showing what downsampling means:

A while ago Robin Heggelund Hansen announced the release of his game he uses for teaching Elm. It's called Elm Warrior, and now Robin has written a nice guide on how to start sharpening your Elm skills in order to pass different levels.

The first time I found out about destructuring was via famous Python value swap trick: a, b = b, a. Then was JavaScript, followed by Elixir's powerful pattern matching that was way above what I knew before. And then there was Elm's. Yang Wei has shared a gist where he lists examples from Elm.

Last week as I was writing a special issue on testing, Samuel did a two-part series (one, two) on test-driven implementation of K-D tree. Not only can you see how to do test-drive development in Elm, but also how helpful the compiler is. Every time the test fails, it's easy to learn from the output what the mistake is, why it happened, and where.

Videos are quite short and easy to follow. And one particular thing I like about them (or any stream in that regard), is you can hear person's thoughts, mistakes they make. And it shows that everyone's a human.

It seems like there is not a single week without Richard participating in some conference and talking about programming. This guy is a clandestine of knowledge and interesting talks. This time he gave a brief introduction to and comparison of Rust and Elm. If you're already familiar with these languages (and I assume you are, at least in regards to Elm), it might be a bit boring for you because the presentation is targeted at those who haven't made up their mind yet about checking out Elm or Rust. He did a good job on selling Rust to me. Now, if only I could find the 25th hour in the day.

Next-generation programming

Quote of the week

This planet has—or rather had—a problem, which was this: most of the  people living on it were unhappy for pretty much all of the time.  Many solutions were suggested for this problem, but most of these were  largely concerned with the movement of small green pieces of paper,  which was odd because on the whole it wasn't the small green pieces of  paper that were unhappy.

Every chapter, almost every paragraph from The Hitchhiker's Guide to The Galaxy is worth quoting.

Have a great week!

Show Comments