Just released: Castalia 2009.2

Posted on June 24th, 2009 in Business, Castalia, CodeGear, Delphi, TwoDesk | 2 Comments »

I’m very excited to announce the latest version of Castalia, the ultimate tool for Delphi developers.

The major focus of Castalia 2009.2 has been improving the parser and adding support for many language features that have been added to Delphi in recent years. I’m very happy to say that the Castalia Delphi parser is now fully up-to-date.

In addition, Castalia 2009.2 includes the following improvements over the previous version:

* Fixed: “Index Out of Bounds” error during some context switches
* Fixed: Some Castalia features not available after line 30768 in the code editor
* Fixed: Access violation when firing a code template with an empty scope

Castalia users with a current maintenance subscription can download version 2009.2 today at http://subscribe.twodesk.com.

Everyone else can grab the free trial at http://www.twodesk.com/castalia.

Dead and Deader

Posted on June 20th, 2009 in Business, Castalia, Delphi, iPhone | 6 Comments »

Last Friday (June 12), I went out for an afternoon bike ride, and when I got home, the monitors connected to my main work computer were dark. I wiggled the mouse to bring them back to life, but they did not revive. The computer had crashed.

While such a thing had never happened with this particular computer before, we’ve all seen random system crashes, and I didn’t think anything of it. I had saved all my files before going out the door, after all.  I pushed the power button on the computer case to shut off the machine and reboot it…

…And nothing happened. The case LEDs were still on, keyboard LEDs still glowing. The machine had all the appearances of being alive, but was dead. I tried again. Held the power button down for 15 (it should turn off after 10), 20, 30 seconds. No response. It wouldn’t turn off.

Hmm. This is strange.

I flipped the rocker switch on the power supply and the machine shut off instantly. After a short wait, I flipped it back on and pressed the power button.

Nothing happened.

Again, I pressed and held the power button. No case LEDs, no keyboard lights, no fans spinning up, nothing. Great.

I love the small town where we live, but one of its downsides is that there’s no decent place to buy computer parts in a pinch. Thankfully, there’s a big internet electronics warehouse store that’s located such that when we order things with the cheapest UPS ground shipping, we almost always get them the next day. But, it being late Friday afternoon, I knew anything I ordered wouldn’t actually ship until Monday, so I wouldn’t get it until Tuesday. Oh well, at least I still have the laptop to keep me on top of things.

I ordered a new power supply, since it was obviously fried, and it arrived tuesday afternoon, just as expected. Tuesday evening, I sat down with the ailing computer and swapped out power supplies. I got it all plugged in and put together, and hit the power button.

Nothing, again.

Dangit! As most of you surely know, when you have a computer that’s just dead, the culprit is almost always either the motherboard or the power supply. In this case, I had good reason to believe the power supply was the problem. Apparently it wasn’t (or at least it wasn’t the ONLY problem). Now I need to order a new motherboard.

Again, it’s after shipping time, so anything I order will ship Wednesday and arrive Thursday. Fine. I ordered a new motherboard, and went back to work on the laptop (which, by the way, is a Mac, and doesn’t have all the Delphi versions on it that I need to work on Castalia). The new motherboard arrived Thursday afternoon, and went easily into the computer case

Cross fingers. Say a prayer. Do a rain dance. Push the power button.

It booted right up. No other hardware damage, no data loss.

The rest of Thursday was spend installing new drivers for the new chipset and audio all that stuff that comes with a new motherboard, and Friday I was finally back in action. A full week without my main computer was quite a bit of lost work, and put me behind schedule, but I’m catching up quickly.

One thing I had planned to do towards the end of the week was release Castalia 2009.2. Obviously, that didn’t happen, but final testing is looking good, and I think it’s close. Watch for it this week, as long as there are no more major hardware failures (and misdiagnoses).

The moral of the story: While I didn’t lose any data, it made me take a good look at my backup strategies. While the source code that keeps my business running was always backed up in two different places, other things (like iPhone app sales records) were not. If there had been a hard drive problem, some important things could have been lost.

So please take this opportunity to review your backup strategy and make sure that everything important is backed up and will survive a hardware failure or worse (Question: what would happen if your house burned down while you weren’t home? Would you still have your precious data intact?). We work way too hard on creating our digital lives to have them vanish at the whim of a few faulty bits of silicon. Be careful!

Naming things in code

Posted on June 6th, 2009 in Castalia, Delphi | 6 Comments »

I came across a great blog post yesterday by Robert Nystrom, Naming Things in Code.  Robert goes through a whole bunch of examples and comes up with some rules for how things should be named. Here’s a an oversimplification:

  • Type names should be nouns
  • Functions that do things should be verbs
  • Functions that return booleans should be questions
  • etc…

I don’t want to reproduce his article here. I want you to read his article.

I’ve thought for a long time that the way things are named in code is one of the most important decisions a programmer can make. I’ve also discovered that when you’re “in the flow” of creating something, stopping to decide the best name for something can be an interruption and can actually hurt your code.

Sometimes, you know you need to store some data in a temporary variable, for example, but you’re just not sure what to call it. So either you break your flow to stop and think up the right name, or you call your variable “X” and you move on.

This exact scenario is the reason that the first refactorings created in Castalia were the simple “rename” refactorings. In my opinion, the essence of refactoring comes down to two things: 1. Renaming things, and 2. Extract Method.  The whole point of both of these is to take code that you know should be organized better and to make it really easy to organize it better.

So when you realize that X should really be called “AverageUnits,” you can use Castalia Refactorings to change it with just a few keystrokes and move on, with no tedium and with no impact on the way the code works.

The point? More readable code is better code.

A quick update

Posted on June 3rd, 2009 in Castalia, Delphi | 2 Comments »

I haven’t written anything here in a while. I really should write more.  But I just wanted to quickly share something that I’m a little excited about:

I’ve fixed something like 100 parser bugs in the Castalia source code in the last several days.  These will appear in the Castalia 2009.2 release that’s slated to come out sometime in the next couple weeks.

Boomshine Issues

Posted on May 11th, 2009 in Games, iPhone | 1 Comment »

Several people have reported issues with the iPhone game Boomshine.  We are working to resolve these issues as quickly as we can.  Part of the permanent resolution will be a new release of Boomshine on the App store (which will of course be a free update to everyone who has bought Boomshine already), but that will take a few days for Apple to approve.  Please be patient.

Castalia 2009.1 is now available.

Posted on April 23rd, 2009 in Castalia, CodeGear, Delphi, TwoDesk | No Comments »

If you have a current subscription, you can get Castalia 2009.1 at http://subscribe.twodesk.com.  Everyone else should give the free trial a run (http://www.twodesk.com/castalia).

Here’s what’s new:

* New: “Modeless” “Add Parameter” refactoring
* Improved code formatting for “Remove Unused Variables” refactoring
* New: “CurrentLine” function in code template scripting
* Fixed: Unicode characters in identifiers can cause memory leaks in Delphi 2009.
* Fixed: Improper cursor movement after some text searches
* Fixed: <Esc> key closes Code Insight *AND* pops a bookmark off the stack if Code Insight is invoked when there are bookmarks on the stack.

Enjoy!

–Jacob

Castalia 2008.4.3 Released

Posted on March 2nd, 2009 in Castalia, Delphi | 2 Comments »

I just put Castalia 2008.4.3 up on the servers.  Three very significant bug fixes:

  1. Fixed the “divide by 0″ error that many people are experiencing.
  2. HUGE speed improvements on text searching
  3. Fixed the strange garbage in the library version numbers

Current subscribers can get it at http://subscribe.twodesk.com.  For everyone else, the 30 day free trial is still at http://www.twodesk.com/castalia

Enjoy!

Finally, a breakthrough

Posted on February 24th, 2009 in Castalia, Delphi | 1 Comment »

After MONTHS of hunting down a divide-by-zero bug that affected a few people using Castalia 2008.4.2, I’ve finally located the culprit.

At the same time, I’ve also discovered a way to increase performance on Castalia’s text search by - well - A LOT.

I’ve got to clean out 6 weeks worth of debug code and then do some testing before I can release it, but expect a 2008.3 release in the next couple days that will fix those two issues.

Let’s try again: Castalia 2008.4.2

Posted on January 6th, 2009 in Uncategorized | 3 Comments »

Castalia 2008.4.2 is now available, which fixes a couple more bugs:

  • Fixed: Delphi 2007 library precompiler activates at the wrong time under some circumstances
  • Fixed: Delphi crashes when started with the /NOCASTALIA command line option
  • Fixed: Esc doesn’t close Code Insight windows when there are no bookmarks in the bookmark stack.

Castalia 2008.4.2 is available for current customers at the Customer Service Site, or for everyone else at http://www.twodesk.com/castalia.

Released: Castalia 2008.4.1

Posted on December 30th, 2008 in Castalia, CodeGear, Delphi, TwoDesk | 2 Comments »

Castalia 2008.4.1 is now available.

Current customers can download from http://subscribe.twodesk.com

Everyone else can get the free trial at http://www.twodesk.com/castalia/

This release is entirely a bugfix release.  The following issues have been addressed:

  •  Fixed: Access violations when pressing F3 after using modeless text search
  •  Fixed: ‘Clipboard’ function not recognized in code templates
  •  Fixed: Clipboard insertions incorrectly translated to new code template format
  •  Fixed: Some hotkey pickers don’t display properly in D2005, D2006, D2007, or D2009
  •  Fixed: Code template indenting stuck at 2 spaces
  •  Fixed: Library precompiler activates at the wrong time under some circumstances
  •  Fixed: Delphi 2009 hangs at the splash screen under some circumstances
  •  Fixed: Incorrectly identified syntax error when using parameterized types with multiple parameters