Simple dual-booting

gone, but not forgotten

As a child, I tried to dual boot Windows and Ubuntu. After a couple days, and a couple internet guides, everything seemed to be working. A week later Windows would no longer boot. Why? I don’t know. Extensive troubleshooting didn’t help and eventually the data was pulled and the disk nuked. However, I still wanted to boot Windows and Ubuntu. A software solution had failed, perhaps a hardware fix would be simpler? [Read More]

Building a Hackintosh with OpenCore v0.5.5

just buy an iMac

I’m a fan of MacOS; it looks nice and is generally easy to use. However, I’m not a fan of Apple’s desktop hardware. None of Apple’s desktop lineup, except for the Mac Pro perhaps, have GPUs suitable for gaming. Mac Mini: only has an iGPU iMac: rx580 (old) Mac Pro: too expensive Apple suggests using an external GPU to boost graphics performance, but this requires buying a ~$300 GPU enclosure and suffering a 5% to 30% performance penalty. [Read More]

Deep state changes with Immer

(no not that kind of deep state)

One of the tedious aspects of writing reducers is handling changes to deeply nested objects. Deeply nested state is somewhat frowned upon, but I do a lot of work with Mapbox and managing MapStyle (an object with lots of map configuration objects inside it) through a reducer helps a lot with integrating a fairly imperative library (mapbox-gl-js) into a React app. An example To allow a user to click the map and see a point appear, the click event must create a GeoJSON Point feature: [Read More]

Redux is React's version of global variables?

portals through the component hierarchy

I’ve been digging into a React/Redux project at work recently. The React parts were easy to pickup, but the Redux part was a bit mysterious at first. What is this folder of exported strings called “actionTypes”? What are all these “reducers” and why do they not seem to do anything? What is mapStateToProps and mapDispatchToProps doing at the bottom of all these components? Two things helped me understand: [Read More]

Python dependency resolution

gone wrong

Today pipenv install broke on the project I was working on. It worked yesterday and the day before that, but today it failed. At first, I thought my Python or pipenv installation was broken. The project’s integration tests ran in a Docker container, so I docker run -it <image> bash’d into a container and tried pipenv install. The result was the same—“dependencies could not be resolved”. This was a surprise…how could a Dockerized application suddenly stop working? [Read More]

Spotify doesn't have a playlist importer

so I made my own

The podcast “Uhh Yeah Dude” has interesting musical intros and outros, I wanted to have all these songs in a Spotify playlist. A fan of the show had maintained such a playlist until 2016, but more recent picks were missing. What to do? Getting and transforming the data The first step was scraping the UYD website to build a list of episodes–not too difficult! The code for this is kind of boring, but it’s on GitHub if you’re interested. [Read More]

Writing Dockerfiles

Trial and error--but faster!

Why use Docker? At my last job, I developed on Windows and deployed on Linux. There were multiple production VMs running different operating systems with different versions. This made deployment annoying and tedious as certain apps would work on some machines but not others. Additionally, there was a large application that would not install on fresh machines. Docker fixes a lot of these issues. To deploy a dockerized application, just copy it to the machine and run something like docker-compose up. [Read More]

Converting scanned images into a single PDF

the government doesn't make it easy to submit forms

I had to submit a form to a government agency today and they demanded PDF format. The document had to be signed by hand, so I couldn’t just fill the form and resubmit. I had to print the form, fill it out, sign, and then re-scan each page. Now what? I’ve got a directory of images, how do I convert them to PDF? Adobe’s dark pattern Adobe Reader looks like it has a built-in tool for converting different formats to PDF. [Read More]

Takashi NYC

Yakiniku FTW

Three days in New York City and the highlight was definitely Takashi, a Japanese restaurant specializing in beef. “Our menu is beef, all beef and nothing but beef!” Meat is served raw and cut into bite-sized chunks; each table has a personal grill, so meat can be cooked to your favourite degree of doneness. The greatest advantage of this style of restaurant is that meat always tastes hot and fresh—much nicer than eating the last bite of a lukewarm steak! [Read More]

Hello world

If I make it easy enough, maybe I'll actually write?

I’ve finally had time to setup a blog. Past attempts were foiled by perfectionism, so this time I focused on making writing and publishing as painless as possible. This blog is a static site generated by Hugo, it uses the Beautiful Hugo theme. Whenever a new commit is pushed to the repo, Netlify automatically rebuilds and redeploys the site. Forestry.io serves as a nice front-end for writing new posts (changes are committed behind the scenes). [Read More]