<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blogbody</title>
	<atom:link href="http://lightbody.net/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://lightbody.net/blog</link>
	<description>Patrick Lightbody&#039;s personal blog</description>
	<lastBuildDate>Tue, 19 Feb 2013 04:04:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>This blog has moved</title>
		<link>http://lightbody.net/blog/?p=572</link>
		<comments>http://lightbody.net/blog/?p=572#comments</comments>
		<pubDate>Wed, 05 Oct 2011 05:35:54 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/?p=572</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>After several days of playing with Posterous and Tumblr I&#8217;ve decided to move my blog over to <a href="http://blog.lightbody.net">http://blog.lightbody.net</a> (powered by Tumbler).</p>

<p>If you are one of the few <span class="caps">RSS </span>subscribers still watching this blog (which would surprise me since it&#8217;s been ~2 years since my last post), it should auto switch over to the new blog since I&#8217;m using FeedBurner.</p>

<p>However, be on the lookout if you don&#8217;t see more regular updates because I really do fully intend to blog quite a bit more starting now <img src='http://lightbody.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=572</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Book: Apache Struts 2 Web Application Development</title>
		<link>http://lightbody.net/blog/?p=545</link>
		<comments>http://lightbody.net/blog/?p=545#comments</comments>
		<pubDate>Sun, 26 Jul 2009 15:34:51 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[struts]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2009/07/new-book-apache-struts-2-web-application-development.html</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=545</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great Article on Advanced Selenium</title>
		<link>http://lightbody.net/blog/?p=544</link>
		<comments>http://lightbody.net/blog/?p=544#comments</comments>
		<pubDate>Thu, 09 Apr 2009 14:30:51 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2009/04/great-article-on-advanced-selenium.html</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>I was forwarded a <a href="http://www.neocoders.com/portal/node/34">great article on advanced Selenium techniques</a>. Worth a read for anyone who uses Selenium. While the article focuses on ExtJS, the lessons in there can be applied for any website. Building Java (or perl or python, etc)-based components that represent the logical page is a technique I&#8217;ve used in the past, but it&#8217;s great to see it written up so clearly!</p>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=544</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security with Java Scripting (JRuby, Jython, Groovy, BeanShell, etc)</title>
		<link>http://lightbody.net/blog/?p=542</link>
		<comments>http://lightbody.net/blog/?p=542#comments</comments>
		<pubDate>Mon, 09 Feb 2009 21:12:41 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Jython]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2009/02/security-with-java-scriting-jruby-jython-groovy-beanshell-etc.html</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m looking to run some un-verified scripts (written in a yet-to-be-determined language, but needs to be Java-based, so JRuby, Groovy, Jython, BeanShell, etc are all candidates). I want these scripts to be able to do some things and restricted from doing other things.</p>
<p>Normally, I&#8217;d just go use Java&#8217;s SecurityManager and be done with it. That&#8217;s pretty simple and lets me restrict file and network access, the ability to shutdown the <span class="caps">JVM, </span>etc. And that will work well for the high level stuff I want to block off.<br /></p>
<p>But there is some stuff I want to allow, but only via my custom <span class="caps">API</span>/library that I&#8217;ve providing. For example, I don&#8217;t want to allow direct network access to open up a <span class="caps">URLC</span>onnection to yahoo.com, but I am OK if it is done with MyURLConnection. That is &#8211; there is a set of methods/classes that I want to allow and then everything else I want to be off limits.<br /></p>
<p>I don&#8217;t believe this type of security can be done with the standard Java security model, but perhaps it can. I don&#8217;t have a specific requirement for performance or flexibility in the scripting language itself (the scripts will be simple procedural calls to my <span class="caps">API </span>with basic looping/branching). So even a &#8220;large&#8221; overhead that checks a security check on every reflection call is fine by me.<br /></p>
<p>Suggestions?<br /></p>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=542</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>IDEA 8: Buggy as Hell</title>
		<link>http://lightbody.net/blog/?p=533</link>
		<comments>http://lightbody.net/blog/?p=533#comments</comments>
		<pubDate>Wed, 14 Jan 2009 18:38:39 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[BrowserMob]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[Intellij IDEA]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JetBrains]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2009/01/idea-8-buggy-as-hell.html</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a running list of all the bugs I&#8217;ve come across with IntelliJ <span class="caps">IDEA</span> 8 so far. Some of these may actually be thoughtful changes from the behavior in version 7, but they are annoying so I&#8217;m calling them bugs <img src='http://lightbody.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
  <li>Can no longer autocomplete lowercase for enums. For example, typing &#8220;TimeUnit.sec&#8221; does not prompt for TimeUnit.SECONDS. This used to work in <span class="caps">IDEA</span> 7 and is inconsistent with autocomplete for methods (&#8220;getcon&#8221; prompts &#8220;getConnectionTimeout&#8221;).</li>

  <li>Pasting a block of code no longer always asks asks me to auto-import the classes needed to make the code work. It does in some cases, but not in others.</li>

  <li>I don&#8217;t remember searching by files (Command-Shift-N) showing me .java files unless there was no other match for my search. This annoys me, since now when I search for &#8220;foo&#8221; I expect to see foo.jsp to be selected first (it&#8217;s listed first), but FooActionBean.java is listed at the bottom but sometimes it is preselected, making me have to use the arrow keys.</li>

  <li>Sometimes, especially on more complex pages, <span class="caps">HTML </span>auto tag closing (ie: &#8220;&lt;ul&gt;&#8221; causes &#8220;&lt;/ul&gt;&#8221; to be inserted) doesn&#8217;t work for all tags. I&#8217;ve seen cases where it works for &lt;li&gt; but not for &lt;ul&gt; or &lt;div&gt;.</li>

  <li>&lt;title&gt; tags don&#8217;t get indented in a &lt;head&gt; tag unless there is additional content in the head section. This may have been done on purpose, but I don&#8217;t like it. I end up having to correct the indentation myself or running the auto-format, which is always risky.</li>

  <li>Pasting <span class="caps">HTML</span>/JSP snippets from one part of a <span class="caps">JSP </span>to another part causes the indentation to be completely lost (shifted all the way to the left). In the previous versions, <span class="caps">IDEA </span>was smart enough to paste in and match the correct indentation level for the context I just pasted in to.</li>

  <li>When renaming/moving a class, any <span class="caps">JSP </span>tag that references it (ie: &#8220;&lt;s:link beanclass=&#8217;foo.Bar&#8217;&gt;&#8230;&#8221;) will get <span class="caps">HTML </span>escaped, completely breaking the behavior and introducing a bug in to my code. Worst yet: it won&#8217;t even tell me, which is totally breaks my trust of <span class="caps">IDEA&#8217;</span>s traditionally excellent refactoring tools.</li>

  <li>Related to the above &#8211; when tying a fully qualified class name in a <span class="caps">JSP </span>tag, typing lower case letters (&#8220;foobar&#8221;) will prompt the class &#8220;FooBar&#8221;. This is good. But when I press enter on the selected class, the resulting text is all lower case &#8220;foobar&#8221; rather than the actual class name. This is bad!</li>

  <li><span class="caps">UPDATE</span> 1: When a class doesn&#8217;t exist and <span class="caps">IDEA </span>prompts you to create the class, it suggests a bad default module. It used to suggest the module that the current code was in (which logically makes sense), but now it&#8217;s suggesting a different module, which I didn&#8217;t catch at first. I&#8217;m loosing my trust with <span class="caps">IDEA </span> <img src='http://lightbody.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>

  <li><span class="caps">UPDATE</span> 2: When debugging, the &#8220;Run to Cursor&#8221; feature seems to never work. Hovering my mouse over it produces a very nice &#8220;null&#8221; tooltip.</li>

  <li><span class="caps">UPDATE</span> 3: Clicking on the left margin on a blank line produces an error claiming that &#8220;Method breakpoints may dramatically slow down debugging&#8221; &#8211; despite the fact that I didn&#8217;t add a method-level breakpoint.</li>

  <li><span class="caps">UPDATE</span> 4: Command-P does not show parameter information for Pattern.compile unless the cursor is placed immediately to the right of the opening parenthesis. It appears this is due to the internal support for syntax highlighting of regexes.</li>

  <li><span class="caps">UPDATE</span> 4: Related to the last one &#8211; normally <span class="caps">IDEA </span>is smart enough to know that when I type a double quote and I&#8217;m inside of a string, it will not add a new one and instead will replace the double quote character to the right of my cursor. This doesn&#8217;t work in regexes.</li>

  <li><span class="caps">UPDATE</span> 5: The debugger seems incredibly slow now. Perhaps it&#8217;s from one of those phantom &#8220;method breakpoints&#8221; it thinks I&#8217;ve turned on, but the Frames, Debugger, and Watches tabs are now really slow. So slow I can watch them render and evaluate &#8211; something that never happened in <span class="caps">IDEA</span> 7.</li>

  <li><span class="caps">UPDATE</span> 6: As we all know, pressing dot will prompt the list of methods and fields available to call. I use this all the time &#8211; so much so that I put the auto-complete time down from the default of 1000ms to 0ms. Unfortunately, a regression from 7 to 8 happened that breaks chained method calls using this feature. For example, typing &#8220;mapEntry.&#8221; will prompt me for &#8220;getValue()&#8221; and &#8220;getKey()&#8221;. If I navigate using the arrow keys to &#8220;getValue()&#8221; and then press &#8220;.&#8221; again, I expect to now see the method list for the instance in the Map.Entry value. Instead, &#8220;getValue().&#8221; is completed, but then I have to press control-space to get the next list. Lame!</li>

  <li><span class="caps">UPDATE</span> 7: Pasting in the code &#8220;Gson gson = new Gson();&#8221; prompts me to import the &#8220;Gson&#8221; on both the right hand side and the left hand side.</li>

  <li><span class="caps">UPDATE</span> 8: Despite having the <span class="caps">SQL </span>support plugin enabled on both my laptop and my desktop, only my laptop is doing any sort of <span class="caps">SQL </span>syntax support for *.sql files. Very odd.</li>
</ul>
<p>There are a lot more and I&#8217;ll update this list as I find them. This was just the ones I wrote down while coding this morning. Got some of your own to share? Add them in the comments and I&#8217;ll roll &#8216;em in here to share with the JetBrains team.</p>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=533</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Did you know Selenium has a blog?</title>
		<link>http://lightbody.net/blog/?p=532</link>
		<comments>http://lightbody.net/blog/?p=532#comments</comments>
		<pubDate>Wed, 14 Jan 2009 17:33:17 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2009/01/did-you-know-selenium-has-a-blog.html</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s true &#8211; it does! Check it out <a href="http://clearspace.openqa.org/community/selenium/blog">here</a> and subscribe to the <span class="caps">RSS </span>feed <a href="http://feeds.feedburner.com/Selenium">here</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=532</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why your web startup will fail</title>
		<link>http://lightbody.net/blog/?p=530</link>
		<comments>http://lightbody.net/blog/?p=530#comments</comments>
		<pubDate>Fri, 02 Jan 2009 23:31:36 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[BrowserMob]]></category>
		<category><![CDATA[startups]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2009/01/why-your-web-startup-will-fail.html</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.ideasonideas.com/2009/01/startup_fail/">great article</a> by Eric Karjaluoto on all the difficulties of a startup. Tons of great reasons to avoid doing a startup, but at the end of the day, this is what it all comes back to:</p>
<blockquote cite="http://www.ideasonideas.com/2009/01/startup_fail/">
  <p>With all of that said, I have to emphasize that little of this really matters. If you&#8217;re inclined to start a startup, nothing anyone says will stand in your way, nor, should it. If you have the bug to make something, it&#8217;s impossible to shake, and in my mind can be one of the best life experiences you can have.</p>[From <a href="http://www.ideasonideas.com/2009/01/startup_fail/"><cite>Why your web startup will fail</cite></a>]
</blockquote>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=530</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEO Optimization for Micro ISVs</title>
		<link>http://lightbody.net/blog/?p=529</link>
		<comments>http://lightbody.net/blog/?p=529#comments</comments>
		<pubDate>Fri, 02 Jan 2009 19:55:17 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[BrowserMob]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2009/01/seo-optimization-for-micro-isvs.html</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a huge fan of <a href="http://balsamiq.com">Balsamiq</a>, which also is a self-described &#8220;Micro <span class="caps">ISV</span>&#8220;. One of the things they do well is communicate everything they are up to on their blog. Early on I decided I&#8217;d leave the official <a href="http://blog.browsermob.com">BrowserMob blog</a> a bit more sparse so that it only had <a href="http://blog.browsermob.com/2008/12/new-features-virtual-user-think-time-and-unique-parameterization/">content</a> <a href="http://blog.browsermob.com/2008/12/using-firebug-for-load-testing/">that</a> <a href="http://blog.browsermob.com/2008/12/six-tips-for-web-performance-testing/">my</a> customers cared about. The rest (marketing ideas, business status updates, etc) would be left for this blog. This is one of those posts <img src='http://lightbody.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://brainyatom.com/">A friend of mine</a> let me know that Google <a href="http://www.mattcutts.com/blog/last-toolbar-pagerank-update-of-2008/">recently did a toolbar PageRank update</a>, which is the best place to get a basic idea of where your page rank sits. This got us talking about simple <span class="caps">SEO </span>optimization tricks I could do that wouldn&#8217;t take all my time. This is important for a micro <span class="caps">ISV </span>like my company.</p>
<p>The lists of things I have already done or plan to do for BrowserMob are:</p>
<ul>
  <li>Use H1 tags near the top of the page, matching the <span class="caps">TITLE </span>tags exactly.</li>

  <li>Make page titles unique for all the important pages (pricing, contact, signup, etc).</li>

  <li>Use <span class="caps">META </span>tags for keywords and description. While not super important, they don&#8217;t hurt much either.</li>

  <li>Use important keywords (&#8220;load testing&#8221;, &#8220;performance testing&#8221;, &#8220;Selenium&#8221;, etc) in the page titles.</li>

  <li>Use some of the same keywords in the <span class="caps">URL</span>s themselves (ie: /load-testing-support vs. /contact).</li>
</ul>
<p>These are the basics I can do quickly. Beyond that, the real push towards a higher PageRank will only happen with real work. My first guest post in support of BrowserMob was <a href="http://ajaxian.com/archives/why-load-testing-ajax-is-hard">recently posted</a> on Ajaxian. This drove 10X more traffic and signups to the site when compared to our last peak day.</p>
<p>More importantly, it&#8217;s now one of the most authoritative documents on the search <a href="http://www.google.com/search?client=safari&amp;rls=en-us&amp;q=ajax+load+testing&amp;ie=UTF-8&amp;oe=UTF-8">&#8220;Ajax load testing&#8221;</a>. While it doesn&#8217;t link to my business, it offers credibility that I know what I&#8217;m talking about (btw &#8211; awesome to see Dojo masters <a href="http://twitter.com/dylans/status/1088754939">enjoyed</a> the article). It also links to my business, so someone who is really interested in the subject not only learns about it, but now can also choose to check out BrowserMob if they want.</p>
<p>Going forward, my marketing plan will involve a lot of this type of activity. I want to get the word out there that load testing can be easier and more affordable. I&#8217;ll continue writing articles on the BrowserMob blog, but I&#8217;ll also be writing most guest posts on popular sites. I&#8217;ll also be asking industry experts to blog their thoughts on the business, product, and idea on their blog (good or bad).</p>
<p>Hat tip: many of these ideas formulated after I read Balsamiq&#8217;s excellent post on <a href="http://www.balsamiq.com/blog/?p=198">startup marketing advice</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=529</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Plans for Selenium in 2009</title>
		<link>http://lightbody.net/blog/?p=528</link>
		<comments>http://lightbody.net/blog/?p=528#comments</comments>
		<pubDate>Fri, 02 Jan 2009 18:10:17 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[BrowserMob]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2009/01/plans-for-selenium-in-2009.html</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://blog.browsermob.com/2009/01/plans-for-selenium-in-2009/">just posted</a> on the <a href="http://blog.browsermob.com">BrowserMob blog</a> my thoughts on how 2009 will turn out for the Selenium world. This is in addition to a <a href="http://clearspace.openqa.org/community/selenium/blog/2009/01/02/whats-next-for-selenium">new blog post</a> on the <a href="http://clearspace.openqa.org/community/selenium?view=blog">Selenium blog</a> about our short term plans to get a 1.0 release out.</p>
<p>Please take a look and let us know what you think.</p>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=528</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Compact Logging in Java</title>
		<link>http://lightbody.net/blog/?p=527</link>
		<comments>http://lightbody.net/blog/?p=527#comments</comments>
		<pubDate>Mon, 29 Dec 2008 19:44:04 +0000</pubDate>
		<dc:creator>plightbo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[able]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://lightbody.net/blog/2008/12/tip-compact-logging-in-java.html</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>One of the little touches I added to <a href="http://code.google.com/p/able">Able</a>, which came from code originally in <a href="http://browsermob.com">BrowserMob</a>, was a nice little <span class="caps">JDK </span>logging formatter. It is designed to work with modern <span class="caps">IDE</span>s (IntelliJ <span class="caps">IDEA </span>being my personal favorite) and their ability to understand shorthand notation for classes.</p>
<p>As I was building BrowserMob, I was getting irritated by long package and class names as well as the fact that my log messages weren&#8217;t lined up nicely. For example, I&#8217;d get:</p>


<pre>
<code>INFO 12/29 19:26:28 org.directwebremoting.impl.StartupUtil - Starting: DwrGuiceServlet v3.0.0.109.dev
INFO 12/29 19:26:31 com.browsermob.stripes.WelcomeActionBean - Some log message
INFO 12/29 19:26:37 com.browsermob.stripes.WelcomeActionBean - Some log message</code>
</pre>


<p>I tried a simple formatter that truncated the class name, but the result wasn&#8217;t very helpful, since the class name (usually the most important part) would get cut off when the package name was too long:</p>


<pre>
<code>INFO 12/29 19:26:28 org.directwebremotin - Starting: DwrGuiceServlet v3.0.0.109.dev
INFO 12/29 19:26:31 com.browsermob.strip - Some log message
INFO 12/29 19:26:37 com.browsermob.strip - Some log message</code>
</pre>


<p>That was when I realized that often the package name wasn&#8217;t that useful, especially since they were often very predictable and unique even in a compact state. For example, in the past developers I have worked with would often write &#8220;n.s.s.c.StripesFilter&#8221; as a short hand for &#8220;net.sourceforge.stripes.controller.StripesFilter&#8221;. So why not use this for logging too? The result was much easier on the eyes:</p>


<pre>
<code>INFO 12/29 19:26:28 o.d.i.StartupUtil    - Starting: DwrGuiceServlet v3.0.0.109.dev
INFO 12/29 19:26:31 c.b.s.WelcomeAction~ - Some log message
INFO 12/29 19:26:37 c.b.s.WelcomeAction~ - Some log message</code>
</pre>


<p>Basically, the packages would get cut down to the first letter of each sub-package. If the class name pushes the whole thing beyond 20 characters, then a tilde is added to indicate the name is longer than could fit.</p>
<p>The nice thing about this is that it works beautifully with modern <span class="caps">IDE</span>s. I can copy the text &#8220;c.b.s.WelcomeAction&#8221; and locate that string in <span class="caps">IDEA </span>and it&#8217;ll know what I mean:</p>
<p><img src="http://lightbody.net/blog/wp-content/uploads/2008/12/200812291142.jpg" width="480" height="79" alt="200812291142.jpg" /></p>
<p>If you want to use this formatter, you can find the code <a href="http://code.google.com/p/able/source/browse/trunk/able-lib/src/main/java/able/util/StandardFormatter.java">here</a> in the Able source repository. It could probably get some performance improvements, such as some simple memoization, so feel free to send any tweaks you make my way. Do you have any neat tricks you do with logging? If so, please share in the comments!</p>]]></content:encoded>
			<wfw:commentRss>http://lightbody.net/blog/?feed=rss2&#038;p=527</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
