Graduate Blog

Rantings of a semi-conscious graduate student -- take with a grain of salt.

The Secret Santa App

Posted by chathaway on Nov. 25, 2016, 3:39 p.m.

This is a fun one; my stepmother walks in and says "I have a great idea! Why don't you make a little app that randomly assigns people for secret santa!"

I think she was just trying to be nice; include my hobby in the a family tradition. She thought it sounded easy enough, and it shouldn't take me more than 5 minutes. But let's take a minute, and explore another case of "That should be easy, right?"

The Problem

For this who don't know, Secret Santa is basically a game in which each person is assigned ...


The RTS Struggle

Posted by chathaway on Nov. 1, 2016, 1:20 a.m.

During all my free time, which as a graduate student, which I totally have a ton of (no, sarcasm, of course), I've been searching for a good RTS game to play. If you know if one, please leave it in the comments! This blog post documents my attempts at playing various games; I will record what impressions of the game were, how it compared to the "gold standard", and whether or not I returned the game before Steam's grace period was up.

Note that I try these games for a maximum of 2 hours, then make a snap ...


Anonymous Fibonacci in Haskell

Posted by chathaway on Sept. 14, 2016, 3:55 p.m.

We all know how to write the Fibonacci function; but can we do it using only anonymous functions? It's easy enough in something like Javascript; we make the Fibonacci function take in the function as an argument, then our normal variables. i.e.

(function (x, n) { return x(x, 1, 0, n) }) (function(m, a, b, n) {if (n == 0) { return a } else { return m(m, a+b, a, n-1) }}, 5)

Or, if you want to use ES6:

((x, n) => { return x(x, 1, 0, n) }) ((m, a, b, n) => {return n == 0 ? a : m(m, a ...


Some Unwritten Django Rules

Posted by chathaway on Sept. 7, 2016, 8:27 p.m.

These are just patterns which I've observed while working on various Django projects; they are not all-inclusive, and not actually rules, but all the same.

Regarding Templates

Your base template should define a 'content' block; this is where most of the page content goes. It should also have 'breadcrumbs', 'title', 'extrajs', and 'extrastyle' blocks. The last of those goes in the section of the page, and is where apps can put references to stylesheets.

When working on an app, make sure templates and static files are placed in directories named after the app. For example, django_teams would store it ...


Good Games need LAN

Posted by chathaway on Aug. 22, 2016, 1:39 p.m.

I've been known to dabble in video games every now and then; I play all types of games, from turn-based strategy games (like Chess) to first-person shooters (like Paintball), role-playing games and turret defense games. One of the most important part of gaming, to me, is the social element. Playing these games with my friends, have a good game that makes everyone shout in rage when someone wins by hitting an air transport with a tactical missile (for those of you who play Forged Alliance, you know that that is nigh impossible).

But alas, games in recent years have ...


A Brief Discourse on Software Complexity Metrics

Posted by chathaway on Aug. 16, 2016, 2:06 p.m.

Software Complexity is the measure of how difficult software is to conceptualize, comprehend, and through extension, create and maintain. Despite having the word "complexity" in the title, this domain of computer science has nothing to do with time or space complexity that people often think of (Big-O notation, omega time, etc.). More interestingly, there doesn't seem to be any connection between high time complexity and higher software complexity.

From the time of the first computer programs, written in assembly language or hard-coded into the machine, measuring the size of these programs has been a subject of debate. The first ...


On The Topic of Multiplication Tables

Posted by chathaway on Aug. 15, 2016, 1:48 p.m.

During a routine evening visit with my Mom last week, the topic of multiplications tables was broached. She expressed some fear that upcoming generations, now surrounded by these devices that took on the simple mathematics operations that used to by done by hand or in the heads of children, will not learn mathematics the same way she had. Whether this is true or false is not something I am qualified to answer; it has been years since I was in grade school. Instead, the question of whether or not we should be, or ever should have been, teaching math in ...


How-to Git

Posted by chathaway on Aug. 15, 2016, 2:10 a.m.

This article gives a pretty simple workflow for Git that allows you to take advantage of the distributed nature, ease of branching, and awesomesauce that is Git; for now, I assume you use Github. This can easily be adapted to other Git-systems, such as Atlassian Stash or Gerrit.

This article is a little bit... sarcastic. It's intended for people who are good with the command line (or willing to learn); although pretty, the Github UI is somewhat limited. It is much better to become familiar with the CLI interface.

Step 0: Setup your SSH key

Duh. If you're ...


Installing VICE in Ubuntu

Posted by chathaway on Aug. 15, 2016, 2:10 a.m.

Although this should be as easy as an apt-get command, there is a trick to installing VICE for use as a Commodore64 emulator in Ubuntu. It took me a while to figure it out, and I kept getting the error: ?DEVICE NOT PRESENT ERROR when attempting to autoload a rom.

Step 1: Install VICE through the package manager

sudo apt-get install vice

Step 2: Download the VICE source package

You can search around for this if you can't find it handy; VICE is open source, so it should be easy to find. I find it here: http://vice-emu.sourceforge ...


Gerrit Configuration Issues

Posted by chathaway on Aug. 15, 2016, 2:09 a.m.

Hi all! So I just spent a few minutes getting frustrated at Gerrit, but finally figured out what was going on. Since Google was of no help with this issue, I figured I would document it here

The Symptoms

  • A Git repo in Gerrit shows no branches in the Gerrit Web UI
  • The Git repo has branches when inspected manually
  • Cloning the repository gives an error about HEAD not being found

The Solution

You need to verify that the user (you, in this case) has read permission to refs/*; in my case, this permission was defined in a group that ...


Page 1 of 2. next
© 2016 Charles Hathaway PDF