DRuby has me thinking...
All a developer should have to worry about is coding his API and maybe his user interface. Networking, permissions, input, rendering to the screen - all of that should be taken care of for him. He shouldn’t need to worry about whether an object will be accessed from a PC, a cell phone, or a dumb terminal on the other side of the world.Because the moment he does worry about any of these things, the solution he comes up with is gonna be “wrong” from someone’s perspective.
Read more...The MOO mini-cards came last night; they’re gorgeous. They were no effort at all to create, too. Kinda made me forget that I was dropping $20 plus $5 shipping on something I have no practical way to display or carry in my wallet. They don’t make frames for something that’s half the size of a business card.
They’ll probably wind up sitting in their box on the end-table, waiting for guests to flip through them and take one. They point to mcgavren.com on the back, so once I actually have a page up there, they’ll be able to see all the rest of our photos.
.
Read more...Extract local variable...
Eclipse just saved me a couple hours’ work… Thanks to a series of admittedly bad decisions, I had a unit test chock full of call chains like this:
assertEquals("West", hc.getAreaInfo().getAttractions().getAttraction().get(3).getRefPoints().getRefPoint().get(0).getDirection()); assertEquals("Name", hc.getAreaInfo().getAttractions().getAttraction().get(3).getRefPoints().getRefPoint().get(0).getName()); assertEquals("20", hc.getAreaInfo().getAttractions().getAttraction().get(3).getRefPoints().getRefPoint().get(0).getTransportations().getTransportation().get(0).getTransportationCode()); //...etc
….too embarrassing to let a colleague see. So I was resigned to spending a very boring midday importing the appropriate classes and assigning those values to local variables, when it occurred to me to check Eclipse’s Refactor menu…
And there I found “Extract local variable”. What a godsend. All I had to do was highlight the section of the call chain I wanted, and it (intelligently) chose a variable name, replaced all occurrences with the variable, and even imported the classes I needed. In just a few minutes the above code and everything like it was changed to this:
com.mycompany.ota.generated.AreaInfoType.Attractions.Attraction attraction = hc.getAreaInfo().getAttractions().getAttraction().get(3); RefPoint refPoint = attraction.getRefPoints().getRefPoint().get(0); assertEquals("West", refPoint.getDirection()); assertEquals("Name", refPoint.getName()); assertEquals("20", refPoint.getTransportations().getTransportation().get(0).getTransportationCode()); //...etc
Java is a very bad language, and Eclipse is what was created to cope with it. Fortunately, its creators exhibit boundless ingenuity.
Read more...Awwwww...
Lenny: When I’m grown up, I’m gonna work where you work. Me: You mean you want to work for my company? Lenny: No, I’m gonna work where you work. Me: Oh, you want to work together with me? Lenny: Yeah. Me: You want me to teach you how to do my job? Lenny: Sure.
Well, come to think of it, I was only a year older than he is when I wrote my first simple program. I need to get his PC running, and test out one of those new languages targeted at kids for him. (Oh, yeah, and teach him how to write, though he’s making rapid progress in that area already.)
.
Read more...This is my first (and probably last, cause I hate soft keyboards) post from my newly-working DS browser. Yay!
All my Reader feeds are in my bookmarks (public HTML, DS Opera doesn’t like the AJAX), which is all I need from it for now.
Read more...