|
|
||
Tim Boudreau's BlogSeptember 2007 ArchivesThe NetBeansMobile goes on HiatusPosted by timboudreau on September 14, 2007 at 09:08 AM | Permalink | Comments (1)With a blown engine in Kenosha, Wisconsin, the NetBeans Mobile is going for a bit of TLC for a few weeks, but will be back on the road in October. For the gory details, see the JavaLobby thread. Nice review of Rich Client Programming; more updatesPosted by timboudreau on September 10, 2007 at 11:20 PM | Permalink | Comments (0)David Sills posted a very thorough review of our book, Rich Client Programming on JavaLobby. Thanks, David! I'm in Rockford, Illinois, meeting up with my friend Charlie Hunt in the morning to visit and pick up my repaired MacBook, to demo on tomorrow night for the Madison Wisconsin Java Users Group, then on to Milwaukee to meet up with some developers there. Chris Maki, of the Salt Lake City Java Users Group posted some pictures from our small meet-up. I also visited my friend Ben Galbraith in his new digs at his cool new startup, Feature50. What they're doing is top secret at the moment, but they've got big plans and quite an array of talent. Had a bit of trouble with rain on the windshield and the webcam today. Since I'll have a bit of time off the road tomorrow, I'm going to try to mount something above the dash to let it see out the wiper area. Nonetheless, the latest pics from today are up. The route link is also neat. It's a little sparse, since the tool that trims it to manageable size for Google Maps has to leave out tons of points (it's now about 9MB of raw data - XML files with a reading of my position every second or so). But it amazes me that all this stuff works together! Turned the camera around for one shot My co-pilot. Chris Maki christened her "Betsy" Installing Betsy Thanks to Rob Demmer for coming up with this pithy slogan Demoing in the Red Rock Brewery in Salt Lake City The NetBeans Mobile is half way across the U.S.Posted by timboudreau on September 10, 2007 at 03:45 AM | Permalink | Comments (1)In Avoca, Iowa. Travelling is always an adventure, and this is no exception. I bought some Gatorade and nuts at the truck stop yesterday (the dinner of champions!). Two guys wearing turbans entered the store at about the time I brought my items to the counter. The woman selling me the things said, "You know it still scares me when I see people who look like that. And I'm not a racist person". I said "Well, I suppose we have the news to blame for that". I mean, what do you say? There are no racist people. There are people who have learned to fear something. That can happen through first-hand experience, or through the media, or through any variety of indoctrination. But the bottom line is, I can meet the person whose grandfather killed my grandfather, and I will never know that fact unless somebody told me it - and if they told me it, it was probably them looking out for their personal gain via what I might do because I knew that "fact". There are no age-old conflicts. There are no "These people have been fighting for 6000 years, it's unstoppable" conflicts. That's a lie. All of that is just manipulation - people turning easily available knobs on other people. This is basic: There are no 6000 year conflicts because there is nobody who has been alive for 6000 years. Period. These conflicts need to be refreshed and renewed with each generation, and the appalling thing is that there are people who have no reservations about doing that. Slobodan Milosevich exploded the Balkans into a war with the phrase "No one will beat you again." As a species, as a whole, we need to get more media-savvy fast. This stuff is not going to slow down. Human beings are a product of biology. We are vulnerable. The environment we were built for is not the one we are in. The essence of evil is exploiting those vulnerabilities for gain without regard for the multitude of consequences. Anyway, this is a longer and less focused blog than I'd planned writing. The NetBeans Mobile is doing well, and I'm looking forward to meeting the Java Users Group in Madison, Wisconsin on Tuesday, and the folks in Milwaukee on Wednesday. And I'm a little creeped out by people thinking I must be a skinhead. I'm just going bald in a big way and every other alternative I've seen looked pretty embarrassing. -Tim Smooth Sailing in the NetBeans Mobile; Wicket AJAX basicsPosted by timboudreau on September 06, 2007 at 10:28 AM | Permalink | Comments (5)After an initial mechanical hiccup, the NetBeans Mobile is purring along nicely, and I'm stopped for the night most of the way across Nevada. Photos from today are available here. It looks like I'll be visiting with members of the Salt Lake City, Utah Java Users' Group on Friday, the Milwaukee, Wisconsin JUG on Monday and the Madison, Wisconsin JUG on Tuesday. If you're along my route, drop me a line! My friend at Sun, Sharat Chander posted some photos from our adventures in Sacramento yesterday - he came and met me at the truck stop where the alternator was being replaced, and then we found out the parts company sent the one matching alternator they had to the wrong shop. So we zoomed over there, picked it up, brought it back to the truck stop...and found out it was the wrong alternator. Anyway, it all came out well in the end. The folks at the 49er Truck Stop in Sacramento were incredibly nice and helpful! The site requires registration, but I'll post the best-of later. I need a name for my copilot, the California native poppy plant I'm bringing to Massachusetts for my friend Todd's cousin. Any suggestions? Unbeknownst to me, the photo rig was off for the lovely drive through the Sierras, into Nevada - the power plug was loose from the laptop. But there are photos, and not all of them are of white lines in the highway. And I know there are friends and family, not to mention people in other countries who are getting to take a vicarious road trip across the U.S. through this. So I'm now keeping the laptop on the dash. I'm going to try to get something working tonight so that I can stick a mouse on the dashboard and press the mouse wheel to trigger taking a picture when there's something interesting to see - the timer works for showing random progress, but it would be nice to be able to have both. You may have noticed that the site uses AJAX to switch between the table of photos and the full size photos and the comments page. AJAX in Wicket is incredibly easy! You just add an AJAX behavior to the component, and write one method. That method adds any components that should be updated to the AjaxRequestTarget, and replaces them in their parent container with new components with the same ids as the old ones!
Here's an example. We will simply put some text on a page; whenever it is clicked, it updates to say how many times it has been clicked. The code that does the magic is incredibly simple:
package com.myapp.wicket;
import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
public class ExamplePanel extends Panel {
private int clickCount;
private Label lbl;
public ExamplePanel(String id) {
super(id);
//Add a simple text label
lbl = new Label("label", "Click Me");
add(lbl);
//Make it clickable via AJAX
lbl.add(new ClickBehavior());
}
private final class ClickBehavior extends AjaxEventBehavior {
private ClickBehavior() { super("onClick");}
protected void onEvent(AjaxRequestTarget target) {
//Make a new label with the same ID as the old one
Label nue = new Label("label", "Clicked " + (clickCount++) +
" times");
//This is important, so the label's markup can be rewritten
nue.setOutputMarkupId(true);
//Replace the old label with the new one
ExamplePanel.this.addOrReplace(nue);
//Add the component to the request target, so the javascript on the
//client knows to rewrite it in the page DOM
target.addComponent(nue);
//Add the same click behavior - to the new component, so it
//responds to clicks too. Note we cannot reuse "this" here.
nue.add(new ClickBehavior());
lbl = nue;
}
}
}
The HTML for it is even simpler:
<html>
<head>
<title>Dummy content</title>
</head>
<body>
<wicket:panel>
<span wicket:id="label">the label</span>
</wicket:panel>
</body>
</html>
I've added this example to the sample projects in the NetBeans Wicket Module. Probably the coolest thing about AJAX in Wicket is that for a lot of components, the fallback behavior if the browser doesn't have javascript available is handled for you (e.g. AjaxFallbackLink).
Another thing that is wonderful about Wicket is its debuggability: If you run this example, you'll see a nice little label at the bottom of the browser that says WICKET AJAX DEBUG. Click it and you get a little popup with all sorts of useful logging info.
Mobile terrariumsPosted by timboudreau on September 04, 2007 at 08:16 PM | Permalink | Comments (0)I'd thought my wiring problem was a loose wire, but it turned out that the alternator was not putting out nearly enough current. So after making it to Sacramento where there was not enough power to make the blinkers blink, I gave in and took it to a truck stop garage. Fortunately my friend Sharat lives here. When the parts company delivered my alternator to another garage, we ended up going and getting it, only for it to turn out to be the wrong alternator...anyway, it has a happy ending, and the beast is running great and the lights are as bright as they should be. So I'm having a little dinner, and will then make some more headway. I'm shooting for Salt Lake City on Friday, although if all goes very well it could be very late tomorrow. I now have a copilot - a Matilija Poppy, native to California, also known as a fried egg plant. My friend Todd in Ireland wrote me that his young cousin is in a coma and he had been to California and loved it, and could I find a California-native plant before I leave the state and bring it to Massachusetts. So Sharat and I went and found a nursery and picked this critter up (this is giving me weird ideas about mobile terrariums...). And I got a tour off downtown Sacramento, which I'd never been to. It is quite lovely. I promise more Javaesque content soon! Almost mobilePosted by timboudreau on September 04, 2007 at 01:01 AM | Permalink | Comments (1)Well, I got the NetBeans Mobile loaded, and picked up a slew of NetBeans t-shirts, books, usb drives and squishy balls (thanks, Julie Welch!). And got all of 3 miles :-) The trip site with pictures and gps info is live, though there are only a few photos there yet - but the trip has begun! Unfortunately, I'm having some alternator trouble - and it's probably my own doing (baf! baf! <kicks self in head>) - when I replaced the hot wire to the battery the other day, well the solenoid is above the transmission, in a tight spot where you pretty much do everything by feel. I suspect there is a wire I didn't reconnect :-( Driving by day you don't notice that all the electrical systems are running off the battery, and I'd assumed that the jump starting was simply the battery not having charged earlier. I knew I should have checked the current across the terminals with it running earlier! Anyway, it's probably for the best, as I'm physically exhausted from two days of packing and loading heavy boxes. Was hoping to at least make it out of state tonight, and drive till about 3AM, but it might be just as well to start fresh in the morning. But the hardware is all working - I'm still gaga about David's work on the reverse lookup stuff, which is why each picture has an actual address under it (the web service that provides the reverse geocoding gets called on a background thread, so brand new images don't have addresses for a few minutes; theoretically it's possible for an image to be shot just before the client software is shut down, in which case there may not be an address until the next upload, since the image-to-position mapping is based on time stamps). The source code for all of this stuff is currently in the misc/ directory of nbwicketsupport.dev.java.net. Certainly not a good home for it long term, but it was someplace to put it so David and I could work collaboratively (thanks Geertjan and Petr for not objecting to my dumping strange stuff in our source tree...).
Anyway, it's all fun! I'll post some pictures of the interior of the vehicle - and hopefully some from the road for real - tomorrow.
Culture, Memes and ProgrammingPosted by timboudreau on September 02, 2007 at 09:22 PM | Permalink | Comments (0)I was in Home Depot this afternoon, and used their automated checkout to buy some supplies for the NetBeans Mobile. They have an automated system that lets you scan your own items, and talks to you. It's a perfect example of how software cannot be divorced from culture. To provide some backstory, my dad is a literary critic and semiotician who got me interested in the subject of memes when Richard Dawkins first proposed the concept in the afterword to The Selfish Gene (my mom was a psychologist - and no, dammit, I'm not overly analytical!). Anyway, the intersection of culture and computers and language is a fascinating one - I was almost a linguistics major, and the topic of “making computers talk” is one I will probably never lose my fascination with. So I'm at the checkout in Home Despot. The checkout machine has a touch screen and a female voice. What struck me as weird was the sentence: “Use pin-pad to complete transaction”. Now, what would have been wrong with saying “Use the pin-pad to complete the transaction”? After all, at the conclusion it says “Thank you for shopping at the Home Depot”. Faskinating. In this day and age, with decent speech synthesis available for free, what is the cost of a the? The answer is culture. I would wager that the programmer who built this system had seen some sci-fi, and without even knowing it, absorbed the meme that computers speak in stilted language. Odds are the omission of the in those sentences has nothing to do with conscious choice - someone simply acted on an impulse that was culturally conditioned, and created software that talks like Robbie the Robot, because that's how Robbie the Robot is supposed to talk. Fascinating, isn't it? Now, at Sun, we occasionally also talk like Robbie the Robot - but it comes from the conscious choice of lawyers (ever wonder why presentations never say “create a JavaBean”, they say “create a JavaBeans™ Technology Component”? That's trademark protection in action - I think someone needs to do for trademark licensing what the GPL and other licenses did for software licensing - this is an area that desparately needs some brave and creative lawyering, because I don't want to have my slides edited into Robbie the Robot-dom, dammit - but such is my one-man war against Sun being the-company-that-doesn't-know-how-to-talk). Cultural artifacts abound in software - it gets very interesting when the team building a piece of software is multinational. I suspect creating software - at least anything that has a GUI - to be cultural-artifact-free is impossible (and not even a worthwhile goal if it were). Anyway, think about this the next time you run any random piece of software - how many cultural artifacts and assumptions can you find in it? The NetBeans Mobile is AlivePosted by timboudreau on September 02, 2007 at 12:28 PM | Permalink | Comments (4)Well, the graphics are on, and the NetBeans Mobile is now officially a big honkin' truck with NetBeans logos on it! Getting ready and loaded up is taking a little longer than I had hoped (I'm just a typical engineer underestimating how long work will take :-)) - so I expect to be on the road on Monday. I'll make it a short day/shakedown cruise, and plan to end up in Salt Lake City on Tuesday night. Two days later I'll be visiting some folks in Milwaukee. BTW, if anybody out there has successfully gotten a Blackberry Pearl to act as a modem under OS X, I'd be very interested in the details. I've found this modem script which worked exactly once; this rather enigmatic piece of software (does anyone really want their modem to be a gui application?) might work, but is a beta limited to 10Mb. Surely this should be simple... At worst, I'll end up uploading pictures and everything from truck stops along the way - but it would be more fun if they arrived as they were taken. The server-side piece of the software is done. David Botterill did some amazing work with reverse geocoding. So each picture actually has an address to go with it! And there's a ui for adding comments to pictures. This is going to be fun! I'll publish the URL this evening, once I get some initial data up. Anyway, here are some pics of the NetBeans Mobile!
Here's the photo/gps rig in action (yes, the dashboard is plywood - it was a roofer's van in its former life...).
And a fine way to code on the road :-)
And the tagline:
| ||
|
|