Archive for December, 2008

Interesting SQLite3 Wrapper from Gus Mueller

Wednesday, December 31st, 2008

SQLite3.gif

In keeping with the digging I've been doing with SQLite3 this morning, I found this link on a web site discussing Objective-C SQLite3 wrappers. I happen to think Gus' work at Flying Meat is really nice, and given that, it's probably a pretty solid piece of code. I like the fact that it complements CoreData in that it deals with the data in the database as just that - data in a database. The object-level abstractions are great for CoreData, but if I have data that I need to store in a database that's not an object representation, for some reason, then I want this kind of access to make it easier to get to.

I'll hang onto this link just in case, as SQLAPI++ doesn't have SQLite3 bindings and I know that I might very well need them sooner or later.

Fun with SQLite3 and Base v1.1

Wednesday, December 31st, 2008

Base.jpg

This morning I decided to do a little digging into SQLite3 after thinking about CoreData more and talking to a friend who uses it a lot at his Shop. Interestingly, it's a file-based database system, much like MySQL, but in this case, they update the database only once - at night, and then it's read-only all day long. Because it's a file-based database, it's going to be very fast to get the data out of it. Sure, there will be limitations - like I can't really do foreign keys - yet, but they say they are working on it.

But it's got stored procedures, triggers, and C/C++ extensibility. So there's a lot there to like - considering it's the basis of CoreData. So the engineers at Apple must have seen something in it, and my friend says it's rock-solid and "just works". So I started digging.

The command-line interface, sqlite3 is nice - very similar to other tools in this genre, but I have to say that the output of simple requests like select * from person are a lot nicer in PostgreSQL than SQLite3, but there's a ton of flexibility in the output format in SQLite3, I could just be missing it.

I happened across a neat tool - Base, that is a Mac GUI to SQLite3 databases. It's clean, fast, and at v1.1, it's got a lot of room for improvement. I'm hoping that they add a few things - like preferences for the fonts in the table views, and the ability to re-arrange the columns on the data and SQL output panes. It's got a lot of promise, so I registered it to at least support them in their efforts.

So I'll see what I can do with SQLite3 - I'm thinking there's an app in here waiting for me to write. Not sure yet, but it is nice and fast, and dovetails with CoreData so nicely... it seems a waste to miss this opportunity. Feels right... we'll see what I dig up.

My 47th Birthday

Wednesday, December 31st, 2008

Cake.jpg

Well... another day, another month, another year and my birthday is here. It's been an interesting year, full of a lot of surprises and unexpected moments. Work was not what I'd have hoped, but in the end it payed the bills. The kids are doing well, Liza is fantastic. In the end, it's a year a lot like the last, and I'm guessing a lot like the next.

So here's to a new year and a fun birthday!

I’m a Sucker for Rules, and I Pay for it Every Day

Tuesday, December 30th, 2008

cubeLifeView.gif

I'm sitting here thinking how much I dislike the situation I find myself in and I realized that I'm as mad at myself as anyone else. Face it - they're doing everything they can get away with, and I'm the idiot playing by the rules. Who's the smart one? Not me.

I work with some people that I have to wonder what their motivations really are. They are a lot like people on the interstate - they push the rules until they think they can't get away with anything more, or they see people getting in trouble for similar actions. They are realizing that the "rules" aren't really rules, but just guidelines in case someone asks so it seems to be a level playing field.

But it's not. Not even close.

If I were a little smarter I'd see this daily and simply push back. I'd say "Hey, yeah, I'd love to, but I'm a bit busy now. You can do it." and then be done with it. Or I could tell people that I needed something today when I don't need it for a week and then when they give it to me tomorrow I still have it in plenty of time to meet my deadlines.

But silly me... I tell the truth.

So I get to do all this crap work, and I do it. I don't say "No." I don't think what I can get away with - I think what's the right thing to do. I'm going to pay for that every time in this environment. No question about it. There's always someone willing to undercut an honest person when there's no real cost to it. It might even been seen as clever by some.

The question is not if things will change - I know they won't. The question is when will I learn that it's time for me to leave. That's the only real solution. I'm not going to be someone that competes with them on their own level - I'm no good at it, and I don't want to.

My Chair has Shipped!

Tuesday, December 30th, 2008

aeron.jpg

It's taken several weeks, but my Aeron chair has finally shipped and I'll probably be getting it in the next few days. Certainly in the next week. I ended up getting a very good deal on it, and it's got the full 12-year warranty, so I'm ready to start sitting. I got the large coasters for the carpet, so it should move smoothly across my office floor. I just can't wait.

Pretty soon I'll have a really nice chair for my office. Then, I just need to code.

UPDATE: based on UPS, my chair is expected to arrive on Jan 5 - the Monday after the New Year holiday weekend. Crud. But better then than later. I'll at least have it by the next weekend.

SubEthaEdit is Up to v3.2.1

Tuesday, December 30th, 2008

subethaedit.jpg

It's been a while since I checked on SubEthaEdit, and this morning I decided to check and see if it's been updated recently. To my surprise, it was up to 3.2.1 - from 3.1 I'd been running for a long time. Turns out there are a ton of changes - and all of them good.

There were a few things that I didn't really like about SubEthaEdit, and the first was the syntax highlighting was slower than I could type. It would look like "normal" text for half a second and then convert to the correct style. Not horrible, but not as fast as BBEdit or MacVim, and those are the two that I use daily. Even the editor in Xcode was faster at the change. Well... with 3.2 (and then 3.2.1) they have improved the syntax highlighting performance significantly.

They have also improved the PHP, Perl, CSS, Javascript, and a few other modes. This is going to be a lot faster. I'm very excited about what they have been doing here. If they only added the ability for me to mark/jump and also navigate by the keyboard and fix the method sorting.

There are a few other things: the scrolling 'jumps' when you get to the bottom of the screen and while this is fine for people that didn't get used to 'vi' or other editors that scrolled one line at a time, it's really distracting for me as I have to refocus on the moved text.

It's getting better, and I'm really happy to support them as they get better, but for now it's not going to supplant BBEdit or MacVim.

VoodooPad (Pro) 4.0.4 is Out

Monday, December 29th, 2008

VoodooPad.jpg

The guys at Flying Meat have released a nice update to VoodooPad (Pro) today - 4.0.4. From the release notes it looks like quite a few bugs fixed and several of them crashers. I haven't run into any of the issues, and I've been using it quite a bit - but maybe very simply.

Anyway... nice to see the progress made.

Mounting a USB Thumb Drive in Linux

Monday, December 29th, 2008

Fedora.jpg

I got a thumb drive for Christmas and I wanted to put a few things on it from my linux workstation but I wasn't really sure how to mount it properly. What device did it show up as? There are a few things that I needed to know, but it seemed pretty difficult to find out. Then I talked with a friend that had done this before and he had a few great pointers.

First, find out the device by looking in /dev/disk/by-label. It's got them organized by their labels, and all these thumb drives are going to come with some default label. So now that we have the device it's a simple process of mounting the filesystem:

  $ sudo mkdir /mnt/thumb
  $ sudo mount /dev/disk/by-label/MY_DRIVE /mnt/thumb -t auto

and then it's ready to use. When you're done, simply unmount it:

  $ sudo umount /mnt/thumb

and you can pull it out. Pretty sweet.

Found an Interesting Bug in the PList Parsing in CKit

Monday, December 29th, 2008

CKit.jpg

I came in today to see a problem in one of my apps that uses the plist parsing in CKit for preferences - much like the old Mac OS X plist files. I did this because I really liked them, and they afforded me a great deal of flexibility in the setting of the parameters for this application. But there was a problem. I hadn't found it because up to this point I edited the file and then reloaded the file into the app. But if the app wrote out the file and then tried to reload it, there was a problem.

The problem today was that I looked at the plist file and it had clearly been changed. Yet they probably hadn't changed it. What probably happened was that the app itself had written it out and then failed to read it back in properly. There was another interesting complication in the works that lead me to believe that it was the writing part and that was a feature I had put into the code from the beginning.

If I had a section of the plist that looked like this:

    backup = {
        interval_mins = 5;
        filename = "../logs/<hostname>/backup.dat";
    }

then the same could would write out:

    backup = {
        filename = ../logs/<hostname>/backup.dat; interval_mins = 5;
    }

and there's a good reason for it. First, the quotation marks are gone because it's obviously a string and there's nothing that needs escaping in the string. Secondly, for maps with less than three elements, I decided to place them all on a line so that things like points and lines are more easily visualized. What happened then was the bug.

The bug was in the reading of the converted plist. Specifically, it wasn't looking at the semi-colon as the terminator for the value on the first key/value pair. In fact, it was only looking at the line-endings as terminations and that was meaning that the filename had the semi-colon as well as the second key/value pair. That's not going to work.

The solution was simple - recognize that the semi-colon was the terminator and everything worked perfectly. Simple fix, but finding it took longer than I expected.

Audio Hijack Pro 2.9 is Out

Monday, December 29th, 2008

AudioHijackPro.png

The guys at Rogue Amoeba have completely updated the UI of Audio Hijack Pro for 2.9 and it's very nice. The old UI was functional, but looked more in keeping with a Mac Classic than an OS X app. The new UI looks like a fusion of iTunes and iCal - very nice. There's also a few things the did with this update - like editing ID3 tags, but for the most part, the big change is the UI. Nicely done.