18 September 2012

Aaargh - Another BAD CodeSnip Bug - Now Squashed

You couldn't make this up.

No sooner had I released CodeSnip 4 release candidate 2 to correct a nasty bug relating to snippet display names than I read a comment in the blog about another new, and even worse, bug.

This one affects clean installs of CodeSnip, i.e. installs where there was no previous version of the program installed.

It would either crash on start-up or to look into a permanent loop using a lot of processor time. Bad because it means no new users could install it. This bug goes back to beta 2.

I've rushed out a patch for this problem - CodeSnip 4 release candidate 3. You can get this on SourceForge or download it direct from my website.

If you are using any of the betas or release candidates you really SHOULD update now.

I find it strange that no-one has reported this until now, and that I didn't find this bug while testing the installer. But at least it got reported before the final version gets released - big thanks to the anon reporter. I guess people using the betas tended to be existing users so the bug didn't show up.

I'm deeply embarrassed by this :-(

17 September 2012

CodeSnip v4.0 RC-1: Nasty Duplicate Display Name Bug + Fix

Well, this is embarrassing.

Only a few days after CodeSnip 4 RC 1 became available I've discovered a nasty bug that causes the user interface to crash if more than one snippet has the same display name. The bug also applies to Beta 1 and Beta 2.

It's really nasty for two reasons:

  1. Its easy to trigger the bug. All you have to do is to accept an edit where you have created a display name that duplicates an existing one. Once you've pressed OK its too late. Worse, if you duplicate a snippet CodeSnip automatically duplicates the display name if the snippet has one. Once again pressing OK is all that's needed.
  2. Because the bug is reported as a fatal error, CodeSnip helpfully tries to save the database before terminating. In the case of this bug it usually succeeds, which means the duplicate display name is saved in the database. When CodeSnip is restarted it instantly crashes again because its UI can't display the duplicate display names.

I've rushed out a fix that you can get from SourceForge and from my website. Please download it now if you're using one of the affected editions.

Even if you've already been bitten by the bug all is not lost. Just download and install the fixed version (or any later release) and simply run it. It will be able to load the database, with the duplicate display names, and you hopefully won't have lost any data.

You'd be well advised to backup the database before carrying on (Database > Backup User Database menu option). But you do that anyway don't you!!

Really sorry about this one folks!

The linked download also incorporates another major bug fix.

16 September 2012

SourceForge Allura - First Impressions

Now that SourceForge are promoting their new Allura forge and are encouraging projects to move to it, I thought it was time to dip my toe in the water.

I have a tiny project called CompFileDate (a file date comparison utility) that I keep on SourceForge mainly as a test-bed. I thought I'd migrate that to try out the new platform before taking the plunge and migrating the much larger CodeSnip project.

Here are my first impressions.

The new interface is very clean and looks promising. But it is quite inconsistent and the menus change between a simple clear menu bar on some pages to a kind of toolbar on other pages. Here's part of the menu as displayed when viewing the summary page.

And now here's what it looks like when the Wiki item is clicked:

Not only has the style changed but, in the first menu you get to the download files page from the "Files" item. In the second menu you get there from "Downloads".

It confused the hell out of me at the start, and still catches me out now.

The repo browser, at first sight, it hugely improved. This:

instead of this:

And navigating is easier and more intuitive. Now, if you click on a file you see the file (yeh!), whereas before clicking on a file gave you a list of revisions and you had to click a view link to see the file itself. Conversely, if you clicked a revision number next to a file you saw the file! Love to know who thought of that one. So the new interface is a huge improvement in that respect.

The wiki is a massive improvement on the old version. It seems much quicker and uses the simple Markdown for markup. I might actually start using it now.

I haven't got issue tracking or news activated for CompFileDate, so I can't say anything about that.

There are a couple of problems with speed:

  1. The system seems slow to update: as I write on 16th September, the summary page is showing the last update as the 14th where in fact I updated only about an hour ago. And it keeps getting revision numbers out of sync.
  2. The whole system is s-l-o-w. But then again I've always found the main problem with SourceForge is its speed: I just hoped it would improve.

The file manager is pretty much unchanged from the old interface, and all the better for that. Nice.

One of the other issues that may be more or less of a problem for you is that the URLs used to checkout from the Subversion repo have changed. That's not too much of a problem for CompFileDate but it will mean quite a few documentation tweaks for CodeSnip.

I'm really hoping many of my gripes are down to teething problems, because in general I like Allura. Or rather, I think I'm going to like it.

Will I be migrating CodeSnip? Think I'll wait a while.

By the way, if you use CompFileDate, the new checkout URLs are given on the project's SourceForge Code page.

Online Code Snippets Database Reverts to Childhood

For a time now the web based Code Snippets Database has been lagging behind the CodeSnip program in the kinds of snippets it can understand and include in compilable units.

The compromise position was that it would display any snippet, but would not include some of them in compiled units. These included:

  • Overloaded functions and procedures
  • Simple types
  • Constants

CodeSnip 4 is due to make matters worse by introducing class / advanced record types and units, neither of which this venerable web app can handle.

It's a lot of work to bring the database up to date, so I've decided to replace it with an all-new Web 2.0 app. In the meantime, I've decided to restrict the old app to displaying only those snippets it understands. In effect, it is now compatible with the CodeSnip 2 way of handling the online database.

Sorry if this is inconvenient. If you need the full database, please download the latest version of CodeSnip, which can display everything and can also create units for all the snippet types.

One side effect of this is news items about new snippets that have been added to the database can't always provide a link that displays all the snippets if they include any that can't be displayed by the on-line database.
This is no longer the case: any snippet referenced in a news item is now displayed in a custom web page.

15 September 2012

Code Snippets Database Version Support

When updating the Code Snippets Database, I have always maintained compatibility with all versions of my CodeSnip program: as many snippets as possible have been available in all versions of CodeSnip.

As CodeSnip has developed, and more and more features have been added, supporting them all has become something of a burden.

So I've decided to stop releasing snippets that support CodeSnip v2 and earlier from the end of the year.

This means that, as of 1st January 2013, any new snippets added to the database will not be visible in CodeSnip v2 and earlier. Existing snippets will continue to be available - I'm not planning to take anything down that's already there.

If you're one of the few remaining users of the early CodeSnip versions it's really time to update.

There are differences between snippets used in CodeSnip v3 and the new v4, but these are much easier to manage, and so all snippets will continue to be available for both versions, unless they need the new features introduced in v4, such as units, class types etc.