George V. Reilly

HouseCanary PyCon2016 Progamming Challenge

Yesterday, while at PyCon, I whipped up a quick, brute-force answer to the House­Ca­nary PyCon2016 Progamming Challenge in a few minutes. That was sufficient to pass the first two test cases and win me a very pretty House­Ca­nary t-shirt.

The answer ran in O(n⁴) time, so it failed miserably on the larger problem sets in the third and fourth cases. I mulled it over and came up with an O(n²) solution that runs in reasonable time on the larger problem sets. On the second test case, input1.txt, runtime drops from 5.2s to 0.2s.

I submitted my new answer. I’ll learn on Monday if I won the speed challenge.

Review: Jimmy the Kid (audiobook)

Title: Jimmy the Kid
Author: Donald E. Westlake
Narrator: Brian Holsopple
Rating: ★ ★ ★ ★ ½
Publisher: Highbridge
Copyright: 1974
Keywords: crime, humor
Listening period: 27–31 May, 2016

I rarely listen to audiobooks, except on long driving trips. We listened to another Dortmunder book on our drive down to and back from Portland for PyCon.

Dortmunder’s jinxed associate Andy Kelp spends a few days in jail and reads a book called Child Heist by Richard Stark, which Kelp believes to be the blueprint for a perfect crime. Dortmunder, always wary of Kelp’s schemes, doesn’t appreciate having a plan brought to him, since he’s always been the planner of the crew. Some of the crew aren’t eager continue.

Review: A Colder Kind of Death

Title: A Colder Kind of Death
Author: Gail Bowen
Rating: ★ ★ ★ ★ ½
Publisher: McClelland & Stewart
Copyright: 1994
Pages: 218
Keywords: mystery
Reading period: 27–28 May, 2016

Joanna Kilbourn’s husband, Ian, was sense­less­ly murdered along the Trans-Canada Highway six years ago. Now the killer has been murdered in prison. And his vile girlfriend, who was acquitted of Ian’s murder, is making threats. Then she’s found dead, strangled by Joanna’s scarf, and Joanna is the prime suspect. Joanna, who is a quietly competent mother, professor, and political com­men­ta­tor, starts digging and she finds things that alarm her about Ian’s past, things that she had missed in her fog of grief after his murder.

This continue.

FlyingCloud Documentation Updates

I made a number of updates to the Fly­ing­Cloud Doc­u­men­ta­tion tonight. I hope to give a lightning talk about Fly­ing­Cloud at PyCon on Monday evening or Tuesday morning, and I put together some slides for that too.

Powell's City of Books

We drove down to Portland, Oregon yesterday for PyCon. No trip to Portland would be complete without a trip to Powell’s bookstore. I don’t have much time this trip, but we did manage to spend an hour there last night, before they closed at 11pm. There’s nothing like it in Seattle. I like Elliott Bay Bookstore but it’s a pale shadow of Powell’s. A long time ago, someone described Powell’s to me as “the best bookstore in Seat­tle”—mean­ing that Seat­tleites who want to visit a world-class bookstore have to visit Portland.

I got out lightly. I spent only $85.

Review: Mars Crossing

Title: Mars Crossing
Author: Geoffrey A. Landis
Rating: ★ ★ ★ ½
Publisher: Tor
Copyright: 2000
Pages: 433
Keywords: hard sf
Reading period: 22–27 May, 2016

Five astronauts are stranded on Mars. Their only hope is to find the vehicle of an earlier crew who died—but that ship is at the north pole and they’re south of the equator. And so they trek north across Mars. They know that the other ship can’t hold them all, and some of them start dying along the way.

Landis is a NASA scientist who writes “hard science fiction”; i.e., SF that’s solidly based in science, some of which is known for plodding writing and dull characters. Landis’s characters have continue.

Shrinking PDF File Size

Our poster designer sent me a PDF of this year’s Bloomsday poster. I thought the file was too large at 7.2MB and I wanted to reduce the file size without sig­nif­i­cant loss of image quality. I was unable to achieve this in Preview or Acrobat Reader, but Ghost­script did the trick, thanks to an answer on AskUbuntu:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
    -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH \
    -sOutputFile=output.pdf input.pdf

The results speak for themselves.

Crop of the Original PDF, size 7.2MB.

Crop of -dPDF­SET­TINGS=/screen. PDF size: 78KB

Crop of -dPDF­SET­TINGS=/ebook. PDF size: 234KB

Crop of -dPDF­SET­TINGS=/prepress. PDF size: 1.75MB

Seattle Power Outage

The power suddenly went out at work today about 11:30am. There was a technician who was running wires, standing on a ladder next to us, who disclaimed all re­spon­si­bil­i­ty. Since the wires were Ethernet cables, we believed him. It quickly became apparent that it was not just our office or even our building, but many blocks of downtown Seattle that had lost power. One person was trapped in the elevator in our old Pioneer Square building. Within half an hour, everyone had left the office. Although most of us have laptops, no elec­tric­i­ty meant no Internet. I drifted up to Capitol Hill and spent the afternoon working with two colleagues in a continue.

Deploying a Docker Container on AWS

I spent a couple of frus­trat­ing hours this evening trying to figure out an easy way to deploy a Docker container on AWS. I tried out the EC2 Container Service and got lost in a sea of Clusters, Tasks, and Services. I couldn’t connect to the EC2 instance where my container supposedly lived.

I tried Elastic Beanstalk and gave up in ex­as­per­a­tion. When you create a new Docker en­vi­ron­ment, there’s no way to pull an existing image from an external repo that I could see. We have some tools for deploying a Docker image to Elastic Beanstalk, but they were so cryptic that I didn’t want to pursue that.

Eventually I went old continue.

Toastmasters' Evaluations

Toast­mas­ters teaches three skillsets. By far the best known is public speaking, but evaluation and leadership are also valuable. Learning to evaluate a speech teaches you to listen carefully and to give useful feedback. The Toast­mas­ters’ Sandwich is the best-known approach: point out several things the speaker did well, suggest some areas of im­prove­ment, and conclude with more praise.

The evaluator benefits too from the evaluation, as they hone their listening and critical skills and as they learn to give helpful feedback. The audience also benefits, as they hear both the speech and a measured response to the speech.

Outside of Toast­mas­ters, feedback is often negative and critical ("Here’s how you’re fucking up"), which leads to de­mo­ti­va­tion ("I’m just continue.

Previous » « Next