 |
This blog is now on Roller, and I have no idea how to use it
Well, I browsed to my blog today to write an entry, and everything's
changed from a publishing perspective. Apparently we've finally
switched over to using the Roller
blogging engine vs. our old custom solution, so I need to relearn how
to write blogs and use this thing. I think I'll probably attend the
next Raleigh Blogger's Meetup so I can ask Dave Johnson (Roller's original creator) for some tips.
One major benefit I've discovered so far - we finally have a "Preview"
mode so I don't have to publish before seeing all of my typo's and HTML
mistakes. Now if only they have a distributed preview mode so that my
mom could proofread in advance of publishing (I always get friendly
emails from her telling me about misspellings and grammar mistakes).
- Bill (bhiggins@us.ibm.com)
Categories
: [ blogging ]
Mar 12 2006, 08:52:18 AM EST
Permalink
|
Any good books on message design?
I've been implementing some REST services recently and I'm finding that I'm a bit in the dark when it comes to message design. The syntax of XML is straightforward, but what are the patterns to produce messages that satisfy your key application priorities (e.g. performance, scalability, maintainability, etc.)?
I can't find any good books or web sites on message design for distributed systems. Ted Neward's discussion of context completeness in Effective Enterprise Java was very good. Bobby's EIP book certainly talks about the mechanics of message systems and Martin Fowler's PEAA book talks about design considerations re: levels of granularity and such, but I have yet to find one book on message design vs. the 10s of great books on object design.
Any suggestions on books, articles, papers, or blogs on considerations for message design? Post a comment or email me if you don't feel like doing the developWorks registration thing.
And with that, I'll end my blogging extravaganza for this evening. Tomorrow it's heads down in more coding and radio silence on the blog channel again for a few weeks.
- Bill (bhiggins@us.ibm.com)
Categories
: [ books_and_articles ]
Mar 02 2006, 01:20:00 AM EST
Permalink
|
Yahoo Design Patterns Library
Many other people have mentioned this, but in case you haven't seen it and you're doing web-based development, you really should check out the Yahoo Design Patterns Library. It's simply an excellent resource. Run, don't walk.
Does anyone know who's actually behind this site? If so I'd like to follow their blogs. What the heck's going on with Yahoo anyhow? In 2001, I dropped Yahoo and their busy "search portal" in favor of the simplicity of Google. But Yahoo's just been doing some great stuff around DHTML, Ajax, and open source. Did they get a high-level brain transplant or something in the past couple of years?
- Bill (bhiggins@us.ibm.com).
Categories
: [ software_dev ]
Mar 02 2006, 12:57:00 AM EST
Permalink
|
How to effectively plan your career: DON'T!
Last week I got to catch up with Francoise Legoues, who's one of the most amazing people I've met at IBM. An IBM Vice President, a Distinguished Engineer, and a mother of two lovely and very successful daughters. She asked me about how I liked my job and what I thought I'd like to do for my next job. A few years ago I would have given some spiel about how I wanted to gain some more technical bona fides, then take a management position in preparation for a move to the executive ranks. But in the past couple of years I've come to believe that that sort of career planning is pretty much bogus.
When I think of all of the good things that have happened to me in my career - or life for that matter - all of them had a high degree of coincidence and luck associated with them. For instance, the only reason I'm working at IBM is because when I was a junior in college, I skipped class one day to get pizza (a favorite diversion) and happened to wander by the Penn State co-op office, for whom I was developing a web site. They mentioned "IBM is here today, you should stop down" and the rest is history. My current job with Rational is another example - to make a long story short I got it because I happened to meet an IGS exec at one of those town halls I normally skipped and struck up a conversation with an idea I had for development tools which led me to the IBM CIO's office and then the contact in the CIO's office took a new job at Rational, introducing me to my current team and *plop* - here I am.
So if anyone reading this is struggling over "what you want to be working on five years from now" - STOP! Here are the only things you must do to get great work:
- Work on something you enjoy and find interesting
- Work with people you like and ideally are much smarter than you (you'll learn more)
- Work your ass off. If you enjoy the work and like the people it won't feel like you're working your ass off
- Don't be afraid to go against the status quo if you see an opportunity to make things better. The status quo is just some person's idea of the golden path - it's not like the laws of physics or something *really* inflexible. And it doesn't matter if you're disagreeing with someone with a big fancy title either. If your company's worth anything, others will treat your ideas on their merit, not on their adherance to dogma.
If you follow these guidelines, you won't have to look for good work; it will find you.
- Bill Higgins (bhiggins@us.ibm.com).
Categories
: [ worklife ]
Mar 02 2006, 12:45:00 AM EST
Permalink
|
Eclipse's culture of shipping
I work in the part of Rational that originally created the Eclipse platform. This group used to be a separate company - Object Technology Incorporated (OTI) - but was later somehow acquired by IBM. I'm really liking the culture in this organization - and I'm not just saying this because next week we find out our 2005 bonus - I really like the culture over here because of its focus on shipping good software and cutting bureaucracy down to near zero.
Recently I was talking to a friend about the culture in this group and I remembered an old artima.com interview with Erich Gamma, who helped establish the culture in this organization. It's worth a read if you'd like to see one way to run a highly effective software development organization.
Eclipse's Culture of Shipping: A Conversation with Erich Gamma
- Bill Higgins (bhiggins@us.ibm.com)
Categories
: [ software_dev ]
Mar 02 2006, 12:19:00 AM EST
Permalink
|
Dojo (part 1)
It's weird. Sometimes you write blog posts about the most random things, and other times you forget to write posts about the stuff you use every day. Bobby wrote a blog entry with a snippet of code showing how to parse an Xml document returned by an Ajax call, regardless of whether you're using IE or Mozilla. This prompted me to write some code showing how easy it was to realize this scenario with my DHTML/Ajax framework of choice, Dojo.
Here are some of the things I like about Dojo.
The packaging system
Coming from an Eclipse/Java background, it's very scary to think about things living within the same global namespace, without any component dependency management as you get within OSGi/Eclipse. Dojo gives you the beginnings of this through its lazy-loading pseudo-namespace-based packaging system. Just call:<script type="text/javascript" src="dojo.js"></script>
<script type="text/javascript">
dojo.require("dojo.widget.*");
</script>
...to load (for instance) the Dojo widget subsystem on demand. Note that if it's already loaded, it won't be loaded again.
Easy Ajax
Dojo has a nice, clean, anonymous-object-driven syntax to do Ajax. No need to check for browser-specific weirdness, very little code to write. Here's the example I wrote on Bobby's blog:<script type="text/javascript" src="dojo.js"></script>
<script type="text/javascript">
dojo.require("dojo.io.*");
var ajaxArgs= { url: "/some/ajax/url", mimetype: "application/xml", // let's be NLS-friendly load: function(type, xmlData, evt) { myCallbackFunction(xmlData); } };
dojo.io.bind(ajaxArgs);
function myCallbackFunction(xmlData) { var topLevelElement= xmlData.getElementsByTagName("topLevelElement"); // etc. }
</script>
(more on the Dojo way of doing Ajax)
For those not familiar with JavaScript syntax, the declaration "var ajaxArgs= ..." declares an an object with the properties url, mimetype, and load. In the subsequent statement, you call the function dojo.io.bind, sending ajaxArgs as an argument. dojo.io.bind looks for these named properties (as well as others) and behind the scenes figures out which native browser methods it should use to make the Ajax call and build the Xml document object.
This is also good from a maintainability standpoint. IE 7 is going to support native XmlHttpRequests (vs. the IE 5 and 6 Active-X based XmlHttpRequests). Will this affect your existing Dojo code? Nope. Just grab a new version of Dojo post IE 7 release, and it will hide the new IE 7 way of doing Ajax just as it hid the IE pre-7, Mozilla, etc. ways of doing Ajax.
That's enough for now. I still have more good things to say about Dojo, but it's 3am, so I'll cut it short and label this "part 1". I promise to deliver parts 2 and beyond sometime in 2006. Thank goodness it's February!
- Bill (bhiggins@us.ibm.com).
Categories
: [ software_dev ]
Feb 13 2006, 03:03:00 AM EST
Permalink
|
Christmas in February - new Thinkpad
Christmas came early on Thursday. I was plugging away at some JavaScript code when I got an instant messsage from Tom, the Rational hardware guy in RTP, NC.
Tom: I've got good news and bad news. Which do you want first? Me: Good news. Tom: New Thinkpad T42p Me: WOO HOO! Me: Bad news? Tom: You have to walk down to my office to get it.
Here are the specs:
- 2 GHz processor
- 2 GB RAM (Eclipse is hungrier and hungrier...)
- 80 GB, 7200 RPM hard disk
- Onboard 802.11 a/b/g wireless
I named this computer "odyssey4". Why? Well, I joined IBM in February, 2001 so I decided to name my first computer odyssey1, since I was starting a new journey in my life, since the year was 2001, and since I'm a big fan of the Kubrick movie 2001: A Space Odyssey. Here are the computers I've had at IBM:
- odyssey1 (2001 - 2002) - slow desktop
- odyssey2 (2002 - 2004) - Thinkpad T21
- odyssey3 (2004 - 2006) - Thinkpad T40
- odyssey4 (2006 - ?) - Thinkapd T42p
My T40 was actually pretty good - also 2GB of RAM and 7200 RPM hard disk (which make the most difference when doing development). The three big plusses of this current iteration are:
- Fresh version of Windows - I totally hosed my last computer to the point of being almost unusable
- Only one greasy little handprint (so far) from my 2 year-old
- 802.11g wireless that isn't hosed (the wireless was the most hosed part of my very hosed last computer)
Well, I think that's enough:
- about my Thinkpad
- bulleted lists
... for one night.
- Bill (bhiggins@us.ibm.com).
Categories
: [ off_topic ]
Feb 12 2006, 07:39:00 PM EST
Permalink
|
Learning XSLT
Well, it's "Think Friday" (Software Group is now allowing us to use Friday afternoons for "think time", ala Google) so I decided to sit down with an XSLT book, since I've been meaning to learn XSLT for a while. Here's a record of my experiene.
3:00pm - Pick up XLST book off the Barnes and Noble bookshelf. 3:10pm - Begin to glance around bookstore and look at my watch. 3:15pm - Put XSLT book back on the bookshelf.
I think I'm going to try to learn XSLT by writing a program rather than reading a book. It's just a tad too abstract to read.
PS - If you have no idea what XSLT is, don't worry, you probably don't need to.
PPS - I keep meaning to mention this. Though I like the idea of Think Friday, its naming sort of makes you wonder... it's not like we're in a stupor from Monday through Thursday. Well, at least I'm not!
- Bill (bhiggins@us.ibm.com).
Categories
: [ software_dev ]
Feb 03 2006, 04:16:00 PM EST
Permalink
|
Ajax patterns
I've been working on some Ajax stuff lately and this morning I was complaining to patterns guru Erich Gamma that I hadn't seen any good design pattern resources for Ajax. He pointed me to this site which looks good:
http://ajaxpatterns.org/
Would have never guessed that one!
- Bill (bhiggins@us.ibm.com)
Categories
: [ software_dev ]
Jan 31 2006, 09:43:00 AM EST
Permalink
|
Contact with journalists and analysts - IBM Business Contact Guidelines
Every year each IBMer has to read and certified that they read the IBM Business Conduct Guidelines. This is a worthwhile exercise, because sprinkled throughout the document are a bunch of best practices related to a wide variety of issues - open source licensing, dealing with vendors, etc.
One part though struck me as somewhat out-of-date, given our official foray into the blogosphere in this last year:IBM's business activities are monitored closely by journalists, consultants and securities analysts. You should not initiate contact with these individuals or groups or respond to their inquiries without authorization as follows:- Journalists - IBM Communications
- Consultants - IBM Analyst Relations or IBM PartnerWorld
- Securities or Financial Analysts - IBM Investor Relations
- Attorneys - IBM Counsel
For the cases of jounalists and analysts, I don't think this can be an absolute rule for IBMers who want to participate in the blogosphere(s). If it is, then I've violated it many many times in conversations with the Redmonk guys and other analysts I've encountered in the blogosphere.
Think about it. I write a post on some technical thought, and an industry analyst is nice enough to add his or her two cents to the conversation via a comment or a trackback blog. Now imagine that the industry analyst had an interesting insight, or challenged something I said, or had an innocent question. Do I call analyst relations and say "I would like to respond to this two sentence comment that an industry analyst wrote at my blog. Can you help me craft an appropriate response?"
Get real.
Now there have been cases where an analyst got a little too forward-looking with their questions and then I vectored them off to the appropriate communications group. But the rule in the business conduct guidelines is too absolute for the current environment.
You gotta trust your employees to use their judgement, and sometimes that judgement will tell them to talk directly with journalists and analyst, without bringing in the comms intermediaries.
- Bill (bhiggins@us.ibm.com)
Categories
: [ blogging ]
Jan 31 2006, 06:34:00 AM EST
Permalink
|
Just crashed Microsoft Money
Unfortunately not because I have too much money, but rather because I didn't have enough memory. Closed Rational Software Architect (-450 MB) and the Mozilla Venkman JavaScript debugger (-250 MB) and once again I'm able to browse my IBM pension account with a growing sense of nostalgia.
I wonder if Bill Gates can use the normal edition of Microsoft Money or if they have to build a special 64-bit edition just for him, to handle the unusual number of digits in his account totals...
Categories
: [ off_topic ]
Jan 24 2006, 01:59:00 AM EST
Permalink
|
Eclipse tools for Ajax
Bob Sutor pointed these articles out:
As a recent convert from JSF to Ajax / REST, I'm very interested in tooling that simplifies the development process. Gino Bustelo was nice enough to give me and several teammates a preview of these tools the other day and I'm ready for them NOW... a DOM inspector, a JavaScript debugger, and JavaScript as-you-type syntax validator directly in Eclipse.
24 Jan. 2006 update: Spoke with Gino today and apparently these announcements got out a bit early, leading to much consternation in his emerging technologies group. If you read the post above and/or linked-to articles, please purge them from your memory banks until such time as we're ready to officially announce.
- Bill (bhiggins@us.ibm.com).
Categories
: [ software_dev ]
Jan 23 2006, 04:23:00 AM EST
Permalink
|
Be careful about using Java RegEx's for simple patterns
I was writing some code this week that essentially implements a REST API for a server-side web app. The URL could either end in a positive integer (e.g. /123) or a semi-random unique identifier (e.g. _someLongString). So the server-side code basically needed to check if the thing was a legit positive integer and if so do something.
Java provides a method int Integer.parseInt(String str) that attemps to turn 'str' into a primitive int, so say if you passed in the string "-45" it would become the number negative 45. The problem is that if you pass this method something that's not an int (say "abc") it throws an exception. Throwing an exception may make sense in cases where the correct input is always supposed to be a String form of an int, but in my case there was a legitimate case where I'd receive non-ints (the unique identifier case) so throwing and catching an exception seemed like a bad practice (see Bloch's Effective Java, Item 39: "Use exceptions only for exceptional conditions") so I was looking for something that could test a String to see if it was an int without throwing an exception.
I thought I found something when I found java.lang.String's matches method. It takes a regular expression as input and returns a boolean indicating whether or not your pattern matches your String. So to test for a positive int I could just say myStr.matches("[0-9]+") (For non-programming friends and family members, this pattern means "match only strings that contain a digit ("[0-9]") one or more times ("+").)
I mentioned this to my manager and he was a bit worried because he was under the impression that regular expressions in Java were relatively processor-intensive, and the code in question was on a frequently-traveled server-side code path, meaning that any extra cycles would add up as more users used the server. He suggested I time the different options available, so I did. It turns out he was right - String.matches was horrendously slow compared to some of the other methods available. Below is a summary of the tests I ran:
Method 1: Custom checker The custom checker is a private method that takes a String as input, walks the String and returns false if it hits any character that's not a digit (using Character.isDigit(char testChar)).
Method 2: Try Integer.parseInt, catch Exception This seems to be the de facto method for testing Strings for ints, but the one I rejected because of the legit case of a non-int as input.
Method 3: Pre-compiled regular expression Similar to String.matches, but using a regular expression that's compiled only once in the lifetime of the program, since the pattern ("[0-9]+") never changes.
Method 4: String.matches(String regex) Matching on the string "[0-9]+", meaning that this regex needs to be compiled each time.
Input: 1 million randomly generated integers, converted to strings, with 5% of said int-strings mangled to include non-int characters.
Results:
| # | Method | Processing time (in secs) | | 1 | Custom checker | 0.9 | | 2 | Number format exception checker | 5.5 | | 3 | Pre-compiled reg-ex | 27.1 | | 4 | String.matches | 141.7 |
I was pretty stunned that the most straight-forward method (String.matches) was two orders of magnitude slower than the custom checker, which I ended up going with. Now I know someone out there is reciting "premature optimization is the root of all evils", so a few disclaimers:
- This pattern was extremely simple, so it was easy to write a custom checker - if the pattern was more complex, or user-supplied, then it would have made more sense from a maintainability standpoint to use the pre-compiled regex since your custom algorithm for the complex case would start to be as expensive as just using the regex, plus probably containing bugs!
- This was server-side code on a frequently-executed code path. If this were running in some obscure server-side code or better yet, on an infrequent method in a desktop application, the pre-compiled regex again would have been fine.
- The simple
Character.isDigit checker isn't as robust as Integer.parseInt (e.g. mine couldn't grok a minus sign), but again it didn't need to be because of my application's requirements. Because of the one-off nature of this test, I put it in a private method.
Ah, coding again.
Categories
: [ software_dev ]
Jan 14 2006, 04:37:00 AM EST
Permalink
|
No rush for the Xbox 360
There's been plenty of media attention given in the last part of 2005 to the launch of Microsoft's Xbox 360. On the positive side there's the great graphics and the much sleeker product design; on the negative side there's been the severe shortages and the reports of instability.
I don't see much point buying an Xbox 360 until late 2006 at the earliest, if ever. As someone in the tech industry, I realize it's mildly heretical not to lust after the shiniest of shiny new toys, so let me explain. It basically comes down to this - there are many games for the original Xbox (and the Playstation 2, and the Gamecube for that matter) that you can get for $20-30 that are much better than any $50-60 new game for the 360 ... next-gen graphics be damned!
Great games usually lag new platforms and the Xbox 360 is a great example of this. It takes time for developers to ramp up on new APIs and new programming models, so great games for a given video game platform don't usually show up until year 2. Occasionally there are exceptions to this rule (e.g. Halo on the Xbox and Rogue Squadron on the Gamecube) but with the Xbox 360, I haven't seen any games in that league. I'm perfectly happy spending my limited time on games like Jade Empire (current game) and Ninja Gaiden Black (next game, should I ever finish current game), both of which have received excellent reviews (90+ on the geek-o-meter) and both of which I can get for around $25 used on Amazon. If you really feel the urge to experience the next-gen graphics on the 360, go to Best Buy at 9am on a Saturday morning and play the in-store 360 for a few hours to get it out of your system.
Another consideration for some people is that next year, two more new next-gen consoles arrive - the Playstation 3 and the Nintendo Revolution. One might make the argument that you should wait to see which of the three is best before buying the first one. This argument is bogus though because it's very easy to sell your console back to a store like Gamestop for store credit towards future purchases. Or you could just buy all three.
Contact (or spam) me: bhiggins@us.ibm.com
Categories
: [ off_topic ]
Dec 27 2005, 05:33:00 AM EST
Permalink
|
|
 |
|