Working with Google Collections

June 22nd, 2009

google-labs-logo.gif

I have been working in an inherited codebase that uses the Google Collections library to extend the Collections in Java 5. I have to admit, they have done the set of classes that I'd have expected from Google - fits in with the existing objects, but adds those classes that can really be quite handy from, say, C++ and STL.

Multimap is one, missing in the JDK, but picked up by the Google Collections and implemented pretty nicely. They have the standard interface and then several implementations, each with it's particular plusses and minuses. I look at this very much in the same vein as the visualization library that I've been using for a while - very nice, but clearly done for something they had planned.

Not bad. I may spend a little more time looking into the library now that I've had to find it. Could be a nice addition like the visualization library.

Interesting Memory Footprint Test Results for Firefox 3.5

June 22nd, 2009

Firefox.jpg

I was reading one of my sites this morning and ran across this study of memory footprint usage by Chrome 3.0, Safari 4.0, Opera 10 and Firefox 3.5. I have to say that I'm impressed with Firefox 3.5's numbers. I have been using Chrome 2.0 for a while and very happy with it in terms of minimal memory footprint for my web application, but if the new Firefox 3.5 is going to best it, that will be even better.

I'll have to see what happens in real-life tests, but it's really encouraging to see this kind of progress in the Firefox line. It's been sitting on 3.0 for a while as others have jumped ahead. It'd be great to see Firefox retake the lead for a while.

Xcode 3.1.3 Developer Tools are Out

June 22nd, 2009

xcode.jpg

I noticed this morning that Xcode 3.1.3 is out from Apple. I'm sure this is the release that supports the iPhone OS 3.0 SDK, and for those of us that haven't yet gotten that SDK, this probably has just a few little enhancements. No matter, I'm a big fan of Xcode and I'd be getting the update anyway. Great tools.

UPDATE: I'm having a slight problem downloading the new docs within the Help system for Xcode 3.1.3. It's saying the password isn't right, but I know it is as I was able to download the other docs update within Help just fine. I'll keep trying every so often, and if it fails, I'll download them manually from the Apple Developer site.

Lots of Code Changes for a New Feature

June 19th, 2009

GeneralDev.jpg

Today I spent the majority of the day updating jUnit tests for this new feature that I need to add to this system I have inherited. The addition of the feature wasn't too bad. There were wrinkles as we're not really handling the booking of positions like you might in an accounting system with all the levels, etc. that you might otherwise do, but that's part of this business - it's a limited subset of products and how they are organized. No biggie, still it took a little bit to work it in.

The vast majority of the day was the updating of the jUnit tests. I've thought about this a lot, and there's a lot to be said for Unit Tests, and there are real benefits to Integration Tests, but I think that confusing one for the other can not only make for bad testing, but a false sense of security.

First, it's important that Unit Tests include - at a minimum, the following:

  • Edge Conditions - if you're not checking for the minimum and maximum allowable values then you're not really testing the unit. If you use only one datapoint, the "black box" might just work for that point and nothing else.
  • Improper Inputs - if you code up checks on the inputs, then you need to test those so that you're certain that should the user pass you in an illegal value, you'll catch it.

this is by no means a comprehensive list - it's just the minimum you need to test in order to have a reasonably high level of confidence that what you've written is working. Face it... it's all about code-coverage. If your tests only hit 10% of the code in a module, the remaining 90% can have millions of bugs. You need to try and get as good code coverage in your tests in order to increase your confidence in the tests.

Then there's the issue of using unite testing frameworks to do integration testing. This is a really an extension of the problems associated with incomplete code coverage testing. Face it, if you're not testing all of your units completely, then trying to test three or more with the same coverage is going to make things even more dicey. Sure, you can do it, but the tests become less and less about really creating assurance as they are about habit.

Someone used to writing unit tests may not be able to draw the line. They're so used to writing them they just can't stop. They drive them far past their point of usefulness. Oh sure... there is some utility in the limited tests, but it's nothing like an assurance that things are working properly. It's more like "Yeah, I haven't messed this horribly."

This is really nothing more than simple testing with live data.

I have seen cases where the unit testing is complete and amazing. But in those cases, it's a lot of work and maintaining the tests is a significant bit of work. I've also seen cases where the testing doesn't ensure nearly anything, but it's still a ton of work because of the integration set-up required.

Test appropriately. This includes unit tests and human-driven tests.

iPod Touch OS 3.0 is Out at the iTunes Store

June 18th, 2009

iPodTouch.jpg

Well... I'm not sure I'm going to see a ton of improvement in my iPod Touch, but it's an upgrade, and there's that little chance that I'm going to wish I had that one feature when I don't have access to the 'net - so for $9.95 I upgraded to OS 3.0 this morning.

If I end up getting the iPhone 3GS, then I'll probably give this guy to Liza or the kids, but if I don't, or it takes a while to get one, then I'd like to have it up to date for a while. So I got it.

I have to say that Apple makes it easy to upgrade these guys after the initial horrible sync/backup times of the original device. Yikes! I remember that. But no longer. It's nice and clean. Good job.

NeoOffice 3.0 Patch 4 is Out

June 18th, 2009

NeoOffice.jpg

I don't worry about staying too up-to-date with NeoOffice because for the most part I don't use it. But every now and then I use it to read a file someone sends me that can't be read by the other apps I have to fake MS Word or some older word processor. It's been a while since I've updated, and so this morning when I heard about Patch 4 being released, I decided that today was the day to get up to date.

Good enough. I'm ready for the next time I need it.

Skitch Beta 8.2 is Out

June 18th, 2009

Skitch.jpg

This morning, after my reboot for Safari 4.0.1, I found that Skitch's Beta had timed out, and that the new Skitch: Beta 8.2 was out with the following release notes:

Improved

  • Improved GIF and BMP support
  • Extended Skitch beta time-out

I can't imagine running without Skitch - had to upgrade. And if they start to charge for it, I'll be first in line - no question. It's the Post-It notes of my Mac -- didn't know I needed it until I had it and now I can't imagine working without it.

Safari 4.0.1 on Software Update

June 18th, 2009

Safari.jpg

Well... I wish I didn't have to reboot my box, but again this morning, I didn't really have a choice. Software Updates had Safari 4.0.1 on it and the release notes say:

This update addresses incompatibilities between Safari 4.0 and certain features in iPhoto ‘09, including Places and Facebook publishing.

So in typical Apple form, it doesn't give any real details, but still... it's Safari, and that means it's time to agree to the update and reboot the system.

Helping Out and Making Progress

June 17th, 2009

cubeLifeView.gif

Today has been a pretty decent day. We figured out why my NVIDIA 8400 GS video card wasn't displaying 2560x1600 with RHEL5 x86_64 - turns out the 180.51 driver was too old - when updating to the latest (185.18.14), it worked fine. Big difference to see it all and it is a great view. I can see a lot more of the code and web pages. Nice.

I also helped out a bit as a co-worker started making another page in the webapp that I started. This one was a heat map from the Google Visualizations, and it was OK, but the limitations really made it hard to display the data the way she wanted. We talked a bit, and I looked at the other visualizations and the Magic Table was really a winner. It was HTML 5-based and that's great, but also it had all she was looking for. Hopefully, it'll be easy to retrofit the Magic Table for the Heat Map.

I needed to help one of the Q/A folks get the software of mine they were testing up and going. It's been a chore as I inherited the code from another developer and the set-up of new machines is not what you'd call very deterministic. Basically, it's a "clone a VM and go" type of thing, and that leads to difficult situations when you have to re-configure it for Q/A test points.

Still, we got that going, and hopefully, we'll get through Q/A quickly and I can deploy the latest release and start on the next.

Finally, tonight is Nina's first playoff game for the 2009 softball season. The Twins go into the playoffs a 12-0 favorite - the next-best team is something like 8-4, or something like that. Still... on any given evening someone can get hot and win. Here's hoping that the Twins win this evening and move on to the next round.

Incredible BBEdit 9 Font – Anonymous Pro

June 17th, 2009

I was reading Gruber today and he pointed to an article about a new free font - Anonymous Pro. It's very clean and nice, and at a 10pt Bold, it's perfect for BBEdit. It's dark enough to be very readable, but not too smashed to be unreadable. It's tight, has wonderful 'greater than' and 'less than' signs... it's just perfect for BBEdit.

BKSimpleScatterGraphApplet.java

I tried it in Xcode, but I have to say here, the rendering they use in Xcode is best served by Panic Sans. But still, it's not bad.

I tried it in MacVim, but again, Inconsolata was better here for how they rendered text. Still, not bad.

So it's going to depend on what app and what you want to see, but for a light background on BBEdit, this is amazing.