Saturday, June 19, 2004

Quick, Easy, Free UML Diagrams of Java Classes

I sure do love it here in the Java open-source community!

I read in Martin Fowler's blog that there's a cool open-source tool, called UMLGraph, he's been playing with for rendering UML class diagrams. If Fowler says it's worth checking out, then that's good enough for me. What the heck? I'll give it an hour.

So, I installed the tool itself (a JavaDoc Doclet -- just one jar), and I installed the free executable from AT&T Labs that actually does the rendering. I added a JavaDoc command to my Ant build script, and I added a call to the AT&T tool. Walla! Pretty UML diagrams to go with my program! It couldn’t be any simpler.

Not that I'll ever wait until the end of a project and generate reams of UML documentation to sit on a shelf -- what this will allow me to do is start to write new Java code, without any meat on the bones yet, and immediately get diagrams as I go to show off at design reviews and whatnot. Don’t like the way the design looks? I'll just take advantage of the Eclipse refactoring tools, and then re-render the diagrams. Is that slick, or what? No need to pay for a Rational Rose license, nor go though contortions to install it. No need to learn how to use the Rose UI. And, best yet, no need to "transcribble" (transcribe with possible errors) the design into code -- it's already code.

Note that I've only played with UMLGraph's class diagrams thus far. There's also a way to draw sequence diagrams, but it doesn’t work off of the Java source. You have to use something called the PIC language, so that's not as slick, but I'm not complaining. Being able to render class diagrams quickly and easily (and cheaply) is a tremendous boon. I couldn't wait to spread the word.

Oh, and back to why I love the Java open-source community: Fowler's blog entry wasn't even a day old when the UMLGraph people changed the front page of their site to reference the suggestions for improvement that Fowler made. I wouldn't be surprised if the team has acted on them already.

Friday, June 18, 2004

Opting Out

Here is a concise web page that tells you how to cut down on junk mail (snail mail), starting with those pesky pre-approved credit card appilcations that you otherwise have to shred.

Thursday, June 17, 2004

The Decline and Fall of Our Civil Rights

First the fun part:

I saw this on techno.blog("Dion"): "Teacher Arrested at Airport - At New York Kennedy airport today, an individual later discovered to be a public school teacher, was arrested trying to board a flight while in possession of a ruler, a protractor, a setsquare, a slide rule and a calculator. Attorney general John Ashcroft believes the man is a member of the notorious al-gebra movement. He is being charged with carrying weapons of math instruction.
'Al-gebra is a very fearsome cult, indeed', Ashcroft said. 'They desire average solutions by means and extremes, and sometimes go off on a tangent in a search of absolute value. They consist of quite shadowy figures, with names like 'x' and 'y', and, although they are frequently referred to as 'unknowns', we know they really belong to a common denominator and are part of the axis of medieval with coordinates in every country.' As the great Greek philanderer Isosceles used to say, ! 'There are 3 sides to every triangle.' When asked to comment on the arrest, President Bush said, 'If God had wanted us to have better weapons of math instruction, He would have given us more fingers and toes."

Here's the serious part:

On last night's Tavis Smiley Show, civil rights attorney Connie Rice expressed dismay at how she seems to be the only one of her peers who is concerned about the extreme errosion of privacy that Patriot Act II will introduce. I was driving while listening and couldn't take notes, so I can't go into particulars, but I was appauled as she read off the things that Ashcroft will be able to do without a by-your-leave from anyone. It's scary stuff!

In searching via Google, I see she's really not totally alone in this. The Bill of Rights Defense Committee in MA is a prominent site with lots of resources and calls to action.

Sunday, June 06, 2004

Friedman on Outsourcing

I caught a 1-hour program on the Discovery Channel the other day about outsourcing to India that was pretty good. It was by Thomas L. Friedman a columnist for the New York Times. The program, called "The Other Side of Outsourcing" showed Friedman's visit to Bangalore, India where he interviewed Indians on the pros and cons of globalization. It looks like you can still catch a rerun on the Discovery Times channel this week if you have digital cable.

It starts off by listing all of the things that are currently being outsourced from call centers (commonly divided into inbound, i.e. service calls, and outbound, i.e. sales calls), to proofreading novels, to Indian medical doctors analyzing x-rays. They say its only the tip of the iceberg. I'm waiting for someone to start outsourcing the proofreading of American résumés.

Thursday, May 20, 2004

Nickeled & Dimed to Death x 100

Two months ago, Bank One quietly shortened the grace period on my credit card by 7 days (although the customer service guy swears it was only 5). So, suddenly I'm hit with two $35 late charges in a row, plus extra finance charges. Sneaky, sneaky. I think that they are also deliberately sending the bills out late. The one I got today is due on the 2nd, which means I only have a week to get a check in the mail if I want to allow 5 days for it to get there. What if I was away on a business trip?

A few days ago I read an article on SlashDot about T-Mobile charging their customers a "Regulatory Programs Fee" which sounds like a government tax but is just a way for them to stick it to the customer without changing the prices they advertise. Sneaky, sneaky. I think they took their cue from the practice of hotels hitting you with a "resort fee" that's on top of the advertised rate and never mentioned until you arrive to check in. Sneaky, sneaky. (BTW, I was considering switching to T-Mobile once until I realized that the contract they wanted me to sign bound me to terms that appeared only on some arbitration company website that wouldn't come up in any browser. Talk about buying a pig in a poke!) Anyway, you can bet I'll be watching out for when my cell phone company follows T-Mobile's example.

And, of course, today my cable bill went up another $2.50 for the second year in a row.

It used to be that you had to watch out for being nickeled and dimed to death. Now, it's $2.50'd and $35.00'd to death.

Tuesday, May 18, 2004

Two Books on Being a Software Professional

I just read a blog entry on productmarketing.com that mentioned a book called Coder to Developer by Mike Gunderloy. (The blog is addressed at marketing professionals and recommended the book as a way for them to become familiar with how software is, or ought to be, created). This book reminds me of another one called Code Complete by Steve McConnell that is due out with a second edition next month. I highly recommend Code Complete to anyone interested in software craftsmanship, and it sounds like this other one might be worth a look, too. The biggest difference appears to be that Gunderloy's book is thick with .NET stuff, while McConnell's book is agnostic.

The productmarketing blog points out that Gunderloy's book is "generous with references to other works," and that his index of all web-accessible references is online. Be sure to check it out, whether or not you read the book. At a quick glance, I recognize many sites that I know and love, and I'm sure I'll have fun exploring the rest.

Thursday, May 06, 2004

Tech Jobs on the Rise

The Extreme Programming SoCal group meets informally over lunch every other Wednesday (in addition to occasional formal programs), in two locations: Pasadena and Tustin. The Tustin contingent was 7 strong this week with some rarely seen faces, three of whom were all just laid off together, which is why they were available. They swear that it was because their group was doing XP and the old guard managers simply reverted to what they considered "tried and true," without questioning the true part. They didn't seem worried about their prospects, though. Vladimir (another Vladimir, not my partner) said that one mailing list he subscribes to recently increased from 2 or 3 help wanted ads per month to 50+. So, it sounds like the economy really is picking up, even if some companies are still feeling the pain.

Wednesday, April 28, 2004

Don’t Refactor and Enhance at the Same Time

Last night at my "Introduction to Refactoring" presentation, I received a bunch of blank stares the first few times I said that you aren’t supposed to refactor and enhance at the same time. Eventually, it dawned on me that I was being imprecise in my definition of the word "enhance." After all, refactoring is itself a form of enhancement -- you are improving the design when you refactor. So, what I meant by "enhance" is adding functionality from the user’s (customer’s) point of view. I don’t know where I picked up that terminology. Maybe it was a culture thing where I’ve been working. Do other people use the term "enhance" that way?

Anyway, the bottom line is you aren't truly doing refactoring unless
  1. you isolate the refactoring activities from the feature-adding activities,
  2. before you apply a refactoring you have an automated unit test that puts the existing functionality through its paces, and
  3. the exact same unit test runs cleanly before and after the refactoring is applied.
Note that it’s okay if the unit test has to be tweaked to conform to new method signatures and whatnot, but you can’t change anything that has to do with what the unit test is trying to prove.