Some talks for your JavaOne Schedule
JavaOne is coming up, and now is the time to convince your boss to send you. You only need to learn a few productive tools for the conference to pay for itself. In addition to
the Guice talk, here's some sessions I'm excited about...
Developing LimeWire: Swing for the Masses
Use painters, AppFramework, XUL and even GlazedLists to create hot Swing apps.
Simply Sweet Components
How Component-oriented design dramatically simplifies UI development.
The Collections Connection
Philosophy behind the Java™ Collections Framework and Google Collections.
JavaOne registration.
# posted by Jesse Wilson
on Thursday, April 30, 2009
0 comments
post a comment
Two simple classes for text processing in Java
FileCharSequence
adapts a
java.io.File
as a
CharSequence
which has nice consequences. For example, you can run Java regular expressions directly against a File. And you can easily send part or all of a file to a
StringBuilder
or
Writer
:
/**
* Adapts a text file as a character sequence so that it can be directly
* manipulated by regular expressions and other character utilities. The
* file may be at most 2 GB in size and encoded with {@code ISO-8859-1};
* otherwise behaviour is undefined.
*/
public final class FileCharSequence implements CharSequence {
...
}
If you like this, feel free to use
the code in your projects.
I prefer to use Java for one-off text processing tools. Partly this is because that's what my development environment is already set up to do, and partly it's because I'm not very productive in Python. With that constraint, I've written
Strip.java
. It uses
FileCharSequence
behind-the-scenes to strip all occurrences of a regex from a file. It uses Java's regex syntax, and supports switches like
(?m)
for multi-line regexes. Just like
the Rip.java tool, it can be executed directly from your command line:
jessewilson:~$ Strip.java
Usage: Strip <regex> [files]
regex: a Java regular expression, with groups
http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html
you can (parenthesize) groups
\s whitespace
\S non-whitespace
\w word characters
\W non-word
files: files to strip. These will be overwritten!
flags:
--clober: overwrite the passed in files rather than creating new ones
-c:
Use 'single quotes' to prevent bash from interfering
This code is also Apache-licensed for your enjoyment. Download
Strip.java, make it executable (
chmod a+x Strip.java
) and put it somewhere on your path!
# posted by Jesse Wilson
on Tuesday, April 21, 2009
4 comments
post a comment
Upcoming Guice talks
Dhanji and I are doing some Guice talks over the next two months.
First, we'll be presenting at
Google I/O. This conference is fast, web-focused, and cutting edge. It's also affordable: $300 if you register before May 1.
Big Modular Java with Guice
Learn how Google uses the fast, lightweight Guice framework to power some of the largest and most complex applications in the world. Supporting scores of developers, and steep testing and scaling requirements for the web, Guice proves that there is still ample room for a simple, type-safe and dynamic programming model in Java. This session will serve as a simple introduction to Guice, its ecosystem and how we use it at Google.
Then at JavaOne, I'll be providing a technical intro to Guice. It's a Friday afternoon time slot, so hopefully you're not too worn out to make the talk.
Introduction to Google Guice: Java is fun again!
Session TS-5434, Core Technology track
Friday June 5 at 14:50
Before Guice, the Java programming language subjected developers to a false dichotomy:
Use "new" to write concise but tightly coupled code. If you need more abstraction later on, you'll have to update all of the N callers.
Write a factory so you can easily change the implementation later on. You might end up doing unnecessary work, not to mention make your code harder to read.Guice leverages recently added language features to enable the best of both words: abstraction without the boilerplate! Guice's @Inject is the new new. Start off with coupled and straightforward code. If you need more flexibility down the road, you can change your code in one place; you don't need to update N callers.
Jesse and Bob, each of whom have organized millions of lines of Google code, will compare factories and service locators to dependency injection, with and without Guice. Then, they'll show you how to use Guice to make your code more modular, readable, and testable than ever before. All you need is a working knowledge of the language.
Immediately following the introductory talk, Dhanji Prasanna will be presenting Google open source development with Guice, GWT, and SiteBricks.
Building Enterprise Java™ Technology-Based Web Apps with Google Open-Source Technology
Session TS-4062
Friday June 5 at 16:10
Google open-source technologies bring a new perspective to enterprise Web applications. The company likes simple stuff that's easy to maintain and that works and scales REALLY well. It also believes that the Java™ platform is strong and thriving and can be as lightweight and competitive as other popular dynamic platforms. With the right approach.This session explores how you can take away the pain of traditional enterprise development with Googley alternatives in your stack. Use Google Guice, the Google Web Toolkit, and SiteBricks to completely rethink how you write applications. These technologies all employ idiomatic Java programming language -- but in highly productive, novel ways -- and have produced enormous success in some of the largest and most complex applications ever built.
Take the simple back! The Googley way.
Please come out! I'm particularly excited to get to spend some time with other developers. Mailing list discussions flow better for me when I can put a face to the names.
# posted by Jesse Wilson
on Monday, April 20, 2009
5 comments
post a comment
Jesse and Kevin B help out with Java Posse #239
I love listening to The Java Posse. Back when
they mentioned Glazed Lists on episode 76, I was majorly psyched. I ran home and played the relevant clip for my wife, who's usually annoyed at the amount of time I spend programming,
"See Jodie? See, see? I feel so proud of myself, having been referenced on my favourite show! They'll know of Glazed Lists across seven continents! Yay!"Jodie,
"Wow, my hubby is Internet-famous!" She was impressed, but only because I was.
On Wednesday, I did even better - I got airtime on the Posse!
Kevin B and myself got to discuss the news with Dick, Carl, Joe and Tor on
Episode 239. Everytime that I listen to the Posse, I always want to participate in the discussion. Well, I had a chance and it was a fairly lively episode.
You can hear me giggling at the jokes the whole way through. I probably shouldn't have giggled so much, but it's a habit from the previous 238 episodes. Keep up the fantastic work Java Posse.
# posted by Jesse Wilson
on Friday, April 03, 2009
3 comments
post a comment