Archive for the ‘Open Source Software’ Category

Linear Algebra Classes on iTunes U

Friday, August 1st, 2008

keynote_sm.png

A friend of mine that wanted to get up to speed on matrix math asked me what I thought he should do. I told him I'd look at iTunes U and if I found some good class on Linear Algebra I'd tell him about it. Well, I have to say I'm amazed at what's available in the iTunes U selection.

I looked around a bit - it could be a little better organized, but I can say it's not bad - just time-consuming to find what you might be looking for. What I found was a pretty nice course called Linear Algebra, Spring 2005 from MIT Open Courseware. Thirty-five 40 minute lectures that start at a pretty basic level and seem to cover all the basics. It'll give him a really solid understanding of the matrix manipulations he's doing in his work, and hopefully some understanding as to why he's doing them.

I have to say that the first time I took Linear Algebra I got the mechanics down pretty well, but the level of understanding was just too thin. Maybe it was the guy teaching it, after all, it was a night-school class at a local campus, so it's not like he was a renowned lecturer, but still, I have to accept a good chunk of the blame.

Later, in grad school when I really learned it, I really enjoyed it as well. I told my friend that if he watched the course and had any questions I'd be glad to meet him for lunch and help him through the issues. I doubt he'll have a lot of questions - he's a smart guy, but it's always nice to know you have a safety net, and that's what I really gave him. Should be interesting to see how he does.

Crazy Talk About Source Control Systems

Wednesday, July 30th, 2008

cvs.gif

I've used a lot of different source control systems in my days. Some have seemed to be really nice, only to be replaced by others that are even nicer. Some were replaced by worse systems, but for the most part, it's about the integrity of the development process. Period. Some make it easier to work in teams, some make it easier to work in a distributed manner, but all should have the same key feature: it allows you to version your files so you don't loose anything.

Which is why I was stunned to be in the middle of a discussion about the "one" source control system we should be using. Why? We've used ClearCase, and it worked OK, but then they didn't like supporting it and told us to move to a different system. We've used CVS for ages and it's never failed us. You can use Subversion now, and it's fine. I'm not sure, but I'm willing to bet that just about any reliable SCM is going to work. Just pick one, make sure it's safe, backed-up, and then get on with the job.

svn.gif

To say a group needs to use one at the exclusion of another is silly. You don't use one development environment at the exclusion of another - use Eclipse if you want... use Emacs, use Vi... just get the job done. Why would a group of professional developers even consider making rules like this?

OK, maybe some places feel it's important to have a single tool for each category so that people can get used to it and not have to change. Fine. Then by that logic, if someone is using a tool, don't make them change. If it's working, then it's solved. If it's not, then fix it. But making rules like this when nothing's broken is just plain silly.

When I've used projects that are in Subversion, I used subversion. When they were in ClearCase, I used that. What's the big deal? There is no one tool that's so vastly superior to the others that it can't be made to work, just pick one for a project and stick with it. Seems pretty clear to me.

But I'm in the minority here, it seems. They want to say all new development needs to be in one system. Until they don't like that and move to another, as they did when they moved to this one they are favoring now. It's crazy, but that's corporate life, I guess.

Lots to Say About the iPod Touch App Store

Friday, July 25th, 2008

iPodAppStore.jpg

Well, there's certainly been a lot of noise on the net recently about Apple's iPhone/iPod Touch App Store. Good, Bad, Angry, Happy... all over the map. While I've only done a little bit of playing around on the App Store, I do have a few ideas on the App Store now. Overall, nat bad, but there's a lot Apple could do to make it better.

First, because I have the Touch, there's not a lot of apps that I'm going to buy because I leave the WiFi off most of the time to conserve battery power, also there aren't a ton of places where I'll have a Hot Spot and not pull out my laptop instead of my iPod. So it's got limited utility to me, but still, there are a few nice things, and as a sales tool for up-selling to the iPhone the Touch is a nice entry point.

So... the thing that seems to be the most significant issue is the fact that developers can't control the timing of releases to the App Store and then to the users. It's a nice idea to have the App Store handle all that, but the complaints I've seen and read certainly put Apple's speed of movement through the store as somewhat less than ideal. It's slow, and there's no way to give developers any idea of when their stuff will be out on the store and available for updating.

For someone who likes to make continual, small improvements to my code, this is a very bad thing. The delays in the publishing to the store require a different level of testing and certification by the developers. Face it, a lot of the Mac apps use Sparkle, or something similar to get automated updates out to their users pretty darn quickly. They control every aspect of the publishing. Now there's a publisher in the middle, and their speed isn't all that good. That makes a lot of the applications on the store look a bit dodgey. After all, what's it say to get an app that you and the developer knows is buggy, with a new release coming "soon" - whenever Apple gets around to posting it.

Not a good relationship builder.

I can see that there is the need for Apple to move more quickly, or allow for the direct downloading of applications from web sites - much like plugins and themes for Firefox. You download it and then it's there. Problem is, this allows for all those malicious web sites to download bad things and take over your phone... so I can see why they aren't too crazy about it.

There's also the unavoidable round of 'junk apps' - dozens of To Do apps and such. Hey, there's nothing you're ever going to be able to do about this stuff. It's new, it's there, and there are always going to be folks that are fast and trying to make a quick buck. Let it go... not even worth talking about. Darwin (natural selection) will weed them out and there's noting that solves this problem like time.

Then there's the legal battles over the simple act of talking about the SDK. This is something that has to be an oversight on the part of Apple and needs to be fixed to give developers a better feeling about Apple. Basically, some folks have read the SDK license agreement and said that GPL software can't be built for the iPhone because you have to be able to release details that are part of the NDA in the SDK license.

While I can understand this as a part of the initial SDK rollout, Apple can't expect to control people's conversations at dinner or over the net. They just aren't capable of doing that. But it's enough to scare people from talking about it in forums, etc. This is a very bad thing, and Apple needs to loosen up - like it has for the Mac OS X SDK. Let people talk. It's good for the platform. They have to know that they will get back a hundred-fold what they put out there - that's the way the developers are with Apple.

Yes, it's a new platform, and they don't want viruses, but they can't stop the virus writers, and so all they are doing is hurting those that can really help the platform.

So... it's got a lot of good things to like about the App Store, but a lot of things that need a little tweaking. I'm sure it'll get better, but it needs to make significant improvements in the publishing very soon or they will loose a lot of momentum they have generated with the launch.

Lots of Trouble with MindAlign These Days

Wednesday, July 23rd, 2008

chat.jpg

We use MindAlign in the Shop to have a secure chat environment, such as it is. Over the last few days, it's been problematic to say the least. Today, in fact, they have narrowed down the problem to a global corporate loss of DNS due to MindAlign.

I am not going to bad mouth MindAlign, it's a package that the corporation has picked, and we're going to use it. Period. But today when I came into work I noticed (again) that almost all my production applications (servers and services) had one core/CPU hammering away doing seemingly nothing - but very very fast.

I found that once again we were having MindAlign problems and I decided that this morning I'd dig into the problem and find out why they were all spinning like mad. The first step on that path was to get a few stack dumps, and it's a lot easier to do that in Java than it is in C++, so I did a few thread dumps on an afflicted Java app and after three of them, it because pretty clear where the problem was - in the BKIRCProtocol object. That's the thing that talks to the IRC server, which is the core of MindAlign.

It appeared that the IRC protocol was trying to throw an EOFException because the socket was not returning any data, and was, in fact returning an error code indicating that it wasn't all there anymore. The problem was, that at the higher level, where the EOFException was being caught, I was assuming that the socket was closed - which is why I'd get the EOF condition in the first place. By making that assumption, a socket with an indeterminate state talking to the MindAlign server was "there", but not "there enough".

I put in an explicit disconnect() on the socket connection and that should take care of things. Simple one-line fix (with an accompanying 10 line comment to say why it's being done. Then I was on to the C++ version.

Thankfully, the code is very similar, but the socket communications isn't. But I dug into the code about the same spot - a socket that's almost dead, but returning that it's still connected even though it's not returning any data. What I found was code that looked like this:

  // now read up to the "\n" NEWLINE that the IRC server sends
  if (!error) {
    retval = mCommPort.readUpToNEWLINE();
  }

where readUpToNEWLINE() should return only when a line is received from the IRC server terminated in a NEWLINE (\n) character. The problem was, it was returning an empty string and that was all I needed to know. If it returns nothing, then the only acceptable reason is that there was a timeout. So, check for that, and all other conditions cause us to disconnect from the server and on the next pass, a new connection will be created.

Something like this:

  // now read up to the "\n" NEWLINE that the IRC server sends
  if (!error) {
    retval = mCommPort.readUpToNEWLINE();
    /*
     * It's possible that the data is empty - but the only way for
     * that to be acceptable is for a timeout to have occured. So,
     * if the data is empty and a timeout *didn't* occur, then we
     * need to disconnect this guy and the next pass through, we'll
     * be able to connect again and set things up properly - we
     * hope.
     */
    if (retval.empty() && (errno != ERR_READ_TIMEOUT)) {
      disconnect();
    }
  }

At this point, I think I have the MindAlign issues under control. There's still the issues with the corporate servers, etc., but I can't do anything about them, and we'll just have to wait for them to get fixed up properly by the support teams. It's just nice to have these fixes into BKit and CKit so that I won't get bitten by this problem in the future.

OsiriX 3.2.1 Released and Viewing MRI Image Movies

Monday, July 21st, 2008

OsiriX.jpg

Today I fired up OsiriX to add in the MRI images from Liza's hip and it told me that 3.2.1 had been released. Not as simple and neat as Sparkle, but not bad. I got the 32-bit version and then loaded up Liza's MRI images. Lots of images, as it turns out.

Since this is the first set of MRI images I've loaded into OsiriX, I was very interested to see how it would treat them, and what capabilities it'd have for looking at them. Well, I was certainly not disappointed. This is amazing.

The images can be viewed in a movie where the slices are sequenced based on the order in which they were placed on the media - which I only assume was the order in which they were taken. Very exciting. Looks just like those amazing images you see on TV when they "move" through the human body.

Then there's the 3D representation. Now I'm not doctor, but this stuff is very cool, and the body seems to take on a more machine-like quality when you look at it as this level. I can see what my sister and brother-in-law said about surgery - it's not a person so much as a machine you're working on. Makes it possible to remain a little detached and therefore better prepared to handle the problems that might arise.

Anyway, get it if you have any x-rays or MRI images. It's amazing.

Static Code Analyzer for Obj-C

Tuesday, July 15th, 2008

xcode.jpg

OK, I've been coding for a long time. I've used lots of development environments and the only one that I've found that really holds my interest is ProjectBuilder/Xcode on Mac OS X. From the first time I used it on NeXTSTEP 3.3, I knew it was something far beyond an editor with build tools. It was just so clearly built by developers, for developers. I'm still of that same opinion today.

This morning I read about an interesting tool that analyzes the Obj-C/C code and tells you where you might have issues with leaks, etc. Nothing that hasn't been covered a dozen times before in a dozen different tools, but this one is a little different. First, it's a syntax checker. Again, lint did this for decades, but this is different in that it knows about the idioms of Obj-C and the class structure that Mac OS X uses. That's huge.

Next, it's slick in it's reporting in that it's all web-based and generates all this very simply. I'm not a big fan of web apps, but for reporting, it just can't be beat. What they have done here is the very best of web reporting for coding issues, and I have to say it's remarkable.

I decided to put in one of my projects to see what it might find. Interestingly, it found a possible error in one of my classes in that I wasn't creating a - (void)dealloc method for the instance. Now, technically, the class involved is the main controller class, and it would not get deallocated except on shutdown, so there's no real problem there, but it's nice to keep things clean and try to do the right thing all the time. So I added the very simple method and re-ran the checker. Clean, save for a dead store issue that I'm not about to change as it's really just the last part of a method that doesn't return the error code. It's more of a coding style than an error, but I appreciate that it's telling me about this.

While I'm not doing a lot of Obj-C coding these days, it's tools like this that make me want to change jobs so that I did do a lot of Obj-C coding. The Mac is a wonderful platform, and its development tools are the best I've ever seen. With the addition of tools like this code analyzer, it's even better. Long live the Mac!

Adium 1.2.7 Update

Sunday, July 13th, 2008

Adium.jpg

While on vacation I got word from Adium that there was an update to 1.2.7 available. I got it and promptly forgot what the updates were from the release notes. Typical me. I believe, however, that they were small - as if that helps, but it's something to get anyway. I use it all the time every day and it's become an integral part of my daily communication. Gotta have it.

MacVim Snapshot 33 is Out

Sunday, July 13th, 2008

MacVim.jpg

While on vacation, the great guys developing MacVim released another update - Snapshot 33. There are a lot of changes, but I didn't take a lot of notes as I was in a Disney World resort at the time. I got the update, and if you're interested, you should too. I think this is the best Vim implementation I've seen and it's certainly the best Vim on Mac OS X.

MarsEdit, WordPress, Flickr, Skitch and Blog Images

Wednesday, July 2nd, 2008

MarsEditIcon128.jpg

One of the really nice things I like about MarsEdit and WordPress is the ease with which you can put images into your posts. Sure, it's not rocket science, but there's writing the image tag and then there's point-and-click. I like the latter when there's a really nice interface. So I've been doing a little experimenting with the image options with MarsEdit.

There's the images that you upload to WordPress, and that's OK, but it has a limit on the upload of only a few kb. It's not horrible, but when I was trying to put up 20kb images it often times didn't work, and it's probably as much to do with the connectivity as anything else - but this is the connectivity I have, and if it's unreliable, then it really isn't a matter of why as much as it's a question of how to get the images up to the site?

Skitch.jpg

Many months ago I read about Skitch, and watched the demo and thought Hey, this is sweet! and signed up for an invititation. After a few months, I got an invite and have been using it ever since. It's been a simple way to take iSight pictures and screen shots and get them up to a place where they can be saved and served.

Flickr is the same kind of service (so I thought) and so I was recently looking at the different Flickr clients - settling on 1001 as it seemed to be a nice small app that did what I needed and didn't make a big deal of itself. The wrinkle with Flickr was not Flickr - but MarsEdit. When you place an image into a post from Flickr you get a 'mini' version of the image and a link to the Flickr page where the image resides.

This is OK if you're really wanting to forward folks to Flickr, but if you want to just display images in your posts, this isn't the best thing because the way it's integrated in MarsEdit. However, if I put the screenshots up on Skitch then I have to go to the Skitch page to get the URL and then paste it into the post in MarsEdit. It's like I have to do the work up-front or force the readers to do it on their own.

Neither is ideal. So I posted a request to the MarsEdit forums about adding Skitch support. Ideally, I'd be able to put something on Skitch (like I can in Flickr) and then MarsEdit can preview those images and I can include the links easily - but as regular images and not links to pages with images.

Daniel wrote back about the future plans, and if he does the plug-in I think I'm going to have to write a Skitch one as this is just about the neatest little snap-n-share application and service I've ever used. If you haven't seen it, take a look.

ICQ, libpurple, and Adium Updates – It’s Wacky

Wednesday, July 2nd, 2008

Adium.jpg

Yesterday afternoon I noticed a message from Adium saying that it could not connect to ICQ because the version of libpurple had expired. That's odd, I thought, and checked then for an update to Adium to see if I had missed something. Nope... no update. Since I don't get a lot of chats on ICQ, I figured that there was nothing to do, and I let it go.

This morning, Adium 1.2.6 was available with (surprise) an updated libpurple so ICQ is once again working. I got it and everything is fine.

What surprised me the most, I guess, was that an open source library would expire like that. Maybe it was the protocol at ICQ that required it, but it seems so counter to the open source ethos that it should expire. Very odd. But... I have to say, the Adium folks were on top of it quickly. Good enough.