Posts Tagged ‘Open Source’
I Don’t Get It February 5, 2010 | 03:29 pm

When encountering a bug in an open source project, most Java people seem unwilling to either fix it themselves or pay the maintainer to fix it—they’d rather abandon the project or kludge their software painfully and repetitively. WTF?

Open Source Journaling: Cornerstone February 11, 2009 | 08:48 am

I did another brief update to Cornerstone last night. When parsing floating point numbers, I was doing a parse of an integer, then the dot, then a series of digits, and gluing it all together afterwards. Fred Medlin at the Java Hack Night pointed out that was silly, and I should should parse the value directly as a regex. I went one step further, and jacked the BigDecimal String constructor’s BNF, but encoded as a regex.

So the number parsing now looks like this:

  def float_number : Parser[BigDecimal] = (rawFloat <~ ("F"|"f"))
 
  def integer_number : Parser[BigInteger] = (rawInteger <~ ("Z"|"z"))
 
  def rational_number : Parser[CSRational] = (
    (rawFloat ^^ { new CSRational(_) }) |
    fraction |
    (rawInteger ^^ { new CSRational(_) })
  )
 
  def fraction : Parser[CSRational] = (
    ((rawInteger <~ "/") ~ rawNonzeroNatural) ^^ {
      case x ~ y => new CSRational(x,y)
    }
  )
 
  def rawInteger: Parser[BigInteger] = (
    ((opt("+") ~> """[01-9]+""".r) |
      """[-]?[01-9]+""".r) ^^ { new BigInteger(_) }
  )
 
  def rawNonzeroNatural : Parser[BigInteger] = (
    (opt("+") ~> """[1-9][01-9]*""".r) ^^ { new BigInteger(_) }
  )
 
  def rawFloat : Parser[BigDecimal] = (
    """[-+]?\d*\.\d+([eE][+-]?\d+)?""".r ^^ { new BigDecimal(_) }
  )

As you can see, Cornerstone has only 3 kinds of numbers: integers, floats, and rationals. Rationals are the default, with integers and floats being signaled by suffixes on the numbers (“Z”/”z” and “F”/”f”, respectively). I’m still trying to decide, but I may go with 5 numeric types at the end of the day: long integers (“z”), BigIntegers (“Z”), double-precision floats (“f”), BigDecimals (“F”), and arbitrary-precision rationals (un-suffixed).

Fit, AntFit, and Fitnesse: Test-Based Communication Tools December 31, 2006 | 01:59 pm

I was recently introduced to Fit (actually, FIT: “Framework for Integrated Testing”), AntFit, and Fitnesse. They’re pretty cool ideas for any kind of business development setting, and the technology is beautifully simple.

Basically, Fit fills a critical communication void: the communication of what the software should do and what it does do. I am a huge advocate of transparancy, since my experience has shown a lack of transparency to be the primary cause of breakdowns in development environments (e.g.: this on “soft deliverables” and other fun). Even better, this is transparency at the level business people are used to dealing with: electronic paperwork. You can take whatever documentation your people like to use, massage it very gently, and then plug it into your automated testing framework by creating a class that (even in Java!) is not even 100 lines.

The up-shot of this technical process is that you can take your state/requirement/story documents, and give them technical updates that are red light/green light in simplicity. Business people are also given an easy way to explore the existent capabilities of a software system, which enables them to make requirements based on changing the status quo (the very concept of iterative development).

AntFit is simply a plug-in to use Fit in Ant, which enables you to perform all of your tests any time you are doing a build. At my current contract, I have plugged this into a part of the continuous integration environment, so every deployment build contains both the code itself and a thorough reporting of the code’s functionality.

Fitnesse takes fit and plugs it into a Wiki. Although editting Wikis is not something I would expect most business people to know how to do, it certainly is something that developers can do. Since a major impedence to collective ownership is the lack of meaningful documentation, and since you can drop whatever you’d like as a link from a Wiki (say, a link to a Visio diagram or to an API homepage), it’s a major win to just have a Wiki in place to begin with. To then follow it up with the ability to execute segments of code on demand to illustrate behvaiors provides a really nice interactive-show-and-tell quality to the documentation.

I only see two things outstanding for improvements on these technologies. First, AntFit needs a way to optionally fail a build if there is a given test that fails — or at least set a property with the number of failures. Second, the core needs to be ported to Ocaml: it’s already been ported to most other modern business languages.