April 17, 2017

Less intrusive color theme

The purpose of syntax highlighting is to draw attention to certain parts of the code: it helps us to identify when a comment or a string literal is not properly terminated, when a keyword is misspelled, or when an escape sequence is invalid. Lately, I find that editors colorize too many elements and use too many colors. (This is a recently-acquired annoyance; maybe age and worse eyesight have something to do with it? ... Read more

April 13, 2017

Functional Queues

First-in first-out queues are a data structure used in many algorithms (including my favorite one—breadth-first search) and as a building block for complex functionality, the operations on queues should be as efficient as possible. This can be a bit of a challenge in a functional language: the bread-and-butter data structure of functional programming, the list, supports fast insertion and deletion at the head—ideal for enqueuing or dequeuing respectively—but operations at the other end of the list take O(n) time in the length of the list. ... Read more

April 7, 2017

Being a T.A.

Being a teaching assistant is a job that most graduate students are asked—pressured even—to do. During my time at McGill, I was a T.A. three times: twice for the introduction to compiler design class (taught by my adviser), and once for a functional programming class. It was difficult, time-consuming, and not well paid, yet being a T.A. was the best job I’ve ever had. I’ve had many bad T.A.’s when I was an undergrad; absent from the message boards, with a poor understanding of the subject, and confusing in their explanations, they make hard classes more difficult and bad classes unbearable. ... Read more

March 27, 2017

Journalistic Writing Exercises 1

I recently purchased Journalistic Writing by Robert Knight. I’m not a journalist, but I’m sure some of his lessons transfer to other areas of non-fiction writing. At the end of the first chapter, the author presents the reader with a number of sentences that contain unneeded thats, there is’s, there are’s, etc.; the goal of the exercise is to rewrite the sentences without them. Here is my attempt. There were half a dozen vintage airplanes standing in the foreground of the museum. ... Read more

March 18, 2017

Libre de Penser

En août dernier, j’ai utilisé mon premier chèque de paie pour m’offrir un abonnement au journal Le Devoir. Ça fait maintenant 6 mois que je le lis plus-ou-moins quotidiennement (ces jours-ci, je passe plus de temps à lire sur la situation politique aux États-Unis) et c’est un 17$ par mois très bien investi selon moi: je suis mieux informé qu’avant et je peux lire sur mon téléphone, dans mon navigateur web, et même avec un lecteur PDF. ... Read more

March 11, 2017

Understanding Recursion

Recursion is my absolute favorite programming technique. It’s powerful, it’s elegant, and for many problems it yields simple and beautiful solutions. Unfortunately, recursion has a terrible reputation: new programmers find it hard and unnatural and some programmers with years of experience avoid it because of the trauma it incurred when they learned it. There are valid, practical reasons to not use recursion; fear and disdain are not good reasons. ... Read more

March 5, 2017

How 'Learning Red Hat Linux' Changed My Life

Can you point to a book that changed your outlook on life and had a profound impact on the kind of person you are? For me, that book would be Learning Red Hat Linux. In 1997, I was 14 and I decided that I wanted to be hacker. In order to look the part, I wanted to install Linux on my computer. This was early in Linux’s life and the distributions of the time didn’t have easy-to-use installers—we had to create root and boot floppies with a tool called rawrite. ... Read more

February 26, 2017

Le Processus de Sélection d'un Jury

En septembre dernier, j’ai reçu une lettre qui me convoquait à la cours de Montréal pour servir comme candidat-juré. Je ne savais pas du tout comment le processus fonctionnait et quand je suis arrivé au Palais de Justice, j’ai réalisé que la majorité des gens présents étaient également ignorants du processus. J’ai pris des notes durant mes deux journées—que deux, car je n’ai pas été retenu comme juré—que je résume ici et qui, j’espère, vous aideront à mieux comprendre cet aspect de notre système judiciaire. ... Read more

February 22, 2017

A month of literate programming

During the month of December, I completed all the Advent of Code problems using a programming technique called Literate Programming (LP). My programs look like LaTeX documents, they mostly contain text that explains the task at hand and details my solution, and they are interspersed with Rust code that gradually builds the solution. The build.sh script transforms the LaTeX-like files into PDFs and executables. The Teacher Mindset We don’t typically write programs with readers in mind. ... Read more

February 18, 2017

My Impressions of Final Fantasy IV Advance

Final Fantasy IV is a fantastic game, and Final Fantasy IV Advance is a fine port plagued by an unforgivable flaw. Final Fantasy IV was released in North America as Final Fantasy II; the US port was modified to be an easier game. Enemies had fewer hit points and the characters had fewer abilities, like Cecil who didn’t have his Darkness attack. Final Fantasy IV Advance is a port to the GameBoy Advance of Final Fantasy IV as it was in Japan. ... Read more