Posts filed under 'Tools'

Diff for Javascript, revisited

Last weekend I finally revisited the diff-in-javascript code I’d written a couple of years back, adding (very simple) patch-like and diff3-like functionality.

On the way, not only did I discover Khanna, Kunal and Pierce’s excellent paper “A Formal Investigation of Diff3“, but I found revctrl.org, the revision-control wiki, which I’m just starting to get my teeth into. I’m looking forward to learning more about merge algorithms.

The code I wrote last weekend is available: just download diff.js. The tools included:

  • Diff.diff_comm - works like a simple Unix comm(1)
  • Diff.diff_patch - works like a simple Unix diff(1)
  • Diff.patch - works like a (very) simple Unix patch(1) (it’s not a patch on Wall’s patch)
  • Diff.diff3_merge - works like a couple of the variations on GNU’s diff3(1)

Read on for some examples showing the library in action.

Continue Reading Add comment May 9th, 2008 tonyg

Moving away from CVS

When LShift first started off in 2000, the only real option for mature, open source version control was CVS. We’ve used CVS for most of our projects since then, and gone on to develop a strong infrastructure for managing CVS-backed projects, including a web interface for viewing versions, a web-based searchable database for related CVS commits (”CVSzilla”) which infers transactions from multiple simultaneous commits, and integration with the Bugzilla bug tracker.

Today, there are many other options, and I’ll discuss six major alternatives here: Subversion, Monotone, darcs, Git, Bazaar, and Mercurial.

Continue Reading 1 comment April 24th, 2008 Paul Crowley

Unit testing in Java vs. Smalltalk

When you write unit tests, the minimal requirement before being able to try them out is that they compile. In Smalltalk, this means things like syntactic well-formedness, and perhaps the presence of global variables (i.e. classes) that you reference in the test method body.

It’s very quick and comfortable in Smalltalk to develop supported by unit testing: to write tests you know will fail, and refine away the failures until your test suite passes.

In Java, it’s much less comfortable, because besides the basic requirement of syntactic well-formedness, all the methods, classes, interfaces, and packages that your code relies on, directly or indirectly, must be present in the system before you can even try a run of the test suite! This makes for a less incremental style of development.

It would be very interesting to see a unit-testing framework for Java that simply treated a non-compiling test as a normal test failure, rather than a complete show-stopper, and which let you continue with the other tests in the suite. At the end of a run, it would include the non-compiling tests in the final reports just the same way as any other unexpectedly-failing test is reported.

4 comments February 22nd, 2008 tonyg

NDocProc bug fix for empty namespaces

Thanks to a comment from Claus, I’ve discovered the wonderful fact that null is not permitted as a key in an IDictionary in .NET. As it happens, the main problem was that I’d not covered namespaceless classes in NDocProc at all gracefully, but nonetheless, forbidding nulls as dictionary keys is a strange design decision.

I’ve fixed the bug, and now NDocProc handles types with no namespace much more gracefully. I’ve updated the darcs repository:

darcs get http://www.lshift.net/~tonyg/ndocproc/

and there’s a snapshot (source and binary) available, as well: ndocproc-200801211208.zip

Add comment January 21st, 2008 tonyg

Openembedded Bitbake recipe for Spidermonkey Javascript 1.7.0

In my ongoing quest for a sensible programming environment, I’ve filed an OpenEmbedded bug with patches providing support for version 1.7.0 of Spidermonkey, Mozilla’s javascript engine. It hasn’t gotten me much further toward my goal, but it’s nice having a quality javascript interpreter available for my OpenMoko phone, should I ever need one…

Add comment December 31st, 2007 tonyg

NDocProc updated for C# 2.0 with Generics

NDocProc, our small and simple .NET javadoc-like documentation generator, has been updated for C# 2.0 and Generics.

Changes since the previous announcement include:

  • Support for generics, nested types, arrays, delegates, events, and the intersection of them all.
  • Now requires .NET 2.0 or Mono 2.0 to build.
  • Support for slightly more of the XML documentation language used in .NET documentation comments.
  • Better formatting of namespace pages, and summaries on the main index page.

The project homepage is here. You can download a zip of the latest version, or use darcs to check out the repository:

darcs get http://www.lshift.net/~tonyg/ndocproc/

5 comments November 7th, 2007 tonyg

I have seen the light

Recently I had to configure a FastCGI application to work in a mixed SSL and plain HTTP environment. A few hours into the adventure I remembered LigHTTPd (pronounced lighty, usually), a new free software web server that is gaining popularity, especially within the dynamic community, and thought I might as well give it a try.

Continue Reading 6 comments December 12th, 2006 Tom Berger

Keeping Trac of Bugzilla

It’s hard to believe only a week has passed since we’ve integrated the project blog into Trac - with the Timeline view now displaying both source code changes and blog entries, it now became really convenient to just keep Trac open and refresh it every time we want to get an update on the state of the project.

I still found myself switching between Trac and Bugzilla all the time, and that can be very frustrating - so frustrating it can ruin even days like this, when the weather is so fine. Something had to be done - it was time to integrate our project’s bug-list from Bugzilla into Trac.

Continue Reading 4 comments November 27th, 2006 Tom Berger

Keeping Trac of the Project Blog

Trac is the best thing that happened to humanity since the cultivation of chik peas. Finally software project management has a centralized hub almost anyone can use to make the process more effective. It is beautifully designed and implemented. Extending it is easy and there’s a strong community of developers and users. I decided to see how difficult it would be to extend Trac to grab feeds from our project blog and display them in the timeline view.

Continue Reading 9 comments November 20th, 2006 Tom Berger

Web Development with Python

For a new web project we’re working on, we wanted to use a dynamic environment. We’ve resolved to use Python, a language we feel very comfortable with, and I went to test several pythonic web components, in particular the stuff that gets bundled with TurboGears and web.py.

Continue Reading 18 comments November 15th, 2006 Tom Berger

Previous Posts

Calendar

May 2008
M T W T F S S
« Apr    
 1234
567891011
12131415161718
19202122232425
262728293031  

Posts by Month

Posts by Category