Graduate Blog

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

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


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


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

Read more...


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

Read more...


Adding fortune to email signatures

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

This is a very quick post! I decided today to start putting a signature in my emails, which are sent by Thunderbird, and wanted to include a fortune (output from the fortune program, http://en.wikipedia.org/wiki/Fortune_%28Unix%29) into the footer of my signature.

Turns out that Thunderbird only allows you to add a static message, attach a file, or a v-card (not THAT v-card, silly you). So there's no easy way to attach the output from a script.

BUT! It re-reads the file every time if you want to attach a txt file. So if ...

Read more...


Compiling opentracker on OpenBSD

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

My goal is simply; compile and run the opentracker software on an empty OpenBSD box. I ran into one particularly cryptic problem, and came up with a short-term fix (short term because it wouldn't be accepted into their source tree, but it's simple and gets the job done.

If you see the error message...

....  
opentracker.o(.text+0xeae): In function `main':
: warning: srandom() seed choices are invariably poor
trackerlogic.o(.text+0x123): In function `trackerlogic_init':
: warning: random() isn't random; consider using arc4random()
trackerlogic.o(.text+0x305): In function `remove_peer_from_torrent':
: warning: sprintf() is often misused, please use snprintf ...

Read more...


Process for creating 3d Adrinka stamps

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

This article will guide you through creating 3d stamps (using a 3d printer) from Adrinka patterns generated using the Adrinka tool on community.csdt.rpi.edu (https://community.csdt.rpi.edu/applications/17). This assumes the following:

  • You have a 3d printer configured and working that can handle STL files
  • You are familiar with the 3d printer software you are using
  • You have created a stamp in the Adrinka software and are ready to print it

There are 3 primary steps; converting the image to grayscale, inverting the colors, and converting grayscale image to .stl. We will use GIMP (http ...

Read more...



previous Page 2 of 3. next
© 2016 Charles Hathaway PDF