|
|
|||||||||||||||||||||||||||||||||||||||||||||
Gregg Sporar's Blog
If it's Tuesday, this must be BrasíliaPosted by gsporar on April 27, 2008 at 07:02 PM | Permalink | Comments (4)The ninth annual FISL conference was April 17-19 in the city of Porto Alegre, which is the capital city of the Brazilian state of Rio Grande do Sul. I was fortunate enough to have my memory leaks talk selected, so I asked my co-worker Bruno Souza if he could set up some user group meetings and/or university visits in the days immediately before the conference. This is sort of like asking if it would be possible to get another slice of grilled meat at a churrascaria; his answer was: "Of course!" :-) In Brazil, everyone who knows Java knows Bruno - and even people who don't know Java know Bruno, including the president, as shown in this photo. So Bruno said to me: "How busy do you want to be?" I responded: "Very." I'll think twice before I say that to him again.... :-D I did presentations for the following Java users groups: SouJava, Java Noroeste, Java do Sertão, and ceJug. And I did a presentation at Universidade Católica de Brasília. The end result: within my first few days in the country, I traveled almost as many miles within Brazil as I had flown to get to Brazil. But it was worth it. The food was excellent, the events were well-attended, and the best part (as usual) was getting to meet so many nice people. I was very well cared for in Brazil. One of my goals was to show folks some of the new features coming in NetBeans IDE 6.1 (which is due out this week). One of the most important new features is powerful support for JavaScript. The support is built on what was put into the 6.0 release to support Ruby. As a result, powerful code-completion is included. Now I'm not a JavaScript guru and have only played around with it a bit. Luckily, my co-worker Brian Leonard put together a very nice demo script that highlights the most important features. So I had been using that and had even managed to impress some hardcore JavaScript users with the editor's features at the first couple of events. In Sertão, however, the code completion support did not work. Anyone who does as many live software demos as I do has been in this situation before - all the sudden, everything that worked great just moments before stops working:
I was stumped. Since it was the end of the final presentation of a long day, I went ahead and kept going and wrapped up my presentation without continuing that demo. Immediately after I finished, one of the attendees rushed up to me and asked: "How can the editor provide JavaScript support outside of a <script> tag?" That's when it hit me like a ton of bricks: "Doh! I was adding JavaScript code into an .html file without a <script> tag. No wonder the editor did not work!" So this is one of the few instances where one of my demos failed because of the presenter, instead of the software. In my defense, over the previous 80 hours I had only had about 12 hours of sleep, so I was a little off-balance. Nevertheless, the question made me realize what I was doing wrong, so I did the demo for a small group of folks who crowded around my laptop; the first feature of which is to show one of the flavors of code completion:
Photos from the Java Noroeste, Java do Sertão, and ceJug events are below.
Return to Big DPosted by gsporar on March 14, 2008 at 05:06 PM | Permalink | Comments (1)In March 2007 the nice folks at the Java Metroplex Users Group (MUG) in Dallas let me speak to them about NetBeans. They had noticed that I had talked about memory leaks to the Houston Java Users Group back in October and they asked me to do the same presentation for them. So I drove up on March 12 and it was a great time. I got to chat briefly with Pete Carapetyan, who I had met last year; Pete has his own review of my presentation here. We had a good crowd: over 50 people. The slides are available here. There were several really interesting comments and questions. One attendee commented on how the problem I demonstrated with a PermGen memory leak would not have happened if the application had not been repeatedly undeployed and redeployed to the web server. While that is certainly true, it led another attendee to comment: "Once I give them the .war file, I have no control over what they do with it." In other words, in an ideal world applications do not get repeatedly undeployed and redeployed, but in the real world things do not always work out that way.... There was also a question about cyclic object references. The Heap Walker in the NetBeans IDE provides annotations to indicate just those sorts of relationships. Cyclic references are shown with two green arrows that form a circle:
My thanks to Lisa Danzer for coordinating my visit to Dallas and (as always) to Aaron Houston for sending some books and t-shirts that we could use as prizes. And many thanks to Erik Weibust of the MUG for inviting me up and running the meeting. I did not get to meet Erik last year because he was unable to attend that meeting. Turns out he is a great guy and for those of you in the area, he is one of the organizers of an interesting one-day conference: Dallas TechFest. It is on May 3 and the price cannot be beat: free! I would consider driving up to attend, but I will be in California that day getting ready for NetBeans Day at JavaOne. Is That Shortcut in Use?Posted by gsporar on March 09, 2008 at 05:20 PM | Permalink | Comments (4)How can I find out whether a particular keyboard shortcut is assigned to an action in the NetBeans IDE? That question was posted by davenull in a comment on my blog entry last month about Hippie Completion. I will admit up front: the answer I provider here is a hack. As Brian Leonard points out in this IssueZilla entry, the IDE should have better support for this feature. Let's say you are wondering whether or not Ctrl+Shift+Period is assigned to an action. Select Tools > Options > Keymap. You will see a list of the types of actions: ![]() In order to find out whether Ctrl+Shift+Period is assigned, you need to attempt to assign it to an action. The easiest way to do this is to try to assign it to an action that does not currently have a keystroke assigned. Expand the entry for Help and select the entry for About and click the Add button:
That brings up the Assign Shortcut dialog, where you can type in Ctrl+Shift+Period. If the keystroke combination you type in is already in use, the IDE will tell you to which action it is assigned. In my installation, that keystroke combination is already assigned:
Are Applets Back?Posted by gsporar on March 09, 2008 at 05:08 PM | Permalink | Comments (5)As I described back in December, Sun ordinarily sponsors the annual holiday party of the Austin Java Users Group (AJUG). This is something that Albert Leigh and I help coordinate. When the opportunity to sponsor an additional AJUG meeting in February became available, we jumped at the chance to bring Ken Russell to town. This blog entry is my belated report on the end result. Special thanks to Samuel Terry of Sun's Field Marketing office for providing the funding and to Aaron Houston for the swag that we used as prizes. Ken is the architect of the next-generation Java Plug-in and the project lead for JOGL, the Java binding to OpenGL. Ken started his presentation with a couple of quotes, one from Ben Galbraith and another from the Java Posse, both of which can be summed up as: "Applets really suck." He then talked about the many reasons why, with a focus on problems in the Java browser plug-in. In Ken's view, the newly rewritten Java browser plug-in changes everything. The problems with browsers hanging and crashing are gone. In addition, the deployment model for applets will be the same as for Web Start and the integration with JavaScript has improved. More details are in Ken's presentation slides, but just reading through them will not provide you with Ken's enthusiasm or the cool demos that he did. The new browser plug-in is part of JDK 6 Update 10, which has also been referred to as the "Consumer JRE." It is also known as JDK 6 Update N, because originally they were not sure what update number to assign to it. It all seemed to strike a chord with the audience - there were many questions. Rob Ratcliffe, one of the AJUG board members, wrote this in his recap email: Ken gave a great talk on the new capabilities of the redesigned Java Plug-in. I'm excited that there may be a rebirth of embedded rich swing-based applications over the slightly unwieldy mix of DHTML, Javascript, Ajax, etc.. (Although, it appears that applets and Javascript will play well together in the new plug-in.) NetBeans on OpenSolarisPosted by gsporar on February 27, 2008 at 06:32 PM | Permalink | Comments (0)A while back I wrote a blog entry about how I have been primarily using Ubuntu. Meanwhile, the OpenSolaris folks continue to make progress on creating a desktop-friendly version of Solaris. I recently got a nice new Sony laptop, so after I got Windows Vista and Ubuntu working on it I decided to try installing OpenSolaris. Unfortunately, it would not install. I think the problem is this bug, but I am not certain. I tried the work around described in the bug, but it did not work for me. Bottom line was that even after getting considerable help from some very nice OpenSolaris gurus, I could not get the install to work with the partition that I had set aside on the laptop's hard disk. I thought I was out of luck, and then came the announcement that Sun is planning to acquire Innotek (the deal has since been finalized). I had looked at VirtualBox briefly several months ago but I did not have an immediate need for it, so I had never installed it. Once the announcement came out, several people started experimenting with it and blogging about it. So I tried it and it worked - I am typing this blog entry into an .html file using NetBeans IDE 6.0.1, running on OpenSolaris Developer Preview 2 (herein after referred to as OSDP2), which is running in a VirtualBox VM on Windows Vista. Click the screen snapshot for a full-size version and you will see that NetBeans looks the same as it does on any other GNOME desktop (I do not know if OpenSolaris offers KDE or not...):
There were some rocks in the road. Read on for the full details.... I am using VirtualBox version 1.5.6. The first problem that I ran into was that OSDP2 would not install onto a fixed size VirtualBox virtual drive. I think that is because of a known issue in VirtualBox version 1.5.4, which is what I was using initially. The workaround is simple: I installed onto a dynamic virtual drive instead. There were two significant problems after I installed: no network access and I could not set the video resolution of OSDP2 to anything higher than 1024x768. Alan Burlison has the solution for both problems in this blog entry. Note that by default, OSDP2 does not have an xorg.conf file - it does automatic configuration. So if you want to use the xorg.conf file that Alan provides, you will not be overwriting an existing xorg.conf - you will instead just be placing the file into /etc/X11. Also note that in order to get the instruction that Alan provides for running the VBoxManage command to work, I had to not only shutdown the guest VM, but also the VirtualBox user interface itself. Now comes the big question: Can I use this as my every day environment? I don't think so - not yet, anyway. The lag time as I type is very noticeable and using the mouse can be a bit frustrating. I am hoping those are just video/mouse driver problems. VirtualBox has guest operating system "Guest Additions" that help solve some of these issues. Unfortunately, there are no "Guest Additions" available for Solaris yet. Hopefully that will soon change. In the meantime, it is good enough that I can use it to experiment with things such as the NetBeans DTrace plugin. :-) Hidden HippiePosted by gsporar on February 05, 2008 at 03:44 PM | Permalink | Comments (5)This has been written about before - Tor Norbye wrote a blog entry on this topic, as did Charles Ditzel. It is mentioned in a tutorial by Randahl Fink Isaksen, and perhaps in other spots. With more and more folks trying out the NetBeans IDE, however, I continue to see this discussed out on the nbusers email list so it is worth repeating because this feature is one of those that almost seems hidden - even though it is listed on the IDE's top level Source menu. Tor pointed out that the name "hippie completion" originated with the feature in XEmacs. Wherever the name came from, the concept is simple: in response to a control key combination, the editor fills in the nearest matching string. So for example, using NetBeans 6.0, on line 21 of this source file: ![]() I have typed in
Note that the match is done without any sort of context knowledge. That is an important point because it means that hippie completion is not smart, at least not in comparison to a standard code completion feature. The upside though is that it is faster than code completion.
If I had instead pressed Ctrl-Shift-K then the editor would have
searched forward in the edit window and would have wrapped around to the beginning
of the file and continued searching until it found ![]() Some things to note:
More Ruby TuesdaysPosted by gsporar on January 30, 2008 at 03:02 PM | Permalink | Comments (0)Since my last blog entry on this topic, I have done two additional talks to Ruby developers. On January 9th I spoke to the Atlanta Ruby Users Group and on January 15th I did a presentation for the Austin on Rails group. The Austin on Rails meeting got mentioned in an article in the local newspaper. If you look closely at the third photo, you can see the NetBeans IDE on the screen. :-) As always, there were many questions. Some I could answer, some I could not. For those that I could not answer, I did some asking around and Tor Norbye and Martin Krauskopf were kind enough to fill in the blanks for me. Some of the highlights:
|
April 2008
Search this blog:CategoriesJavaOneArchives
April 2008 Recent EntriesIf it's Tuesday, this must be Brasília | ||||||||||||||||||||||||||||||||||||||||||||
|
|