Ask me anything
One of the problems with memory is the tendancy to remember what it is you meant, and that what you meant might not actually be what you said. A lot of bugs in code come from this because as long as you remember what it is your code is meant to do, you won’t really read it to see what it says it really does.
The same thing happens when we type, we read what we meant to type, not what the letters say. My favorite typo of all time was when on a postcard instead of writing Postage, I wrote Postange. Nobody noticed, not me or anyone that proofed it, for months.
One of the reasons that writing tests works for coding is that it forces you to say the same thing twice in different ways and validate that what you said both times is logically the same.
Likewise, peer code review works because it requires that someone else can read your code and agrees that it means what they think it should.
Not looking at code for months can also help with the same thing. “What the hell was this supposed to do?” - “Oh, I get it, but this isn’t correct.”
So don’t worry about forgetting what your code means, if you can’t come back to it 6 or 12 months later and read it, you wrote shitty code to begin with.
By default in my dev environment Google App Engine stored my datastore and blobstore in the /tmp/ directory which had the unfortunate effect (in my case) of wiping out the blob store every time I rebooted, which was frequently. For whatever reason, Google doesn’t seem to have listed how to resolve this in a single place, so this how to resolve it.
My start command now looks like this:
~/google_appengine/dev_appserver.py -a 0.0.0.0 . —use_sqlite —datastore_path=/mnt/project/aeds/appengine.datastore —blobstore_path=/mnt/project/aeds/blobstore
The bolded part above needs to exist before you run the command, but the appengine.datastore file (or whatever you name it) and the blobstore directory (or whatever you name it, it shows up as a directory, not a file) will be made if they don’t exist when you first run.
The italicized switches —datastore_path and —blobstore_path are both required.
You may not need to include that —use_sqlite switch or that particular IP address in your environment.