Skip to content

Design Pattern Flash Cards

Alex Bowe
Alex Bowe
1 min read

Table of Contents

flashcards
Last year I studied a subject which required me to memorise design patterns. I tried online flash card web sites, but I was irritated that I didn’t own the data I put up (they had no export option). So I wrote a something in Python to generate flash cards for me using LaTeX and the Cheetah templating library. The repository is hosted here, although it could do with a refactor.

If you don’t want to generate your own, you can download the pre-generated design pattern intent flash cards here which contains the 23 original design patterns from the Gang Of Four.

To generate your own flash cards, create an input text file with this structure:

Front text (such as pattern name):
Definition line 1.
Definition line 2.

For example:

Abstract Factory:
Provides an interface for creating families of related or
dependent objects without specifying their concrete classes.

Currently the front text is single-line only. The regex could be updated of course (if you do, feel free to send a pull request!).

To compile this:

./cardgen.py -i inputfile -o outputfile
pdflatex outputfile

Then just print it out on a double side printer (or glue the two sheets together). I carried these around with me all the time during the lead-up to the exam, and I was scay-fast when it came to recalling which design pattern did what. Just flick through them (shuffle first) in forward or reverse order when you are on the train next :)

design patternseducationlearningtools

Alex Bowe Twitter

Alex has a PhD in succinct data structures for bioinformatics, and currently works on self-driving cars. He's also interested in cryptocurrency, business, fashion, photography, teaching, and writing.


Related Posts

Advice to CS Undergrads

Since I’m starting my PhD this year, I have been reflecting on how I would be different if I went back in time and started my degree all over again. I am also continuing tutoring, in my 4th year, and I have been occasionally approached by students and

I Don't Know What the F*** I'm Doing

This is a nice article I read back in February which discusses why it’s a good thing when you realize how very little you know. I feel just like that right now, and I’m enjoying it because there is so much territory left to explore…