Great good fortune

Posted on September 13, 2015

I bit the bullet, merged and deployed the yesod1.4 branch. Usual last-minute faffs (eek! I need a .env file for the production environment), but it all seems to work.

In truth this chunk of changes got rather too ambitious. However, the beefing up of the test facilities that I’ve done as a result is definitely good news. From here on in, it’s going to be test-driven development. I’ve been using TDD in more and more projects, and I find it increasingly indispensible.

For the foreseeable future, I hope to avoid the dual checkout situation again. So that means that programs in the build tree are for the test environment. They can be installed, and then copied to ~/bin for production when I’m happy with them.

Now, I had been thinking of subscribing a test address to some of the high volume mailing lists I’m on. This would obviously help to exercise the test system, and I was thinking it would also be a way to cope with my information overload. But there are a couple of things wrong with this idea. First, it isn’t necessarily helpful if the test system gets clutttered up with emails. Secondly, it reduces my motivation to make flare cope well with high-volume inboxes. (Merely adding a delete button to each row of the overview would pretty much solve my problems.)

The most urgent problem I’ve spotted with flare over the last few months is its inability to accept more than one message per second, due to a failure to generate unique file names. I had been thinking that this would be fiendishly difficult to test, although eee should be able to spot it fairly easily, if only it worked with flare!

But as a unit test, it’s simplicity itself: simply run Model.Store.makeName 3 times and check that it produces 3 distinct names. At present, it doesn’t. Simplest fix I can devise is to replace the pid with a random number.

Also, how have I never used cabal repl before? That just makes things like this so much quicker. My flabber is gasted.