<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Gregg Sporar&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/" />
<modified>2008-06-24T22:40:25Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2008, gsporar</copyright>
<entry>
<title>New Address</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/06/new_address.html" />
<modified>2008-06-24T22:40:25Z</modified>
<issued>2008-06-24T22:40:25Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.10020</id>
<created>2008-06-24T22:40:25Z</created>
<summary type="text/plain">How many weblogs does one person need?  </summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[How many weblogs does one person need?  Blogging at java.net has been great, but I am moving my blogging activity.  Check out <a href="http://blogs.sun.com/gregg/entry/the_observatory">this post</a> for more info. and please update your RSS readers.  Thanks.]]>

</content>
</entry>
<entry>
<title>JavaOne 2008 Recap: Houston</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/05/javaone_2008_re.html" />
<modified>2008-05-29T04:54:18Z</modified>
<issued>2008-05-29T04:54:03Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9884</id>
<created>2008-05-29T04:54:03Z</created>
<summary type="text/plain">I was on a panel at the May 2008 Houston Java Users Group meeting where we discussed JavaOne 2008.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    <a href="http://jimbethancourt.blogspot.com/">Jim Bethancourt</a>
    , president of the <a href="http://hjug.org/">Houston Java Users Group (HJUG)</a> invited
    me to sit on a panel at their May meeting to discuss <a href="http://java.sun.com/javaone/sf/index.jsp">JavaOne 2008</a>.
</p>
<p>
    It was a good dicussion.
    The other panelists were James Velasco, Steven Reynolds, and Dan Sline.
    Dan started things off with a discussion of some proposed changes:
    closures, annotations for fields, etc.
</p>
<p>
    I then did some demos.  I did the <a href="https://btrace.dev.java.net/">BTrace</a>,
    <a href="https://gchisto.dev.java.net/">GChisto</a>,
    and 
    <a href="https://visualvm.dev.java.net/">VisualVM</a>
    demos that Jarda and I did during our <a href="http://weblogs.java.net/blog/gsporar/archive/2008/05/ts6000_improvin_1.html">technical session</a>.  The 
    coolest demo I did, though, was Ken Russell's applet plugin demo.  I 
    dragged an applet out of the browser onto the desktop, closed the browser, 
    and the applet kept running.
</p>
<p>
    After that, Steven took over and talked about some of his favorite sessions,
    which included <a href="http://in.relation.to/Bloggers/Gavin">Gavin King</a>'s 
    session on <a href="http://jcp.org/en/jsr/detail?id=299">Web Beans</a> and Mikael Grev's
    session on the <a href="http://www.miglayout.com/">MiG layout manager</a>.
</p>
<p>
    James wrapped things up with a neat approach: a JavaOne "index" that 
    showed which trends were on their way up, and which were on their way down.
    Among those on the way up: <a href="http://www.netbeans.org/">NetBeans</a> and 
    <a href="http://www.javafx.com/">JavaFX</a>.  Among those on their
    way down: SOAP-based web services.
</p>
<p>
    Slides from the presenters are available <a href="http://hjug.org/present/J1_2008.zip">here</a>.  A photo of the speakers
    is below.  James and Dan are in front, that's Steven and me in the back row.
</p>
<br>
<img alt="DSCN4111.JPG" src="http://weblogs.java.net/blog/gsporar/archive/images/DSCN4111.JPG" width="372" height="279" />
]]>

</content>
</entry>
<entry>
<title>TS-6000 : Improving Application Performance with Monitoring and Profiling Tools</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/05/ts6000_improvin_1.html" />
<modified>2008-05-28T22:31:22Z</modified>
<issued>2008-05-28T22:30:41Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9879</id>
<created>2008-05-28T22:30:41Z</created>
<summary type="text/plain">Finally have a chance to blog about JavaOne; first up: a recap of our technical session.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    Last year I made a change that I really enjoyed: I did <i>not</i>
    blog during JavaOne.  The event alone is enough of an exercise
    in endurance, so I decided to drop the blogging in favor
    of additional sleep.  :-)
</p>
<p>
    I did a 
    <a href="http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-6000&yr=2008&track=tools">technical session</a> 
    this year with Jaroslav Bachorík (who sometimes blogs
    <a href="http://blogs.sun.com/nbprofiler/">here</a>).  Our goal was 
    to do an overview of <i>some</i> of the tools available for tracking down
    performance and memory problems in Java applications.  So the talk was
    broad, not deep - we covered 12 different tools and did demos of 3
    of those.
</p>
<p>
    It seemed to be well received, based on initial reviews.  The room holds
    about 800 and was packed,
    so we did the session a second time late on Friday afternoon (not as large 
    a crowd the second time, of course).
</p>
<p>
    The slides are available 
    <a href="http://mediacast.sun.com/users/GreggSporar/media/PS_TS-6000_296000_191-1_FIN_v3.pdf">here</a>.
    There are several links to online resources, which I have reproduced
    below.
</p>
<br></br>
<ul>
    <li>
        <a href="http://java.sun.com/performance/reference/whitepapers/6_performance.html">Java SE Performance White Paper</a> - 
        a great starting point.
    </li><br>
    <li>
        <a href="http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/docinfo.html">Troubleshooting Guide for Java SE 6 with HotSpot VM</a> - provides useful
        tips
    </li><br>
    
    <li>
        <a href="http://www.sun.com/bigadmin/content/dtrace/">DTrace portal</a> - contains links to several resources
    </li><br>
    <li>
        An article on 
        <a href="http://www.devx.com/Java/Article/33943/0/page/1">using DTrace with Java applications</a>, 
        by Jarod Jenson.
    </li><br>
    <li>
        An article on 
        <a href="http://developers.sun.com/solaris/articles/javapps.html">using the Sun Studio Collector/Analyzer on Java applications</a>,
        by Marty Itzkowitz.
    </li><br>
    <li>
        An interesting article by Nasser Nouri on 
        <a href="http://developers.sun.com/solaris/articles/dtrace.html">using DTrace in conjunction with the Sun Studio Collector/Analyzer</a>.
    </li><br>
    <li>
        The project page for <a href="https://btrace.dev.java.net/">BTrace</a>.
    </li><br>
    <li>
        The project page for <a href="https://gchisto.dev.java.net/">GChisto</a>.
    </li><br>
    
    <li>
        Part <a href="http://weblogs.java.net/blog/gsporar/archive/2007/04/tracking_down_m.html">1</a>
        and part <a href="http://weblogs.java.net/blog/gsporar/archive/2007/05/tracking_down_m_1.html">2</a>
        of an article I wrote with 
        <a href="http://blogs.sun.com/sundararajan/">Sundar</a> and 
        <a href="http://blogs.sun.com/fkieviet/">Frank Kieviet</a>
        on dealing with different types of memory leaks in Java applications.
    </li><br>
    <li>
        <a href="http://www.netbeans.org/features/java/profiler.html">Features</a> 
        in the NetBeans profiling tools, and the <a href="http://profiler.netbeans.org/">project page</a>.
    </li><br>
    <li>
        The Hands On
        Lab on the NetBeans profiling tools 
        that I taught with Maria Davydova is now available for download 
        <a href="http://developers.sun.com/learning/javaoneonline/j1lab.jsp?lab=LAB-8430&yr=2008&track=1">here</a>.
    </li><br>
    <li>
        The project page for <a href="https://visualvm.dev.java.net">VisualVM</a>.
    </li>
</ul>]]>

</content>
</entry>
<entry>
<title>If it&apos;s Tuesday, this must be Brasília</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/04/if_its_tuesday.html" />
<modified>2008-05-21T14:33:53Z</modified>
<issued>2008-04-28T03:02:23Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9616</id>
<created>2008-04-28T03:02:23Z</created>
<summary type="text/plain">I had the good fortune to visit Brazil recently and meet many nice people scattered out across a great country.  Along the way I managed to demonstrate some of the new features coming in NetBeans IDE 6.1.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    The <a href="http://fisl.softwarelivre.org/9.0/www/">ninth annual FISL conference</a> 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 <a href="http://fisl.softwarelivre.org/9.0/papers/pub/programacao/239">memory leaks talk</a>
    selected, so I asked my
    co-worker <a href="http://weblogs.java.net/blog/brunos/">Bruno Souza</a> if 
    he could set up some user group meetings and/or
    university visits in the days immediately before the conference.
</p>
<p>
    This is sort of like asking if it would be possible to get another slice
    of grilled meat at a <a href="http://en.wikipedia.org/wiki/Churrascaria">churrascaria</a>; 
    his answer was: "Of course!"  :-)
</p>
<p>
    In Brazil, everyone who knows Java knows Bruno - and even people who don't
    know Java know Bruno, including <a href="http://en.wikipedia.org/wiki/Luiz_In%C3%A1cio_Lula_da_Silva">the president</a>,
    as shown in <a href="http://weblogs.java.net/blog/gsporar/archive/images/BrunoWithPresident." onclick="window.open('http://weblogs.java.net/blog/gsporar/archive/images/BrunoWithPresident.','popup','width=457,height=406,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">this photo</a>.
</p>
<p>
    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
</p>
<p>
    I did presentations for the following Java users groups: 
    <a href="http://www.soujava.org.br/display/v/Inicial">SouJava</a>, 
    <a href="http://www.javanoroeste.com.br/">Java Noroeste</a>,
    <a href="http://www.guj.com.br/posts/list/87300.java">Java do Sertão</a>, 
    and <a href="http://www.cejug.org/display/cejug/Home">ceJug</a>. 
    And I did a presentation at 
    <a href="http://www.ucb.br/">Universidade Católica de Brasília</a>.  
    The end result: within my first few days in the country, I traveled
    almost as many miles <i>within</i> Brazil as I had flown to <i>get</i> to 
    Brazil.
</p>
<p>
    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.
</p>
<p>
    One of my goals was to show folks some of the new features coming in 
    <a href="http://www.netbeans.org/">NetBeans</a>
    <a href="http://www.netbeans.org/community/releases/61/">IDE 6.1</a> 
    (which is due out this week).  One of the most important new features
    is <a href="http://wiki.netbeans.org/NB61NewAndNoteWorthy">powerful support</a> 
    for <a href="http://www.javascript.com/">JavaScript</a>.  The support is built on what was 
    <a href="http://www.netbeans.org/features/ruby/index.html">put into the 6.0 release</a> 
    to support <a href="http://www.ruby-lang.org/">Ruby</a>.  As a result, powerful code-completion
    is included.
</p>
<p>
    Now I'm not a JavaScript guru and have only played around with it a bit.  Luckily,
    my co-worker <a href="http://weblogs.java.net/blog/bleonard/">Brian Leonard</a> put 
    together a very nice <a href="http://wiki.netbeans.org/JavaScriptDemo">demo script</a> 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.
</p>
<p>
    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:
</p>
<img alt="noworkjs.png" src="http://weblogs.java.net/blog/gsporar/archive/images/noworkjs.png" width="277" height="57" />
<br></br>
<p>
    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.  
</p>
<p>
    Immediately after I finished, one of the attendees rushed up to me and asked:
    "How can the editor provide JavaScript support outside of a &lt;script&gt; tag?"
    That's when it hit me like a ton of bricks: "Doh!  I was adding JavaScript
    code into an .html file without a &lt;script&gt; tag.  No wonder the editor
    did not work!"  
</p>
<p>
    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:
</p>
<img alt="worksjs.png" src="http://weblogs.java.net/blog/gsporar/archive/images/worksjs.png" width="425" height="228" />
<br></br>
<p>
    Photos from the Java Noroeste, Java do Sertão, and ceJug events are below.
</p>
<img alt="WeAll.png" src="http://weblogs.java.net/blog/gsporar/archive/images/WeAll.png" width="400" height="300" />
<br></br>
<img alt="daniel.png" src="http://weblogs.java.net/blog/gsporar/archive/images/daniel.png" width="400" height="300" />
<br></br>
<img alt="fortaleza.png" src="http://weblogs.java.net/blog/gsporar/archive/images/fortaleza.png" width="400" height="300" />
<br></br>
]]>

</content>
</entry>
<entry>
<title>Return to Big D</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/03/return_to_big_d.html" />
<modified>2008-03-15T01:07:05Z</modified>
<issued>2008-03-15T01:06:56Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9367</id>
<created>2008-03-15T01:06:56Z</created>
<summary type="text/plain">It is one year later and I got invited back to do another presentation for the Java Metroplex Users Group.  The topic this time: memory leaks.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>In March 2007 the nice folks at the <a href="http://www.javamug.org/">Java Metroplex Users Group (MUG)</a> in Dallas let me <a href="http://weblogs.java.net/blog/gsporar/archive/2007/03/big_questions_i.html">speak to them about NetBeans</a>.</p>

<p>They had noticed that I had <a href="http://weblogs.java.net/blog/gsporar/archive/2007/10/bayou_city_leak.html">talked about memory leaks</a> to the <a href="http://www.hjug.org/">Houston Java Users Group</a> back in October and they asked me to do the same presentation for them.</p>

<p>So I drove up on <a href="http://javamug.org/mainpages/2008Meetings.html#Mar">March 12</a> and it was a great time.  I got to chat briefly with <a href="http://couldbe.net/blog/1">Pete Carapetyan</a>, who I had met last year; Pete has his own review of my presentation <a href="http://couldbe.net/What_If_Memory_Leaks_Were_Plumbed_At_JavaMUG_Tonight">here</a>.  We had a good crowd: over 50 people.  The slides are available <a href="http://javamug.org/mainpages/presentations/Sporar_Gregg_MemoryLeaksInJavaApplicationsDifferentToo.pdf">here</a>.</p>

<p>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....</p>

<p>There was also a question about cyclic object references.  The <a href="http://www.netbeans.org/features/java/profiler.html">Heap Walker</a> in the <a href="http://www.netbeans.org/features/index.html">NetBeans IDE</a> provides annotations to indicate just those sorts of relationships.  Cyclic references are shown with two green arrows that form a circle:</p>

<p><img alt="loop.png" src="http://weblogs.java.net/blog/gsporar/archive/images/loop.png" width="645" height="327" /></p>

<p>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.  </p>

<p>And many thanks to <a href="http://erik.weibust.net/category/java/">Erik Weibust</a> 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: <a href="http://dallastechfest.com.dnnspeed.com/Default.aspx">Dallas TechFest</a>.  It is on May 3 and the price cannot be beat: free!</p>

<p>I would consider driving up to attend, but I will be in California that day getting ready for <a href="http://www.netbeans.org/community/articles/javaone/2008/nb-day.html">NetBeans Day</a> at <a href="http://java.sun.com/javaone/sf/index.jsp">JavaOne</a>.</p>]]>

</content>
</entry>
<entry>
<title>Is That Shortcut in Use?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/03/is_that_shortcu.html" />
<modified>2008-03-10T01:20:56Z</modified>
<issued>2008-03-10T01:20:50Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9338</id>
<created>2008-03-10T01:20:50Z</created>
<summary type="text/plain">Last month I wrote a blog entry on a feature that seems hard to discover: Hippie Completion. That led to a question: Is there a way to determine if a keyboard shortcut is currently assigned?</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    How can I find out whether a particular keyboard shortcut is assigned
    to an action in the <a href="http://www.netbeans.org/features/">NetBeans IDE</a>?  
    That question was posted by davenull in a 
    <a href="http://weblogs.java.net/blog/gsporar/archive/2008/02/hidden_hippie.html#comments">comment</a> 
    on my blog 
    <a href="http://weblogs.java.net/blog/gsporar/archive/2008/02/hidden_hippie.html">entry last month about Hippie Completion</a>. 
</p>
<p>
    I will admit up front: the answer I provider here is a hack.  
    As <a href="http://weblogs.java.net/blog/bleonard/">Brian Leonard</a> points out in this
    IssueZilla <a href="http://www.netbeans.org/issues/show_bug.cgi?id=127152">entry</a>, 
    the IDE should have better support for this feature.
</p>
<p>
    Let's say
    you are wondering whether or not Ctrl+Shift+Period is assigned to 
    an action.  Select <b>Tools</b> &gt; <b>Options</b> &gt; <b>Keymap</b>.  
    You will see a list of the types of actions:
</p><br>
<img alt="k1.png" src="http://weblogs.java.net/blog/gsporar/archive/images/k1.png" width="427" height="531" /><br>
<p>
    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.
</p>
<p>
    Expand the entry for <b>Help</b> and select the entry for <b>About</b>
    and click the <b>Add</b> button:
</p>
<br><img alt="k2.png" src="http://weblogs.java.net/blog/gsporar/archive/images/k2.png" width="427" height="531" />
<br>
<p>
    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:
</p><br>
<img alt="k3.png" src="http://weblogs.java.net/blog/gsporar/archive/images/k3.png" width="379" height="180" />

]]>

</content>
</entry>
<entry>
<title>Are Applets Back?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/03/are_applets_bac.html" />
<modified>2008-03-11T18:59:44Z</modified>
<issued>2008-03-10T01:08:31Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9337</id>
<created>2008-03-10T01:08:31Z</created>
<summary type="text/plain">Ken Russell thinks so.  He provides some interesting evidence.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
As I <a href="http://weblogs.java.net/blog/gsporar/archive/2007/12/a_dynamic_holid.html">described</a> 
back in December, Sun ordinarily sponsors the annual holiday party 
of the <a href="http://www.austinjug.org/">Austin Java Users Group (AJUG)</a>.  
This is something that <a href="http://blogs.sun.com/sunabl/">Albert Leigh</a> 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.
</p>

<p>
Ken is the architect of the next-generation <a href="https://jdk6.dev.java.net/plugin2/">Java Plug-in</a> 
and the 
project lead for <a href="https://jogl.dev.java.net/">JOGL</a>, the Java binding to 
<a href="http://www.opengl.org/">OpenGL</a>.
</p>

<p>
Ken started his presentation with a couple of quotes, one from 
<a href="http://galbraiths.org/blog/">Ben Galbraith</a> and another from the 
<a href="http://www.javaposse.com/">Java Posse</a>, 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.  
</p>

<p>
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 <a href="http://java.sun.com/products/javawebstart/">Web Start</a> and 
the integration with JavaScript 
has improved.  More details are in Ken's <a href="http://www.austinjug.org/presentations/NewJavaPlugIn-AustinJUG-20080226.pdf">presentation slides</a>, but just reading through 
them will not provide you with Ken's enthusiasm or the cool demos that he did.
</p>

<p>
The new browser plug-in is part of <a href="https://jdk6.dev.java.net/6uNea.html">JDK 6 Update 10</a>, 
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.
</p>

<p>
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: 
</p>

<p style="margin-left:2%;"><i>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.)</i>
</p>

]]>

</content>
</entry>
<entry>
<title>NetBeans on OpenSolaris</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/02/netbeans_on_ope.html" />
<modified>2008-03-17T19:10:20Z</modified>
<issued>2008-02-28T02:32:46Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9281</id>
<created>2008-02-28T02:32:46Z</created>
<summary type="text/plain">Actually, I should call this entry &quot;NetBeans on OpenSolaris on VirtualBox on Windows Vista.&quot;  :-)</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    A while back I wrote a <a href="http://weblogs.java.net/blog/gsporar/archive/2007/08/netbeans_on_ubu.html">blog entry</a> about how 
    I have been primarily using <a href="http://www.ubuntu.com/">Ubuntu</a>.
</p>
<p>
    Meanwhile, the <a href="http://opensolaris.org/">OpenSolaris</a> 
    folks <a href="http://opensolaris.org/jive/thread.jspa?threadID=51916&tstart=0">continue to make progress</a> on creating
     a <a href="http://www.opensolaris.org/os/project/indiana/">desktop-friendly version</a> of 
     <a href="http://www.sun.com/software/solaris/">Solaris</a>.  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.
 </p>
 <p>Unfortunately, it would not install.  I think the problem is
 <a href="http://bugs.opensolaris.org/view_bug.do?bug_id=6651384">this bug</a>, 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.
</p>
<p>I thought I was out of luck, and then came the <a href="http://www.sun.com/aboutsun/pr/2008-02/sunflash.20080212.1.xml">announcement</a>
that <a href="http://www.sun.com">Sun</a> is planning to acquire <a href="http://www.innotek.de/">Innotek</a>
(the deal has since been <a href="http://www.sun.com/software/innotek/">finalized</a>).  
I had looked at <a href="http://www.virtualbox.org/">VirtualBox</a>
briefly several months ago but I did not have an immediate need
for it, so I had never installed it.
</p>
<p>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
<a href="http://www.netbeans.org/features/">NetBeans IDE 6.0.1</a>, running on 
OpenSolaris Developer Preview 2 (herein after referred to as OSDP2),
which is running in a VirtualBox VM on Windows Vista.
</p>
<p>
    Click the screen snapshot for a full-size version and you will see that NetBeans looks the same
    as it does on any other <a href="http://www.gnome.org/">GNOME</a> desktop (I do not know if OpenSolaris
    offers KDE or not...):
</p>
<p></p>
<a href="http://weblogs.java.net/blog/gsporar/archive/images/vbFull." onclick="window.open('http://weblogs.java.net/blog/gsporar/archive/images/vbFull.','popup','width=1280,height=1024,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img alt="vbThm.png" src="http://weblogs.java.net/blog/gsporar/archive/images/vbThm.png" width="423" height="338" /></a><p></p>
<p>
    There were some rocks in the road.  Read on for the full details....
    
</p>
<p>I am using <a href="http://www.virtualbox.org/wiki/Changelog">VirtualBox version 1.5.6</a>.  
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 <a href="http://www.virtualbox.org/wiki/User_FAQ">known issue</a> 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.
</p>
<p>
    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.  <a href="http://blogs.sun.com/alanbur/">Alan Burlison</a> 
    has the solution for both
    problems in <a href="http://blogs.sun.com/alanbur/entry/kicking_both_tyres_together_virtualbox">this blog entry</a>. 
    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.
</p>
<p>
    Also note that in order to get the instruction that Alan provides for
    running the <tt>VBoxManage</tt> command to work, I had to not only 
    shutdown the guest VM, but also the VirtualBox user interface itself.
</p>
<p>
    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.
</p>
<p>
    In the meantime, it is good enough that I can use it to experiment with things
    such as the <a href="http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3925">NetBeans DTrace plugin</a>.  :-)
</p>
]]>

</content>
</entry>
<entry>
<title>Hidden Hippie</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/02/hidden_hippie.html" />
<modified>2008-02-05T23:56:30Z</modified>
<issued>2008-02-05T23:44:11Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9144</id>
<created>2008-02-05T23:44:11Z</created>
<summary type="text/plain">&quot;Hippie&quot; completion continues to be one of the best features of the NetBeans IDE&apos;s editor - and also one of the hardest to discover</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    This has been written about before - <a href="http://blogs.sun.com/tor">Tor Norbye</a> 
    wrote a blog <a href="http://blogs.sun.com/tor/entry/hippie_completion">entry</a> on this topic, 
    as <a href="http://cld.blog-city.com/quick_bits__hippie_completion_on_netbeans.htm">did</a>
    <a href="http://cld.blog-city.com/">Charles Ditzel</a>.  It is mentioned
    in a <a href="http://www.netbeans.org/kb/articles/stop-typing-source-code.html">tutorial</a>
    by Randahl Fink Isaksen, and perhaps in other spots.
    With 
    more and more folks trying out the 
    <a href="http://www.netbeans.org/features/">NetBeans IDE</a>, however, 
    I continue to see this
    <a href="http://www.netbeans.org/servlets/BrowseList?list=nbusers&by=thread&from=829940">discussed</a>
    out on the <a href="http://www.netbeans.org/servlets/SummarizeList?listName=nbusers">nbusers</a> 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.
</p>
<p>
    Tor pointed out that the name "hippie completion" originated
    with the feature in <a href="http://www.xemacs.org/Documentation/packages/html/edit-utils_23.html">XEmacs</a>.
    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 <a href="http://www.netbeans.org/community/releases/60/">NetBeans 6.0</a>, on line 21 of this source file:
</p>
<img alt="h1c.png" src="http://weblogs.java.net/blog/gsporar/archive/images/h1c.png" width="692" height="102" /><br>
<p>I have typed in <code>myBi</code> as the parameter to 
    <code>System.out.println()</code>.  If I then press Ctrl-K
    the editor will search backwards through the edit window for the 
    nearest match and will then fill in the rest of the string for
me:</p>
<p>
<img alt="h2c.png" src="http://weblogs.java.net/blog/gsporar/archive/images/h2c.png" width="798" height="103" />
    <br>
</p>
<p>Note 
    that the match is done <i>without</i> 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.
</p>
<p>
    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 <code>myBig</code>:
</p>
<img alt="h3c.png" src="http://weblogs.java.net/blog/gsporar/archive/images/h3c.png" width="685" height="101" /><br>
<p>Some things to note:</p>
<ul>
    <li>Press Ctrl-K (or Ctrl-Shift-K) repeatedly to have the editor
    suggest other strings that match.</li><br>
    <li>You don't have to type anything before invoking the feature - if you
    do not give it anything to match then the editor will just suggest
    the string that is closest to the cursor position.</li><br>
    <li>As mentioned, when it does its search the editor wraps around
        when it reaches the end of the file.  It also wraps when it reaches 
        the beginning.  As a result, I always just use Ctrl-K, even when 
        I want to insert a string that is further down in the file from
    where I am currently editing.</li><br>
    <li>The editor searches <i>all</i> open editor windows for a match,
    not just the window for the file that currently has focus.</li><br>
    <li>NetBeans has had this feature for years and years and prior to
    version 6.0 the keybindings were Ctrl-K to search backward and Ctrl-L
    to search forward.  The addition of so many new features in NetBeans
    6.0 required modifying the default keymap and the default forward search
    keybinding got changed from Ctrl-L to Ctrl-Shift-K.</li><br>
    <li>The official names for these features are "Insert Previous
    Matching Word" (Ctrl-K) and "Insert Next Matching Word" 
    (Ctrl-Shift-K).  But I prefer to use
    the term "Hidden Hippie."  :-)</li><br>
</ul>]]>

</content>
</entry>
<entry>
<title>More Ruby Tuesdays</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2008/01/more_ruby_tuesd.html" />
<modified>2008-02-26T15:23:27Z</modified>
<issued>2008-01-30T23:02:32Z</issued>
<id>tag:weblogs.java.net,2008:/blog/gsporar/239.9098</id>
<created>2008-01-30T23:02:32Z</created>
<summary type="text/plain">Actually, one of them was a Wednesday, but the point is the same: I enjoy talking to Rubyists and showing them the tools available in the NetBeans IDE.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    Since my last <a href="http://weblogs.java.net/blog/gsporar/archive/2007/11/ruby_tuesday.html">blog entry</a>
    on this topic, I have done two additional
    talks to Ruby developers.  On January 9th I spoke to the <a href="http://wiki.atlrug.org:8000/view/HomePage">Atlanta
    Ruby Users Group</a> and on January 15th I did a presentation for
    the <a href="http://austinonrails.org/">Austin on Rails</a> group.  The Austin on Rails meeting got mentioned
    in an <a href="http://www.statesman.com/business/content/business/stories/technology/01/28/0128ruby.html">article</a> 
    in the <a href="http://www.statesman.com/">local newspaper</a>. 
    If you look closely at the 
    <a href="http://www.statesman.com/">third photo</a>, you can see the 
    <a href="http://www.netbeans.org/features/ruby/index.html">NetBeans IDE</a> on the screen.  :-)
</p>
<p>
    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 <a href="http://blogs.sun.com/tor/">Tor Norbye</a> and Martin Krauskopf were kind enough to fill
    in the blanks for me.
</p>
<p>
    Some of the highlights:
</p>
<ul>
    <li><b>What is the business model here?  In other words, how is <a href="http://www.sun.com">Sun</a> going to make
        money on <a href="http://www.ruby-lang.org/">Ruby</a>/<a href="http://www.rubyonrails.org/">Ruby on Rails</a> development tools?</b><br>We have a saying around here: "Volume drives value."
        Which means, in part, get the developer's attention up front and the money will
        come later.  Specifically, at deployment time.  I spoke with a number of
        attendees in Atlanta who are very interested in deploying Rails applications
        to <a href="https://glassfish.dev.java.net/">GlassFish</a>.  And if they want a support contract on that runtime, Sun
    can provide that.</li><br>
    <li><b>What is the story on the lengthy scan times at startup?</b><br>
        When the IDE creates a project it scans the source files and 
        the libraries you have installed and caches some information.  On a restart it will do a quick scan
        of your source to make sure the cache is still valid.  But there are some problems
        in this area.  I cannot reproduce the behavior under Windows or Linux,
        but others can.  There is an IssueZilla (IZ) 
        <a href="http://www.netbeans.org/nonav/issues/show_bug.cgi?id=124444">entry</a>;
    see also this <a href="http://www.netbeans.org/nonav/issues/show_bug.cgi?id=124454">entry</a>. And
finally, some <a href="http://ruby.netbeans.org/servlets/ReadMsg?list=users&msgNo=752">recent comments</a> from Tor are worth reading.</li><br>
    <li><b>Is there support for <a href="http://haml.hamptoncatlin.com/">HAML</a>/<a href="http://haml.hamptoncatlin.com/docs/sass">SASS</a>?</b><br>Yes, but the last time I checked,
        it only works with NetBeans 6.0 - it does not work with <a href="http://bits.netbeans.org/download/trunk/nightly/latest/">development builds</a>
    of <a href="http://wiki.netbeans.org/NB61NewAndNoteWorthy">NetBeans 6.1</a>.  More information <a href="http://www.nabble.com/New-version-of-the-Haml-Sass-Netbeans-support-available-td13184976.html">here</a>.</li><br>
    <li><b>Turning off the "Show Logical Project View" option is helpful, but not
            quite good enough because even with that option off, the vendor subdirectory of a Rails project is still 
        not shown in the Projects window.  Is there any plan to change that?</b><br>As of 
        <a href="http://wiki.netbeans.org/RubyRecentChanges">December 7</a>, in the 6.1 development builds
    the vendor subdirectory is shown in the Projects window.</li><br>
    <li><b>On large projects the code completion list is overwhelming - there is just
        too much stuff that shows up in the list.  Is there any way to control this?</b><br>
        The response I got from Tor was: 
        <p><i>
                The typical strategy for that is to type more before asking for completion. Don't try completion on empty context, or just one character. You do that when you really don't know what you're looking for - and in that case completion should probably show you what it knows about so you can go hunting.<br><br>
                
                But if you type 3-4 chars it's no longer that long is it?<br><br>
                
                Something I've been thinking of doing is to truncate searches at 50 matches. If there are more than 50 matches I will abort the search and insert a magic (unselectable) item in the completion list saying "Too many matches, result truncated." or something to that effect.  That should make completion snappier and probably won't affect people too much since nobody really scrolls through 800 items looking for something anyway,  you keep typing until what you're looking for shows up in the visible list.
            </i>
    </p>
    On a somewhat related note, there has recently been a <a href="http://ruby.netbeans.org/servlets/BrowseList?list=dev&by=thread&from=828054">discussion</a> about
    this on one of the <a href="http://ruby.netbeans.org/servlets/SummarizeList?listName=dev">NetBeans Ruby email lists</a>.</li><br>
    <li><b>If the vendor subdirectory for a project contains the Rails source then it gets indexed and that slows things down -
    is there any plan to fix this?</b><br>Yes, that is fixed in the development 
builds, as Tor wrote: "... in 6.1 I've decoupled things a bit so that [the vendor subdirectory] is 
now shown in the projects view etc. but is still indexed differently than user sources." </li><br>
<li><b>How does the IDE actually start the debugger?</b><br>This is what I got
from Martin: 
<p><i>Instead of rdebug (standard Fast debugger for Ruby) we start rdebug-ide which 
is part of <a href="http://debug-commons.rubyforge.org/">debug-commons</a> project on 
<a href="https://rubyforge.org/">RubyForge</a>. <br><br>

[The] rdebug-ide script is executed with a another ruby script (debuggee) as a parameter. 
Currently only use case since rails is just another Ruby script.<br><br>

The rdebug-ide, in short:<br><br>

- starts the server to which a frontend connects and communicates
  through it<br>
- registers debug event hook in Ruby runtime<br>
- loads the debuggee (after 'start' command is received from the
  frontend)<br><br>

As events are happening they are sent through socket to the frontend and at the same time 
server is listening to the frontend (for commands like 'add breakpoint', 'do step', ...). </i></p></li>
<li><b>Is there any way to get to a Ruby debug console while using the debugger?</b>
<br>Currently, no.  But Martin is aware of this request; there is an <a href="http://www.netbeans.org/issues/show_bug.cgi?id=107761">IZ entry</a> for it.</li>
</ul>]]>

</content>
</entry>
<entry>
<title>A Dynamic Holiday Party</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2007/12/a_dynamic_holid.html" />
<modified>2008-02-26T15:22:52Z</modified>
<issued>2007-12-12T18:47:31Z</issued>
<id>tag:weblogs.java.net,2007:/blog/gsporar/239.8813</id>
<created>2007-12-12T18:47:31Z</created>
<summary type="text/plain">The annual Austin Java User Group holiday party was held for the fourth time at Sun&apos;s office in Austin.  The main topic was DTrace and its use in finding performance problems in Java applications.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    <a href="http://blogs.sun.com/angelo/">Angelo Rajadurai</a> is a long-time <a href="http://www.sun.com">Sun</a> engineer who works with software
    vendors to make sure their products run well on <a href="http://developers.sun.com/sxde/">Solaris</a>.  My buddy
    Albert Leigh was able to convince Angelo to be the featured speaker
    at the <a href="http://www.austinjug.org/">Austin Java Users Group (AJUG)</a> holiday party, which Sun sponsored
    for the fourth year in a row.
</p>
<p>
    I have never used <a href="http://www.sun.com/bigadmin/content/dtrace/">DTrace</a> in anger but have always wanted to learn
    more and Angelo delivered - I learned quite a bit.   He covered the basic concepts and then
    drilled into numerous specific examples to show the value that
    DTrace provides.  What was especially useful (and entertaining as 
    well) were his war stories from the field.  Those "real world"
    examples of DTrace being used to solve hard problems really made
    the topic lively.
</p>
<p>
    As is normally the case, the evening started off with a short talk
    (a "technotizer" as it were :-) ).  I was the speaker and I did
    an overview of just some of the new <a href="http://www.netbeans.org/features/">features</a> in <a href="http://www.netbeans.org/">NetBeans IDE
    6.0</a>.  I included a quick demo of some of the <a href="http://www.netbeans.org/kb/60/java/editor-screencast.html">new editor features</a> and then I
    turned it over to long-time NetBeans user (and AJUG board member)
    Rob Ratcliff, 
    who did a quick demo of the new
    <a href="http://www.netbeans.org/kb/60/java/swing-app-beans-binding-screencast.html">Swing Framework/Beans Binding features</a>.
</p>
<p>
    So all in all, a fun and informative evening.  A few pictures below - 
    for more check out Albert's photos <a href="http://picasaweb.google.com/albert.leigh/AustinJUGDec112007">here</a>.
</p><br>
<img alt="edemo.png" src="http://weblogs.java.net/blog/gsporar/archive/images/edemo.png" width="500" height="332" /><br>
<b>Demoing the editor</b><br><br>
<img alt="sm.png" src="http://weblogs.java.net/blog/gsporar/archive/images/sm.png" width="500" height="375" /><br>
<b>Sam Griffith, Jr. and Michael Yuan show off their new NetBeans 6 t-shirts</b><br><br>
<img alt="ase.png" src="http://weblogs.java.net/blog/gsporar/archive/images/ase.png" width="500" height="375" /><br>
<b>Angelo Rajadurai, Sam Griffith, Jr., and Earnest Hill</b>]]>

</content>
</entry>
<entry>
<title>Ruby Tuesday</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2007/11/ruby_tuesday.html" />
<modified>2008-02-26T15:22:34Z</modified>
<issued>2007-11-16T18:21:06Z</issued>
<id>tag:weblogs.java.net,2007:/blog/gsporar/239.8669</id>
<created>2007-11-16T18:21:06Z</created>
<summary type="text/plain">I enjoyed visiting the Houston Ruby and Rails User Group - and it was on a Tuesday.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    Key disclaimer: I am <i>not</i> a <a href="http://www.ruby-lang.org/">Ruby</a> 
    expert.  These days I am mostly
    a Java guy, but I am <a href="http://www.pragprog.com/titles/ruby">learning Ruby</a>. 
    And enjoying it.  My 
    <a href="http://weblogs.java.net/blog/gsporar/archive/2006/07/from_java_to_ru.html">interest in it</a>
    dates back to before any support was added to the 
    <a href="http://www.netbeans.org/community/releases/60/index.html">NetBeans IDE</a> for 
    doing Ruby development.
</p>
<p>
    Once the support was added it was nice to be able to have things like
    code completion and some refactoring features, etc.  Back in September
    I did a quick 10-minute demo of some of the Ruby support at the 
    <a href="http://www.lonestarrubyconf.com/">Lone Star Ruby Conference</a>.
    I also met <a href="http://www.houstonrb.com/member">Keith Lancaster</a>, the founder of the 
    <a href="http://www.houstonrb.com/">Houston Ruby and Rails User Group</a>.
</p>
<p>
    Keith invited me to do a presentation and that's how I ended up in Houston
    on a Tuesday night showing the Ruby and 
    <a href="http://www.rubyonrails.org/">Rails</a> features of the NetBeans IDE.
    It was a lot of fun - a very interactive session with many questions.  Doing these
    sorts of presentations/demos is the best part of my job and one of the reasons I like it so much is that
    I end up learning new things along the way.  
</p>
<p>
    There were some questions
    that I could not answer, so after I got back home I got some answers from
    <a href="http://blogs.sun.com/tor/">Tor Norbye</a>, 
    one of the developers of the Ruby support in NetBeans.  <a href="http://weblogs.java.net/blog/bleonard/">Brian</a>
    suggested I add the questions and answers to the 
    <a href="http://wiki.netbeans.org/wiki/view/RubyFAQ">NetBeans Ruby FAQ</a>, which I have
    done.  (Side note: the main <a href="http://wiki.netbeans.org/wiki/view/Ruby">NetBeans Ruby wiki page</a> also has some great info.
    as does the <a href="http://www.netbeans.org/kb/60/ruby/index.html">main documentation page</a>.)
</p>
<ul>
    <li>
        <b>What's with the contents of ruby1/rubystubs?</b><br>
        These stub methods are used by the IDE regardless of which Ruby
        interpreter you have configured.  That's where I got confused - in my haste
        I misread the path which is why I had mistakenly thought these files
        were in the JRuby directory.  More details <a href="http://wiki.netbeans.org/wiki/view/FaqRubyNavigateToBuiltinClass">here</a>.
    </li><br>
    <li>
        <b> Is there automated support for creating the self.down method of a Rails migration?</b><br>
        Unfortunately, <a href="http://wiki.netbeans.org/wiki/view/FaqRailsAutomatedSelfDown">for now the answer is no</a>.
    </li><br>
    <li>
        <b>Can the IDE's generate dialog also run the Rails "delete" operations?</b><br>
        Unfortunately, <a href="http://wiki.netbeans.org/wiki/view/FaqRailsGenerateDialogRunDeletes">again the answer is no, but this will hopefully be fixed soon</a>.
    </li><br>
    <li>
        <b> Is there a way to turn off the "logical" Project view on Rails projects?</b><br>
        This is a good example of where I learned something new.  Most of the attendees
        would prefer that the IDE's Project tab display something flatter - more like
        the way its Files tab displays a Rails project.  I did not realize that option
        was available, <a href="http://wiki.netbeans.org/wiki/view/FaqRailsLogicalProjectView">but it is</a>.  :-)
    </li><br>
    <li>
        <b> Is there a default keyboard shortcut for the Rails generate dialog?</b><br>
        This is a bit tricky....  If you right-click a Rails project the context
        menu includes an entry called "Generate" which brings up a dialog that provides
        easy access to the Rails generator scripts.  There is
        no keyboard shortcut listed for that context menu entry.  You can add one
        easily enough, however, it turns out that there is a default 
        <a href="http://wiki.netbeans.org/wiki/view/FaqRailsGenerateDialogDefaultKeyboardShortcut">keyboard shortcut available</a> 
        when you are editing a .rb file in a Rails project.
    </li><br>
    <li>
        <b>How can I run <a href="http://en.wikipedia.org/wiki/Interactive_Ruby_Shell">IRB</a> with native Ruby?</b><br>
        In NetBeans IDE 6.0, you cannot run the IRB shell with native Ruby - it 
        always uses the <a href="http://jruby.codehaus.org/">JRuby</a> that is bundled with the IDE.  In newer daily
        builds, however, there is a <a href="http://wiki.netbeans.org/wiki/view/FaqIRBWithNativeRuby">workaround</a>.
    </li><br>
</ul>
<p>
    The answer to that last question about IRB brings up an interesting point.
    The feature set in NetBeans IDE 6.0 is frozen - the final bits will be available
    in just a few weeks.  Work continues, however, on new features.  Some of those 
    new features will eventually be put on the beta update center (choose Tools > Plugins
    within the IDE to install plugins from an update center).  But if you want 
    to live on the edge, you can always install a <a href="http://bits.netbeans.org/download/6.0/nightly/latest/">nightly build</a>.  Or if you really want
    to be on the edge - install a build with just the Ruby pack <a href="http://deadlock.netbeans.org/hudson/job/ruby/">from the continuous build server</a>.
</p>
]]>

</content>
</entry>
<entry>
<title>Bayou City Leaks</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2007/10/bayou_city_leak.html" />
<modified>2008-02-26T15:22:04Z</modified>
<issued>2007-10-26T04:02:20Z</issued>
<id>tag:weblogs.java.net,2007:/blog/gsporar/239.8497</id>
<created>2007-10-26T04:02:20Z</created>
<summary type="text/plain">I did my &quot;memory leaks&quot; presentation for the Houston Java Users Group. As usual, it seemed to strike a chord and led to some interesting discussions.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    I grew up in the Houston area and most of my family still lives there,
    so it was fun to do a presentation in the 
    <a href="http://en.wikipedia.org/wiki/Buffalo_Bayou">Bayou City</a>.  
    <a href="http://www.linkedin.com/in/jimbethancourt">Jim Bethancourt</a>
    is the president of the <a href="http://www.hjug.org/">Houston Java Users Group (HJUG)</a> 
    and when I got
    in touch with him several weeks ago I provided a list of about six
    topics on which I would be happy to do a presentation.
</p>
<p>
    Jim put that list to a vote and the winner was my talk on tracking 
    down memory leaks
    in Java applications.  I originally did this 
    <a href="http://weblogs.java.net/blog/gsporar/archive/2006/05/bof2417_memory.html">presentation</a> at JavaOne
    last year and have repeated it at 
    <a href="http://weblogs.java.net/blog/gsporar/archive/2006/09/javazone_sessio.html">JavaZone</a> and 
    <a href="http://weblogs.java.net/blog/gsporar/archive/2007/03/theserverside_j.html">TheServerSide Java Symposium</a>.  
</p>
<p>
    It changes around a bit each time.  The biggest addition was in July of this 
    year for the TheServerSide conference in Barcelona:
    I added a whole section on permanent generation memory
    leaks, based on the work of <a href="http://blogs.sun.com/fkieviet/">Frank Kieviet</a> and 
    <a href="http://blogs.sun.com/edwardchou/">Edward Chou</a>. Frank and Edward did an
    excellent <a href="http://blogs.sun.com/fkieviet/entry/javaone_2007">presentation</a> 
    earlier this year at JavaOne dedicated entirely to that topic.
    Frank and I also collaborated with <a href="http://blogs.sun.com/sundararajan/">Sundar</a> on an 
    <a href="http://weblogs.java.net/blog/gsporar/archive/2007/05/tracking_down_m_1.html">article</a> about permanent
    generation memory leaks for <a href="http://stpmag.com/">Software Test & Performance</a> magazine.
</p>
<p>
    Another change that I made last night was to include a demo of 
    <a href="https://visualvm.dev.java.net/">VisualVM</a>, a relatively new
    tool that is being developed as an open source project.  
    There is an <a href="https://visualvm.dev.java.net/description.html">introductory document</a> available on the project web site. I hope to write more about VisualVM soon.
</p>
<p>
    The changes I have made to the presentation have also been driven by
    the questions that I have gotten when doing the presentation.  A consistent
    theme that was repeated last night in Houston was: "Is there a way to prevent
    memory leaks from occurring in the first place?"
</p>
<p>
    Automating detection is a problem.  <a href="http://weblogs.java.net/blog/tball/">Tom Ball</a> 
    left a <a href="http://weblogs.java.net/blog/gsporar/archive/2006/09/javazone_sessio.html#comments">comment</a> on that topic on my 
    post from JavaZone. There are, however, some things that can be automated.  
    If, for example, you are shadowing
    a static variable with a local variable
    and as a result you do not end up setting the static variable to null and a memory leak
    results, then a <a href="http://www.netbeans.org/community/releases/60/index.html">good editor</a> 
    or <a href="http://findbugs.sourceforge.net/">FindBugs</a> can point 
    out to you that you are 
    shadowing the variable.  But detecting that the shadowing indirectly leads to a memory leak
    is beyond the capability of any static analysis tool that I know of.
</p>
<p>
    There are best practices that can certainly help. (For example, don't shadow
    static variables with local variables :-) )  I probably need to
    add a section on weak references to this presentation - I got a question specifically about that
    last night.  My favorite post on that topic is from <a href="http://weblogs.java.net/blog/enicholas/">Ethan Nicholas</a>: 
    <a href="http://weblogs.java.net/blog/enicholas/archive/2006/05/understanding_w.html">Understanding Weak References</a>.
</p>
<p>
    Some photos are below.
</p><br><br>
<img alt="h1.png" src="http://weblogs.java.net/blog/gsporar/archive/images/h1.png" width="500" height="544" /><br>
<b>The pizza was popular, as usual.</b><br><br>
<img alt="h2.png" src="http://weblogs.java.net/blog/gsporar/archive/images/h2.png" width="550" height="413" /><br>
<b>The room is not too big and not too small.</b><br><br>
<img alt="h3.png" src="http://weblogs.java.net/blog/gsporar/archive/images/h3.png" width="550" height="413" /><br>
<b>Left to right: Paul Lisowski, Stephen Nimmo, Gregg Sporar, Jim Bethancourt</b>]]>

</content>
</entry>
<entry>
<title>Next Tab Please</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2007/10/next_tab_please.html" />
<modified>2008-02-26T15:21:28Z</modified>
<issued>2007-10-10T14:35:41Z</issued>
<id>tag:weblogs.java.net,2007:/blog/gsporar/239.8404</id>
<created>2007-10-10T14:35:41Z</created>
<summary type="text/plain">I stumbled across another nice feature in NetBeans IDE 6.0 today: a couple of additional keyboard short cuts for moving between tabs.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>In the screen shot below, I have three source files open in the editor and each has its own tab.
</p>
<img alt="tone.png" src="http://weblogs.java.net/blog/gsporar/archive/images/tone.png" width="835" height="597" /><br>
<p>For a long time now, the <a href="http://www.netbeans.org/products/ide/">NetBeans IDE</a> has provided an easy way to move between the tabs: hold down the Ctrl key and then press the Tab key.  You get a little popup that looks like this:
</p>
<img alt="ttwo.png" src="http://weblogs.java.net/blog/gsporar/archive/images/ttwo.png" width="171" height="63" /><br>
<p>Continue to press the Tab key until the file you want is selected and then let go of the Ctrl key and the IDE will switch focus to that file's tab.  Simple enough and very convenient.</p>
<p>One of the things that got some attention in the upcoming <a href="http://www.netbeans.org/community/releases/60/">NetBeans IDE 6</a> release is keyboard short cuts, which is nice because I do not like to take my fingers off the keyboard.  I stumbled across a couple of new short cuts earlier today: Ctrl-PageUp and Ctrl-PageDown.  They are similar to the existing Ctrl-Tab but instead of displaying a list of the files, they just take switch focus to the next tab to the right (Ctrl-PageDown) or to the left (Ctrl-PageUp).  One additional thing I like is that they wrap.  In other words, pressing Ctrl-PageDown on the furthest tab to the right will set focus to the first tab on the left.
</p>
<p><b>Update:</b> A comment from grimlock81 indicates that this feature did exist in previous versions of NetBeans: Ctrl-Left arrow and Ctrl-Right arrow.  In investigating further, it appears to me grimlock81 is close, but not quite correct.  Using NetBeans 5.5, the default keystrokes are actually Alt-Left arrow and Alt-Right arrow.
</p>
<p>So why didn't I spot that?  Two reasons: this feature is not as easy to discover as I might like <i>and</i> the keymap entry moved in NetBeans 6.  In NetBeans 5.5 the entries in the Options dialog's Keymap list for Previous Tab and Next Tab were under the "Go To" category.  In NetBeans 6 they have been moved to the "Window/Select Document in" sub-category of the "Window" category:
</p>
<img alt="toptions.png" src="http://weblogs.java.net/blog/gsporar/archive/images/toptions.png" width="418" height="655" />]]>

</content>
</entry>
<entry>
<title>Unmark Occurrences</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gsporar/archive/2007/09/unmark_occurren.html" />
<modified>2008-02-26T15:21:07Z</modified>
<issued>2007-09-21T23:28:31Z</issued>
<id>tag:weblogs.java.net,2007:/blog/gsporar/239.8299</id>
<created>2007-09-21T23:28:31Z</created>
<summary type="text/plain">There is a nice feature in NetBeans IDE 6.0 that can be a bit overwhelming, but you can tune the options to get the exact behavior you want.</summary>
<author>
<name>gsporar</name>

<email>Gregg.Sporar@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gsporar/">
<![CDATA[<p>
    The beta release of <a href="http://www.netbeans.org/community/releases/60/index.html">NetBeans IDE 6.0</a> came out earlier this week.  The entire <a href="http://wiki.netbeans.org/wiki/view/NewAndNoteWorthy">feature
    list</a> is lengthy, and instead of rehashing that here, 
    what I have been doing <a href="http://weblogs.java.net/blog/gsporar/archive/2007/08/javadoc_hints.html">lately</a> 
    is to focus on the "little things" that I have found while using the IDE.  These
    are features that I particularly like or that might be easily overlooked.
</p>
<p>
    One of these features in the editor is Mark Occurrences.  It is pretty straightforward:
    put your cursor on something and the editor highlights all occurrences of
    that thing, be it a variable, method, method exit points, etc.
</p>
<img alt="mark.png" src="http://weblogs.java.net/blog/gsporar/archive/images/mark.png" width="806" height="429" />
<br><br>
<p>
    I should point out that this feature has actually been available for a long time
    now to NetBeans IDE users.  The prolific <a href="http://blogs.sun.com/scblog/">Sandip Chitale</a> wrote a plugin module 
    for it long ago (I even created a <a href="http://www.netbeans.org/download/flash/mark-occurences/MarkOccur.html">screencast to demonstrate</a> it).  But in 6.0
    the feature is included in the standard distribution.
</p>
<p>
    Which is great.  The only thing I'm not crazy about is that by default
    the highlighting marks stick around, even after I move the cursor away.  The marks do
    not disappear until I put the cursor on something else that can be highlighted.
</p>
<p>
    I would guess most folks prefer it this way, but I have always been a bit
    odd.  :-)  This is what user definable options are for - allowing each of
    us to do our own thing.  In this case, Tools > Options provides:
</p>
<img alt="moptions.png" src="http://weblogs.java.net/blog/gsporar/archive/images/moptions.png" width="610" height="547" />
<br><br>
<p>
    The Options dialog not only allows me to control what sorts of things get
    highlighted, but I have also disabled the default "Keep Marks" option so that
    as soon as I move the cursor off of whatever was being highlighted, the highlights
    go away.
</p>
<p>One final note: it appears that even though the control for Mark Occurrences
    is under the Java Code section in the Options dialog, the Ruby and JavaScript
    editors seem to abide by the setting of the "Keep Marks" option.  I have filed an IssueZilla <a href="http://www.netbeans.org/issues/show_bug.cgi?id=116381">entry</a> to get that improved....
</p>]]>

</content>
</entry>

</feed>