Saturday, July 12, 2008

Greeting Grammar

I've noticed that most people start off emails with "Hi Bob,". I suspect they're treating "hi" as a less endearing replacement for "dear" in "Dear Bob,". Technically, "dear" is an adjective describing "Bob" while "hi" stands on its own and is not part of the direct address. I prefer the more correct salutation: "Hi, Bob."

Who is the most grammatically correct social network? Facebook, Plaxo Pulse, and Flickr get this wrong, by my standards, in their automated emails. Twitter gets it right.

Thursday, June 26, 2008

Expert Guice

Stephan just posted video of a talk I gave at Javapolis back in December: Expert Guice: 50 some odd ways to Guice up your Java

Update: Stephan fixed the audio levels so you should be able to hear me now. :-)

Wednesday, May 28, 2008

Guice @ Google I/O

Jesse and I are presenting Guice 101 at Google I/O, 11:15 this morning:
Guice (pronounced 'juice') is a Jolt award-winnning, lightweight dependency injection framework for Java 5 and above. Put simply, Guice alleviates the need for factories and the use of new in your Java code. Think of Guice's @Inject as the new new. You will still need to write factories in some cases, but your code will not depend directly on them. Your code will be easier to change, unit test and reuse in other contexts.

Sunday, May 04, 2008

Teyana Taylor - "Google Me"

Thursday, May 01, 2008

Going to JavaOne? Sign up for Twitter.

If you already twitter, feel free to skip to the next section. If you've never heard of Twitter, read on and keep your finger on the pulse of JavaOne.

With Twitter, you can broadcast short status updates to your followers and receive updates from people who you follow. It's like having one big instant messaging conversation with all of your friends.

You can access Twitter via SMS. During JavaOne, you can easily keep tabs on your fellow attendees as well as let them know what you're up to, all from just about any cell phone (standard text messaging rates apply).

For example, if you follow me, and I text "free beer at Guice BoF!" to Twitter, Twitter will forward the message on to your phone.

Note: In addition to following someone, you must also enable "device updates" for that person in order to receive their updates via text and instant message.

If you don't have unlimited text messaging, you can always access Twitter via the web or one of the zillion 3rd party Twitter applications.

#javaone

The Twitter world utilizes an ad hoc tagging system called hashtags. It's simple. Tag your JavaOne-related messages by appending "#javaone" to them, and I'll be able to see your update even if I'm not following you yet.

Simply text "track javaone" to Twitter in order to receive any message containing the word javaone from anyone on Twitter, or search for "#javaone" on Summize, a real time Twitter search engine.

Follow Me

I plan to twitter throughout JavaOne. In addition to following me, also check out these Java twitterers:

If you'll be twittering from JavaOne and I didn't mention you above, link to your profile from the comments so others can find you.

Finally, please spread the word about this post and twittering at JavaOne in general. The more people who Twitter from JavaOne, the more fun we'll have!

Thursday, April 17, 2008

The Twubble with Twitter

Dion Almaer interviewed me about Twubble for the Google Developer Podcast:

If you use Twitter, Twubble can look at your existing friends' friends and recommend new people for you to follow. It's a stupid simple idea, but I think the execution and fun factor have won people over.

I wrote Twubble in a couple nights of hacking in bed after the kid went to sleep. I used the latest Google Web Toolkit milestone which supports Java 5 (flawlessly from my experience). I was writing Javascript code (server and client side) for years before I ever got into Java, but I have to say, you'd be crazy to write AJAX apps any other way than GWT nowadays.

Tuesday, March 11, 2008

Statically Typed Foreword

Robbie asked me to write a foreword for his upcoming Guice book. Having never written a foreword before, I Googled, "how to write a foreword," which brought me to two helpful posts from Muse Ink: Foreword Thinking and Foreword March.

Here's what I came up with:

I created Guice in the midst of one of the biggest projects of my career. When you have hundreds of engineers touching millions of lines of code, you come to appreciate the benefits of static type checking. Static types aren't just about compiler errors. In fact, I rarely see Java compiler errors nowadays. Thanks to all that great, formalized Java type information, my IDE helps me write correct code in the first place.

Writing your application in a nearly 100 percent type safe manner, like Guice enables and Robbie advocates in this book, opens the door to a new level of maintainability. You can effortlessly navigate unfamiliar code, jumping from interfaces to their implementation and from methods to their callers. As you master your Java tools, you realize that deceptively simple atomic refactorings combine to form molecular tools, which you can reliably apply to companywide swaths of code, accomplishing refactorings you'd never even consider trying by hand. In the long run, it's much cheaper to ward off bit rot through heavy reuse and constant refactoring than by nuking the world with a rewrite every couple years.

Having experienced Guice's benefits on a number of projects, we at Google knew we couldn't keep it to ourselves and decided to make it open source. Readying Guice for the outside world felt like it took an order of magnitude more work than writing that first internal version, but community contributors like Robbie who fuel the forums, help polish rough edges, and generate excellent documentation like this book pay back that effort tenfold. You'll find that Robbie's brevity and conversational tone suit Guice well. I like my books like I like my APIs: with high power-to-weight ratios.

I focused on static typing because I've gotten a lot of questions about it lately. There's a lot of misinformation out there. For example, some people incorrectly conflate static typing with compiler errors, and, based on that false foundation, they claim that unit testing is an adequate substitute for static typing.

Static typing and unit tests are orthogonal. Static typing doesn't replace unit tests. Unit tests don't replace static typing. In fact, static typing can make maintaining unit tests much easier, especially when paired with the right mocking framework. I certainly believe that scripting languages have their place; beware anyone who tells you that static typing doesn't.