Michael Angstadt's Homepage
the works and thoughts of a software developer and artist.

Projects

Last updated: 05/17/2012 How I get this date
Language: Java

An SMTP (email) server written from scratch in pure Java (the Java Mail API isn't used at all). Also supports the POP3 protocol.

Last updated: 11/30/2011 How I get this date
Language: PHP

A PHP library for querying the Hyperiums API (HAPI). I've also written a reference manual, which describes HAPI in great detail because the documentation on their website doesn't provide a lot of information.

Hyperiums is a turn-based strategy game that you play in your browser. You start out in control of a single planet. You earn money by trading with neighboring planets and you use that money to research technology and build fleets of warships. Then, you use the warships to fight battles and take control of other planets, and so on. You can join alliances with other players to help keep your planets safe.

Last updated: 06/18/2011 How I get this date
Language: Java

A command-line Java program that plays the Game of Life. It uses a concurrent implementation, spreading the CPU load across multiple cores. I wrote this program while reading the book The Art of Concurrency by Clay Breshears.

Last updated: 8/30/2010
Language: Java

Bemuled! is a Java game I created that's similar to the popular game Bejeweled, except instead of lining up rows of jewels, you line of rows of donkies ("mule" rhymes with "jewel"). Read the technical overview I wrote, which describes the technical aspects of the game.

Language: PHP

A widget you can add to your webpage that displays your JavaRanch forum username and number of posts that you made.

Errata Contribution
Date: 7/15/2009

I read A Programmer's Guide to Java SCJP Certification: A Comprehensive Primer (3rd Edition) by Mughal and Rasmussen in order to prepare for the SCJP exam. I sent the authors of list of mistakes I found in the book and some made it into the online errata.

Last updated: 04/14/2012 How I get this date
Language: Java

A command-line Java program that accepts the terms and conditions you are often required to accept when using a public Wifi hotspot. This is useful if you have your browser configured to open all tabs that it had open last. With this utility, you can accept the terms and conditions, open your browser, and not be afraid of losing any of your tabs.

Last updated: 03/20/2011
Language: PHP

A webpage that generates getter and setter methods for all of the fields in a PHP class. These methods are used a lot in the Java world. They are simple methods that allow you to get and set the properties in a class (which should be private). It's good practice to use them because as long as the signatures of the getter/setter methods don't change, you can make modifications to the class's fields without breaking any code that uses the class.

Last updated: 10/28/2010
Language: PHP

A webpage that validates XML documents against XML schemas.

Last updated: 6/1/2010
Language: HTML/Javascript

A Mac OS X dashboard widget that allows you to view the screen of your Chumby.

Last updated: 4/13/2010
Language: PHP

A utility that creates a data URI from an uploaded image. Data URIs allow you to include the actual binary data of an image inside of an HTML page, instead of referencing the image with a URL.

Last updated: 8/5/2009
Language: Java

Finds all solutions to a given Boolean Satisfiability problem.

Last updated: 7/22/2009
Language: PHP

Downloads Hyperiums data files and imports the data into a database.

Last updated: 1/10/2009
Language: Java

A command-line Java program that solves Sudoku puzzles.

Last updated: 5/3/2008
Language: Javascript

ThumbThru is a Javascript utility that provides a simple way of displaying photos on your website.

Last updated: Fall 2005
Language: C
Platform: Windows

I created this as a project for a game programming class I took in college. Watch as alien invaders blow away helicopters in the city!

Quick Reference Sheets

Java System Properties pdf word

This reference sheet lists some of the more commonly used Java system properties, and also includes basic instructions on how to access system properties.

Java SimpleDateFormat reference pdf word

This contains a table listing the pattern codes that the java.text.SimpleDateFormat class uses to parse and format Date objects.

PHP date() reference pdf word

This contains a table listing the pattern codes for the PHP date() function.

PHP 5.3 Magic Constants pdf word

This reference sheet lists and describes all the PHP magic constants, such as __DIR__ and __FILE.

HTTP Status Code Flashcards pdf word

Teach yourself all of the HTTP status codes!

Using the Github commits API

Last updated: 12/31/2011

Some of the projects listed on this page are hosted on Github, a free, open-source code hosting service that makes it easy to share your code with other people. In order to get the date that my github projects were last updated on, I use the Github commits API.

It is very easy to use. Just send a GET request using a URL that contains the username of the project owner and the name of the project. It returns a list of the most recent commits, encoded in JSON.

https://github.com/api/v2/json/commits/list/USERNAME/PROJECT/master

It returns something like the 10 most recent commits. You can get older commits by adding a page=N query string parameter to the URL. However, I only need information on the most recent commit, so making one request is good enough for me.

I cache this data so that I don't have to contact Github everytime the page loads. The data is cached in an XML file that looks like this:

<?xml version="1.0"?>
<github>
	<project name="PHP-HAPI" username="mangstadt"
		commit="2011/11/30 17:04:06" refreshed="2011/12/31 12:12:36" />
	<project name="The-Game-of-Life" username="mangstadt"
		commit="2011/06/18 09:11:53" refreshed="2011/12/31 12:12:36" />
	<project name="Public-Wifi-Accepter" username="mangstadt"
		commit="2011/06/01 07:42:34" refreshed="2011/12/31 12:12:37" />
</github>

It uses the time in the refreshed attribute to determine if the data on that particular project is stale or not. If it is stale, then it queries the Github API to get the most recent data, then saves the data back to the cache.

View the source

Back to top