<?xml version="1.0"?>
<rss version="2.0">
    <channel>
        <title>kdgregory.com</title>
        <link>http://www.kdgregory.com/index.php?page=home</link>
        <description>Keith Gregory's home page</description>
        <language>en-us</language>
        <lastBuildDate>Tue, 19 Jul 2011 07:33:19 -0400</lastBuildDate>


        <item>
            <title>Understanding OutOfMemoryError</title>
            <link>http://www.kdgregory.com/index.php?page=java.outOfMemory</link>
            <pubDate>Mon, 18 Jul 2011 09:00:00 -0400</pubDate>
            <description>
                OutOfMemoryError is a frustrating exception: usually it indicates a bug in your code, but sometimes it happens when your have plenty of free space in the Java heap. This article looks at the different causes of OutOfMemoryError, and what you can do about them.
            </description>
        </item>
        
        <item>
            <title>Ancho-Lime Grilled Salmon</title>
            <link>http://www.kdgregory.com/index.php?page=food.salmon</link>
            <pubDate>Sun, 01 May 2011 18:00:00 -0400</pubDate>
            <description>
                A recipe for grilled salmon with an ancho-lime sauce. Even people that don&#039;t like salmon like this salmon.
            </description>
        </item>
        
        <item>
            <title>Motorcycling Across Pennsylvania</title>
            <link>http://www.kdgregory.com/index.php?page=mc.pa_east_to_west</link>
            <pubDate>Tue, 06 Jul 2010 07:30:00 -0400</pubDate>
            <description>
                It&#039;s hard to find a motorcycle-friendly road that heads west from eastern Pennsylvana; this article looks at a few of the routes that I&#039;ve found, along with an in-state destination for when you give up.
            </description>
        </item>
        
        <item>
            <title>Byte Buffers and Non-Heap Memory</title>
            <link>http://www.kdgregory.com/index.php?page=java.byteBuffer</link>
            <pubDate>Sun, 13 Jun 2010 18:00:00 -0400</pubDate>
            <description>
                Most Java programs spend their time working with objects on the JVM heap, using getter and setter methods to retrieve or change the data in those objects. A few programs, however, need to do something different. Perhaps they&#039;re exchanging data with a program written in C. Or they need to manage large chunks of data without the risk of garbage collection pauses. Or maybe they need efficient random access to files. For all these programs, a java.nio.ByteBuffer provides an alternative to traditional Java objects.
            </description>
        </item>
        
        <item>
            <title>A Controller-based Approach to Swing Applications</title>
            <link>http://www.kdgregory.com/index.php?page=swing.controller</link>
            <pubDate>Wed, 17 Feb 2010 13:30:00 -0500</pubDate>
            <description>
                Far too many Swing applications follow the anti-pattern of subclassing a JDK container class in order to add components. This article describes an alternative, in which a controller class builds the UI and manages external interaction with its components.
            </description>
        </item>
        
        <item>
            <title>Asynchronous Operations in Swing</title>
            <link>http://www.kdgregory.com/index.php?page=swing.async</link>
            <pubDate>Mon, 18 Jan 2010 10:30:00 -0500</pubDate>
            <description>
                This article looks thread management in a Swing GUI. There&#039;s more to success than simply spinning up background threads for long-running operations: you need to get the results of these operations back to the user, control the sequencing of not-quite-independent operations, and provide feedback to the user while the operation is running.
            </description>
        </item>
        
        <item>
            <title>Enum: Not Just a Constant With a Pretty Face</title>
            <link>http://www.kdgregory.com/index.php?page=java.enum</link>
            <pubDate>Mon, 31 Aug 2009 09:30:00 -0400</pubDate>
            <description>
                The typesafe enum pattern was made part of the Java language with the 1.5 release. This article looks at programming techniques that exploit the fact that enums are in fact Java objects, not simply named constants.
            </description>
        </item>
        
        <item>
            <title>So You Think You&#039;re Covered?</title>
            <link>http://www.kdgregory.com/index.php?page=junit.coverage</link>
            <pubDate>Thu, 20 Aug 2009 10:30:00 -0400</pubDate>
            <description>
                Coverage tools are great for telling you about code that you haven&#039;t tested. They&#039;re not so good at telling you what tests to write or what mainline code needs to be written. This article looks at the limitations of these tools, and how you can work around them.
            </description>
        </item>
        
        <item>
            <title>Refactoring Unit Tests</title>
            <link>http://www.kdgregory.com/index.php?page=junit.refactoring</link>
            <pubDate>Mon, 18 May 2009 10:00:00 -0400</pubDate>
            <description>
                Unit tests are often used to support refactoring mainline code, but tests themselves are candidates for refactoring. This article examines techniques for doing just that.
            </description>
        </item>
        
        <item>
            <title>Creating a Micro-View with JSP Taglibs</title>
            <link>http://www.kdgregory.com/index.php?page=jsp.microViews</link>
            <pubDate>Wed, 18 Mar 2009 08:30:00 -0400</pubDate>
            <description>
                The traditional MVC implementation, where the controller creates a model containing all the data for a page, breaks down with complex pages where the markup changes depending on model data. This article looks at an alternative, in which a JSP tag creates a model that applies only to its body.
            </description>
        </item>
        
        <item>
            <title>JSP Refactoring via Static Includes</title>
            <link>http://www.kdgregory.com/index.php?page=jsp.refactoring</link>
            <pubDate>Sun, 15 Feb 2009 12:00:00 -0500</pubDate>
            <description>
                A large, monolithic JSP is the same as a large, monolithic method; refactoring can make both easier to manage. This article describes a technique similar to &quot;extract method&quot;, in which portions of the JSP are extracted into statically included fragments.
            </description>
        </item>
        
        <item>
            <title>The Dark Side of C++ Templates</title>
            <link>http://www.kdgregory.com/index.php?page=java.generics.cpp</link>
            <pubDate>Wed, 11 Feb 2009 09:00:00 -0500</pubDate>
            <description>
                One of the perceived drawbacks of Java&#039;s parameterized types is that type erasure means they&#039;re not truly typesafe. In this article I show that C++ templates aren&#039;t terribly typesafe either, at least for people who are willing to misuse them.
            </description>
        </item>
        
        <item>
            <title>In Defense of Parameterized Types</title>
            <link>http://www.kdgregory.com/index.php?page=java.generics</link>
            <pubDate>Sat, 17 Jan 2009 16:00:00 -0500</pubDate>
            <description>
                Parameterized types, aka Generics, have received a lot of negative press. In this article, I gloss over their bad features, and show how they can make our programs more concise and error-free.
            </description>
        </item>
        
        <item>
            <title>Practical XML: Parsing</title>
            <link>http://www.kdgregory.com/index.php?page=xml.parsing</link>
            <pubDate>Sun, 04 Jan 2009 10:00:00 -0500</pubDate>
            <description>
                Describes how to use the JDK&#039;s DOM parser, including validation using both DTD and XML Schema.
            </description>
        </item>
        
        <item>
            <title>Practical XML: XPath</title>
            <link>http://www.kdgregory.com/index.php?page=xml.xpath</link>
            <pubDate>Thu, 01 Jan 2009 15:00:00 -0500</pubDate>
            <description>
                XPath is a way to select portions of an XML document, modeled on the paths of a filesystem, with the addition of tests on the content and attributes of each node. This article describes how to work with XPath from Java, and work around the pitfalls you&#039;ll find there.
            </description>
        </item>
        
        <item>
            <title>Effective Logging</title>
            <link>http://www.kdgregory.com/index.php?page=java.logging</link>
            <pubDate>Wed, 19 Nov 2008 20:00:00 -0500</pubDate>
            <description>
                This article covers techniques to make logging more useful as a debugging tool, and less intrusive to the logical flow of your program code.
            </description>
        </item>
        
        <item>
            <title>Creating Mocks and Stubs with Reflection Proxies</title>
            <link>http://www.kdgregory.com/index.php?page=junit.proxy</link>
            <pubDate>Wed, 19 Nov 2008 20:00:00 -0500</pubDate>
            <description>
                Reflection proxies, introduced in JDK 1.3, allow you to write a class that implements only part of an interface. This can be very useful with unit tests, when you don&#039;t want to go to the time and trouble to implement a fully-functional collaborator, or where you need to stub out classes that aren&#039;t in a freely available mock objects package.
            </description>
        </item>
        
        <item>
            <title>Writing a Java Micro-benchmark</title>
            <link>http://www.kdgregory.com/index.php?page=java.microBenchmark</link>
            <pubDate>Sun, 16 Nov 2008 21:00:00 -0500</pubDate>
            <description>
                A micro-benchmark is designed to evaluate the performance of a short piece of code, typically in comparison to other code that provides the same functionality. While they can be valuable, they&#039;re only valid within the context of a particular execution environment. This article discusses how to compensate for the environment and interpret results.
            </description>
        </item>
        
        <item>
            <title>Practical XML: Output</title>
            <link>http://www.kdgregory.com/index.php?page=xml.builder</link>
            <pubDate>Sun, 02 Nov 2008 14:00:00 -0500</pubDate>
            <description>
                XML output is surprising tricky to get right. Between entity escape rules and incompatible encodings, it&#039;s a wonder that there&#039;s any well-formed XML in the real world. This article describes some of the pitfalls, shows how to use the APIs built into the JDK, and then presents a simpler alternative.
            </description>
        </item>
        
        <item>
            <title>Baking with Sourdough -- Photos</title>
            <link>http://www.kdgregory.com/index.php?page=sourdough2</link>
            <pubDate>Mon, 01 Sep 2008 11:00:00 -0400</pubDate>
            <description>
                Photos to go with the sourdouh article.
            </description>
        </item>
        
        <item>
            <title>Gluten-free Kasha (buckwheat) Pancakes</title>
            <link>http://www.kdgregory.com/index.php?page=buckwheat</link>
            <pubDate>Mon, 11 Aug 2008 21:00:00 -0400</pubDate>
            <description>
                Recipe for gluten-free pancakes using ground kasha or buckwheat flour.
            </description>
        </item>
        
        <item>
            <title>Motorcycling in Southeast Pennsylvania</title>
            <link>http://www.kdgregory.com/index.php?page=mc.se.pa</link>
            <pubDate>Sun, 27 Jul 2008 22:00:00 -0400</pubDate>
            <description>
                A motorcycle-friendly loop anchored by King of Prussia, Reading, and Allentown.
            </description>
        </item>
        
        <item>
            <title>Baking with Sourdough</title>
            <link>http://www.kdgregory.com/index.php?page=sourdough</link>
            <pubDate>Sun, 29 Jun 2008 12:00:00 -0400</pubDate>
            <description>
                Recipe and process for baking sourdough bread.
            </description>
        </item>
        
        <item>
            <title>Java Reference Objects</title>
            <link>http://www.kdgregory.com/index.php?page=java.refobj</link>
            <pubDate>Sat, 14 Jun 2008 20:00:00 -0400</pubDate>
            <description>
                Reference objects allow you to interact with the garbage collector, specifying levels of reachability between &quot;in use&quot; and &quot;gone.&quot; This article is based on a presentation that I gave to the Philadelphia Java User&#039;s Group in December 2007, providing an overview of the Java object life-cycle and practical examples of when and why you&#039;d use reference objects.
            </description>
        </item>
            </channel>
</rss>

