Subscribe to RSS

Cha-Ching and the MEMO field in Quicken .QFX files

If you use Cha-Ching and have a bank, like PNC, that allows exports into Quicken File (.QFX) format, then you can use a quick sed script to replace the normally useless <name> field with the infinitely more useful <memo> field.

Ta-da:

#!/bin/sh
sed -e '/\<NAME/d' -i '' "$1"
sed -e 's/\<MEMO/\<NAME/' -i '' "$1"

Save it as quickenImportManip.sh, and run it:

$ chmod +x quickenImportManip.sh
$ ./quickenImportManip.sh YourQuickenFile.qfx

Then import away!

Guess What I’m Doing

Here’s a snippet:

	- (void) testSettingPositionString
	{
		NSString * pos = [NSString stringWithString:@"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"];
		[conv setPositionString: pos];
		STAssertTrue([conv positionString] == pos, @"Position string not set");
	}

:-)

The Project I Care About: Rancher’s Delight

I made a lot of progress this weekend on the project I brought to the forefront once I put aside all the other projects I realized I wasn’t that interested in.

Rancher’s Delight, if you don’t know, is a game engine I’m making based on the SNES classic Harvest Moon. Its primary goal is to faithfully recreate the underlying engine for the original game. Once that is done, I will extend it to allow for a programmable system that will enable anybody to create any kind of Harvest Moon-like game they wish.

What I accomplished this weekend:

  • removed the old code that dealt with resizing the viewed area to make sprites and locations larger. If I need this again it can easily be rewritten, but it has to fit into the new underlying framework.
  • wrote different functions to take into account the character moving versus the world scrolling under him. The former is used when there’s no more location to scroll in that direction, and coming away from the edge of a map where he’s not in the center yet. The latter is used for everything else.
  • added in-game objects, and ensured that they are stationary with the background when the character moves.
  • added a prototype of the messaging system, using font rendering for the messages and a surface with the original dialogue box on it. It can fit a bit more content than the old fixed-length one, but the content needs to be hand-checked to ensure it doesn’t spill over the edge of the box. It may be worth it to enforce a cut-off just in case.
  • started enforcing cardinality in a character’s facing direction, along with slowly putting together sprite sheets.
  • started playing around with, then polished off, cycling sprites for movement.
  • completely refactored everything up to this point, making everything a lot cleaner. There’s now a sort of God object, the Camera, which takes care of all kinds of relationships between things. Already a lot more relationships can be refactored out, but I can’t see the most effective ways to do so until the whole thing gets a lot more complicated. Primarily I’m starting to see the difference between an object doing something, and the user seeing what it does.
  • introduced a frame length to cycled sprites, which I’ll need to tweak along with the movement speed to get the best recreation of how Jack moves in Harvest Moon. This is really important to get right, as a the timing of the game and how people play it rely on the movement of the main character for precise schedules.
  • stitched together the exterior of the farm, where all the magic happens.
  • created a tool to replace the soon-to-be game objects in a location (such as the stumps and weeds in the exterior farm) with random ground tiles. Fairly simple and effective.

So, yeah. A decent amount of work. You can keep track of the progress on the GitHub feed of commits for the project, as well as test and try it out yourself by cloning my repository:

git clone git://github.com/ardekantur/ranchers_delight.git

In the meantime, here’s a pre-release screenshot :-) It’s Jack spending some alone time on the church roof.

Jack contemplates jumping off the church roof.

Fall Cleanup

In an effort to focus, and more importantly, focus on the projects that I really want to work on, and would benefit from personally, I’ve removed the following projects from GitHub:

  • my fork of rest-client
  • bulletin
  • wondercroc
  • uproar
  • clementine
  • flint
  • quandry
  • ioaxiom
  • taskforce

If you had any interest in any of these projects, let me know and I could provide you the source, or any guidance for what I had planned for them. As it stands, this leaves me with Taskomaly, which I’m slowly waning interest in since my move to Things, and Rancher’s Delight, which, as a game and a very large undertaking, probably won’t see a lot of progress. This leaves me with a virtually clean slate with which to start thinking about problems I’m interested in solving.

SUUIDs

Mostly this is just farting around but I thought I’d post about it because it’s an interesting idea, at least in theory.

GUIDs are good but I wanted to do one better. So I created SUUIDs. Super Universally Unique IDs. The format of the current version, v2.0, is thus:

2/xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxx

Where x is a case-sensitive alphanumeric character. This gives us somewhere in the area of 3.35×10^64 possible combinations, and a lot of interesting characteristics.

  • For example, if the address space of a given ID is all hexadecimal, and the last four characters are IPv6, this functions just as well as an IPv6 address format. Thus, The IPv6 address 2001:0db8:0000:0000:0000:0000:1428:57ab is notated as 2/20010db8-00000000-00000000-142857ab-IPv6. If a field contains all the same character, you can replace the ending hyphen with a comma and the field with a single instance of that character, so that IP address could also be 2/20010db8-0,0,142857ab-IPv6.
  • In the same token, the same rules apply to a message that ends in 0MD5 — that’s an MD5 checksum as well as a unique address.

An implementation in Ruby:

	module SUUID
	  def self.gen
	   chars = ("a".."z").to_a + ("1".."9").to_a + ("A".."Z").to_a
	   x = [8, 8, 8, 8, 4]
	   x.map! {|i| i = Array.new(i, '').collect{chars[rand(chars.size)]}.join }
	   return "2/" + x.join('-')
	  end
	end

It’s not pretty, but it gets the job done. You could always throw a more random source of entropy at it, use the system date, time, whatever. Don’t particularly care about the implementation.

Here’s what a couple look like — to get used to the idea :-)

2/f9nuBgzm-HGTE4bSK-ZEfkfsRp-T3SXgpXA-5LNC
2/hoyOCd7o-V48NQGvv-OS5RBDIl-CG1FRNqG-Xd3j
2/sUZd6aGa-1J55rs9C-lxH1mvPA-I9PAvkOh-ZLVj

Additionally, you can omit the version number, which so far still allows for distinction between version 1 and version 2 (version 1 didn’t have lowercase letters). This means you have a nice set of directory names at your disposal.

mkdir /DOMejDTy-APESCioG-yyXpXBNL-lYAuQogL-Uep9
mkdir `curl -X POST http://example.com/suuid/provider`

I have no idea how checksums, hashes, verified randomness all fit into something like this. Just something fun and stupid to keep me occupied today.