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.
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.
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!
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.
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.
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:
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.
(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 :)
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.
- Page 1 of 2