Pictionary Against Humanity

We had some friends over for a barbecue and some games last night and invented something awesome*.

We’d recently bought our own set of Pictionary so were playing that with slightly modified rules whereby one person would be drawing and everyone else was guessing what it was (instead of playing in teams, mostly because we initially didn’t have a useful number of people for teams). Someone mentioned Cards Against Humanity, and Kristina and Millsy both simultaneously had the idea of PICTIONARY AGAINST HUMANITY. Instead of playing a black question card as in Cards Against Humanity and everyone putting down the white cards for answers, we’d have our own individual pile of white cards and would choose one and have to draw it and everyone else guessed the card we were drawing.

It’s seriously amazing. Our rules are as follows:

  • Each player gets a pile of 20-30 white cards and checks through them all to weed out the cards they couldn’t draw (the really weird abstract ones, etc.), then shuffles the pile face-down in front of them.
  • Going around the table in turns, each player takes a single white card from the top of their personal deck—without showing anyone—and attempts to draw it, and everyone else tries to guess the card (with the exact wording of that card). If the drawing player decides it’s too difficult to draw, they can put it in the discards pile and take another card from the top of their deck.
  • There’s a two-minute time limit for guesses, and if the time runs out without anyone guessing it, the same player picks up another card from their deck and attempts to draw it.
  • The person who correctly guesses the white card that was being drawn takes that card and puts it face-up in front of them, and at the end of the game whoever has the most face-up cards wins.

Same as in CaH, the “end of the game” is whenever you want it to be. The best tip is to make sure everyone has played enough CaH that they’re quite familiar with all the white cards. We have the base game plus the first through sixth expansions but the fifth and sixth ones were relatively recent additions and so there were a number of cards we’d either not seen before or hadn’t seen enough to remember. Those ones were just put straight into the discard pile.

It’s all the hilarity of Cards Against Humanity but with the added bonus of making really shitty stick figure drawings. Give it a try!

* Ok fine, I’m sure someone has thought of this before, but whatevs.

Seven years

The subject has come up on a few occasions recently of how long people have been married for (three years, two years, two months!), and my mind is blown anew each time when I point out that as of today we’ve been married for seven years!

I picture seven years in my head and I think, “Yeah, that’s a pretty good length of time”, but then I realise that’s how long we’ve been married and it just does not even remotely feel like it’s been that long. It’s witchcraft! Before we got married we always used to joke that we had time-warpy powers because we’d be doing something and a bunch of time would pass and it wouldn’t feel like it’d been several hours. The same powers have clearly continued into marriage!

<3

Hunter Valley farm stay

Kristina and I went up to the Hunter Valley for a long weekend last weekend. We stayed at a place called Hunter Hideaway Farm, and it was mostly nice but… a bit odd.

We arrived at about 2pm on Saturday, and there’s a long dirt road leading to the house that winds through fairly dense trees and bush. The lady that runs the place with her husband does ceramic sculptures and had put some of them on the trees and along the side of the dirt road as you start to get closer to the house. I understand the effect she was going for but it ended up just coming off as really creepy… a distinct “Someone who is insane and is going to kill you lives here” sort of vibe. It was even worse coming home after dinner when it was pitch black.

After that weirdness, we had just gotten inside when we heard a dog barking. We looked out the front door and there was a fairly sizeable dog barking loudly and in a very unfriendly manner at us. The husband rushed up and grabbed a hold of the dog’s collar, saying that the dog isn’t friendly and they weren’t expecting us yet (despite check-in being at 2, and why on earth would you have an unfriendly dog on a place that constantly has new people in it?!). After that he hauled the dog off into their house, but all of this was a slightly off-putting start to the vacation. The place had a kitchen in it, but it also had a sign saying that you needed to wash and clean and put away everything or there’d be a charge. I can understand not wanting people to leave the place as a complete mess but the sign was worded very passive-aggressively and really rubbed both of us the wrong way.

The view from the second story was pretty nice though.

View from the second floor

The farm itself is an actual working farm, they breed Angus cows and have some horses and a couple of ponies as well. One of the horses was very derpy, which was great, but the ponies were completely uninterested in people and apparently were also prone to biting.

AWW YEAH!

Ponies!

Neither of us drink wine, so we were mostly interested in the food of the area, but the first night’s dinner was underwhelming. It was at the Royal Oak Hotel and was recommended by the farm stay people but mine just wasn’t hugely flavourful and none of the flavours that were in Kristina’s dinner went together. The sheer distance that everything was from everything else was a bit annoying as well, not that that was entirely unexpected.

Saturday night’s weather was totally clear and a new moon as well, so the view of the stars was incredible; standing outside looking up at the Milky Way is always humbling.

The second day was spent doing some more wandering of the property in the morning (during which time that angry dog was out again and came running at us, but we just stood still and the wife came out and apologised and called him back, saying that he’s normally tied up—so maybe keep him tied up then), going out and buying lots of really nice cheese and chocolates, then relaxing and reading books in the afternoon. There was another, much friendlier, dog there that seems to have been a neighbour’s dog, and she was wandering around with us but mostly just running everywhere at full speed. There’s also an extremely picturesque lake that the cows enjoying sitting in and drinking from.

Running

Drinking

Sunset brought some really nice light and some great photos. The switch out of daylight savings was perfectly timed because we could admire the sunset and then go out to dinner, as opposed to all the gloriousness occurring while we were out.

Grasses

Horses running

Sunset

Sunday night’s dinner was amazing. We went to an Italian restaurant called Lillino’s, and it was one of those meals where just everything was perfect and it needed absolutely nothing—no extra salt, no extra parmesan, nothing. If you’re in the Hunter Valley you really need to go eat there.

It was definitely nice to get away from everything and spend some time relaxing and taking photos, but overall we’re not going to bother going back to the Hunter Valley, it’s not really our thing (and the farm stay was weird).

Home improvement: Curtain Edition

Lounge room with new curtains

We put up new curtains—and a new curtain rod—on the door leading out to the patio today, and it looks so much more cozy in here now (previously the window had on it the same horrible blue/grey straight-out-of-an-office vertical blinds that are still on the front window).

Kristina commented that it’s the first place she’s lived in that feels like an adult house, and it’s true… when renting you’re really just temporarily occupying someone else’s place for a period of time, whereas now we’re actually able to put our own mark on things and do what we want and it’s pretty great.

Stubbing services in other services with Sails.js

With all my Javascript learnings going on, I’ve also been learning about testing it. Most of my website consists of pulling in data from other places—Flickr, Tumblr, Last.fm, and my Ninja Block—and doing something with it, and when testing I don’t want to be making actual HTTP calls to each service (for one thing, Last.fm has a rate limit and it’s very easy to run into that when running a bunch of tests in quick succession which then causes your tests to all fail).

When someone looks at a page containing (say) my photos, the flow looks like this:

Request for page → PhotosController → PhotosService → jsonService → pull data from Flickr’s API

PhotosController is just a very thin wrapper that then talks to the PhotoService which is what calls jsonService to actually fetch the data from Flickr and then subsequently formats it all and sends it back to the controller, to go back to the browser. PhotosService is what needs the most tests due to it doing the most, but as mentioned above I don’t want it to actually make HTTP requests via jsonService. I read a bunch of stuff about mocks and stubs and a Javascript module called Sinon, such but didn’t find one single place that clearly explained how to get all this going when using Sails.js. I figured I’d write up what I did here, both for my future reference and for anyone else who runs into the same problem! This uses Mocha for running the tests and Chai for assertions, plus Sinon for stubbing.

Continue reading “Stubbing services in other services with Sails.js”

And now for something completely different: roast potatoes!

Growing up, we’d frequently go over to my grandma’s house on a Sunday evening for a full roast dinner. Roast beef, roast veggies, gravy, the works. Her roast potatoes were always amazing, they were wonderfully crispy on the outside and I never knew how she did it. Whatever my parents’ method is pales in comparison as they never get them at all crispy.

I made roast potatoes tonight following a recipe from Taste.com.au entitled The Best Roast Potatoes, and my god, they’re not joking. They’re almost identical to how my grandma’s used to come out! If you’re a fan of roast potatoes, you should definitely give that recipe a go.

  1. Preheat oven to 200°C or 180C fan-forced. Peel potatoes and cut into 5cm chunks. Place into a large saucepan. Cover with cold water.
  2. Bring to the boil over medium-high heat. Reduce heat to medium. Simmer for 5-10 minutes or until partially cooked (potatoes should be only just tender when pierced with a skewer).
  3. Drain potatoes well. Return to saucepan over low heat until any remaining water evaporates. Shake saucepan vigorously to rough up surface of potatoes (this will make them crunchy when roasted). Alternatively, scrape surfaces of potatoes with a fork to create a rough texture.
  4. Pour oil into a large roasting pan. Place roasting pan into oven for 5 minutes or until oil is hot. Working quickly, add potatoes to hot oil. Use tongs to turn potatoes to coat in oil, then return roasting pan to oven.
  5. Roast potatoes for 40 minutes. Turn and roast for a further 30 minutes or until golden and crisp. Season with salt. Serve immediately.

Learning new things: Javascript and Node.js

We’ve used Node.js (specifically with a framework called Sails.js) at work for a number of projects but I never really felt I properly understood one of Node’s fundamental concepts, that of the callback. It’s absolutely pervasive throughout Node and I was able to muddle on through at work without totally grasping it, but it wasn’t ideal.

Back at the end of January I decided to try rewriting my website using Node.js (it’s currently written in Perl using the Mojolicious framework) as a learning experience. It’s now almost two months later and my site is actually completely rewritten with Node/Sails (sans tests, which are currently being written; I know about test-driven development but I wasn’t about to start bashing my head against failing to understand how to get the tests to do what I wanted on top of learning a whole new language :P) with all the same functionality of my Perl one, and although I’m still far from an expert I actually feel like I have a proper handle on what’s going on.

The problem I found when trying to find examples was that they were all very contrived; I felt like they were missing fundamental underlying parts that apparently everybody else was able to understand but I couldn’t. For me, the “ah ha” moment was this post on Stack Overflow about using callbacks in your own functions. It didn’t assume anything or use an example of some module that apparently everyone is already familiar with (the most common one was fs.read() to read data from the filesystem). Once I had that straight, it was full steam ahead. It’s also significantly easier to deal with Javascript objects compared to Perl’s array/hash references.

My actual live website at virtualwolf.org is still on the old Perl version, but I don’t want to put the Node one up until I’ve actually got it properly covered with tests. Speaking of tests, I’m using a thing called Istanbul for code coverage, the reports it generates look like this, and it’s really satisfying having the numbers and bars go up as your coverage increases. It’s basically gamification of tests, really!

All in all, I’m pretty pleased!

Comforts

There’s certain things that are comforting by virtue of having done or seen them many times before and thus you know exactly what to expect.

Diablo III is like that for me, specifically the story mode. The original Diablo III had you go through the (very linear) story multiple times, once for each difficulty level, and by the time you hit the maximum level of 60 you’d generally done it at least three or four times. Combine that with the five different classes you can choose, and that’s a lot of repeats. When the Reaper of Souls expansion came out, Blizzard did away with that whole repeat-the-story-many-times in favour of Adventure Mode. It’s varied and certainly less repetitive than the old story mode, but I do enjoy going back every now and again and starting a new character to play through the story from the beginning. It’s definitely comfortable.

Zombies, Run!

A couple of years ago—a couple of months after we moved into our house, actually—I bought C25K, a couch-to-5K training app. It took me longer than I’d have liked, but I eventually got up to the full 5km, though only at 7km/h which for me is barely faster than brisk walking (a comfortable brisk walk for me is 6.5km/h; I know these speeds because I do my running on a treadmill at home). I stopped for a while and decided to start it again but from the beginning at a faster pace for the running sections, but fairly quickly lost interest.

Then the subject came up at work, and a colleague mentioned a thing called Zombies, Run! that combines an actual story with your running. It turned out they also made a couch-to-5K version and it’s really well done. There’s an audio story that plays, almost like an old radio drama, that puts you in the position of a new runner to an outpost that’s survived the zombie apocalypse and they need you to train up in order to be able to complete reconnaissance missions and to go get supplies from other bases and so on. It’s done in the form of periodic radio transmissions to you, but in between you can have your own music playing. The voice actors they’ve used are extremely good; there’s none of the cringe-worthy voice acting you’d often get in the video games of yesteryear. I’ll freely admit that I’ve been fairly slack, I only completed Week 4 yesterday despite having begun the program in May last year, but it is very neat and definitely a more interesting alternative to your bog-standard couch-to-5K program!