Wednesday, December 9, 2009

Magic Incantations for Installing asdf-install in Clozure Common Lisp

I'm on my way to bed, but I wanted to document this first.
  1. Follow the instructions here: http://common-lisp.net/project/asdf-install/tutorial/setup.html
  2. Skip the command "(asdf:operate 'asdf:compile-op :asdf-install)". It didn't run for me, but everything seems to work fine without it.
In my case, that means adding the following to my openmcl-init:
(require 'asdf)
(pushnew "/Users/matt/lib/asdf/" asdf:*central-registry* :test #'equal)
(asdf:operate 'asdf:load-op :asdf-install)
None of the other results in Google had it quite right, and they sent me on an hour long wild goose chase.

Saying stuff like "(asdf-install:install 'md5)" now works.

Monday, November 16, 2009

The Flattened Requirements Matrix

I have no idea if something like this exists in the project management literature (ick, project management), but it's a hack I'm in the processes of putting together because I'm sick of less organized projects spinning out of control.

Here's the scenario: I have a ton of new features I need to spec out and a developer who will be doing most of the coding. I also need to make sure it gets done "right". Of course we're using my definition of right here because I'm in charge (sorta)... YMMV.

I don't like long spec docs. And saying "make it do this" never works. The outcome is never the correct "this".

Instead, this is what I'm trying.

I have a Google doc and each feature is a heading. Under the heading I have a paragraph describing what the feature should do. Below that I have subsections titled "depends on" and "dependents". Each is a list of links to either more specific features or back to more general ones. I repeat until people stop asking questions with "obvious" answers... assuming they actually read it.

I call it the Flattened Requirements Traceability Matrix

Friday, April 10, 2009

Making Django's Built-in Auth Tests Pass

Django (web framework)Image via Wikipedia

I added the built in auth framework to a relatively fresh Django project today, and upon running my tests, I got a large number of failures coming from auth. This problem does not appear to be fully documented so this is what I did.

First, notice that most of the errors are template missing errors. Fix these by
  1. Installing the admin tool. Auth relies on some of its templates.
  2. Stub out any other missing templates (ie. login, logout).
Next, the test cases will complain about missing text in your new templates. Just add in exactly what its asking for as plain text.

Finally, some of the password reset tests were complaining about getting redirect (301) codes instead of success (200) codes. This was an error on my part. They're looking for a link in the password reset email and GETting it. I wrapped the link in an HTML anchor, and the regex in the test was grabbing the closing HTML tag. Removing the HTML fixed that problem. Finally, I just had to add some missing text as above, and all the tests passed.
Reblog this post [with Zemanta]

Sunday, February 22, 2009

How to Compile OCMOCK_VALUE for the iPhone

If you're using OCMock to test your iPhone application and OCMOCK_VALUE gives you this error message:
error: syntax error before 'typeof'


Add this line to the top of your test case:
#define typeof __typeof__


What seems to be happening is that the ObjC compiler on the iPhone has renamed 'typeof' to '__typeof__'. The macro above will add the old version back in. Some Googleing seems to suggest that this is related to C99 compatibility.
Reblog this post [with Zemanta]