Strategy

Hendrik Boom hendrik at topoi.pooq.com
Sun Dec 4 21:14:16 EST 2011


On Sun, 04 Dec 2011 18:35:08 +0200, Graham Leggett wrote:

> On 03 Dec 2011, at 11:40 PM, Donald Allen wrote:
> 
>> Gnucash has been around
>> for a long time, and its life-span covers the development of a lot of
>> tools. If you were going to start with a blank sheet of paper today, I
>> doubt very much whether you would do a lot of the system as it is
>> today. The big question is, when is it worth it to cut your losses and
>> start over?
> 
> I use gnucash because a) it's been around a long time, and b) because
> gnucash is likely to be around a long time still.
> 
> Anyone can start over at any time - that's called a new product - but
> when people decide to abandon what they have and start over, that's when
> you lose faith in the project and start to look somewhere else.
> 
> Sure, new fandangled languages are shiny, but will they still be popular
> in 5 years? No idea. I am happy to bet that C will be around in 5 years,
> so investing in the language as unsexy as it might be for me is a good
> investment.

Yeah.  C will still be around.  Scheme is almost as old, (older if you 
consider it Lisp) and will be around too.  I'd guess Python will too, but 
I'm not nearly as sure of that.

> 
> I think gnucash needs a heavy set of refactoring. I'd like to see a
> proper libgnucash split out as a separate library that I can depend on
> in other software. I'd like to use a libgnucash library as a basis for a
> restful service that will allow me to share gnucash with others, like my
> accountant. But I don't think gnucash needs to be started over.

There was once and enterprise-resource system (whatever that is) that 
comprised around 200,000 lines of C (or was it C++?) code.  They decided 
that for some new functionality they should add a scripting language.  
They picked Gambit, and implementation of Scheme, as their scripting 
tool.  Now it happens that Gambit is exceptionally compatible with C and C
++, because although it's usually interpreted, it can also be compiled to 
C or C++ (that's how it's bootstrapped, as it happens).  And in the 
compiled form, it has specific mechanisms to declare and call C 
functions, include C header files, and so forth.

After they started down this path, they discovered other stuff within the 
program that needed improvement, and found the easiest way to do it was 
to rewrite in Gambit.  Eventually in the course of two years or so, the 
200,000 lines of C/C++ had been reduced to about 15,000 lines of Gambit 
code (or was it 25,000?  I forget.  I'll look it up if it's really 
important.)  Not only that, but the program ran significantly faster, 
because of the insights they had into how badly they had been doing 
things, and because of extensive use of the profiling tools in Gambit.

The effect was a complete rewrite.  But it was all incremental change.  
Every bit of it could be seen as improvement over what was there before, 
and worked in context.  Evolutionary change.

No.  I'm in no hurry to throw Scheme out.  Nor am I eager to start a 
project to rewrite everything in Scheme, or C++ or C# or Mesa, or even 
one of my favourites, Modula 3.  Change what needs to be changed.  Change 
what's ugly and becoming unmaintainable.  Prove all things; hold fast to 
that which is good.

-- hendrik




More information about the gnucash-devel mailing list