From a non-theoretical engineer perspective, a monad is a kind of container that you can apply functions to to get a new monad. In particular, you need a way to put something into your monad and a way to apply changes to it. These are called return and bind. There is also a third operation, map, which is a combination of the two. Note that monads are allowed to be empty, which will make bind and map not do anything; and they can also contain more than one thing (in which case bind and map will call the function you give them more than once and merge the results).

Read more

There’s an open source project you want to use, but it’s missing a feature you need, or has a bug you need fixed. You can implement it yourself, but you want to make sure the patch will be accepted by the project’s maintainers. This guide will explain how best to minimize wasted effort and improve the chances of your code being accepted.

Read more

I’ve been working remotely since before it was cool, and one thing I wish more people paid attention to is meeting equipment. It’s annoyingly common to join a remote meeting with someone on flaky WiFi, with a barely-understandable microphone, and a camera where they show up as a shadowy blob.

All of this is fixable, and if you work remotely it’s worth spending a little bit of money to do it. Remote meetings where you can see and (more importantly) hear each other clearly are much nicer, and lead to more natural and collaborative conversations.

A home office desk with two monitors displaying nature scenes, a white circular key light and black webcam mounted on top of the left monitor, a Sennheiser gaming headset with boom microphone, split ergonomic keyboard, and blue-gray hexagonal acoustic panels on the wall behind the desk

Read more

When you’re documenting a project so other people can use it, whether it’s a library or web service, one important thing to do is to give people good examples to work with. Not only does this save people time trying to cobble together their first working program, but it’s also a good way to show how the library is meant to be used, instead of just what’s technically possible.

Read more

Most web browsers only support a few ancient image formats (mainly PNG, JPEG and GIF), but video formats have improved significantly since those formats were defined. Google is attempting to fix this with their WebP image format, based on VP8. Unfortunately, this only works with Google Chrome and Opera. Since what we want is to encode an image using the advancements in VP8 or h.264, I thought it would be interesting to try encoding single-frame videos and using them as images.

Read more