Esmeralda personal webspace

A webspace for innovation, free thinking, and procrastination

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 ...

Read more...


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 ...

Read more...


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 ...

Read more...


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 ...

Read more...


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 ...

Read more...


The Melting Wars

Posted by chathaway on Aug. 17, 2016, 12:47 p.m.

We finally get men on Mars and they discover an old Soviet flag placed down decades ago. The Soviets won the space race but for whatever horrifying reason didn't say anything.

The Red Planet; our first excursion to the stars, to a planet that would bring us sustenance for many years more to come after Earth's resources have been depleted. Since finding water, it has been the aim of every country to land there and claim their territory. A hundred years had passed since the United States of America had claimed victory in their cold war with Russia ...

Read more...


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 ...

Read more...


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 ...

Read more...


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 ...

Read more...



© 2016 Charles Hathaway