
More Ruby Exporting of Groupwise to iCal
One of my most frequently requested posts is my initial exploration into using Ruby to export my Groupwise calendar to iCal format. The code I posted there was simple, and it almost worked. I figured that’d be the jumping off point for a lot of people to dive in and explore the options Ruby has from there. In retrospect, though, I should also have posted my final version that I worked out a few weeks later.
So now I’d like to introduce timshadel.com/code. It’s the start of a simple public Subversion repository where I can share my half-baked code ideas, and where you could watch some of my ideas evolve over time. I’ve run across several small scripts and even medium-sized projects that I figured might be worth sharing, not because they’re stellar code showing the best kind of professional attention to detail, but because there was some aspect about them that I thought was fun to play with and I always like to see examples to start with when I’m investigating a new topic.
So, without further ado, proceed to the full version of my script that turns Groupwise calendars into working iCal files. Please note that I no longer use Groupwise, so I’m not likely to make any more improvements to it, but as it stands it should be able to dump not only your appointments, but the attendees and their email addresses into a format that even Google Calendar can read. Also note that Google Calendar may send reminders to your invitees; so watch out.
If you’ve got comments or improvements, feel free to share them in the comments.
Pinpoint error prone areas with log4j
Building internal IT systems is as much about the data that passes through your application as it is about the logic that operates on it. I’ve scanned log files of web servers for years. I often use a combination of grep, sed, and other tools to look into specific problems. These are often one-off curiosities that don’t require a GUI.
Since before taking over management of this team in July, our app has had some long-running cases where we see ERROR level items in our logs. Some I question whether they should be logged as errors, while some are disconcerting. The application works well overall, but in the spirit of No Broken Windows I’d like to clean up some of the sources of these errors.
Here’s a little snippet of the JBoss log file, showing some standard log output from Hibernate:
After a minute or two I formulated this little command-line string to give me a count of the classes that had the most errors:
grep ERROR jboss.log | sed -e "s/^.,(.)] .*$/\1/" | sort | uniq -c
This cuts through the log file, locates only errors, slices out the classname from the log message, sorts the remaining list, and then counts up the number of times each classname appears in the sorted list.
4 LegacySkimmer
4 PersistentRef
21 ProgramStateExclusionDaoImpl
8 QualifyLeadsDelegate
28 RDBQualifyLeadsDAO
2 SSOLogger
1 ShowNextLeadAction
3 [action]
Interpreting these results can be a bit tricky. I take it really informally. This doesn’t represent the number of bugs in the modules, or even the classes with the most software defects. For me, this is simply a list that shows from among the classes that do log errors, which classes have experienced conditions that trigger those error logs most frequently. For our setup, that usually means that there’s some data from another system coming in that doesn’t meet some assumptions. Other causes may include intermittent connection problems to other systems that just get noticed on one part of the code.
I’m not certain of the exact outcomes that will result from this little discovery exercise, but I’m betting that our code will be a bit cleaner and a bit more robust for it.
Calm before the storm
Tonight we’ll be deploying the first beta of a major new feature of our product that my team’s been working on since September. Don’t get me wrong, we’ve release updates to our product every two weeks. Our branching strategy is such that we have one month cycles on /trunk that branch on release, and are followed up by a second release two weeks later with some new functionality, but no major restructuring. That keeps us building along happily every two weeks with a way to take on bigger work on the four week branch.
Pieces of it have been growing in the app for some time, but tonight we flip on the central piece for a few small groups. We had a hectic day yesterday, and ultimately discovered a networking problem two teams away that prevented us from hitting our well-publicized deadline last night (always make sure to setup your QA environment as closely as possible to your production environment). All that should be resolved today. Everything’s done.
Now there’s nothing more to do for this release but sit and wait to see which way the wind blows.
I should be in charge of everything, or why bureaucracy stinks
Today:
- Release team took 3 hours to respond to the build request I spent all early-morning working on. That made it very late for the QA guy.
- When we sent an updated release, they asked for us to re-email something we had sent just 1 hour before.
- I can’t get a login to my dev machines without going through the generic HelpDesk ticket system. I can’t select the appropriate party to assign the ticket to. I’m stuck with no access.
- I can’t have more than 100 MB of email space. Today I had to dump all my archived mail to mbox for the 2nd time in one month.
- I can’t get access to the hardware load balancer configs without going through the generic HelpDesk ticket system either. I just guessed about where to assign it. It’s now lost in neverland.
- The release team doesn’t own the boxes they build on, so 90 minutes after my second request they were still trying to build but running out of disk space on some partition they had no rights to. They are now planning to build on another machine, and aren’t interested in my local automated build system’s binary output. (It’s all done and even automated on our side, but _they_ haven’t done it yet.)
Other days:
- I can’t connect via POP to pull mail from a common mailbox to streamline turning customer requests into JIRA issues.
- Virus scanners eat gigantic portions of my team’s CPU cycles, to do nothing useful, effectively reducing the speed of the CPU purchased by the company.
- They’re recently installed BlueCoat and have institutionalized the Man-In-The-Middle SSL attack for all outgoing SSL traffic.
- I must write English instructions of how to deploy my application, and then have them executed by a person that has access to the boxes, but very little knowledge of the application. I cannot run any automated commands to accomplish this process.
So today I’m grumbling because I have a different set of priorities that others in the company. That’s life, but today I’m grumbling.
2007 Shake Up
For 2007, I’ve decided to make a few subtle changes to the way I blog and
podcast.
- Less Java, more other stuff.
- Less rigor, more direct.
- More personal.
Less Java, more other stuff. I don’t find that Java captures my main set
of interests any more. I’m going to talk more broadly in both my blog and
the Zdot podcast.
Less rigor, more direct. Up to this point I’ve typically waited to post most substantial things until I’ve had some longer experience. Bloggers like Matt Raible and Ed Gibbs write more stream-of-conscious style. I like the feel it brings, so we’ll see if it fits me in 2007. So don’t be surprised to see posts that reflect my emotions in the moment.
More personal. I’ve avoided most discussion of the more personal sides of life. I’m gonna dabble with extending that a bit more.
While this may not mean big changes for you, I think it’ll free up a few constraints that I’ve put on myself. So out with the old, and in with the new. I’ll talk to you soon.
–Tim
Election Results: Mac over Ubuntu in a landslide
Just before election day in the US I bought another Mac (a MacBook Pro, Core 2 Duo to be precise) after ditching my Ubuntu laptop. This goes against some of the recent migrations that smart people have been making. Mark Pilgrim moved from Mac to Ubuntu, as have a few others.
I’ve read why they switched, and in my experience I’m voting 100% in the other direction. Why? Well, first some background.
I’ve been using Linux frequently for 6+ years. I’ve used Caldera, RedHat, SuSE, Gentoo (extensively), and Ubuntu. Almost all of them were installed on more than one machine, some were desktops and some were servers. Linux has served as my primary all-day-programming desktop for over 18 months. I’ve been around the block with Linux. I’m no stranger to compiling, configuring, and kernel stuff. They don’t intimidate me me.
I’ve also owned a Mac for two years. In that time I’ve used it to do some development and some home stuff. I’ve used it a fair amount. I’ve used it enough to have problems with it (corrupt disk), and I’ve used it enough to know that there are some quirks I’m not fond of (I can’t hit Tab in the browser and give focus to a checkbox).
Recently, very early this year I installed Ubuntu on multiple machines — a couple laptops, a desktop, and a remote server. I’ve used these machines as my primary work and home environments for close to 6 months now. And I’m ready to move on (at least in my home environment).
Why?
Because things in Ubuntu almost work, and on a Mac things Just Work. Ubuntu’s close enough to working that the “almost” takes a few months to fully manifest itself, but in the end I’m sick of fiddling and I’d rather move on to just Getting Things Done.
Hands Down Mac Victories
Search. Spotlight nails it. Beagle’s cool, but it’s not there. It’s a wannabe, and it shows. The presentation isn’t as good. The integration into the “chrome” of the operating system isn’t as smooth. In short, the little barriers to invoking it as well as the slightly less useful results it gave made me abandon it after a couple weeks. On a Mac, I live by Spotlight. And it rarely fails me. On Ubuntu, it almost works.
Mail. Mail.app is great. Evolution almost works. I have to use exchange at work (I have Ubuntu installed there, too). Evolution has a module to integrate with Exchange, and it sorta thinks about working. It’s slow, and frequently it hangs. So much so that I got sick of typing
ps -ef | grep evolu | grep -v grep | awk '{ print $2 }' | xargs kill
that I put it in a batch file shell script. I ran it no less than twice a day, sometimes more. Calendaring almost worked, except when it didn’t. Frequently I’d send out an appointment only to figure out that my colleagues version of the appointment didn’t repeat over the right interval. I don’t blame anyone for having trouble integrating with a Microsoft product. But at the end of the day, it was still annoyingly brittle. On Mac, there’s Entourage — an M$ product to work with the M$ server. As it is, Mail.app rocks for processing my personal email really efficiently. Oh, and it can export your mail to mbox. Duh. On Ubuntu, mail almost works.
Wireless. Wireless Just Works on a Mac (providing your router isn’t ancient). On Ubuntu, it’s the opposite. If you buy a great machine, your wireless may take months to work. On my work machine, I couldn’t use the regular Broadcom driver setup, and so I had to resort to ndiswrapper. The funny thing is, that once I got it setup, it started the habit of dropping the connection randomly. Sometimes it’d go 20 minutes, or an hour and a half, or 30 seconds. It was unpredictable. Come to find out, there’s an IRQ conflict between ndiswrapper and nvidia. A conflict that only the BIOS manufacturer (Dell) can resolve. So if I want to use wireless when working from home, I have to turn off nvidia. If I want the eye candy of Beryl (more on that later) at work, then I have to switch my xorg.conf every time my laptop migrates.
Visual Effects. Ok. So I love that twirling cube on the Mac. The login box shakes its head at you when you put the wrong password in. The system preferences menu highlights areas that may have what you’re looking for as you search. Beyond being “cute”, these kinds of user interface indications provide street signs and affordances that anchor the user in a useful mental model of how the system is treating their actions. It reduces both the Gulf of Evaluation and the Gulf of Execution by radiating system state in a creative, intuitive, meaningful way. There seem to be several different combinations of programs and libraries that you can install on Ubuntu to try to bring some of this UI goodness to your Linux desktop. Beryl has been my most recent favorite. But the maze of configuration settings and the massive number of things that can go wrong if you don’t get something setup quite right are annoying. I had XGL and Compiz setup great on my laptop. Then I did an update one day and everything broke. I had no chrome (close, max, min buttons; resize arrows, etc.) on any of my windows. I dropped back to my normal window manager. I waited. 2 days. 5 days. 3 weeks. Nothing. Meanwhile, my work laptop continued to like Compiz. But then I added an external monitor and then nothing worked. Then Beryl came out. It worked. It fixed both problems, but added others. Configuration still was an intermediate level task. On Ubuntu, the visual effects are mainly eye candy, unstable, and hard to configure. On a Mac, the visual effects are subtle, elegant UI design that Just Works.
Audio Effects. Chat doesn’t blare at you, and the Power On sound is impressive. The sound design shows the same kind of polish as the Tokyo subway. On Ubuntu, some of the sounds are great but some are lame. The inconsistency an lack of harmony among the components is reminiscent of the PC fragmentation. On Ubuntu, it’s almost sorta there, but not quite. A Mac feels more integrated and unified, in my opinion, and the design standard is clearly on a higher Zen plane.
Bluetooth. Bluetooth on the Mac just works. I’ve had an iMac with a bluetooth keyboard and mouse for over 2 years now. I’ve used that same iMac to connect to my cell phone and my bluetooth headset. I’ve pulled pictures off my cellphone, dropped MP3 ringtones onto it, and browsed it’s directories. Ubuntu’s support of bluetooth is nothing short of disastrous. There are half baked projects scattered across both Gnome and KDE. Some work, some don’t. None could connect to my cell phone. Only one could browse part of it. Ubuntu simply gets a failing grade in this area, for sucking the life out of me while I fell down this rabbit hole into the Pit of Despair. On Mac bluetooth Just Works.
Bonus Points for the Mac
Sadly, I don’t have time to elaborate on why this things are so cool. You should just buy a Mac, and then you’d know.
- QuickSilver. You can’t understand how cool this is by simply reading.
- Magnetic battery connection. It’s like moving to a mouse with a scroll wheel — you have to experience it.
- Scriptability.
- I can boot off another device. Like, say, another Mac in Firewire-mode.
- Movie editing. No, real movie editing.
- iPod+iTunes. (amaroK is lame, iTunes is QuickSilver enabled)
- Open formats. Most things speak the open formats I care about.
- Two finger right click + horizontal scroll. Yup, experience required to feel the cool factor.
Stuck on Windows
Visio. There’s nothing on Ubuntu that lets me read files written by Visio. Oh, and VMWare on Linux almost works. Except their website process for downloading the free server edition requires me to re-register every time I need to download. And it requires strange root access. At it can’t boot the physical partition where my real Windows data is. And I’d have to ask support to register my virtual instance with the domain controller so they could conceivably remotely install Visio on my virtual instance. Nope, gotta keep the dual boot. In fact, this has actually pushed me more toward staying in Windows on the work machine.
Conclusion
My reasons for choosing to dump Ubuntu for a Mac are almost entirely about the experience. After years of Linux work, I’m tired of fiddling. I’m tired of things that almost work. I’m ready for a change. I’m sick of the war to get things to work. I’m ready to simply Get Things Done.
Cast your vote.
Bye Typo – Back to WordPress; Podcast Fixed
OK. Now that the little one’s affording me a bit more sleep, I’ve finally gotten around to fixing my podcast. I took the cheap way out — I simply moved back to WordPress. I didn’t find that my experience with Typo was all that compelling. I had to rework my permalinks, migrate the content (comments didn’t come over well), and then there was the question of the podcast (it totally didn’t work at all — all the content’s actually at archive.org).
So now I’ve fixed it all up and hopefully the stage is now set for smoother sailing on both the blog and the podcast from here on out.