Tuesday, March 15, 2011

bacon and autotest

Took a little to figure this out, so thought I would share.  You need an empty file in your spec folder called .bacon in your spec folder.  This appears to load up a lot of the proper bacon environment things into autotest.  However, if you want to override specific behaviors, you do that in a .autotest file in the top directory.


touch spec/.bacon

Inside .autotest:
require 'rubygems'
require 'bacon'
require 'autotest/bacon'

# see inside /lib/autotest/bacon.rb for template

class Autotest::Bacon < Autotest
  undef make_test_cmd
  def make_test_cmd(files_to_test)
    # I modified this to only include _spec.rb files:
    args = files_to_test.keys.flatten.select {|v| v =~ /_spec.rb$/ }.join(' ')
    args = '-a' if args.empty?
    # TODO : make regex to pass to -n using values
    # use bacon -h to see all your possible options!
    "#{ruby} -S bacon -I#{libs} -o TestUnit #{args}"
  end
end

Monday, March 7, 2011

image landscapes for ebooks (and other digital-based reading)

The problem with electronic text is that it lacks the spatial character of a book.  You don't really know where you are at in a giant, monolithic column of perfect text, especially when resizing it changes where text is located.  However, in a book, you have several spatial cues that are constant: which page, which part of the page, how deep into the book (depth) and any imperfections on the page itself or with the text.  So, with ebooks, how can you duplicate this effect?

One could write a program that lays books out so that the book is more like a book (there are cues that indicate depth, etc.).  With svg you could easily add certain permanent imperfections to the text to give it more character.

There are two other ways to add a spatial dimension to reading text:

1. Layer text, or pages, into a 3D landscape.  If the pages of your book traversed an interesting cityscape, room, landscape, or mountain path, etc., you would have spatial anchors upon which to peg the text.

2. The page itself could link out into either auto-generated or user defined images (or text).  In this way, each page is given visual character that links it to other ideas and images.

IMO, both the ideas and the implementation of these ideas (i.e., embedding pages of text, with textual imperfections into a 3D landscape, or adding pictures and text to the pages of the book itself, etc.) are obvious and trivial.  Any college student taking a web or 3D design class could do it.  It merely remains for someone to do it.