Testing your sqitch changes

When you work on larger projects, you'll often find that database changes are hard. Multiple developers, working on the same project, changing the same tables, can be difficult. Database migration tools often (but not always), come with one or more standard flaws:

  • Reliance on migration numbers (in other words, two or more developers commit migration number 6 and get a conflict)
  • Reliance on an ORM, such as DBIx::Class (sucks for the Python devs)
  • Reliance on something other than the Data Definition Language, or DDL (sucks when your custom tool can't represent the stored procedure you want to define)

There are plenty of other ways database migration tools fail, but the best standard tool I've worked with so far is sqitch. Its documentation needs some work, including more explanations of how to deal with common failure modes, but it avoids the above problems and provides you with a rich set of tools to make database migrations easier for large teams.

However, its common failure modes include:

  1. Creating a "revert" change that doesn't revert.
  2. "verify" scripts that work now but don't work in the future (for example, when MySQL is changed to "strict" mode)
  3. Hard-to-comprehend error messages about changes not appearing in the plan (usually a merge conflict that can be solved with reverting some changes and re-deploying)

There's work being done on some of these issues, but the first two can be mitigated with a simple test script I wrote.

git stashed

A quick 'n useful git tip:

$ git config --global alias.stashed "stash list --pretty=format:'%gd: %Cred%h%Creset %Cgreen[%ar]%Creset %s'"
$ git stashed
stash@{0}: 2d7f38b [19 minutes ago] On variable-travel-times-207: variable station travel times
stash@{1}: 1e4207e [6 weeks ago] WIP on custom-mission-actions-30-2: a00a646 Don't show intelligence since we're not using it.

Typically, git stash just shows you the items in your stash. Now, git stashed shows you how long ago an items was stashed (I had no idea I had a 6 week old stash item) and colorizes the relevant bits to make it easy to read (admittedly not visible in the bit above).

Veure: Artists and Narrative Designers

This has been a busy week with Veure. As usual, my daily routine is:

  • Wake up
  • Hack a couple of hours on Veure
  • Work for $client
  • Have dinner
  • Optionally hack more on Veure

Hack, in this case, does not simply mean "write code." There are many other things involved, including research, research, and more research. And legal stuff. And writing. And hiring.

Yes, hiring. For example, we think we've found a great artist. If it works out, we can replace my crappy concept art of a space station:

New ships can be done, new background graphics, and so on. In fact, this could turn into a full-time job for him if Veure is successful. But that's not all we're hiring.

Veure: Arbitrary Mission Actions

This little baby makes me very happy:

That is a screenshot from the completion of a level 1 mission "Find Amaidoo's E-slate." The code was painful to integrate, but it makes things like the above simple to do.

Beta Features for Veure

There was positive response to my last entry about Veure, both on the post and in private email, so I'll keep posting.

Currently, we're pushing forward hard to try to get to the alpha release and get playtesters (let me know if you want in on it). Major things we need to finish to get there:

  • More missions and jobs (repeatable missions for lower rewards)
  • Auction Houses
  • Elite-style trading
  • More NPCs
  • More game balancing
  • Some legal stuff (expensive and time-consuming)

There's more we need, but those are the "big" items we need to finish. The content generation is some of the most time-consuming. Plus, I need to do a lot of work to make the mission system manageable for someone who isn't me. Right now it's complex (to put it mildly) and I'm adding a new feature to make it more flexible but which also increases complexity. If we can't have rich, compelling, missions, much of the game falls flat.

About Ovid

user-pic Freelance Perl/Testing/Agile consultant and trainer. See http://www.allaroundtheworld.fr/ for our services. If you have a problem with Perl, we will solve it for you. And don't forget to buy my book! http://www.amazon.com/Beginning-Perl-Curtis-Poe/dp/1118013840/