How I Work: Tackling Advent of Code, Day 21

For the past three years, the amazing Eric Wastl has been running the Advent of Code - programming puzzles in the format of an advent calendar, a new puzzle every day for the month of December. They’re mindbending but great fun!

I wondered if people might be curious how I attack these kinds of puzzles - and by the reaction I got on Twitter, I guess the answer is yes! So here goes - this is day 21, the most recent puzzle I’ve completed in the 2017 edition.

Read More…

The Noobs Guide to Programming a Vortex Core

Recently I’ve formed a bit of an unhealthy obsession with mechanical keyboards, and one of the first boards I’ve picked up is the infamous Vortex Core.

Read More…

Rails 4 in Action... now for Rails 5! Chapter 2

Continuing on from the chapter 1 runthrough of Rails 4 in Action updated for Rails 5, today I’ll cover the testing frameworks that we originally covered in chapter 2. Testing will once again save our bacon!

Read More…

Rails 4 in Action... now for Rails 5! Chapter 1

Lots of people have asked me, since the release of Rails 5, a couple of things:

1. Will there ever be a Rails 5 in Action? (if there is, I won’t be writing it)

and, more importantly:

2. Can Rails 4 in Action be read and used with Rails 5?

So far my response has been “it likely can, with a few gem version bumps” but I haven’t known the answer for sure. Time to find out, chapter by chapter, line of code by line of code! Let’s dig in.

Read More…

When Rubygems gem versioning goes bad

Rubygems, the package manager for Ruby, has long had this neat little functionality to let you specify the version of a gem you want to use, when running a gem-related command. If you have two versions of Rails installed, say versions 4.2.8 and 5.0.2, you can specify which to use by prefixing the command with a specially-formatted version number.

Read More…

The awesomeness of sass-autocompile

Sometimes there’s a real urge to overcomplicate tech situations. When looking at converting my blog from Jekyll to Hugo (which I’ll write a whole separate post about, soon!), one of the big listed weaknesses of Hugo is no concept of an asset pipeline - nothing to preprocess and compile stylesheets, JavaScript files, etc.

Read More…

TIL: Ecto reading after writes

Today I learned that by default, Ecto doesn’t read data back from the database, after writing new or updated data.

The scenario: A trigger in the database, that calculates the new value of a field before insert or update. The person who presented this problem was quite convinced that the trigger wasn’t running in their tests, based on code like the following:

Read More…

A Whirlwind Guide to Esperanto

So after I wrote my last post, I heard from several people that they’d vaguely heard of this Esperanto thing, didn’t know anything about it, could I please tell them a little more? Absolutely! Enjoy!

Note: Some of this may be somewhat factually inaccurate, as I am only a komencanto (beginner) and working off about six months casual learning.

Read More…

Gerda Malaperis! / Entering Esperantujo

(I’m undecided about writing this post. I’m not sure if it’s going to get laughed at, totally ridiculed, either, both, or something else entirely. Here goes!)

Some people know about my interest in foreign languages. They might even know that I’ve been following and learning Esperanto since it first appeared on Duolingo. Today I’m taking the next step in my learning :)

Read More…

The 30 Day Writing Challenge

People who know me, know that I’m an avid reader. I spend hours every day soaking up news feeds, novels, and all kind of text.

But I don’t do a lot of writing. Sure, I’ve co-written a book, but that was so last year. I still have a lot of ideas buzzing around in my head, but I never seem to find the time to put pen to paper (or fingers to keyboard) and organize my thoughts into coherent blog posts, short stories, or instructional topics and guides.

Read More…