Wednesday, December 28, 2005

Eclipse Macros?

I've found myself using emacs a good bit recently. Why? It is the only editor I use regularly that has easy, fast, and good keyboard macros. As far as I can tell, Eclipse doesn't include any kind of keyboard macro system. Am I missing something obvious? How could such an otherwise amazing package be missing some fundamental? Count me confused.

Then again, Visual Studio may include keyboard macros, but they are so slow and annoying since VS7 that I gave up using them. It is faster to load emacs load the file into emacs and just do it there.

Travel Travails

I spent an extended weekend visiting my family (in Rhode Island). It was good to spend time with my family, especially my new nephew. There is nothing like interacting with a small child (infant in his case) that really renews ones awe at how amazing a creature human beings are.

My flight out was a red-eye; it is that or loose almost an entire day due to travel times + time-zone changes; which was my 2nd worst red-eye ever. I strained my ankle snowboarding last weekend and my ankle cramped up after ~3-4hrs and nothing I could do would get it to relax. Of course I packed my ibuprofin in my checked luggage. Worse, I was in an aisle seat with just enough foot space for my big toe. Lets, see... United aisle seat. Apparently that means you get triple screwed. You are one of the last to board (window and middle seats board first), so there is no luggage space left. Worse, there isn't enough space under the seat in front of you to fit your feet, forget a bag. Lastly, you get the joy of rubbing elbows with everyone who walks past, thanks to the large person overflowing out of the middle seat next to you. (At least on this flight it was some cute woman, not the fat, smelly, snoring guy that made my worse-ever red-eye such the memorable experience.)

There was a pleasant aspect of my travels. For both my flights, out and back, I ran into someone I knew on the 2nd leg of the journey. On the way out, an old acquaintance recognized me as we boarded the puddle-jumper from Dulles to RI. She may have had a year to compete in the world's worse, competition, but it was great to catch up. Andrea, if you ever read this, thanks! On the way back, I had a transfer in Atlanta, and it turned out that another random acquaintance was on that flight also. That turned out to be fortuitous as well, since the plain was delayed, and we were stuck there for a while.

Strange how small the world really is.

Wednesday, December 21, 2005

Mindless Entertainment

It being winter(ish) and all, and more importantly, dark at 4-frigg'n-pm, I've actually seen a few movies recently. (I probably average one movie a month from April-October.)
  • Wallace and Gromit: Funny, Smart, and British as bloody hell. I expect I'll watch it again; I may even buy it.
  • Harry Potter: My favorite Potter movie. Despite having read the book ~2 years ago, I could still feel some of the holes in the story though. Definitely worth the big-screen experience despite that.
  • Chronicles of Narnia: Natascha and I read the first 2 books aloud to each other on the way to Burning-Man this year, so I basically remember the story, and was impressed at how well they kept to the main themes. Fun family entertainment, but somehow, the magic of the story was dulled by the cinematics and the movie definitely lacked the suspension of disbelief evoked by the novel. Worth taking you family to, but I didn't enjoy it as much as Wallace & Gromit.
  • Mr & Mrs Smith: Surprisingly amusing for the first 3/4 of the movie, but the ending was a complete waste. I'm glad this was a rental and that I didn't bother to see it in the theater.
  • Aeon Flux (MTV Anime): I've only had time to watch the first DVD, but I forgot how wonderfully f#cked up this was. It is even more so when you watch entire episodes uninterrupted. It does remove any real desire to see the recently released movie though, as there is no way it could possibly compare. I'll probably rip the rest of the DVDs so that I can watch them while stranded at my parent's house for the holiday.

Thursday, December 08, 2005

Java Profiling

Part of my job, since early on after joining Microsoft, has been to make code run fast, be it my code or someone else's, be it C,C++, JavaScript, C#, or now Java. I actually like doing performance tuning. I'm one of those computer geeks who likes getting down to the machine code and understanding what the processor is doing, and try to refactor and redesign code to better factor in realities of how the code actually runs. I've used many tools, and having been at Microsoft gave me access to a wealth of internally developed tools, that may have been clunky, but worked reasonably well. (I still remember the horrendous Excel spreadsheet that someone had written to analyze the results of an early version of an internal profiler. Scary, but it provided an excellent view that was easily searchable, graphable, etc...)

My more recent Microsoft experiences were with the .Net runtime (aka CLR) and there was (usually) a similar wealth of available options. (If you feel the need to get me going, ask me about trying to profile/tune code during the mid-point of CLR 2.0's development cycle...) The .Net runtime ships with an excellent memory profiling, there is a free profiler, and Visual Studio 2005 (Team System edition) includes a kick-but profiler.

So now I work with Java. I've been developing with Eclipse and using HPJMeter for my profiling UI (it uses the profiling built into the jvm to do the actual tracing). Recently, I've been trying to do some memory usage tuning. HPJMeter is mostly useless there, although all the info I need is in the log file, HPJMeter appears to throw out the stack traces... sigh. I've looked around at the various free profiler tools and been sorely disappointed.

The latest I'm looking at is the profiler integrated into NetBeans. Finally I am seeing something that is more than just a toy! Given Java's reputation for being slow, how could Sun have been so embarrassingly asleep-at-the-wheel all these years, and not helped fund a decent profiler tool before? This just baffles me.

As part of my frustration with the available free tools, I've been evaluating the various commercial tools: JProbe 6.0, YourKit 5.0, and JProfiler 4.1. JProfiler and YourKit appear to be in a head-to-head customer battle, with very similar feature sets and almost identical pricing structures. JProbe looks like the old-school, high-end solution with node-locked licenses and a significantly higher cost, but with a more mature UI and such features as line-level sample-based tracing. All these products have all sorts of features to help J2EE profiling, but all I want is basic application profiling. For that, JProbe is definitely the best, but JProfiler is the best-for-the-money.

All that said, I've started using NetBeans Profiler (M11). It isn't quite as feature-rich as any of the commercial offerings, but it provides 90% of the value, at 0% of the cost.... almost. Unfortunately, it is tied to NetBeans, so I would need to either switch from Eclipse to NetBeans, or live with both. They finally got a Mac OS X build out as well! I'm not sure when I'll get around to trying that out, but that is a major selling point for me. (Most of my development is on a Wintel box. My poor PowerBook is just not up to snuff for real development. Apple, please bring me a decent Pentium M laptop A.S.A.P.! Your PowerPC laptops just can't compare!)

post-script:
I did not realize (before writing this entry) that Microsoft's new profiler only ships in the Team System edition. That is insane. Team System is bloody expensive! I have an MSDN Universal subscription, so I don't really worry about the cost of individual tools, but I can't but wonder if Sun's pushing a decent profiler into NetBeans will eventually force Microsoft to package a stripped-down version of their profiler in Visual Studio Professional or even Standard. Having been at Microsoft during the development of Visual Studio 2005, I understand how much work went into producing it, but I find it hard to believe that customers are really willing to shell out that kind of money, when Java has Eclipse and NetBeans for free, and IntelliJ (which costs a bit more than Standard Edition). Lets see, NetBeans is a decent IDE (slow and bloated, but then so is VS) with an integrated profiler, version-control integration (CVS and Subversion), and Unit-Test framework (JUnit). To get the same from Microsoft, I need to shell out almost $3k? Someone is either not paying attention to their competition or actively enjoys watching their market-share shrink.