Archive for May, 2006

Master of the C

Wednesday, May 24th, 2006

I have just submitted a patch to libtiff’s tiffsplit utility to allow for numbered output instead of incremented letters. The total number of images that can be processed is greater. We’ll use this at work. I’m hoping that it gets included in some modified version in future versions of the utility. There’s a bug open so someone will look at it eventually. This utility was written in C. I am not an expert at wrangling strings in C. There was a lot of pointer arithmetic involved.

The Free Software Foundation launched their Defective By Design campaign, which had people protesting digital restrictions management in hazmat suits. The pictures are pretty cool. It’s about time we had some activisim on this front. We’re going down a scary road; and, yes, I want artists/scientists/creators to be rewarded for their work.

There Has Been An Error While Processing On Line -1

Saturday, May 20th, 2006

Good news! The invoicing application I’ve been working on now has a properly implemented method to render any category of the invoice that I need. This means that I can add, delete, and reorder entire sections of the invoice in the web browser without having to refresh. I’ve been dicking around with this method for the last week. Today, I decided to come into the office and just rewrite the damned thing. After about two hours, I now have a working render method. My biggest hang up was debugging an error where the only part of the error message that I could read said that there was a problem on line -1. Not useful.

The way that rendering was done in the last version of the application was based on lambda expressions. I had a spinner which would execute any lambda expression I wanted on it. That meant that I could call the spinner and tell it to output the entire invoice, just the categories in a formatted select list, or any number of other output options I could think of. That’s flexible, but it’s way too much for what I’m doing and makes it very difficult to find out where my errors are from the AJAX toolkit I’m using.

The refresh button that I’ve implemented on the invoice editor really doesn’t do a lot of good. If I edit something in a category in the database and hit refresh, I can see the changes without having to reload the entire web page and reorient myself; that’s a pretty unlikely scenario, though. The power isn’t in the refresh button, though. Now, if something is added, I just execute the logic to do the add and run the render routine. The same will go for anything that happens to a category, so one of two hard parts with dealing with categories is taken care of. The other is reassigning a parent. I may not allow that from the screen, because there isn’t a clean way to do it.