Thursday, January 24, 2008

What I've been up to

Still have a bad back, still not mobile. I've been using the laptop and programming 12-16 hours a day, which is one way to keep the mind busy.

For the past two days I've been writing Sonar3, which is a refresh of Sonar2, my submissions tracking software. v3 has a new file format (XML), autobackups, improved forms and more. (Sonar1 and 2 were designed when 15" 800x600 screens were the norm, which is why all the dialog boxes are so tiny on modern screens.)

Apart from that I've continued converting apps to Visual Basic 2008, which involves learning a whole lot of stuff about the new graphics handling methods. yLaunch2, yGen2, yCopy2 are all complete and working, and on my own system I'm now using those live in place of the originals.

The problem with converting old code is that many of the tweaks and constructs no longer work. There are two ways you can approach a conversion:

1) Import the old project and set to work converting code in hundreds (or thousands) of places, rewriting everything which doesn't work

2) Still using the old language, take a copy of the project, bump the version number, and rewrite the code so it still works in the old language AND it will work in the new.

I was doing my conversions the first way, and the problem there is that you end up with two wildly different projects. During the conversion process I inevitably fix and tweak other things, until the new project has features not in the original. Then, if I add something to the original I end up with the opposite situation. And doing another conversion from the Improved Original involves losing all the new changes AND all the converted code.

This is what happened with yWriter, and it's the reason I abandoned the new conversion of yWriter 4 and instead wrote it in the old language. It wasn't wasted effort though, since every attempted conversion teaches me more about the new language.

Anyway, over the past couple of weeks I've been working the second way (hence Sonar3), and the difference is incredible. For example, when I imported yLaunch (a nifty little app, by the way) it only had seven errors to fix, instead of 300+. The result was a fully-working new version in under a day.

So, what next?

After Sonar3 I've got a pick of other projects:

Tweak yWriter4.
Write a new database for my charting software.
Discover how printing works in VB2008 (or rather, doesn't.)
Write BookDB3 with a new database format.

Fascinating stuff, eh?

Simon Haynes is the author of the Hal Spacejock and Hal Junior series (Amazon / Smashwords / other formats)

2 comments:

Grant said...

Will you need anyone to beta test the new Sonar?

Simon Haynes said...

Yes I will. I've been testing it pretty extensively but users always seem to find the hidden auto-destruct button ;-)

What I'm going to do is set up a Sonar3 web page and put up a beta version of the program. The installer will put the thing into a new folder (Sonar3) and then you just import your existing DAT files (already working, and there's a menu for it.)

After that, it's play time. Add, delete, remove subs, markets and works (I renamed 'stories' throughout) and see whether anything breaks.

The other thing Sonar3 allows is multiple projects. E.g. you can separate stories and articles into two databases, and eventually you'll be able to open them just like a word Doc, by double-clicking. It automatically loads the most-recently-used though, so the behaviour when opening the prog is the same as always.