Gerrit Niezen

Maker of open-source software and hardware.

Feature image

Today we move into our new house. It's been quite a few months since pitting down an offer on the house, but it is finally ready.

The walls have been painted and new carpets fitted. Now we just need to get all our stuff loaded in a van and get it over there. Let's get started!

Feature image

I know, we're already in August and I'm only now getting to listing my favourite music and bands of the first half of 2018. So be it. For whatever reason, this has been my favourite track of 2018 so far:

The song itself is from 2009, but I only discovered this year. I'm not sure if Set Your Goals is still making music, as their last album is from 2011, but this is such a fun song!

The album I've been listening to the most in 2018 so far is South African punk rock band Fokofpolisiekar's 2017 album Selfmedikasie :

I was surprised to discover that Blink-182 released a deluxe edition of their 2016 album California in May 2017 with ten new songs:

If you know me, you'll know that Blink-182 is my all-time favourite band. So to randomly discover ten new songs was pretty sweet.

Feature image

I really like a good steak. To be honest, I probably eat a lot more meat than necessary, in terms of required nutrients. Given the massive environmental impact of meat production, I thought I'd give some vegetarian and vegan recipes a try and see if I can eat less meat.

I recently came across a vegan mac & cheese recipe. I find the cheese substitute, deactivated yeast, very intriguing. Is it possible that it could even remotely taste cheesy? Well, I managed to get hold off deactivated yeast at a health shop today, and I'm going to give it a try and report back here.

#Food

Feature image

I love coffee. As a graduate student working on my PhD thesis I remember coming across a quote that went something like this:

A programmer is a tool for converting coffee into code

At the time I very much felt like a tool for converting coffee into academic papers. We always had a thermos filled with coffee in our PhD office, and whoever emptied it would immediately make a fresh pot. To this day I still very much enjoy filter coffee, but have accumulated some other methods for making coffee too.

My introduction to the Aeropress was this video:

While I don't think that the coffee it makes is worthy of the term espresso, it does make a decent, very drinkable coffee with very little fuss. It does make quite a strong coffee, so I usually won't have more than one of these per day. Throughout the rest of the day, if I'm making coffee just for myself, I'll make a moka pot.

I've used my moka pot so many times that I had to have the rubber seal replaced. I first ordered the wrong size off eBay. I then resold the three seals separately on eBay, even making a very tiny profit. After replacing it with the right size seal, it's as good as new.

If I'm making coffee for more than one person, it doesn't get really any better than just using our regular old filter coffee machine. Why change something that works?

#Food

Feature image

Today I managed to get my new MTP module for Node.js working in Electron. There are still a couple of rough edges to smooth over, but I can retrieve a file from the device and then load and read it using Node's fs module:

var list = mtp.getFileListing();
console.log('Files:', list);
mtp.getFile(_.maxBy(list, 'id').id, 'test.ibf');
fs.readFile('test.ibf', (err, data) => {
  return cb(err, data);
});

In this specific instance, there are a bunch of files on the device, and I want to retrieve the one with the highest id, so I use _.maxBy() from lodash. mtp.getFile() gets the file from the device and saves it locally. I then use fs.readFile to read the file from the local disk.

Since I'm using version 3 of N-API and it's only available on Node v10 and higher, I needed to use the latest Electron v3.0.0-beta.4, which has Node v10.2.0 inside. Electron v2 has Node v8 inside, but for v8 N-API is still experimental, and also only supports N-API v1 and v2. Hopefully a stable version of Electron v3 will be released soon, so that I can get this code into the Tidepool Uploader.

#nodemtp

Feature image

A week ago I wrote about finding the exact design for a spindle in our staircase that I wanted to replace. Yesterday I found out that there are actually a number of spindles on our staircase that are mismatched. Over the years, as various spindles broke, they have been replaced with different designs. I could make out at least three different designs being used.

I'm still impressed that I managed to find the exact match to the spindle I'm replacing, maybe even more so now that I know others have given up and just used whatever looked vaguely similar. It's also interesting to note that we didn't even notice that they were mismatched until I started looking into it.

Although my attempt at installing skirting boards yesterday was a bit of a failure, I think I managed to do a reasonable job today at cutting the new spindle to the correct shape and size of the old one, and fitting it into place using glue and nails. Maybe I'll even replace the other mismatched ones one day, so that they all look the same again.

Feature image

Follow-up: the mitre box I 3D printed yesterday was a total disaster. It looked great coming off the 3D printer, but was a little too flexible due to its height. This morning, I clamped the skirting board to the mitre box after measuring, started sawing and about thirty seconds later pieces started breaking off. Three things I learned:

  • Don't use PLA for things that will be subject to outside forces – it's a bit too brittle and can snap off and break easily.
  • Don't print things so that the grain of the print is in the same direction as the force that will be applied.
  • Print things a bit thicker than what you think they need to be. They may take a bit longer to print, but at least you'll have a more useful print at the end.

Feature image

There is a bedroom wall in our new house that is missing some skirting boards. It seems reasonably simple enough to do-it-yourself, so I watched a 2-part series on YouTube explaining how to fit skirting boards. One tip they had in there was to use a mitre box to help make straight cuts at 45-degree angles in the wood.

Now, I've never used a mitre box before, so I went to my local B&Q to have a look at the options. Given that my skirting boards are more than 16 centimetres high, I don't think a suitable one exists – they are all too low. So I decided to check out Thingiverse to see if there is a parametric version that I can customize for my needs. Low and behold, there is!

It took me less than 5 minutes from downloading the file, editing the variables in OpenSCAD, rendering a new .STL file and generating g-code in Prusa Slic3r, to starting the print. The estimated print time was 12 hours, so it is quicker than ordering from Amazon, and definitely much cheaper than buying it somewhere. I should remember to post an update here if it works!

#Making

Feature image

In Part 3 I described how I started wrapping libmtp in a Node.js module. Today I discovered napi-macros, which makes writing N-API modules much easier. Recall the getFile function we had from last time:

napi_value getFile(napi_env env, napi_callback_info info) {
    napi_status status;

    size_t argc = 2;
    napi_value argv[2];
    status = napi_get_cb_info(env, info, &argc;, argv, NULL, NULL);
    if (status != napi_ok) {
        napi_throw_error(env, NULL, "Failed to parse arguments");
    }

    int id = 0;
    char path[20];
    napi_get_value_int32(env, argv[0], &id;);
    napi_get_value_string_utf8(env, argv[1], path, 20, NULL);

    int ret = LIBMTP_Get_File_To_File(device, id, path, NULL, NULL);

    napi_value retVal;
    status = napi_create_int32(env, ret, &retVal;);
    if (status != napi_ok) {
        napi_throw_error(env, NULL, "Unable to create return value");
    }

    return retVal;
}

I remember when I was writing that it felt very verbose. Now, using napi-macros this collapses into:

NAPI_METHOD(getFile) {
  NAPI_ARGV(2)
  NAPI_ARGV_INT32(id, 0)
  NAPI_ARGV_UTF8_MALLOC(path, 1)

  int ret = LIBMTP_Get_File_To_File(device, id, path, NULL, NULL);

  NAPI_RETURN_INT32(ret)
}

Wow, that's quite the difference – succinct and easier to read. I like it!

#nodemtp

Feature image

A quick round-up of three of my favourite makers on YouTube at the moment.

Colin Furze

Colin is arguably one of the most famous makers on YouTube, with over 6 million subscribers. He builds insanely cool (and dangerous) things. Here is Colin building a jet-powered scooter for his son:

Estefannie Explains it All

I've written about Estefannie before. She has some great electronics builds on her channel, and is not afraid to share her mistakes. Watch her awesome three-part series on building a Daft Punk helmet for Maker Faire here:

Wintergatan

Wintergatan is a Swedish instrumental band. Band member Martin Molin documents the entire process of building the second version of their famous marble machine in his weekly videos:

#Making

Enter your email to subscribe to updates.