Friday, October 19, 2012

Page numbers in electronic media

Despite what I said recently to my mother about there being no page number handling in Kindle, there is a Menu function on Kindle, Go to Page, that suggests that if you know the paperspace number of a book's page, you can get there. This has very obvious limited utility and I've never done it.

It's just that while you're reading, you don't see page numbers and to figure out what page you're on is probably (I think completely) impossible. All you have is the percent indication of how far you are through the text. I have two Kindles myself and when I synchronize the one to the web, then pick up the other and synchronize to the last page read, it doesn't say what page or anything.


Perhaps we'll lose our "page number centricity" in favor of percent as electronic media becomes more widespread and dominant.


(Does this not establish "chapter and verse" as a superior system of organization for books? Perhaps that's a little too stuffy for novels, eh?)


An aside...


For instance, I noticed that the precursor indications that Asher (in My Name Is Asher Lev, one of the greatest English novels ever written that I've just read for the third time) would paint the three-way conflict between his mother, father and himself came more overtly predicted at 73%, 80% and 87%. I'll forget these numbers within a few days, I'm sure. Why was I watching for this? Because the dénouement at the end of this book is one of the most poignant in literature.

Even further aside...


And, I'm back in paperspace now as I can't justify spending money on a book for Kindle I already own in paper. Thus I'm reading (again after having read it 20 years ago when it appeared) the sequel The Gift of Asher Lev. I've had a couple of paper copies of My Name..., but the last copy I had, I loaned to someone in a hospital who, when I later attempted to retrieve it, clearly had the impression that I'd given it to him so, I made no issue of it.

Back to the farm...


If you think a lack of page numbers is somehow hampering, imaging reading Atlas Shrugged which is 1200 pages. On the other hand, maybe I read it (last spring) precisely because on the Kindle, I had no idea it was anywhere near that long (although I totally knew it was on the same order as War and Peace which can be in excess of 1400 pages).

Now, I can see that this post has completely deviated from the original subject. Could that be for any other reason than that there's precious little more important than reading? Music and literature: nothing can dethrone these which reign supreme over leisure (and beyond). 

Thursday, October 18, 2012

Test first, code later...

Another day, more proof that the first stroke of your finger in vim or whatever your favorite editor is, should begin with public class ...Test.
I prove this to myself altogether too often.
Whatever, I've never been on a project, even one with which I have so much to do as the present, for which there are myriad tests missing almost from day one.
Today, I went to tackle some "clean-up tasks" postulated in a distant sprint planning as something we'd need to get around to. Circumstances made it so that I needed to pitch in to help an area that's not ordinarily mine. So, I immediately set about adding tests for the little details I figured a couple of months back might need particular attention.
As the French say, Ben, voyons ! And how! Handling of nearly every one of the little details was either absent or seriously compromised. The test bits, which I wrote in JUnit using Mockito to eliminate any connection to wire, database or stuff that would defeat total automatization, were tiny, but they did the trick. In the space of probably two hours, I had the tests written and the implementation fixed.
For this, I can only thank my old friends from Brisbane, Dean Povey and David Leonard, for teaching me the maxim that is the title of this post. I'm only a deacon in this church of writing tests first, coding afterward, but I hope to become an ordained priest before much longer.