<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Useless Inc.</title>
    <link>http://www.tomergabel.com/</link>
    <description>Tomer Gabel's annoying spot on the 'net</description>
    <language>en-us</language>
    <copyright>Tomer Gabel</copyright>
    <lastBuildDate>Sun, 22 Jun 2008 13:47:55 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>tomer@tomergabel.com</managingEditor>
    <webMaster>tomer@tomergabel.com</webMaster>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=7ee6b803-1d81-42ee-8cf7-4727a73bb615</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,7ee6b803-1d81-42ee-8cf7-4727a73bb615.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,7ee6b803-1d81-42ee-8cf7-4727a73bb615.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7ee6b803-1d81-42ee-8cf7-4727a73bb615</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After <a href="http://www.tomergabel.com/dasBlogPermalinkWoes.aspx">figuring out the
problem</a> with the old dasBlog permalinks I had to figure out a way to convert all
existing links in my blog to the new format. Lately whenever I need a script I try
and take the opportunity to learn a bit of <a href="http://www.python.org">Python</a>,
so it took an hour or two to write the conversion script.
</p>
        <p>
Here it is; if you want to use this for your own copy of dasBlog, change the "domain"
global variable to wherever your blog is located and run this from your ~/Content
directory (you can also download the script <a href="http://www.tomergabel.com/content/binary/convert_permalinks.py">here</a>):
</p>
        <pre>#!/usr/local/bin/python
#
# convert_permalinks.py
# Quick and dirty permalink converter for dasBlog content files
#
# Tomer Gabel, 22 June 2008
# http:<span style="color: #008000">//www.tomergabel.com</span> #
# This <span style="color: #0000ff">code</span> is placed in the public domain (see
http:<span style="color: #008000">//creativecommons.org/licenses/publicdomain/)</span> from
__future__ <span style="color: #0000ff">import</span> with_statement <span style="color: #0000ff">import</span><span style="color: #0000ff">os</span><span style="color: #0000ff">import</span> glob <span style="color: #0000ff">import</span><span style="color: #0000ff">re</span><span style="color: #0000ff">import</span> urllib
# Static constants domain = 'tomergabel.com' href_lookup = <span style="color: #0000ff">re</span>.compile(
'href="<span style="color: #8b0000">(http:\/\/(www\.)?' + re.escape( domain ) + '/[^</span>"]*\+[^"<span style="color: #8b0000">]*?)</span>"'
) # Globals conversion_map = {} # Takes a URL and removes all offensive characters.
Tests the <span style="color: #0000ff">new</span> URL for validity (anything other
than a 404 error is considered valid). # Returns a tuple with the converted URL and
a boolean flag indicating whether the converted URL is valid or not. <span style="color: #0000ff">def</span> convert(
url ): new_url = url.<span style="color: #0000ff">replace</span>( "<span style="color: #8b0000">+</span>",
"<span style="color: #8b0000"></span>" ) # Check URL validity valid = True try: resp
= urllib.urlopen( new_url ) resp.<span style="color: #0000ff">close</span>() except:
valid = False <span style="color: #0000ff">return</span> [ new_url, valid ] # Processes
the source file, converts all URLs therein and writes it to the target file. <span style="color: #0000ff">def</span> process(
source_file, target_file ): with <span style="color: #0000ff">open</span>( source_file,
"<span style="color: #8b0000">r</span>" ) as input: source_text = input.<span style="color: #0000ff">read</span>()
conv_text = source_text match_found = False for matcher in href_lookup.<span style="color: #0000ff">finditer</span>(
source_text ): <span style="color: #0000ff">if</span> ( matcher != None ): match_found
= True original_url = matcher.<span style="color: #0000ff">group</span>( 1 ) <span style="color: #0000ff">print</span> "<span style="color: #8b0000">\tConverting
permalink </span>" + original_url <span style="color: #0000ff">if</span> not conversion_map.has_key(
original_url ): conversion_map[ original_url ] = convert( original_url ) conversion
= conversion_map[ original_url ] <span style="color: #0000ff">if</span> conversion[
1 ]: <span style="color: #0000ff">print</span> "<span style="color: #8b0000">\tConversion
successful, new URL: </span>" + conversion[ 0 ] conv_text = conv_text.<span style="color: #0000ff">replace</span>(
original_url, conversion[ 0 ] ) <span style="color: #0000ff">else</span>: <span style="color: #0000ff">print</span> "<span style="color: #8b0000">\tConversion
failed!</span>" # Write out the target file <span style="color: #0000ff">if</span> match_found:
with <span style="color: #0000ff">open</span>( target_file, "<span style="color: #8b0000">w</span>"
) as output: output.<span style="color: #0000ff">write</span>( conv_text ) # Entry
point for file_name in glob.iglob( "<span style="color: #8b0000">*.xml</span>" ): <span style="color: #0000ff">print</span> "<span style="color: #8b0000">Processing </span>"
+ file_name process( file_name, file_name + "<span style="color: #8b0000">.conv</span>"
)</pre>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=7ee6b803-1d81-42ee-8cf7-4727a73bb615" />
      </body>
      <title>Dealing with invalid permalinks</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,7ee6b803-1d81-42ee-8cf7-4727a73bb615.aspx</guid>
      <link>http://www.tomergabel.com/DealingWithInvalidPermalinks.aspx</link>
      <pubDate>Sun, 22 Jun 2008 13:47:55 GMT</pubDate>
      <description>&lt;p&gt;
After &lt;a href="http://www.tomergabel.com/dasBlogPermalinkWoes.aspx"&gt;figuring out the
problem&lt;/a&gt; with the old dasBlog permalinks I had to figure out a way to convert all
existing links in my blog to the new format. Lately whenever I need a script I try
and take the opportunity to learn a bit of &lt;a href="http://www.python.org"&gt;Python&lt;/a&gt;,
so it took an hour or two to write the conversion script.
&lt;/p&gt;
&lt;p&gt;
Here it is; if you want to use this for your own copy of dasBlog, change the "domain"
global variable to wherever your blog is located and run this from your ~/Content
directory (you can also download the script &lt;a href="http://www.tomergabel.com/content/binary/convert_permalinks.py"&gt;here&lt;/a&gt;):
&lt;/p&gt;
&lt;pre&gt;#!/usr/local/bin/python
#
# convert_permalinks.py
# Quick and dirty permalink converter for dasBlog content files
#
# Tomer Gabel, 22 June 2008
# http:&lt;span style="color: #008000"&gt;//www.tomergabel.com&lt;/span&gt; #
# This &lt;span style="color: #0000ff"&gt;code&lt;/span&gt; is placed in the public domain (see
http:&lt;span style="color: #008000"&gt;//creativecommons.org/licenses/publicdomain/)&lt;/span&gt; from
__future__ &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; with_statement &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; &lt;span style="color: #0000ff"&gt;os&lt;/span&gt; &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; glob &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; &lt;span style="color: #0000ff"&gt;re&lt;/span&gt; &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; urllib
# Static constants domain = 'tomergabel.com' href_lookup = &lt;span style="color: #0000ff"&gt;re&lt;/span&gt;.compile(
'href="&lt;span style="color: #8b0000"&gt;(http:\/\/(www\.)?' + re.escape( domain ) + '/[^&lt;/span&gt;"]*\+[^"&lt;span style="color: #8b0000"&gt;]*?)&lt;/span&gt;"'
) # Globals conversion_map = {} # Takes a URL and removes all offensive characters.
Tests the &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; URL for validity (anything other
than a 404 error is considered valid). # Returns a tuple with the converted URL and
a boolean flag indicating whether the converted URL is valid or not. &lt;span style="color: #0000ff"&gt;def&lt;/span&gt; convert(
url ): new_url = url.&lt;span style="color: #0000ff"&gt;replace&lt;/span&gt;( "&lt;span style="color: #8b0000"&gt;+&lt;/span&gt;",
"&lt;span style="color: #8b0000"&gt;&lt;/span&gt;" ) # Check URL validity valid = True try: resp
= urllib.urlopen( new_url ) resp.&lt;span style="color: #0000ff"&gt;close&lt;/span&gt;() except:
valid = False &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; [ new_url, valid ] # Processes
the source file, converts all URLs therein and writes it to the target file. &lt;span style="color: #0000ff"&gt;def&lt;/span&gt; process(
source_file, target_file ): with &lt;span style="color: #0000ff"&gt;open&lt;/span&gt;( source_file,
"&lt;span style="color: #8b0000"&gt;r&lt;/span&gt;" ) as input: source_text = input.&lt;span style="color: #0000ff"&gt;read&lt;/span&gt;()
conv_text = source_text match_found = False for matcher in href_lookup.&lt;span style="color: #0000ff"&gt;finditer&lt;/span&gt;(
source_text ): &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( matcher != None ): match_found
= True original_url = matcher.&lt;span style="color: #0000ff"&gt;group&lt;/span&gt;( 1 ) &lt;span style="color: #0000ff"&gt;print&lt;/span&gt; "&lt;span style="color: #8b0000"&gt;\tConverting
permalink &lt;/span&gt;" + original_url &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; not conversion_map.has_key(
original_url ): conversion_map[ original_url ] = convert( original_url ) conversion
= conversion_map[ original_url ] &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; conversion[
1 ]: &lt;span style="color: #0000ff"&gt;print&lt;/span&gt; "&lt;span style="color: #8b0000"&gt;\tConversion
successful, new URL: &lt;/span&gt;" + conversion[ 0 ] conv_text = conv_text.&lt;span style="color: #0000ff"&gt;replace&lt;/span&gt;(
original_url, conversion[ 0 ] ) &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;: &lt;span style="color: #0000ff"&gt;print&lt;/span&gt; "&lt;span style="color: #8b0000"&gt;\tConversion
failed!&lt;/span&gt;" # Write out the target file &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; match_found:
with &lt;span style="color: #0000ff"&gt;open&lt;/span&gt;( target_file, "&lt;span style="color: #8b0000"&gt;w&lt;/span&gt;"
) as output: output.&lt;span style="color: #0000ff"&gt;write&lt;/span&gt;( conv_text ) # Entry
point for file_name in glob.iglob( "&lt;span style="color: #8b0000"&gt;*.xml&lt;/span&gt;" ): &lt;span style="color: #0000ff"&gt;print&lt;/span&gt; "&lt;span style="color: #8b0000"&gt;Processing &lt;/span&gt;"
+ file_name process( file_name, file_name + "&lt;span style="color: #8b0000"&gt;.conv&lt;/span&gt;"
)&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=7ee6b803-1d81-42ee-8cf7-4727a73bb615" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,7ee6b803-1d81-42ee-8cf7-4727a73bb615.aspx</comments>
      <category>Personal</category>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=affdea07-f72f-473c-b582-113d7a306efd</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,affdea07-f72f-473c-b582-113d7a306efd.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,affdea07-f72f-473c-b582-113d7a306efd.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=affdea07-f72f-473c-b582-113d7a306efd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
What a stroke of luck! With more and more sites foregoing captchas, I was starting
to think weird-ass captchas are a thing of the past. Fortunately trusty old <a href="http://rapidshare.com/">RapidShare</a> brought
me to task:
</p>
        <p align="center">
          <a href="http://www.tomergabel.com/content/binary/captcha_of_hell.png">
            <img height="120" alt="captcha_of_hell_sm" src="http://www.tomergabel.com/content/binary/WindowsLiveWriter/CaptchaofHell_B6C8/captcha_of_hell_sm_3.png" width="483" border="0" />
          </a> 
</p>
        <p align="left">
Apparently not only am I meant to figure out the convoluted glyphs (it took me a while
to figure out that there are no numbers -- their G looks exactly like a 6, O and 0
look the same etc.), but I'm supposed to <strong>match only the letters connected
to a cat</strong>. Conceptually amusing, but what the hell? Can you tell me which
of the above are cats? Is it reasonable to expect someone to spend more than about
5 seconds on a captcha?
</p>
        <p align="left">
Oddly enough I re-entered <a href="http://rs19.rapidshare.com/files/122874285/HDMI_R196.exe">the
link</a> a little while later to discover the amazing RapidShare feature called "Happy
Hour":
</p>
        <p align="center">
          <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="182" alt="captcha_of_hell_happy" src="http://www.tomergabel.com/content/binary/WindowsLiveWriter/CaptchaofHell_B6C8/captcha_of_hell_happy_3.png" width="513" border="0" />
        </p>
        <p>
And I'm just left scratching my head.
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=affdea07-f72f-473c-b582-113d7a306efd" />
      </body>
      <title>Captcha of Hell</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,affdea07-f72f-473c-b582-113d7a306efd.aspx</guid>
      <link>http://www.tomergabel.com/CaptchaOfHell.aspx</link>
      <pubDate>Thu, 19 Jun 2008 09:57:44 GMT</pubDate>
      <description>&lt;p&gt;
What a stroke of luck! With more and more sites foregoing captchas, I was starting
to think weird-ass captchas are a thing of the past. Fortunately trusty old &lt;a href="http://rapidshare.com/"&gt;RapidShare&lt;/a&gt; brought
me to task:
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.tomergabel.com/content/binary/captcha_of_hell.png"&gt;&lt;img height="120" alt="captcha_of_hell_sm" src="http://www.tomergabel.com/content/binary/WindowsLiveWriter/CaptchaofHell_B6C8/captcha_of_hell_sm_3.png" width="483" border="0"&gt;&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p align="left"&gt;
Apparently not only am I meant to figure out the convoluted glyphs (it took me a while
to figure out that there are no numbers -- their G looks exactly like a 6, O and 0
look the same etc.), but I'm supposed to &lt;strong&gt;match only the letters connected
to a cat&lt;/strong&gt;. Conceptually amusing, but what the hell? Can you tell me which
of the above are cats? Is it reasonable to expect someone to spend more than about
5 seconds on a captcha?
&lt;/p&gt;
&lt;p align="left"&gt;
Oddly enough I re-entered &lt;a href="http://rs19.rapidshare.com/files/122874285/HDMI_R196.exe"&gt;the
link&lt;/a&gt; a little while later to discover the amazing RapidShare feature called "Happy
Hour":
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="182" alt="captcha_of_hell_happy" src="http://www.tomergabel.com/content/binary/WindowsLiveWriter/CaptchaofHell_B6C8/captcha_of_hell_happy_3.png" width="513" border="0"&gt; 
&lt;/p&gt;
&lt;p&gt;
And I'm just left scratching my head.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=affdea07-f72f-473c-b582-113d7a306efd" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,affdea07-f72f-473c-b582-113d7a306efd.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=f24465a0-c253-469d-8b17-3980e966af16</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,f24465a0-c253-469d-8b17-3980e966af16.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,f24465a0-c253-469d-8b17-3980e966af16.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f24465a0-c253-469d-8b17-3980e966af16</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <u>Update (22 June 2008):</u> I've <a href="http://www.tomergabel.com/DealingWithInvalidPermalinks.aspx">posted
a Python script</a> for converting the invalid permalinks to their "proper" form.
</p>
        <p>
After moving to GoDaddy I found to my chagrin that none of the site's article links
(a.k.a permalinks) seem to work. There are any number of reasons why this is a bad
thing, the two primary reasons being that Google cannot crawl the actual articles
and that historical, incoming links no longer work. As they say, crap on a stick.
</p>
        <p>
I originally looked into the URL rewriting rules and HTTP handler configuration in
web.config, thinking that perhaps some of the handlers need to be manually registered
with IIS for some reason; eventually I installed the blog locally, migrated to IIS
pipeline mode (which might be cool but has no tangible benefit for me) but the problems
persisted. Until I tried accessing a permalink URL locally, that is. Then I discovered
that plus signs in URLs (dasBlog's way of avoiding encoding spaces to %20) are considered
"double-encoded" characters, and are automatically rejected by IIS 7.0 by default
because under some circumstances they <a href="https://blogs.iis.net/thomad/archive/2007/12/17/iis7-rejecting-urls-containing.aspx">pose
a security threat</a>.
</p>
        <p>
There's a <a href="http://support.microsoft.com/kb/927672">knowledge-base article</a> detailing
how to resolve this on a server or per-application level, but either solution requires
server reconfiguration. Working under the assumption that this entails special requests
from <em>each and every potential future web host</em>, and that having plus signs
in my URLs is not the "right thing to do" anyway, I just opted to disable them and
try to rework the existing links as best I can. I suppose blogs with considerably
higher traffic cannot afford that luxury, but then blogs with considerably higher
traffic usually work with much more specialized hosting providers and wouldn't have
to worry about server reconfiguration in the first place...
</p>
        <p>
Anyway, hope this helps someone.
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=f24465a0-c253-469d-8b17-3980e966af16" />
      </body>
      <title>dasBlog permalink woes</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,f24465a0-c253-469d-8b17-3980e966af16.aspx</guid>
      <link>http://www.tomergabel.com/dasBlogPermalinkWoes.aspx</link>
      <pubDate>Mon, 16 Jun 2008 09:05:53 GMT</pubDate>
      <description>&lt;p&gt;
&lt;u&gt;Update (22 June 2008):&lt;/u&gt; I've &lt;a href="http://www.tomergabel.com/DealingWithInvalidPermalinks.aspx"&gt;posted
a Python script&lt;/a&gt; for converting the invalid permalinks to their "proper" form.
&lt;/p&gt;
&lt;p&gt;
After moving to GoDaddy I found to my chagrin that none of the site's article links
(a.k.a permalinks) seem to work. There are any number of reasons why this is a bad
thing, the two primary reasons being that Google cannot crawl the actual articles
and that historical, incoming links no longer work. As they say, crap on a stick.
&lt;/p&gt;
&lt;p&gt;
I originally looked into the URL rewriting rules and HTTP handler configuration in
web.config, thinking that perhaps some of the handlers need to be manually registered
with IIS for some reason; eventually I installed the blog locally, migrated to IIS
pipeline mode (which might be cool but has no tangible benefit for me) but the problems
persisted. Until I tried accessing a permalink URL locally, that is. Then I discovered
that plus signs in URLs (dasBlog's way of avoiding encoding spaces to %20) are considered
"double-encoded" characters, and are automatically rejected by IIS 7.0 by default
because under some circumstances they &lt;a href="https://blogs.iis.net/thomad/archive/2007/12/17/iis7-rejecting-urls-containing.aspx"&gt;pose
a security threat&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
There's a &lt;a href="http://support.microsoft.com/kb/927672"&gt;knowledge-base article&lt;/a&gt; detailing
how to resolve this on a server or per-application level, but either solution requires
server reconfiguration. Working under the assumption that this entails special requests
from &lt;em&gt;each and every potential future web host&lt;/em&gt;, and that having plus signs
in my URLs is not the "right thing to do" anyway, I just opted to disable them and
try to rework the existing links as best I can. I suppose blogs with considerably
higher traffic cannot afford that luxury, but then blogs with considerably higher
traffic usually work with much more specialized hosting providers and wouldn't have
to worry about server reconfiguration in the first place...
&lt;/p&gt;
&lt;p&gt;
Anyway, hope this helps someone.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=f24465a0-c253-469d-8b17-3980e966af16" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,f24465a0-c253-469d-8b17-3980e966af16.aspx</comments>
      <category>Personal</category>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=8da02468-b4c4-4913-90bb-787326c333c8</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,8da02468-b4c4-4913-90bb-787326c333c8.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,8da02468-b4c4-4913-90bb-787326c333c8.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8da02468-b4c4-4913-90bb-787326c333c8</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <u>Note</u>: This is a translation of a <a href="http://www.hometheater.co.il/modules.php?name=Forums&amp;file=viewtopic&amp;p=583179#583179">forum
post</a> in an Israeli home theater site. If you're Hebrew-enabled, the ensuing thread
might be of interest to you.
</p>
        <p>
After a long period of running around, testing and making arrangements I've finally
bought a new set of speakers for my home theater setup. I intend to describe the process,
so if you're impatient feel free to scroll to the conclusion.
</p>
        <p>
I've used the same set of CDs, same amplifier and same testing methodology for each
system I was demonstrated:
</p>
        <ol>
          <li>
A <a href="http://www.yamaha.com/yec/products/productdetail.html?CNTID=558316">Yamaha
RX-V3800</a> A/V receiver, hooked up with HDMI where available and regular optical
cable where it wasn't 
</li>
          <li>
I started each demonstration with a consistent set of musical segments, with the receiver
set to Pure Direct mode. Specifically: 
<ul><li>
Telegraph Road (out of Love Over Gold by Dire Straits) 
</li><li>
Converting Vegetarians (out of the album by the same name) 
</li><li>
Elation Station (same album) 
</li><li>
Sharp switch to Creedence Clearwater Revival, with Lookin' Out My Backdoor 
</li><li>
Followed by Heard It Through the Grapevine by the same band 
</li><li>
Another sharp switch to Ear Parcel (out of Fear of Fours by Lamb. It's kind of "busy
acid jazz" -- recommended for giving amplifiers a serious run for their money) 
</li><li>
And ending with Telegraph Road, again out of the Dire Straits album Love Over Gold 
</li><li>
In some cases I also played excerpts of Time and The Great Gig in the Sky by Pink
Floyd</li></ul></li>
          <li>
I then proceeded to the home theater tests: 
<ul><li>
Master and Commander: The Far Side of the World (the first naval warfare scene, as
well as the scene where the captain and doctor play music together) 
</li><li>
I Am Legend on BluRay (Dolby TrueHD, mostly the chase scenes) 
</li><li>
Pan's Labyrinth on BluRay (DTS HD Master Audio, mostly dialogue-oriented scenes) 
</li><li>
Harry Potter and the Order of the Phoenix (several segments, the O.W.L test scene
in particular) 
</li><li>
Gladiator (opening scene)</li></ul></li>
          <li>
After hearing all available options I've narrowed the selection down to three main
(front) speakers and borrowed them for testing at home. 
</li>
          <li>
The prices mentioned are from memory, in <a href="http://finance.yahoo.com/currency/convert?amt=1&amp;from=USD&amp;to=ILS&amp;submit=Convert">New
Israeli Shekels</a> and can be considered MSRP. In other words, you can usually get
the same goods for a considerably lower price. Additionally, Israeli customs have
a ~30% tax (VAT included) on loudspeakers, so prices here aren't really representative
of the market price in the US.</li>
        </ol>
        <p>
The setups I've tested were:
</p>
        <p>
          <u>Klipsch</u>
        </p>
        <ul>
          <li>
Front: <a href="http://www.klipsch.com/products/details/rf-82.aspx">Klipsch RF-82</a></li>
          <li>
Surround Back: <a href="http://www.klipsch.com/products/details/rs-42.aspx">Klipsch
RS-42</a></li>
          <li>
Center: <a href="http://www.klipsch.com/products/details/rc-62.aspx">Klipsch RC-62</a></li>
          <li>
Subwoofer: <a href="http://www.klipsch.com/products/details/rw-10d.aspx">Klipsch RW-10d</a></li>
        </ul>
        <p>
This system is particularly characterized by a "large" sound-stage, and seems to be
designed mostly for home theater use. Compared to most other systems I've listened
to, the Klipsch speakers exhibit full and punchy sound in home theater, but which
sounds slightly anemic when listening to music (the sound produced lacks volume -
particularly noticeable with Dire Straits) and lacks resolution. The center, however,
exhibited great potential in dialogues (Pan's Labyrinth in particular); the next center
speaker high up in Klipsch's product offerings is the RC-64, which sounds even more
impressive and is one of my candidates for purchase.<br />
Bottom line: a good choice for those interested specifically in home theater, but
Paradigm's more impressive offerings are available in the same price range in Israel.<br />
Total cost: approximately 24,000 NIS.
</p>
        <p>
          <u>Focal, Chorus series</u>
        </p>
        <ul>
          <li>
Front: <a href="http://www.focal.tm.fr/">Focal</a> 816V 
</li>
          <li>
Center: <a href="http://www.focal.tm.fr/">Focal</a> 800CC 
</li>
          <li>
No surround back 
</li>
          <li>
No subwoofer</li>
        </ul>
        <p>
In a word: disappointing. I didn't even bother to continue with the home theater benchmarks.
I had high hopes for this setup, both because of recommendations by several forum
members in various conversations and because I have a Focal component set in my car
and was pleasantly surprised by their performance in that market segment. With this
setup, however, the result was a "dirty" sound that lacks proper resolution, is sharply
biased towards low bass and over-bright treble. I consider this by far the weakest
setup I have tested in my search.<br />
Cost of the front speakers: 
</p>
        <del>
about 8,000 NIS</del>. <u>Update</u>: Forum members have pointed out that the actual
price may be closer to 12,000 NIS.
<p><u>Triangle, Esprit EX series</u></p><ul><li>
Front: <a href="http://www.triangle-fr.com/WD100AWP/WD100Awp.exe/CTX_9620-11-ZRZttoGEqv/gamme_Esprit_EX/SYNC_-1162447306">Triangle
Antal EX</a></li><li>
Center: <a href="http://www.triangle-fr.com/WD100AWP/WD100Awp.exe/CTX_9620-11-ZRZttoGEqv/gamme_Esprit_EX/SYNC_-1162447306">Triangle
Voce EX</a></li><li>
No surround speakers 
</li><li>
No subwoofer</li></ul><p>
These speakers exhibit a very French sound, open and airy with terrific mid-bass and
no shortage of punch in the low-end. The Antal were some of the most impressive speakers
I've examined (in price as well as performance) and I ended up borrowing them for
testing at home. The center speaker had terrific resolution and a very pleasant sound,
despite the fact that the particular speaker tested was new and not yet broken in.<br />
Cost of the front speakers: About 11,000 NIS.
</p><p><u>ProAc</u></p><ul><li>
Front: <a href="http://www.proac-loudspeakers.com/studio140.php">ProAc Studio 140</a></li><li>
Center: Focal Chorus 800CC 
</li><li>
Surround back: Focal Electra 1007 Be (I <em>think</em>) 
</li><li>
Subwoofer: B&amp;W ASW608</li></ul><p>
I am not really partial to British loudspeakers in general, and ProAc in particular;
I had previously listened extensively to both Tablette Signature and Response One
models and had disliked their tonal character, which in my opinion is overly analytical
and dry. This is why I entered this particular demonstration with rather low expectations,
but the Studio 140 speakers simply blew me away from the get-go: they combine astonishing
detail and resolution with huge sound-stage, and provide low, tight bass that's way
out of their size league. At an MSRP of 15,900 NIS (actual price considerably lower)
they are 30-40% more expensive than my other favorites.<br />
The rear speakers also impressed me, particularly with the ambient effects in Master
and Commander, but I think they are from a very highly priced series in Focal's line.
</p><p><u>Paradigm, Monitor series</u></p><ul><li>
Front: <a href="http://www.paradigm.com/en/paradigm/user_manual.php?speaker_type=2&amp;&amp;series_type=4&amp;&amp;type_id=1&amp;&amp;model_type=19">Paradigm
Monitor 11</a></li><li>
Center: <a href="http://www.paradigm.com/en/paradigm/centers-monitor-cc290-model-3-4-1-7.paradigm">Paradigm
CC-290</a></li><li>
No surround speakers 
</li><li>
Subwoofer: <a href="http://www.paradigm.com/en/paradigm/subwoofer-dsp-dsp3400-model-5-24-4-19.paradigm">Paradigm
DSP-3400</a></li></ul><p>
I'll admit that I came to this particular demonstration positively biased; I've known
the old Monitor 9 v2 model for years and very much like the sound character of Paradigm's
products. This system is one of the finest I've heard: the Monitors dealt incredibly
well with just about any music I could throw at them and produce a deep, wide sound
that I find very attractive. In the home theater benchmarks this setup absolutely
shined: the Monitors themselves produce deep, penetrating bass and overall sound that
is far tighter and more detailed than the Klipsch RF-82s. The center speaker is very
convincing in dialogues, but lacks in the bass department, which is why I'm hoping
to test the CC-390 and add it to my list of candidates for purchase. Regardless, I
ended up borrowed the Monitor 11 pair for testing at home.<br />
The subwoofer deserves a separate discussion which I get to further down the page.<br />
Total cost: about 20,000 NIS, making this an amazing value for the money.
</p><p><u>Paradigm, Studio series</u></p><ul><li>
Front: <a href="http://www.paradigm.com/en/reference/fronts-studio-studio60-model-2-13-1-28.paradigm">Paradigm
Studio 60</a></li><li>
Front: <a href="http://www.paradigm.com/en/reference/fronts-studio-studio100-model-2-13-1-29.paradigm">Paradigm
Studio 100</a></li><li>
Center: <a href="http://www.paradigm.com/en/paradigm/centers-monitor-cc290-model-3-4-1-7.paradigm">Paradigm
CC-290</a></li><li>
No surround speakers 
</li><li>
Subwoofer: <a href="http://www.paradigm.com/en/paradigm/subwoofer-dsp-dsp3400-model-5-24-4-19.paradigm">Paradigm
DSP-3400</a></li></ul><p>
Since the previous system left me some room in my budget I've allowed myself to test
two of Paradigm's much-vaunted Studio series loudspeakers. The Studio 60 failed to
impress me despite their impressive detail and resolution, this due to lacking mid-bass
and low-end; I moved on quickly to comparing the Studio 100s directly with the Monitor
11. This model was far more to my liking: clarity and high resolution combined with
tight, bunchy bass, but the sound still felt too thin and lacking in authority compared
to the Monitor 11. To those of you looking for a highly detailed, analytical loudspeaker
I definitely recommend giving the Studio 100 speakers a listen, but they just don't
match my own preferences.<br />
Cost of the Studio 100: roughly 16,000 NIS.
</p><p>
Finally I've heard several front and center speakers that I did not mention (certain
Canton and Wharfedale models, for instance) because in my opinion they are not in
the same league as those products. I will not bother expanding on those.
</p><p align="center"><a href="http://www.tomergabel.com/content/binary/threespeakers_front.jpg"><img src="http://www.tomergabel.com/content/binary/threespeakers_front_sm.jpg" /></a></p><p>
Eventually I've reached the dilemma of choosing between Triangle Antal EX (a beautiful
loudspeaker with a deep, warm tonal character), Paradigm Monitor 11 (an impressive
loudspeaker with serious presence, nor is it shy playing just stereo) and the considerably
more expensive ProAc Studio 140. I was given all three pairs for testing at home during
the <a href="http://en.wikipedia.org/wiki/Shavuot">Shavuot holiday</a>, which gave
me a relatively long time to spend with each speaker. I had four days to experience
a variety of music, movies and TV series in a wide variety of genres, and have managed
to reach several conclusions about these speakers:
</p><ol><li>
First and foremost it's worth noting that each and every pair sounded simply magnificent.
I felt privileged to be able to simply switch from one pair to another and experience
their magnificent respective sounds. 
</li><li>
I don't care what other people say, the Antal EX speaker is simply gorgeous. 
</li><li>
For all you married people: my SO actually preferred the looks of the Monitor 11. 
</li><li>
The Antal and Monitor speakers have similar character to their sound; where the Antal
set was more detailed the Monitors compensated with glorious mid-bass, and where the
Antals exhibited great low-end muscle the Monitors shined with excellent high-end
resolution. If I had to pick between the two I'd be facing a bothersome dilemma, however... 
</li><li>
The Studio 140 set simply offers the best of all worlds and was the clear winner in
my mind. Accurate and detailed yet exhibiting an amazingly wide sound-stage with deep,
low, tight bass to boot? Not only that, the rich mid-bass and pleasant overall tone
completely eradicated my expectations of dryness. They are indeed quite a bit more
expensive, but I think they completely justify the price delta (5,000 NIS on paper,
probably less in practice).</li></ol><p align="center"><a href="http://www.tomergabel.com/content/binary/threespeakers_side.jpg"><img src="http://www.tomergabel.com/content/binary/threespeakers_side_sm.jpg" /></a> 
</p><p><u>Bottom line</u>: a pair of ProAc Studio 140 speakers will soon find its new home
in my apartment.
</p><p>
As an unexpected bonus I was also provided the Paradigm DSP-3400 subwoofer for testing
at home. When the sub was initially demonstrated for me at <a href="http://www.stereo-star.co.il">Stereo-Star</a>,
Rami (the sales person who was conducting the demonstration) walked in the room with
a gargantuan cardboard box, and with a smile on his face told me "not to get excited,
the sub is smaller than the box." Although technically true, the statement hadn't
prepared me for just how amazingly big this subwoofer is -- a 14" woofer with two
6" ports underneath:
</p><p align="center"><img src="http://www.tomergabel.com/content/binary/threespeakers_sub.jpg" /></p><p>
This subwoofer was my companion for the holidays and indirectly thought me a couple
of tricks on how to reinforce cupboard hinges. I'm fairly a bass aficionado, particularly
when it comes to home theater, and this little monster went above and beyond my expectations.
After returning the demo model I went to a short demonstration of another subwoofer,
the <a href="http://www.bowers-wilkins.com/display.aspx?infid=2363&amp;sc=hf">B&amp;W
ASW610</a>, a little monster in its own right; the problem was that compared to the
gut-wrenching effect produced when the DSP-3400 comes to life this was simply an underwhelming
experience. Conclusion 1: I should sample equipment in order of ascending cost, not
the other way around. Conclusion 2: I'm buying the DSP-3400. Its MSRP: about 7,500
NIS.
</p><p>
The demonstrations were held courtesy of Yaki of Z-Max, Rami Kasher of Stereo-Star,
Zohar of Armageddon Audio and Eyal Por of Audio Fidelity. I heartily recommend to
anyone looking for similar equipment to contact them.
</p><p>
And for those of you with me so far, here's a bonus kitty:
</p><p align="center"><a href="http://www.tomergabel.com/content/binary/threespeakers_kitty.jpg"><img src="http://www.tomergabel.com/content/binary/threespeakers_kitty_sm.jpg" /></a></p><img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=8da02468-b4c4-4913-90bb-787326c333c8" /></body>
      <title>It's a boy!</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,8da02468-b4c4-4913-90bb-787326c333c8.aspx</guid>
      <link>http://www.tomergabel.com/ItsABoy.aspx</link>
      <pubDate>Fri, 13 Jun 2008 01:34:10 GMT</pubDate>
      <description>&lt;p&gt;
&lt;u&gt;Note&lt;/u&gt;: This is a translation of a &lt;a href="http://www.hometheater.co.il/modules.php?name=Forums&amp;amp;file=viewtopic&amp;amp;p=583179#583179"&gt;forum
post&lt;/a&gt; in an Israeli home theater site. If you're Hebrew-enabled, the ensuing thread
might be of interest to you.
&lt;/p&gt;
&lt;p&gt;
After a long period of running around, testing and making arrangements I've finally
bought a new set of speakers for my home theater setup. I intend to describe the process,
so if you're impatient feel free to scroll to the conclusion.
&lt;/p&gt;
&lt;p&gt;
I've used the same set of CDs, same amplifier and same testing methodology for each
system I was demonstrated:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
A &lt;a href="http://www.yamaha.com/yec/products/productdetail.html?CNTID=558316"&gt;Yamaha
RX-V3800&lt;/a&gt; A/V receiver, hooked up with HDMI where available and regular optical
cable where it wasn't 
&lt;li&gt;
I started each demonstration with a consistent set of musical segments, with the receiver
set to Pure Direct mode. Specifically: 
&lt;ul&gt;
&lt;li&gt;
Telegraph Road (out of Love Over Gold by Dire Straits) 
&lt;li&gt;
Converting Vegetarians (out of the album by the same name) 
&lt;li&gt;
Elation Station (same album) 
&lt;li&gt;
Sharp switch to Creedence Clearwater Revival, with Lookin' Out My Backdoor 
&lt;li&gt;
Followed by Heard It Through the Grapevine by the same band 
&lt;li&gt;
Another sharp switch to Ear Parcel (out of Fear of Fours by Lamb. It's kind of "busy
acid jazz" -- recommended for giving amplifiers a serious run for their money) 
&lt;li&gt;
And ending with Telegraph Road, again out of the Dire Straits album Love Over Gold 
&lt;li&gt;
In some cases I also played excerpts of Time and The Great Gig in the Sky by Pink
Floyd&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
I then proceeded to the home theater tests: 
&lt;ul&gt;
&lt;li&gt;
Master and Commander: The Far Side of the World (the first naval warfare scene, as
well as the scene where the captain and doctor play music together) 
&lt;li&gt;
I Am Legend on BluRay (Dolby TrueHD, mostly the chase scenes) 
&lt;li&gt;
Pan's Labyrinth on BluRay (DTS HD Master Audio, mostly dialogue-oriented scenes) 
&lt;li&gt;
Harry Potter and the Order of the Phoenix (several segments, the O.W.L test scene
in particular) 
&lt;li&gt;
Gladiator (opening scene)&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
After hearing all available options I've narrowed the selection down to three main
(front) speakers and borrowed them for testing at home. 
&lt;li&gt;
The prices mentioned are from memory, in &lt;a href="http://finance.yahoo.com/currency/convert?amt=1&amp;amp;from=USD&amp;amp;to=ILS&amp;amp;submit=Convert"&gt;New
Israeli Shekels&lt;/a&gt; and can be considered MSRP. In other words, you can usually get
the same goods for a considerably lower price. Additionally, Israeli customs have
a ~30% tax (VAT included) on loudspeakers, so prices here aren't really representative
of the market price in the US.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
The setups I've tested were:
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Klipsch&lt;/u&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Front: &lt;a href="http://www.klipsch.com/products/details/rf-82.aspx"&gt;Klipsch RF-82&lt;/a&gt; 
&lt;li&gt;
Surround Back: &lt;a href="http://www.klipsch.com/products/details/rs-42.aspx"&gt;Klipsch
RS-42&lt;/a&gt; 
&lt;li&gt;
Center: &lt;a href="http://www.klipsch.com/products/details/rc-62.aspx"&gt;Klipsch RC-62&lt;/a&gt; 
&lt;li&gt;
Subwoofer: &lt;a href="http://www.klipsch.com/products/details/rw-10d.aspx"&gt;Klipsch RW-10d&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This system is particularly characterized by a "large" sound-stage, and seems to be
designed mostly for home theater use. Compared to most other systems I've listened
to, the Klipsch speakers exhibit full and punchy sound in home theater, but which
sounds slightly anemic when listening to music (the sound produced lacks volume -
particularly noticeable with Dire Straits) and lacks resolution. The center, however,
exhibited great potential in dialogues (Pan's Labyrinth in particular); the next center
speaker high up in Klipsch's product offerings is the RC-64, which sounds even more
impressive and is one of my candidates for purchase.&lt;br&gt;
Bottom line: a good choice for those interested specifically in home theater, but
Paradigm's more impressive offerings are available in the same price range in Israel.&lt;br&gt;
Total cost: approximately 24,000 NIS.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Focal, Chorus series&lt;/u&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Front: &lt;a href="http://www.focal.tm.fr/"&gt;Focal&lt;/a&gt; 816V 
&lt;li&gt;
Center: &lt;a href="http://www.focal.tm.fr/"&gt;Focal&lt;/a&gt; 800CC 
&lt;li&gt;
No surround back 
&lt;li&gt;
No subwoofer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In a word: disappointing. I didn't even bother to continue with the home theater benchmarks.
I had high hopes for this setup, both because of recommendations by several forum
members in various conversations and because I have a Focal component set in my car
and was pleasantly surprised by their performance in that market segment. With this
setup, however, the result was a "dirty" sound that lacks proper resolution, is sharply
biased towards low bass and over-bright treble. I consider this by far the weakest
setup I have tested in my search.&lt;br&gt;
Cost of the front speakers: 
&lt;del&gt;
about 8,000 NIS&lt;/del&gt;. &lt;u&gt;Update&lt;/u&gt;: Forum members have pointed out that the actual
price may be closer to 12,000 NIS.&gt;
&lt;p&gt;
&lt;u&gt;Triangle, Esprit EX series&lt;/u&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Front: &lt;a href="http://www.triangle-fr.com/WD100AWP/WD100Awp.exe/CTX_9620-11-ZRZttoGEqv/gamme_Esprit_EX/SYNC_-1162447306"&gt;Triangle
Antal EX&lt;/a&gt; 
&lt;li&gt;
Center: &lt;a href="http://www.triangle-fr.com/WD100AWP/WD100Awp.exe/CTX_9620-11-ZRZttoGEqv/gamme_Esprit_EX/SYNC_-1162447306"&gt;Triangle
Voce EX&lt;/a&gt; 
&lt;li&gt;
No surround speakers 
&lt;li&gt;
No subwoofer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
These speakers exhibit a very French sound, open and airy with terrific mid-bass and
no shortage of punch in the low-end. The Antal were some of the most impressive speakers
I've examined (in price as well as performance) and I ended up borrowing them for
testing at home. The center speaker had terrific resolution and a very pleasant sound,
despite the fact that the particular speaker tested was new and not yet broken in.&lt;br&gt;
Cost of the front speakers: About 11,000 NIS.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;ProAc&lt;/u&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Front: &lt;a href="http://www.proac-loudspeakers.com/studio140.php"&gt;ProAc Studio 140&lt;/a&gt; 
&lt;li&gt;
Center: Focal Chorus 800CC 
&lt;li&gt;
Surround back: Focal Electra 1007 Be (I &lt;em&gt;think&lt;/em&gt;) 
&lt;li&gt;
Subwoofer: B&amp;amp;W ASW608&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I am not really partial to British loudspeakers in general, and ProAc in particular;
I had previously listened extensively to both Tablette Signature and Response One
models and had disliked their tonal character, which in my opinion is overly analytical
and dry. This is why I entered this particular demonstration with rather low expectations,
but the Studio 140 speakers simply blew me away from the get-go: they combine astonishing
detail and resolution with huge sound-stage, and provide low, tight bass that's way
out of their size league. At an MSRP of 15,900 NIS (actual price considerably lower)
they are 30-40% more expensive than my other favorites.&lt;br&gt;
The rear speakers also impressed me, particularly with the ambient effects in Master
and Commander, but I think they are from a very highly priced series in Focal's line.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Paradigm, Monitor series&lt;/u&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Front: &lt;a href="http://www.paradigm.com/en/paradigm/user_manual.php?speaker_type=2&amp;amp;&amp;amp;series_type=4&amp;amp;&amp;amp;type_id=1&amp;amp;&amp;amp;model_type=19"&gt;Paradigm
Monitor 11&lt;/a&gt; 
&lt;li&gt;
Center: &lt;a href="http://www.paradigm.com/en/paradigm/centers-monitor-cc290-model-3-4-1-7.paradigm"&gt;Paradigm
CC-290&lt;/a&gt; 
&lt;li&gt;
No surround speakers 
&lt;li&gt;
Subwoofer: &lt;a href="http://www.paradigm.com/en/paradigm/subwoofer-dsp-dsp3400-model-5-24-4-19.paradigm"&gt;Paradigm
DSP-3400&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I'll admit that I came to this particular demonstration positively biased; I've known
the old Monitor 9 v2 model for years and very much like the sound character of Paradigm's
products. This system is one of the finest I've heard: the Monitors dealt incredibly
well with just about any music I could throw at them and produce a deep, wide sound
that I find very attractive. In the home theater benchmarks this setup absolutely
shined: the Monitors themselves produce deep, penetrating bass and overall sound that
is far tighter and more detailed than the Klipsch RF-82s. The center speaker is very
convincing in dialogues, but lacks in the bass department, which is why I'm hoping
to test the CC-390 and add it to my list of candidates for purchase. Regardless, I
ended up borrowed the Monitor 11 pair for testing at home.&lt;br&gt;
The subwoofer deserves a separate discussion which I get to further down the page.&lt;br&gt;
Total cost: about 20,000 NIS, making this an amazing value for the money.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Paradigm, Studio series&lt;/u&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Front: &lt;a href="http://www.paradigm.com/en/reference/fronts-studio-studio60-model-2-13-1-28.paradigm"&gt;Paradigm
Studio 60&lt;/a&gt; 
&lt;li&gt;
Front: &lt;a href="http://www.paradigm.com/en/reference/fronts-studio-studio100-model-2-13-1-29.paradigm"&gt;Paradigm
Studio 100&lt;/a&gt; 
&lt;li&gt;
Center: &lt;a href="http://www.paradigm.com/en/paradigm/centers-monitor-cc290-model-3-4-1-7.paradigm"&gt;Paradigm
CC-290&lt;/a&gt; 
&lt;li&gt;
No surround speakers 
&lt;li&gt;
Subwoofer: &lt;a href="http://www.paradigm.com/en/paradigm/subwoofer-dsp-dsp3400-model-5-24-4-19.paradigm"&gt;Paradigm
DSP-3400&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Since the previous system left me some room in my budget I've allowed myself to test
two of Paradigm's much-vaunted Studio series loudspeakers. The Studio 60 failed to
impress me despite their impressive detail and resolution, this due to lacking mid-bass
and low-end; I moved on quickly to comparing the Studio 100s directly with the Monitor
11. This model was far more to my liking: clarity and high resolution combined with
tight, bunchy bass, but the sound still felt too thin and lacking in authority compared
to the Monitor 11. To those of you looking for a highly detailed, analytical loudspeaker
I definitely recommend giving the Studio 100 speakers a listen, but they just don't
match my own preferences.&lt;br&gt;
Cost of the Studio 100: roughly 16,000 NIS.
&lt;/p&gt;
&lt;p&gt;
Finally I've heard several front and center speakers that I did not mention (certain
Canton and Wharfedale models, for instance) because in my opinion they are not in
the same league as those products. I will not bother expanding on those.
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.tomergabel.com/content/binary/threespeakers_front.jpg"&gt;&lt;img src="http://www.tomergabel.com/content/binary/threespeakers_front_sm.jpg"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Eventually I've reached the dilemma of choosing between Triangle Antal EX (a beautiful
loudspeaker with a deep, warm tonal character), Paradigm Monitor 11 (an impressive
loudspeaker with serious presence, nor is it shy playing just stereo) and the considerably
more expensive ProAc Studio 140. I was given all three pairs for testing at home during
the &lt;a href="http://en.wikipedia.org/wiki/Shavuot"&gt;Shavuot holiday&lt;/a&gt;, which gave
me a relatively long time to spend with each speaker. I had four days to experience
a variety of music, movies and TV series in a wide variety of genres, and have managed
to reach several conclusions about these speakers:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
First and foremost it's worth noting that each and every pair sounded simply magnificent.
I felt privileged to be able to simply switch from one pair to another and experience
their magnificent respective sounds. 
&lt;li&gt;
I don't care what other people say, the Antal EX speaker is simply gorgeous. 
&lt;li&gt;
For all you married people: my SO actually preferred the looks of the Monitor 11. 
&lt;li&gt;
The Antal and Monitor speakers have similar character to their sound; where the Antal
set was more detailed the Monitors compensated with glorious mid-bass, and where the
Antals exhibited great low-end muscle the Monitors shined with excellent high-end
resolution. If I had to pick between the two I'd be facing a bothersome dilemma, however... 
&lt;li&gt;
The Studio 140 set simply offers the best of all worlds and was the clear winner in
my mind. Accurate and detailed yet exhibiting an amazingly wide sound-stage with deep,
low, tight bass to boot? Not only that, the rich mid-bass and pleasant overall tone
completely eradicated my expectations of dryness. They are indeed quite a bit more
expensive, but I think they completely justify the price delta (5,000 NIS on paper,
probably less in practice).&lt;/li&gt;
&lt;/ol&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.tomergabel.com/content/binary/threespeakers_side.jpg"&gt;&lt;img src="http://www.tomergabel.com/content/binary/threespeakers_side_sm.jpg"&gt;&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Bottom line&lt;/u&gt;: a pair of ProAc Studio 140 speakers will soon find its new home
in my apartment.
&lt;/p&gt;
&lt;p&gt;
As an unexpected bonus I was also provided the Paradigm DSP-3400 subwoofer for testing
at home. When the sub was initially demonstrated for me at &lt;a href="http://www.stereo-star.co.il"&gt;Stereo-Star&lt;/a&gt;,
Rami (the sales person who was conducting the demonstration) walked in the room with
a gargantuan cardboard box, and with a smile on his face told me "not to get excited,
the sub is smaller than the box." Although technically true, the statement hadn't
prepared me for just how amazingly big this subwoofer is -- a 14" woofer with two
6" ports underneath:
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img src="http://www.tomergabel.com/content/binary/threespeakers_sub.jpg"&gt; 
&lt;/p&gt;
&lt;p&gt;
This subwoofer was my companion for the holidays and indirectly thought me a couple
of tricks on how to reinforce cupboard hinges. I'm fairly a bass aficionado, particularly
when it comes to home theater, and this little monster went above and beyond my expectations.
After returning the demo model I went to a short demonstration of another subwoofer,
the &lt;a href="http://www.bowers-wilkins.com/display.aspx?infid=2363&amp;amp;sc=hf"&gt;B&amp;amp;W
ASW610&lt;/a&gt;, a little monster in its own right; the problem was that compared to the
gut-wrenching effect produced when the DSP-3400 comes to life this was simply an underwhelming
experience. Conclusion 1: I should sample equipment in order of ascending cost, not
the other way around. Conclusion 2: I'm buying the DSP-3400. Its MSRP: about 7,500
NIS.
&lt;/p&gt;
&lt;p&gt;
The demonstrations were held courtesy of Yaki of Z-Max, Rami Kasher of Stereo-Star,
Zohar of Armageddon Audio and Eyal Por of Audio Fidelity. I heartily recommend to
anyone looking for similar equipment to contact them.
&lt;/p&gt;
&lt;p&gt;
And for those of you with me so far, here's a bonus kitty:
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.tomergabel.com/content/binary/threespeakers_kitty.jpg"&gt;&lt;img src="http://www.tomergabel.com/content/binary/threespeakers_kitty_sm.jpg"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=8da02468-b4c4-4913-90bb-787326c333c8" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,8da02468-b4c4-4913-90bb-787326c333c8.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=ccab5247-853b-4341-a2dd-e57504f9a7af</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,ccab5247-853b-4341-a2dd-e57504f9a7af.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,ccab5247-853b-4341-a2dd-e57504f9a7af.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ccab5247-853b-4341-a2dd-e57504f9a7af</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Sorry for the downtime and the lack of e-mail response over the past couple of months;
I've had a ridiculous lot of problems with my previous web host (<a href="http://www.ucvhost.com/">UCVHOST</a>),
among them:
</p>
        <ul>
          <li>
They switched servers on me with no notification or announcement;</li>
          <li>
This caused a reset of both my mail forwarding settings (causing numerous mailbox
outtages for several days each), my ASP.NET settings (which caused dasBlog to stop
functioning) and the directory security settings (which disallowed comments, trackbacks
or even blog posts);</li>
          <li>
They blamed me for the e-mail problems because supposedly I've changed the MX records
for my domain to point to a different provider. This is ludicrous because the domain
NS was under their control;</li>
          <li>
And the final nail in the coffin, they decided on a new policy that disallows forward
e-mail to a GMail account (which I use as my primary mail provider).</li>
        </ul>
        <p>
In other words, what the hell? My recommendation is strictly to <strong><em>stay away</em></strong> from
UCVHost.
</p>
        <p>
I was looking for a new host for quite a while, and since I was in a pinch with no
time for real research I decided to put my faith in my web registrar <a href="http://www.godaddy.com">GoDaddy</a>.
To make a short story shorter, the setup was quick and painless and I got everything
working within hours. GoDaddy's web-based control panel is exhaustive and usable,
and everything "just worked" from the first instant -- which is the way I like it,
really. So now I'm with a new host and can peacefully blog again.
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=ccab5247-853b-4341-a2dd-e57504f9a7af" />
      </body>
      <title>Moving hosts again</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,ccab5247-853b-4341-a2dd-e57504f9a7af.aspx</guid>
      <link>http://www.tomergabel.com/MovingHostsAgain.aspx</link>
      <pubDate>Wed, 11 Jun 2008 08:51:45 GMT</pubDate>
      <description>&lt;p&gt;
Sorry for the downtime and the lack of e-mail response over the past couple of months;
I've had a ridiculous lot of problems with my previous web host (&lt;a href="http://www.ucvhost.com/"&gt;UCVHOST&lt;/a&gt;),
among them:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
They switched servers on me with no notification or announcement;&lt;/li&gt;
&lt;li&gt;
This caused a reset of both my mail forwarding settings (causing numerous mailbox
outtages for several days each), my ASP.NET settings (which caused dasBlog to stop
functioning) and the directory security settings (which disallowed comments, trackbacks
or even blog posts);&lt;/li&gt;
&lt;li&gt;
They blamed me for the e-mail problems because supposedly I've changed the MX records
for my domain to point to a different provider. This is ludicrous because the domain
NS was under their control;&lt;/li&gt;
&lt;li&gt;
And the final nail in the coffin, they decided on a new policy that disallows forward
e-mail to a GMail account (which I use as my primary mail provider).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In other words, what the hell? My recommendation is strictly to &lt;strong&gt;&lt;em&gt;stay away&lt;/em&gt;&lt;/strong&gt; from
UCVHost.
&lt;/p&gt;
&lt;p&gt;
I was looking for a new host for quite a while, and since I was in a pinch with no
time for real research I decided to put my faith in my web registrar &lt;a href="http://www.godaddy.com"&gt;GoDaddy&lt;/a&gt;.
To make a short story shorter, the setup was quick and painless and I got everything
working within hours. GoDaddy's web-based control panel is exhaustive and usable,
and everything "just worked" from the first instant -- which is the way I like it,
really. So now I'm with a new host and can peacefully blog again.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=ccab5247-853b-4341-a2dd-e57504f9a7af" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,ccab5247-853b-4341-a2dd-e57504f9a7af.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=cb6e5822-a714-4dc9-b9f2-99c72157ba9e</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,cb6e5822-a714-4dc9-b9f2-99c72157ba9e.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,cb6e5822-a714-4dc9-b9f2-99c72157ba9e.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=cb6e5822-a714-4dc9-b9f2-99c72157ba9e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <u>Update</u>: Link to the <a href="http://www.jetbrains.net/confluence/display/OMEA/this+link">Omea
wiki page</a> with more details.
</p>
        <p>
My favourite RSS aggregator, newsgroup client and all-around cool application I always
have in the background is <a href="http://www.jetbrains.com">JetBrains</a>' Omea Pro.
While I don't use those features, Omea also supports aggregating and searching Outlook
mail, contacts and a host of other connectors. Now that it's open source there's even
be room for improvement, so those of you who do not like online aggregators like Google
Reader would do well to <a href="http://www.jetbrains.com/omea/">go to the Omea site</a> and
check it out!
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=cb6e5822-a714-4dc9-b9f2-99c72157ba9e" />
      </body>
      <title>Omea: Now officially open source</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,cb6e5822-a714-4dc9-b9f2-99c72157ba9e.aspx</guid>
      <link>http://www.tomergabel.com/OmeaNowOfficiallyOpenSource.aspx</link>
      <pubDate>Sun, 16 Mar 2008 09:33:36 GMT</pubDate>
      <description>&lt;p&gt;
&lt;u&gt;Update&lt;/u&gt;: Link to the &lt;a href="http://www.jetbrains.net/confluence/display/OMEA/this+link"&gt;Omea
wiki page&lt;/a&gt; with more details.
&lt;/p&gt;
&lt;p&gt;
My favourite RSS aggregator, newsgroup client and all-around cool application I always
have in the background is &lt;a href="http://www.jetbrains.com"&gt;JetBrains&lt;/a&gt;' Omea Pro.
While I don't use those features, Omea also supports aggregating and searching Outlook
mail, contacts and a host of other connectors. Now that it's open source there's even
be room for improvement, so those of you who do not like online aggregators like Google
Reader would do well to &lt;a href="http://www.jetbrains.com/omea/"&gt;go to the Omea site&lt;/a&gt; and
check it out!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=cb6e5822-a714-4dc9-b9f2-99c72157ba9e" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,cb6e5822-a714-4dc9-b9f2-99c72157ba9e.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=405afab6-978b-4a16-988d-c9e78156b57b</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,405afab6-978b-4a16-988d-c9e78156b57b.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,405afab6-978b-4a16-988d-c9e78156b57b.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=405afab6-978b-4a16-988d-c9e78156b57b</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Among a lot of other tools and technologies we use <a href="http://lucene.apache.org/">Lucene</a> here
at <a href="http://www.delver.com">Delver</a>. Lucene is a very mature, high-performance
and full-featured information retrieval library, which in simple terms means: it allows
you to add search functionality to your applications with ease. I could spend an entire
day talking about Lucene, but instead I'd like to show you how to write scripts for
Lucene with Python on Windows (and thus differs from <a href="http://sujitpal.blogspot.com/2007/06/pylucene-python-scripting-for-lucene.html">Sujit
Pal's excellent instructions</a> on the same subject matter).
</p>
        <p>
First, make sure you have your Python environment <a href="http://www.python.org/download/">all
set up</a> -- at the time of writing this I use the Python 2.5.1 Windows installer.
Next you'll need Python bindings for the library, so go and grab a copy of <a href="http://pylucene.osafoundation.org/">PyLucene</a>;
to make a long story short I suggest you use the JCC version for Windows which is
downloadable <a href="http://lists.osafoundation.org/pipermail/pylucene-dev/2008-February/002281.html">here</a>.
Grab it and install it, no fussing necessary. Finally you'll need the Java VM DLL
in your path, and this depends on which type of JRE you're using:
</p>
        <ul>
          <li>
If you're using the Java JDK, add the mental equivalent of <tt>C:\Program Files\Java\jdk1.6.0_03\jre\bin\client</tt> to
your path; 
</li>
          <li>
If you're using a JRE, add <tt>C:\Program Files\Java\jre1.6.0_03\bin\client</tt> to
your path.</li>
        </ul>
        <p>
(As an aside, you should probably be using <tt>%JAVA_HOME%</tt> and <tt>%JRE_HOME%</tt> and
indirecting through those.)
</p>
        <p>
Now you can quickly whip down scripts in Python, like this one which took about two
minutes to write:
</p>
        <blockquote>
          <pre>
            <font color="#008000">#!/usr/bin/python # # extract.py -- Extracts
term from an <span style="color: #0000ff">index</span> # Tomer Gabel, Delver, 2008
# # Usage: extract.py &lt;field_name&gt; &lt;index_url&gt; #</font>
            <span style="color: #0000ff">import</span>
            <span style="color: #0000ff">sys</span>
            <span style="color: #0000ff">import</span>
            <span style="color: #0000ff">string</span>
            <span style="color: #0000ff">import</span> lucene
from lucene <span style="color: #0000ff">import</span> IndexReader, StandardAnalyzer,
FSDirectory <span style="color: #0000ff">def</span> usage(): <span style="color: #0000ff">print</span> "<span style="color: #8b0000">Usage:\n</span>" <span style="color: #0000ff">print</span><span style="color: #0000ff">sys</span>.argv[
0 ] + "<span style="color: #8b0000"> &lt;field_name&gt; &lt;index_url&gt;</span>" <span style="color: #0000ff">sys</span>.<span style="color: #0000ff">exit</span>(
-1 ) <span style="color: #0000ff">def</span> main(): <span style="color: #0000ff">if</span> (
len( <span style="color: #0000ff">sys</span>.argv ) &lt; 3 ): usage() lucene.initVM(
lucene.CLASSPATH ) term = <span style="color: #0000ff">sys</span>.argv[ 1 ] index_location
= <span style="color: #0000ff">sys</span>.argv[ 2 ] reader = IndexReader.<span style="color: #0000ff">open</span>(
FSDirectory.getDirectory( index_location, False ) ) try: for i in range( reader.maxDoc()
): <span style="color: #0000ff">if</span> ( not reader.isDeleted( i ) ): doc = reader.document(
i ) <span style="color: #0000ff">print</span> doc.get( term ) finally: reader.<span style="color: #0000ff">close</span>()
main()</pre>
        </blockquote>
        <p>
Note the VM initialization line at the beginning -- for the JCC version of PyLucene
this is a must, but even like so using the library is extremely painless. Kudos to
the developers responsible!
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=405afab6-978b-4a16-988d-c9e78156b57b" />
      </body>
      <title>Scripting Lucene with Python</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,405afab6-978b-4a16-988d-c9e78156b57b.aspx</guid>
      <link>http://www.tomergabel.com/ScriptingLuceneWithPython.aspx</link>
      <pubDate>Sun, 24 Feb 2008 10:26:41 GMT</pubDate>
      <description>&lt;p&gt;
Among a lot of other tools and technologies we use &lt;a href="http://lucene.apache.org/"&gt;Lucene&lt;/a&gt; here
at &lt;a href="http://www.delver.com"&gt;Delver&lt;/a&gt;. Lucene is a very mature, high-performance
and full-featured information retrieval library, which in simple terms means: it allows
you to add search functionality to your applications with ease. I could spend an entire
day talking about Lucene, but instead I'd like to show you how to write scripts for
Lucene with Python on Windows (and thus differs from &lt;a href="http://sujitpal.blogspot.com/2007/06/pylucene-python-scripting-for-lucene.html"&gt;Sujit
Pal's excellent instructions&lt;/a&gt; on the same subject matter).
&lt;/p&gt;
&lt;p&gt;
First, make sure you have your Python environment &lt;a href="http://www.python.org/download/"&gt;all
set up&lt;/a&gt; -- at the time of writing this I use the Python 2.5.1 Windows installer.
Next you'll need Python bindings for the library, so go and grab a copy of &lt;a href="http://pylucene.osafoundation.org/"&gt;PyLucene&lt;/a&gt;;
to make a long story short I suggest you use the JCC version for Windows which is
downloadable &lt;a href="http://lists.osafoundation.org/pipermail/pylucene-dev/2008-February/002281.html"&gt;here&lt;/a&gt;.
Grab it and install it, no fussing necessary. Finally you'll need the Java VM DLL
in your path, and this depends on which type of JRE you're using:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
If you're using the Java JDK, add the mental equivalent of &lt;tt&gt;C:\Program Files\Java\jdk1.6.0_03\jre\bin\client&lt;/tt&gt; to
your path; 
&lt;li&gt;
If you're using a JRE, add &lt;tt&gt;C:\Program Files\Java\jre1.6.0_03\bin\client&lt;/tt&gt; to
your path.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
(As an aside, you should probably be using &lt;tt&gt;%JAVA_HOME%&lt;/tt&gt; and &lt;tt&gt;%JRE_HOME%&lt;/tt&gt; and
indirecting through those.)
&lt;/p&gt;
&lt;p&gt;
Now you can quickly whip down scripts in Python, like this one which took about two
minutes to write:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;&lt;font color="#008000"&gt;#!/usr/bin/python # # extract.py -- Extracts
term from an &lt;span style="color: #0000ff"&gt;index&lt;/span&gt; # Tomer Gabel, Delver, 2008
# # Usage: extract.py &amp;lt;field_name&amp;gt; &amp;lt;index_url&amp;gt; #&lt;/font&gt; &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; &lt;span style="color: #0000ff"&gt;sys&lt;/span&gt; &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; lucene
from lucene &lt;span style="color: #0000ff"&gt;import&lt;/span&gt; IndexReader, StandardAnalyzer,
FSDirectory &lt;span style="color: #0000ff"&gt;def&lt;/span&gt; usage(): &lt;span style="color: #0000ff"&gt;print&lt;/span&gt; "&lt;span style="color: #8b0000"&gt;Usage:\n&lt;/span&gt;" &lt;span style="color: #0000ff"&gt;print&lt;/span&gt; &lt;span style="color: #0000ff"&gt;sys&lt;/span&gt;.argv[
0 ] + "&lt;span style="color: #8b0000"&gt; &amp;lt;field_name&amp;gt; &amp;lt;index_url&amp;gt;&lt;/span&gt;" &lt;span style="color: #0000ff"&gt;sys&lt;/span&gt;.&lt;span style="color: #0000ff"&gt;exit&lt;/span&gt;(
-1 ) &lt;span style="color: #0000ff"&gt;def&lt;/span&gt; main(): &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (
len( &lt;span style="color: #0000ff"&gt;sys&lt;/span&gt;.argv ) &amp;lt; 3 ): usage() lucene.initVM(
lucene.CLASSPATH ) term = &lt;span style="color: #0000ff"&gt;sys&lt;/span&gt;.argv[ 1 ] index_location
= &lt;span style="color: #0000ff"&gt;sys&lt;/span&gt;.argv[ 2 ] reader = IndexReader.&lt;span style="color: #0000ff"&gt;open&lt;/span&gt;(
FSDirectory.getDirectory( index_location, False ) ) try: for i in range( reader.maxDoc()
): &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( not reader.isDeleted( i ) ): doc = reader.document(
i ) &lt;span style="color: #0000ff"&gt;print&lt;/span&gt; doc.get( term ) finally: reader.&lt;span style="color: #0000ff"&gt;close&lt;/span&gt;()
main()&lt;/pre&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Note the VM initialization line at the beginning -- for the JCC version of PyLucene
this is a must, but even like so using the library is extremely painless. Kudos to
the developers responsible!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=405afab6-978b-4a16-988d-c9e78156b57b" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,405afab6-978b-4a16-988d-c9e78156b57b.aspx</comments>
      <category>Development</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=410b1e3d-c369-4dc1-b020-b0c4005d8b55</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,410b1e3d-c369-4dc1-b020-b0c4005d8b55.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,410b1e3d-c369-4dc1-b020-b0c4005d8b55.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=410b1e3d-c369-4dc1-b020-b0c4005d8b55</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just encountered a really weird issue with Windows Vista, where an external Western
Digital hard drive (an older My Book 250GB) would show up as a mass storage device,
but was not allocated a drive letter and was basically inaccessible. The weirdest
thing is that the USB "Safely remove USB Mass Storage Device" icon did show, except
with no drive letter.
</p>
        <p>
Anyway the way to deal with it was to fire up the Device Manager (Start-&gt;type in
Device Manager) and double-click the external hard drive:
</p>
        <p align="center">
          <a href="http://www.tomergabel.com/content/binary/WindowsLiveWriter/GettingVistatorecognizeyourexternalstora_E068/externalstorage_devmgr_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="378" alt="externalstorage_devmgr" src="http://www.tomergabel.com/content/binary/WindowsLiveWriter/GettingVistatorecognizeyourexternalstora_E068/externalstorage_devmgr_thumb.png" width="390" border="0" />
          </a>
        </p>
        <p>
Then go to the Volumes tab and click on Populate:
</p>
        <p align="center">
          <a href="http://www.tomergabel.com/content/binary/WindowsLiveWriter/GettingVistatorecognizeyourexternalstora_E068/externalstorage_volumes_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="463" alt="externalstorage_volumes" src="http://www.tomergabel.com/content/binary/WindowsLiveWriter/GettingVistatorecognizeyourexternalstora_E068/externalstorage_volumes_thumb.png" width="418" border="0" />
          </a>
        </p>
        <p>
If the volumes show up, you're good to go.
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=410b1e3d-c369-4dc1-b020-b0c4005d8b55" />
      </body>
      <title>Getting Vista to recognize your external storage</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,410b1e3d-c369-4dc1-b020-b0c4005d8b55.aspx</guid>
      <link>http://www.tomergabel.com/GettingVistaToRecognizeYourExternalStorage.aspx</link>
      <pubDate>Thu, 21 Feb 2008 13:55:13 GMT</pubDate>
      <description>&lt;p&gt;
I just encountered a really weird issue with Windows Vista, where an external Western
Digital hard drive (an older My Book 250GB) would show up as a mass storage device,
but was not allocated a drive letter and was basically inaccessible. The weirdest
thing is that the USB "Safely remove USB Mass Storage Device" icon did show, except
with no drive letter.
&lt;/p&gt;
&lt;p&gt;
Anyway the way to deal with it was to fire up the Device Manager (Start-&amp;gt;type in
Device Manager) and double-click the external hard drive:
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.tomergabel.com/content/binary/WindowsLiveWriter/GettingVistatorecognizeyourexternalstora_E068/externalstorage_devmgr_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="378" alt="externalstorage_devmgr" src="http://www.tomergabel.com/content/binary/WindowsLiveWriter/GettingVistatorecognizeyourexternalstora_E068/externalstorage_devmgr_thumb.png" width="390" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Then go to the Volumes tab and click on Populate:
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://www.tomergabel.com/content/binary/WindowsLiveWriter/GettingVistatorecognizeyourexternalstora_E068/externalstorage_volumes_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="463" alt="externalstorage_volumes" src="http://www.tomergabel.com/content/binary/WindowsLiveWriter/GettingVistatorecognizeyourexternalstora_E068/externalstorage_volumes_thumb.png" width="418" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
If the volumes show up, you're good to go.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=410b1e3d-c369-4dc1-b020-b0c4005d8b55" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,410b1e3d-c369-4dc1-b020-b0c4005d8b55.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=73fdb588-c3a6-4cfd-b822-52acbc4ffd3e</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,73fdb588-c3a6-4cfd-b822-52acbc4ffd3e.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,73fdb588-c3a6-4cfd-b822-52acbc4ffd3e.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=73fdb588-c3a6-4cfd-b822-52acbc4ffd3e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Comments are working again. I no longer have the time to muck about with applications
(blogging or otherwise), and so I'm going to move this blog into a hosted blog service.
If you can recommend one that doesn't suck (and preferably supports code highlighting,
user extensions etc.) I'd be delighted to hear :-)
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=73fdb588-c3a6-4cfd-b822-52acbc4ffd3e" />
      </body>
      <title>Another day, another dasBlog issue</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,73fdb588-c3a6-4cfd-b822-52acbc4ffd3e.aspx</guid>
      <link>http://www.tomergabel.com/AnotherDayAnotherDasBlogIssue.aspx</link>
      <pubDate>Mon, 21 Jan 2008 16:39:49 GMT</pubDate>
      <description>&lt;p&gt;
Comments are working again. I no longer have the time to muck about with applications
(blogging or otherwise), and so I'm going to move this blog into a hosted blog service.
If you can recommend one that doesn't suck (and preferably supports code highlighting,
user extensions etc.) I'd be delighted to hear :-)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=73fdb588-c3a6-4cfd-b822-52acbc4ffd3e" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,73fdb588-c3a6-4cfd-b822-52acbc4ffd3e.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=ae4d9ba4-2eee-4e60-ae4f-0c00303d9242</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,ae4d9ba4-2eee-4e60-ae4f-0c00303d9242.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,ae4d9ba4-2eee-4e60-ae4f-0c00303d9242.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ae4d9ba4-2eee-4e60-ae4f-0c00303d9242</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I take pride in being one of the few people I know who actually <em>buy</em> their
media: I have a sizable collection of CDs, DVDs, computer games and software that
I've bought over the years, and I always feel good about having paid the people responsible
for these efforts.
</p>
        <p>
Until recently, that is.
</p>
        <p>
It is commonly said that one of the most obvious traits of Israelis is that they hate
to be screwed, and this is as true for me as it is for everyone else. It seems the
media companies have taken upon themselves to screw me in every conceivable way, and
paying for media is fast becoming an exercise in frustration for me. A most recent
example of this is Valve's not-so-new-and-shiny content delivery network which goes
by the name of <a href="http://www.steampowered.com/v/index.php">Steam</a>. I don't
even know where to begin recounting what's wrong with this thing:
</p>
        <ol>
          <li>
Content delivery speeds are abysmal. I recently downloaded Half Life 2 Episode Two
and got 200K/sec maximum transfer rate (more common rates hovering around 50K/sec)
on a dedicated line with 5Mb downstream. I consistently get 300K+ rates to even the
most busy content delivery servers (Akamai, Microsoft etc.) and it's not like I can
use a download manager to better tune the download to my connection.</li>
          <li>
The download manager is <em>shit</em>. Even ignoring the fact that the only controls
it exposes are "pause" and "resume" doesn't help the fact that the error detection
code is buggy as all hell: the first time I tried downloading the game it got stuck
on 99% without any type of diagnostic or error message, and wouldn't resume. Reading
piles of angry forum threads led me to the conclusion that the downloaded content
files are simply corrupt; deleting and re-downloading the game solved the problem.</li>
          <li>
Terminology is all screwed up: telling the game manager not to automatically download
updates for a certain game will <strong>pause any pending download for that game,
including the game content itself.</strong></li>
          <li>
Although there is no apparent reason for this, <strong>playing a game pauses the downloads
for all other games</strong>. That, at least, has been my observation (Episode Two
was downloading when I started on Episode One, and hasn't progressed a single per
cent when I quit the game).</li>
          <li>
The application itself is completely opaque. At no point does it give any indication
of what it's doing; you can start the client, nothing happens for two minutes until
it finally shows you an "updating Steam client" window. There are no visible clues
when it's attempting to access a server (e.g. when clicking on Show News) or when
a downloaded upgrade is being installed.</li>
          <li>
            <strong>I don't want to connect to a server to play a locally installed, legally bought
game</strong>. That's just unforgivable, even if it didn't mean I sometimes have to
wait for several minutes before the server actually logs me in instead of timing out.</li>
          <li>
It might shock you, but I still play old games. Sometimes <strong>very</strong><em></em>old
games (think <a href="http://www.mobygames.com/game/master-of-magic">Master of Magic</a>).
Will Half Life 2 be playable in five- or ten-year's time when the Steam servers have
long been cold? I doubt it.</li>
        </ol>
        <p>
I know Steam probably works well for a lot of people, but for me it's a god-damned
affront: I'm a paying customer, there's no reason why I should have so little control
over a game that takes up gigabytes on my hard drive. To add insult to injury, the
pirated versions often work better: the pirated version of Half Life 2 itself had
considerably lower loading times, didn't suffer from the audio stuttering issues that
plagued the original, and didn't waste hours of your CPU time on decrypting the game
content once it was finally downloaded. If Valve wants to keep my business, here's
what they should do:
</p>
        <ol>
          <li>
Switch to an open distribution model (HTTP or, preferably, BitTorrent) so I can use
my own software to download their games if I so wish;</li>
          <li>
Get rid of the dependency on Steam for their games. When I click on the HL2E2 icon
I want the game to come up, and <strong>I don't give a rat's ass about Steam</strong>;</li>
          <li>
Move to an asynchronous, transparent update mechanism for their games, preferably
one that allows me to download game updates and install them on my own.</li>
        </ol>
        <p>
With the original versions becoming increasingly irritating and pirated versions becoming
better than the originals (not to mention less costly), does paying for media still
make sense? Remember, that's just <em>one</em> example, I could give a great many
more. 
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=ae4d9ba4-2eee-4e60-ae4f-0c00303d9242" />
      </body>
      <title>Steaming Pile of Crap</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,ae4d9ba4-2eee-4e60-ae4f-0c00303d9242.aspx</guid>
      <link>http://www.tomergabel.com/SteamingPileOfCrap.aspx</link>
      <pubDate>Wed, 16 Jan 2008 10:24:04 GMT</pubDate>
      <description>&lt;p&gt;
I take pride in being one of the few people I know who actually &lt;em&gt;buy&lt;/em&gt; their
media: I have a sizable collection of CDs, DVDs, computer games and software that
I've bought over the years, and I always feel good about having paid the people responsible
for these efforts.
&lt;/p&gt;
&lt;p&gt;
Until recently, that is.
&lt;/p&gt;
&lt;p&gt;
It is commonly said that one of the most obvious traits of Israelis is that they hate
to be screwed, and this is as true for me as it is for everyone else. It seems the
media companies have taken upon themselves to screw me in every conceivable way, and
paying for media is fast becoming an exercise in frustration for me. A most recent
example of this is Valve's not-so-new-and-shiny content delivery network which goes
by the name of &lt;a href="http://www.steampowered.com/v/index.php"&gt;Steam&lt;/a&gt;. I don't
even know where to begin recounting what's wrong with this thing:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Content delivery speeds are abysmal. I recently downloaded Half Life 2 Episode Two
and got 200K/sec maximum transfer rate (more common rates hovering around 50K/sec)
on a dedicated line with 5Mb downstream. I consistently get 300K+ rates to even the
most busy content delivery servers (Akamai, Microsoft etc.) and it's not like I can
use a download manager to better tune the download to my connection.&lt;/li&gt;
&lt;li&gt;
The download manager is &lt;em&gt;shit&lt;/em&gt;. Even ignoring the fact that the only controls
it exposes are "pause" and "resume" doesn't help the fact that the error detection
code is buggy as all hell: the first time I tried downloading the game it got stuck
on 99% without any type of diagnostic or error message, and wouldn't resume. Reading
piles of angry forum threads led me to the conclusion that the downloaded content
files are simply corrupt; deleting and re-downloading the game solved the problem.&lt;/li&gt;
&lt;li&gt;
Terminology is all screwed up: telling the game manager not to automatically download
updates for a certain game will &lt;strong&gt;pause any pending download for that game,
including the game content itself.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
Although there is no apparent reason for this, &lt;strong&gt;playing a game pauses the downloads
for all other games&lt;/strong&gt;. That, at least, has been my observation (Episode Two
was downloading when I started on Episode One, and hasn't progressed a single per
cent when I quit the game).&lt;/li&gt;
&lt;li&gt;
The application itself is completely opaque. At no point does it give any indication
of what it's doing; you can start the client, nothing happens for two minutes until
it finally shows you an "updating Steam client" window. There are no visible clues
when it's attempting to access a server (e.g. when clicking on Show News) or when
a downloaded upgrade is being installed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I don't want to connect to a server to play a locally installed, legally bought
game&lt;/strong&gt;. That's just unforgivable, even if it didn't mean I sometimes have to
wait for several minutes before the server actually logs me in instead of timing out.&lt;/li&gt;
&lt;li&gt;
It might shock you, but I still play old games. Sometimes &lt;strong&gt;very&lt;/strong&gt;&lt;em&gt; &lt;/em&gt;old
games (think &lt;a href="http://www.mobygames.com/game/master-of-magic"&gt;Master of Magic&lt;/a&gt;).
Will Half Life 2 be playable in five- or ten-year's time when the Steam servers have
long been cold? I doubt it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I know Steam probably works well for a lot of people, but for me it's a god-damned
affront: I'm a paying customer, there's no reason why I should have so little control
over a game that takes up gigabytes on my hard drive. To add insult to injury, the
pirated versions often work better: the pirated version of Half Life 2 itself had
considerably lower loading times, didn't suffer from the audio stuttering issues that
plagued the original, and didn't waste hours of your CPU time on decrypting the game
content once it was finally downloaded. If Valve wants to keep my business, here's
what they should do:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Switch to an open distribution model (HTTP or, preferably, BitTorrent) so I can use
my own software to download their games if I so wish;&lt;/li&gt;
&lt;li&gt;
Get rid of the dependency on Steam for their games. When I click on the HL2E2 icon
I want the game to come up, and &lt;strong&gt;I don't give a rat's ass about Steam&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;
Move to an asynchronous, transparent update mechanism for their games, preferably
one that allows me to download game updates and install them on my own.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
With the original versions becoming increasingly irritating and pirated versions becoming
better than the originals (not to mention less costly), does paying for media still
make sense? Remember, that's just &lt;em&gt;one&lt;/em&gt; example, I could give a great many
more. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=ae4d9ba4-2eee-4e60-ae4f-0c00303d9242" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,ae4d9ba4-2eee-4e60-ae4f-0c00303d9242.aspx</comments>
      <category>Gaming</category>
      <category>Personal</category>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=b657662e-31b1-4eb3-bfd4-2557b2ff78b0</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,b657662e-31b1-4eb3-bfd4-2557b2ff78b0.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,b657662e-31b1-4eb3-bfd4-2557b2ff78b0.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b657662e-31b1-4eb3-bfd4-2557b2ff78b0</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The Java implementation for generics is radically different from the C# equivalent;
I won't reiterate issues that have been <a href="http://www.itu.dk/courses/PFOO/F2006/diku-javacsharpgenerics.pdf">thoroughly
discussed before</a>, but suffice to say that Java generics are implemented as a backwards-compatible
compiler extension that works on unmodified VMs.
</p>
        <p>
The implications of this are considerable, and I'd like to present one of them. Lets
fast forward a bit and consider a relatively new language feature in Java (introduced,
I believe, with J2SE 5.0): autoboxing. A thoroughly overdue language feature, autoboxing
allows the seamless transition from regular value types (e.g. the ubiquitous <span class="codetext">int</span>)
to object references (<span class="codetext">Integer</span>); before autoboxing you
couldn't simply add a value to an untyped ArrayList, you had to box (wrap) it in a
reference type:
</p>
        <blockquote>
          <pre>ArrayList list = <span style="color: #0000ff">new</span> ArrayList();
list.add( 3 ); <span style="color: #008000">// Compile-time error</span> list.add( <span style="color: #0000ff">new</span> Integer(
3 ) ); <span style="color: #008000">// OK</span></pre>
        </blockquote>
        <p>
Eventually Java caught up with C# (which introduced autoboxing in 2002), and with
a modern compiler the above code would be valid.
</p>
        <p>
With the introductions out of the way, here's a pop-quiz: what does the following
code print?
</p>
        <blockquote>
          <pre>HashMap&lt;Integer, Integer&gt; map = <span style="color: #0000ff">new</span> HashMap&lt;Integer,
Integer&gt;(); map.put( 4, 2 ); <span style="color: #0000ff">short</span> n = 4; System.out.println(
Integer.toString( map.get( n ) ) );</pre>
        </blockquote>
        <p>
As a long-time C# programmer I was completely befuddled when the code resulted in
a <span class="codetext">NullPointerException</span>. Huh? Exception? What? Why?
</p>
        <p>
It took me a while to figure it out: because Java generics are compile-time constructs
and are not directly supported by the VM, what actually happens is that the underlying
container class accepts regular <span class="codetext">Object</span> instances (reference
types); the compile-time check merely asserts that <span class="codetext">n</span> can
be promoted from <span class="codetext">short</span> to <span class="codetext">int</span>,
whereas the actual object passed to the container class (via autoboxing) is a <span class="codetext">Short</span>!
Since the container doesn't doesn't actually have a runtime generic <em>type</em> per
se, the collection merely looks up the reference object in the map, fails to find
it (I guess the <span class="codetext">Object.hashCode</span> implementation for value
types simply returns the reference value as the hash code as in C#) and returns <span class="codetext">null</span>.
Doh! <b>*slaps forehead*</b></p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=b657662e-31b1-4eb3-bfd4-2557b2ff78b0" />
      </body>
      <title>Java language caveat: autoboxing and generics</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,b657662e-31b1-4eb3-bfd4-2557b2ff78b0.aspx</guid>
      <link>http://www.tomergabel.com/JavaLanguageCaveatAutoboxingAndGenerics.aspx</link>
      <pubDate>Sun, 06 Jan 2008 17:15:54 GMT</pubDate>
      <description>&lt;p&gt;
The Java implementation for generics is radically different from the C# equivalent;
I won't reiterate issues that have been &lt;a href="http://www.itu.dk/courses/PFOO/F2006/diku-javacsharpgenerics.pdf"&gt;thoroughly
discussed before&lt;/a&gt;, but suffice to say that Java generics are implemented as a backwards-compatible
compiler extension that works on unmodified VMs.
&lt;/p&gt;
&lt;p&gt;
The implications of this are considerable, and I'd like to present one of them. Lets
fast forward a bit and consider a relatively new language feature in Java (introduced,
I believe, with J2SE 5.0): autoboxing. A thoroughly overdue language feature, autoboxing
allows the seamless transition from regular value types (e.g. the ubiquitous &lt;span class="codetext"&gt;int&lt;/span&gt;)
to object references (&lt;span class="codetext"&gt;Integer&lt;/span&gt;); before autoboxing you
couldn't simply add a value to an untyped ArrayList, you had to box (wrap) it in a
reference type:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;ArrayList list = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArrayList();
list.add( 3 ); &lt;span style="color: #008000"&gt;// Compile-time error&lt;/span&gt; list.add( &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Integer(
3 ) ); &lt;span style="color: #008000"&gt;// OK&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Eventually Java caught up with C# (which introduced autoboxing in 2002), and with
a modern compiler the above code would be valid.
&lt;/p&gt;
&lt;p&gt;
With the introductions out of the way, here's a pop-quiz: what does the following
code print?
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;HashMap&amp;lt;Integer, Integer&amp;gt; map = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; HashMap&amp;lt;Integer,
Integer&amp;gt;(); map.put( 4, 2 ); &lt;span style="color: #0000ff"&gt;short&lt;/span&gt; n = 4; System.out.println(
Integer.toString( map.get( n ) ) );&lt;/pre&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
As a long-time C# programmer I was completely befuddled when the code resulted in
a &lt;span class="codetext"&gt;NullPointerException&lt;/span&gt;. Huh? Exception? What? Why?
&lt;/p&gt;
&lt;p&gt;
It took me a while to figure it out: because Java generics are compile-time constructs
and are not directly supported by the VM, what actually happens is that the underlying
container class accepts regular &lt;span class="codetext"&gt;Object&lt;/span&gt; instances (reference
types); the compile-time check merely asserts that &lt;span class="codetext"&gt;n&lt;/span&gt; can
be promoted from &lt;span class="codetext"&gt;short&lt;/span&gt; to &lt;span class="codetext"&gt;int&lt;/span&gt;,
whereas the actual object passed to the container class (via autoboxing) is a &lt;span class="codetext"&gt;Short&lt;/span&gt;!
Since the container doesn't doesn't actually have a runtime generic &lt;em&gt;type&lt;/em&gt; per
se, the collection merely looks up the reference object in the map, fails to find
it (I guess the &lt;span class="codetext"&gt;Object.hashCode&lt;/span&gt; implementation for value
types simply returns the reference value as the hash code as in C#) and returns &lt;span class="codetext"&gt;null&lt;/span&gt;.
Doh! &lt;b&gt;*slaps forehead*&lt;/b&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=b657662e-31b1-4eb3-bfd4-2557b2ff78b0" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,b657662e-31b1-4eb3-bfd4-2557b2ff78b0.aspx</comments>
      <category>Development</category>
      <category>Development/Java</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=b66898eb-7c2d-41c2-9ed5-3dab91422eaf</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,b66898eb-7c2d-41c2-9ed5-3dab91422eaf.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,b66898eb-7c2d-41c2-9ed5-3dab91422eaf.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b66898eb-7c2d-41c2-9ed5-3dab91422eaf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A few ReSharper tips for your viewing pleasure (according to rumors it can extend
your penis too!):
</p>
        <p>
          <strong>Alt+Shift+L locates the current file in the Solution Explorer </strong>(at
least with the IDEA-style keyboard bindings we all know and love). This is particularly
useful for extremely file-heavy solutions where you often want to Get Latest (or Undo
Check Out) the current file.
</p>
        <p>
          <u>Note</u>: you can get this behavior automatically through Tools-&gt;Options-&gt;Projects
and Solutions-&gt;Track Active Item in Solution Explorer, but in my opinion it's annoying
as hell.
</p>
        <p>
          <strong>Easier unit testing</strong>: you can bind shortcuts to run or debug unit
tests by context. Context means that the behavior is exactly as expected: using the
shortcut with the cursor on a test will run just that test, using it on a class will
run it as a whole fixture, and using it on a directory in the Solution Explorer will
run all tests that reside in that directory. This is easily accomplished by going
to the Tools-&gt;Options-&gt;Keyboard menu and binding:
</p>
        <ul>
          <li>
            <strong>ReSharper.ReSharper_UnitTest_ContextDebug</strong> to whichever shortcut you
wish for debugging purposes (my favourite is <strong>Ctrl+T</strong>, <strong>Ctrl+D</strong>) 
</li>
          <li>
            <strong>ReSharper.ReSharper_UnitTest_ContextRun</strong> to whichever shortcut you'd
like to use in order to just run tests (my favourite is <strong>Ctrl+T</strong>, <strong>Ctrl+T</strong>)</li>
        </ul>
        <p>
          <u>Note</u>: You can get the same behavior with the ubiquitous <a href="http://www.testdriven.net/">TestDriven.net</a>,
but it makes no sense to me to pay twice for the same functionality.
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=b66898eb-7c2d-41c2-9ed5-3dab91422eaf" />
      </body>
      <title>Improve Your Life With ReSharper</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,b66898eb-7c2d-41c2-9ed5-3dab91422eaf.aspx</guid>
      <link>http://www.tomergabel.com/ImproveYourLifeWithReSharper.aspx</link>
      <pubDate>Wed, 02 Jan 2008 16:07:15 GMT</pubDate>
      <description>&lt;p&gt;
A few ReSharper tips for your viewing pleasure (according to rumors it can extend
your penis too!):
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Alt+Shift+L locates the current file in the Solution Explorer &lt;/strong&gt;(at
least with the IDEA-style keyboard bindings we all know and love). This is particularly
useful for extremely file-heavy solutions where you often want to Get Latest (or Undo
Check Out) the current file.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;Note&lt;/u&gt;: you can get this behavior automatically through Tools-&amp;gt;Options-&amp;gt;Projects
and Solutions-&amp;gt;Track Active Item in Solution Explorer, but in my opinion it's annoying
as hell.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Easier unit testing&lt;/strong&gt;: you can bind shortcuts to run or debug unit
tests by context. Context means that the behavior is exactly as expected: using the
shortcut with the cursor on a test will run just that test, using it on a class will
run it as a whole fixture, and using it on a directory in the Solution Explorer will
run all tests that reside in that directory. This is easily accomplished by going
to the Tools-&amp;gt;Options-&amp;gt;Keyboard menu and binding:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ReSharper.ReSharper_UnitTest_ContextDebug&lt;/strong&gt; to whichever shortcut you
wish for debugging purposes (my favourite is &lt;strong&gt;Ctrl+T&lt;/strong&gt;, &lt;strong&gt;Ctrl+D&lt;/strong&gt;) 
&lt;li&gt;
&lt;strong&gt;ReSharper.ReSharper_UnitTest_ContextRun&lt;/strong&gt; to whichever shortcut you'd
like to use in order to just run tests (my favourite is &lt;strong&gt;Ctrl+T&lt;/strong&gt;, &lt;strong&gt;Ctrl+T&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;u&gt;Note&lt;/u&gt;: You can get the same behavior with the ubiquitous &lt;a href="http://www.testdriven.net/"&gt;TestDriven.net&lt;/a&gt;,
but it makes no sense to me to pay twice for the same functionality.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=b66898eb-7c2d-41c2-9ed5-3dab91422eaf" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,b66898eb-7c2d-41c2-9ed5-3dab91422eaf.aspx</comments>
      <category>Development</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=d44c989f-529c-43d7-be8d-175c2d244ef7</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,d44c989f-529c-43d7-be8d-175c2d244ef7.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,d44c989f-529c-43d7-be8d-175c2d244ef7.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d44c989f-529c-43d7-be8d-175c2d244ef7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Bits and pieces:
</p>
        <ul>
          <li>
Apparently everything is closed on Christmas day, which I suppose is obvious to you
unless you live in a predominantly Jewish or Islamic country in which Christmas isn't
really celebrated.</li>
          <li>
            <a href="http://www.montypythonsspamalot.com/">Spamalot</a> is brilliant.</li>
          <li>
Manchester is a really cool city with terrific pubs and shopping districts.</li>
          <li>
The dominant ethnic group in London is not, in fact, cockney brits, but rather Indians
(i.e. immigrants from India).</li>
          <li>
I'll post some pictures as soon as I upload them to Flickr.</li>
        </ul>
        <p>
Bottom line: As promised. Would buy again.
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=d44c989f-529c-43d7-be8d-175c2d244ef7" />
      </body>
      <title>Back from the UK</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,d44c989f-529c-43d7-be8d-175c2d244ef7.aspx</guid>
      <link>http://www.tomergabel.com/BackFromTheUK.aspx</link>
      <pubDate>Wed, 02 Jan 2008 16:06:56 GMT</pubDate>
      <description>&lt;p&gt;
Bits and pieces:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Apparently everything is closed on Christmas day, which I suppose is obvious to you
unless you live in a predominantly Jewish or Islamic country in which Christmas isn't
really celebrated.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.montypythonsspamalot.com/"&gt;Spamalot&lt;/a&gt; is brilliant.&lt;/li&gt;
&lt;li&gt;
Manchester is a really cool city with terrific pubs and shopping districts.&lt;/li&gt;
&lt;li&gt;
The dominant ethnic group in London is not, in fact, cockney brits, but rather Indians
(i.e. immigrants from India).&lt;/li&gt;
&lt;li&gt;
I'll post some pictures as soon as I upload them to Flickr.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Bottom line: As promised. Would buy again.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=d44c989f-529c-43d7-be8d-175c2d244ef7" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,d44c989f-529c-43d7-be8d-175c2d244ef7.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=7a46422c-9c5e-4ea8-ab54-3287f1536f81</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,7a46422c-9c5e-4ea8-ab54-3287f1536f81.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,7a46422c-9c5e-4ea8-ab54-3287f1536f81.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7a46422c-9c5e-4ea8-ab54-3287f1536f81</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you use <a href="http://www.executor.dk">Executor</a> (a freeware launcher utility),
check <a href="http://executor.21.forumer.com/viewtopic.php?p=682&amp;sid=1e21566ba7927d2ffd7e6300c4a5c654">this</a> out.
There's even a <a href="http://nighted.cjb.net/Executor.avi">video</a> showing it
in action!
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=7a46422c-9c5e-4ea8-ab54-3287f1536f81" />
      </body>
      <title>PicasaWebDownloader with Executor</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,7a46422c-9c5e-4ea8-ab54-3287f1536f81.aspx</guid>
      <link>http://www.tomergabel.com/PicasaWebDownloaderWithExecutor.aspx</link>
      <pubDate>Mon, 24 Dec 2007 10:39:40 GMT</pubDate>
      <description>&lt;p&gt;
If you use &lt;a href="http://www.executor.dk"&gt;Executor&lt;/a&gt; (a freeware launcher utility),
check &lt;a href="http://executor.21.forumer.com/viewtopic.php?p=682&amp;amp;sid=1e21566ba7927d2ffd7e6300c4a5c654"&gt;this&lt;/a&gt; out.
There's even a &lt;a href="http://nighted.cjb.net/Executor.avi"&gt;video&lt;/a&gt; showing it
in action!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=7a46422c-9c5e-4ea8-ab54-3287f1536f81" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,7a46422c-9c5e-4ea8-ab54-3287f1536f81.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=d71c2e0d-f05f-4592-aca5-a1a90567d2cf</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,d71c2e0d-f05f-4592-aca5-a1a90567d2cf.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,d71c2e0d-f05f-4592-aca5-a1a90567d2cf.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d71c2e0d-f05f-4592-aca5-a1a90567d2cf</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm flying to England tomorrow for a week's vacation, which will hopefully give me
a bunch of ideas what to write about (it's quite difficult for me not to focus on
my current area of work, which I doubt would be of much interest to readers...)
</p>
        <p>
If you happen to be in London or Manchester some time within the next week, get in
touch and maybe we'll get together for a beer :-)
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=d71c2e0d-f05f-4592-aca5-a1a90567d2cf" />
      </body>
      <title>Off to England</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,d71c2e0d-f05f-4592-aca5-a1a90567d2cf.aspx</guid>
      <link>http://www.tomergabel.com/OffToEngland.aspx</link>
      <pubDate>Sun, 23 Dec 2007 09:30:05 GMT</pubDate>
      <description>&lt;p&gt;
I'm flying to England tomorrow for a week's vacation, which will hopefully give me
a bunch of ideas what to write about (it's quite difficult for me not to focus on
my current area of work, which I doubt would be of much interest to readers...)
&lt;/p&gt;
&lt;p&gt;
If you happen to be in London or Manchester some time within the next week, get in
touch and maybe we'll get together for a beer :-)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=d71c2e0d-f05f-4592-aca5-a1a90567d2cf" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,d71c2e0d-f05f-4592-aca5-a1a90567d2cf.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=f204d6c8-6299-46c2-afc9-390ab6685e4e</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,f204d6c8-6299-46c2-afc9-390ab6685e4e.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,f204d6c8-6299-46c2-afc9-390ab6685e4e.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f204d6c8-6299-46c2-afc9-390ab6685e4e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Quick link: <a href="http://www.tomergabel.com/content/binary/LightweightWebServer.zip">download</a></p>
        <p>
In my work at <a href="http://www.semingo.com">Semingo</a> I often encounter situations
where it's impossible to unit- or integration-test a component without accessing the
web. This happens in one of two cases: either the component itself is web-centric
and makes no sense in any other context, or I simply require an actual web server
to test the components against.
</p>
        <p>
Since I firmly believe that tests should be self-contained and rely on external resources
as little as possible, a belief which also extends to integration tests, I wrote a
quick-and-dirty pluggable web server based on the .NET <span class="codetext">HttpListener</span> class.
The unit-tests for the class itself serve best to demonstrate how it's used; for instance,
the built-in <span class="codetext">HttpNotFoundHandler</span> returns 404 on all
requests:
</p>
        <pre>    [Test]
    [ExpectedException( <span style="color: #0000ff">typeof</span>(
WebException ) )] [Description( "<span style="color: #8b0000">Instantiates an HTTP
server that returns 404 on all " +<br />
"</span><span style="color: #8b0000">requests, and validates that behavior.</span>"
)] <span style="color: #0000ff">public</span><span style="color: #0000ff">void</span> VerifyThatHttpNotFoundHandlerBehavesAsExpected()
{ <span style="color: #0000ff">using</span> ( LightweightWebServer webserver = 
<br /><span style="color: #0000ff"> new</span> LightweightWebServer( LightweightWebServer.HttpNotFoundHandler
) ) { WebRequest.Create( webserver.Uri ).GetResponse().Close(); } }</pre>
The web server randomizes a listener port (in the range of 40000-41000, although that
is easily configurable) and exposes its own URI via the <span class="codetext">LightweightWebServer.Uri</span> property.
By implementing <span class="codetext">IDisposable</span> the scope in which the server
operates is easily defined. Exceptions thrown from within the handler are forwarded
to the caller when the server is disposed:<pre></pre><pre>    [Test]
    [ExpectedException( <span style="color: #0000ff">typeof</span>(
AssertionException ) )] <span style="color: #0000ff">public</span><span style="color: #0000ff">void</span> VerifyThatExceptionsAreForwardedToTestMethod()
{ <span style="color: #0000ff">using</span> ( LightweightWebServer webserver = <span style="color: #0000ff">new</span> LightweightWebServer( <span style="color: #0000ff">delegate</span> {
Assert.Fail( "<span style="color: #8b0000">Works!</span>" ); } ) ) { WebRequest.Create(
webserver.Uri ).GetResponse().Close(); } }</pre>
The handlers themselves receive an <span class="codetext">HttpListenerContext</span>,
from which both request and response objects are accessible. This makes anything from
asserting on query parameters to serving content trivial:<pre></pre><pre>    [Test]
    <span style="color: #0000ff">public</span><span style="color: #0000ff">void</span> VerifyThatContentHandlerReturnsValidContent()
{ <span style="color: #0000ff">string</span> content = "<span style="color: #8b0000">The
quick brown fox jumps over the lazy dog</span>"; <span style="color: #0000ff">using</span> (
LightweightWebServer webserver = <span style="color: #0000ff">new</span> LightweightWebServer( <span style="color: #0000ff">delegate</span>(
HttpListenerContext context ) { <span style="color: #0000ff">using</span> ( StreamWriter
sw = <span style="color: #0000ff">new</span> StreamWriter( context.Response.OutputStream
) ) sw.Write( content ); } ) ) { <span style="color: #0000ff">string</span> returned; <span style="color: #0000ff">using</span> (
WebResponse resp = WebRequest.Create( webserver.Uri ).GetResponse() ) returned = <span style="color: #0000ff">new</span> StreamReader(
resp.GetResponseStream() ).ReadToEnd(); Assert.AreEqual( content, returned ); } }</pre><p>
We use this class internally to mock anything from web services to proxy servers.
You can grab the class sources <a href="http://www.tomergabel.com/content/binary/LightweightWebServer.zip">here</a> --
it's distributed under a Creative Commons Public Domain license, so you can basically
do anything you want with it. If it's useful to anyone, I'd love to hear comments
and suggestions!
</p><img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=f204d6c8-6299-46c2-afc9-390ab6685e4e" /></body>
      <title>Lightweight web server for testing purposes</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,f204d6c8-6299-46c2-afc9-390ab6685e4e.aspx</guid>
      <link>http://www.tomergabel.com/LightweightWebServerForTestingPurposes.aspx</link>
      <pubDate>Sun, 09 Dec 2007 21:18:06 GMT</pubDate>
      <description>&lt;p&gt;
Quick link: &lt;a href="http://www.tomergabel.com/content/binary/LightweightWebServer.zip"&gt;download&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In my work at &lt;a href="http://www.semingo.com"&gt;Semingo&lt;/a&gt; I often encounter situations
where it's impossible to unit- or integration-test a component without accessing the
web. This happens in one of two cases: either the component itself is web-centric
and makes no sense in any other context, or I simply require an actual web server
to test the components against.
&lt;/p&gt;
&lt;p&gt;
Since I firmly believe that tests should be self-contained and rely on external resources
as little as possible, a belief which also extends to integration tests, I wrote a
quick-and-dirty pluggable web server based on the .NET &lt;span class="codetext"&gt;HttpListener&lt;/span&gt; class.
The unit-tests for the class itself serve best to demonstrate how it's used; for instance,
the built-in &lt;span class="codetext"&gt;HttpNotFoundHandler&lt;/span&gt; returns 404 on all
requests:
&lt;/p&gt;
&lt;pre&gt;    [Test]
    [ExpectedException( &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(
WebException ) )] [Description( "&lt;span style="color: #8b0000"&gt;Instantiates an HTTP
server that returns 404 on all " +&lt;br&gt;
"&lt;/span&gt;&lt;span style="color: #8b0000"&gt;requests, and validates that behavior.&lt;/span&gt;"
)] &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; VerifyThatHttpNotFoundHandlerBehavesAsExpected()
{ &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; ( LightweightWebServer webserver = 
&lt;br&gt;
&lt;span style="color: #0000ff"&gt; new&lt;/span&gt; LightweightWebServer( LightweightWebServer.HttpNotFoundHandler
) ) { WebRequest.Create( webserver.Uri ).GetResponse().Close(); } }&lt;/pre&gt;
The web server randomizes a listener port (in the range of 40000-41000, although that
is easily configurable) and exposes its own URI via the &lt;span class="codetext"&gt;LightweightWebServer.Uri&lt;/span&gt; property.
By implementing &lt;span class="codetext"&gt;IDisposable&lt;/span&gt; the scope in which the server
operates is easily defined. Exceptions thrown from within the handler are forwarded
to the caller when the server is disposed:&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;    [Test]
    [ExpectedException( &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(
AssertionException ) )] &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; VerifyThatExceptionsAreForwardedToTestMethod()
{ &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; ( LightweightWebServer webserver = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; LightweightWebServer( &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; {
Assert.Fail( "&lt;span style="color: #8b0000"&gt;Works!&lt;/span&gt;" ); } ) ) { WebRequest.Create(
webserver.Uri ).GetResponse().Close(); } }&lt;/pre&gt;
The handlers themselves receive an &lt;span class="codetext"&gt;HttpListenerContext&lt;/span&gt;,
from which both request and response objects are accessible. This makes anything from
asserting on query parameters to serving content trivial:&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;    [Test]
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; VerifyThatContentHandlerReturnsValidContent()
{ &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; content = "&lt;span style="color: #8b0000"&gt;The
quick brown fox jumps over the lazy dog&lt;/span&gt;"; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (
LightweightWebServer webserver = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; LightweightWebServer( &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt;(
HttpListenerContext context ) { &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; ( StreamWriter
sw = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StreamWriter( context.Response.OutputStream
) ) sw.Write( content ); } ) ) { &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; returned; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (
WebResponse resp = WebRequest.Create( webserver.Uri ).GetResponse() ) returned = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StreamReader(
resp.GetResponseStream() ).ReadToEnd(); Assert.AreEqual( content, returned ); } }&lt;/pre&gt;
&lt;p&gt;
We use this class internally to mock anything from web services to proxy servers.
You can grab the class sources &lt;a href="http://www.tomergabel.com/content/binary/LightweightWebServer.zip"&gt;here&lt;/a&gt; --
it's distributed under a Creative Commons Public Domain license, so you can basically
do anything you want with it. If it's useful to anyone, I'd love to hear comments
and suggestions!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=f204d6c8-6299-46c2-afc9-390ab6685e4e" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,f204d6c8-6299-46c2-afc9-390ab6685e4e.aspx</comments>
      <category>Development</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=20b89474-642d-4516-bd6f-5ea5f0930450</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,20b89474-642d-4516-bd6f-5ea5f0930450.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,20b89474-642d-4516-bd6f-5ea5f0930450.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=20b89474-642d-4516-bd6f-5ea5f0930450</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well the title is actually a semi-private joke, but the point of the post is to draw
attention to long-time friend, coworker and Mentor cofounder <a href="http://blog.shlomoid.com">Shlomo
Priymak's new blog</a>. Shlomo is <a href="http://www.semingo.com">our</a> sharp-but-misanthropic
DBA, precisely the kind of person you'd want to pay attention to for hardcore MySQL
(and other) problems and solutions.
</p>
        <p>
Speaking of <a href="http://www.semingo.com/">Semingo</a>, we're gearing up to a relatively
close alpha launch and have a new corporate website. Now would still be a good time
to hop on the bandwagon and join a fast-growing company made up entirely of crazy-ass
people out to do the implausible. If this sounds right to you, <a href="mailto:tomer@tomergabel.com">get
in touch</a>! (keywords: web 2.0 startup search .net java developers qa algorithms
nlp and others)
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=20b89474-642d-4516-bd6f-5ea5f0930450" />
      </body>
      <title>In the future, everything will be on the Internet</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,20b89474-642d-4516-bd6f-5ea5f0930450.aspx</guid>
      <link>http://www.tomergabel.com/InTheFutureEverythingWillBeOnTheInternet.aspx</link>
      <pubDate>Sun, 09 Dec 2007 14:17:27 GMT</pubDate>
      <description>&lt;p&gt;
Well the title is actually a semi-private joke, but the point of the post is to draw
attention to long-time friend, coworker and Mentor cofounder &lt;a href="http://blog.shlomoid.com"&gt;Shlomo
Priymak's new blog&lt;/a&gt;. Shlomo is &lt;a href="http://www.semingo.com"&gt;our&lt;/a&gt; sharp-but-misanthropic
DBA, precisely the kind of person you'd want to pay attention to for hardcore MySQL
(and other) problems and solutions.
&lt;/p&gt;
&lt;p&gt;
Speaking of &lt;a href="http://www.semingo.com/"&gt;Semingo&lt;/a&gt;, we're gearing up to a relatively
close alpha launch and have a new corporate website. Now would still be a good time
to hop on the bandwagon and join a fast-growing company made up entirely of crazy-ass
people out to do the implausible. If this sounds right to you, &lt;a href="mailto:tomer@tomergabel.com"&gt;get
in touch&lt;/a&gt;! (keywords: web 2.0 startup search .net java developers qa algorithms
nlp and others)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=20b89474-642d-4516-bd6f-5ea5f0930450" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,20b89474-642d-4516-bd6f-5ea5f0930450.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=c97023aa-9bb4-4e0d-b7ad-5e40e2764396</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,c97023aa-9bb4-4e0d-b7ad-5e40e2764396.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,c97023aa-9bb4-4e0d-b7ad-5e40e2764396.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=c97023aa-9bb4-4e0d-b7ad-5e40e2764396</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
With the web host giving me trouble, just to add insult to injury the comment captcha
generator stopped working. I don't know how long it's been this way and I sincerely
hope it's a new problem; at any rate I disabled captchas and added Akismet spam filtering
in the hopes that it'll keep everyone comfortable and the blog clear of spam...
</p>
        <p>
I'm getting a little tired of all these issues with dasBlog (I still haven't been
successful in configuring it on the new webhost) and am seriously considering replacing
it; I'm basically really happy with the application, but configuration and installation
issues are taking a little too much of my time. If anyone has an easy-to-use platform
in mind, preferably one with a straightforward migration path, I'd appreciate the
suggestion.
</p>
        <img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=c97023aa-9bb4-4e0d-b7ad-5e40e2764396" />
      </body>
      <title>Blogging woes</title>
      <guid isPermaLink="false">http://www.tomergabel.com/PermaLink,guid,c97023aa-9bb4-4e0d-b7ad-5e40e2764396.aspx</guid>
      <link>http://www.tomergabel.com/BloggingWoes.aspx</link>
      <pubDate>Thu, 06 Dec 2007 09:17:16 GMT</pubDate>
      <description>&lt;p&gt;
With the web host giving me trouble, just to add insult to injury the comment captcha
generator stopped working. I don't know how long it's been this way and I sincerely
hope it's a new problem; at any rate I disabled captchas and added Akismet spam filtering
in the hopes that it'll keep everyone comfortable and the blog clear of spam...
&lt;/p&gt;
&lt;p&gt;
I'm getting a little tired of all these issues with dasBlog (I still haven't been
successful in configuring it on the new webhost) and am seriously considering replacing
it; I'm basically really happy with the application, but configuration and installation
issues are taking a little too much of my time. If anyone has an easy-to-use platform
in mind, preferably one with a straightforward migration path, I'd appreciate the
suggestion.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.tomergabel.com/aggbug.ashx?id=c97023aa-9bb4-4e0d-b7ad-5e40e2764396" /&gt;</description>
      <comments>http://www.tomergabel.com/CommentView,guid,c97023aa-9bb4-4e0d-b7ad-5e40e2764396.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://www.tomergabel.com/Trackback.aspx?guid=08ee53ca-6d1a-4406-a7c4-579f6414db2a</trackback:ping>
      <pingback:server>http://www.tomergabel.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.tomergabel.com/PermaLink,guid,08ee53ca-6d1a-4406-a7c4-579f6414db2a.aspx</pingback:target>
      <dc:creator>Tomer Gabel</dc:creator>
      <wfw:comment>http://www.tomergabel.com/CommentView,guid,08ee53ca-6d1a-4406-a7c4-579f6414db2a.aspx</wfw:comment>
      <wfw:commentRss>http://www.tomergabel.com/SyndicationService.asmx/GetEntryCommentsRss?guid=08ee53ca-6d1a-4406-a7c4-579f6414db2a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So you want a web project, a build system and a reasonable IDE to take care of the
annoying details for you, right? The good news are that it's actually quite possible
and there're many ways to do this. The bad news are that it's nigh impossible to get
them to play along if you don't already know how to do that. It took me days to find
a solution that finally seems to work, and I'd like to share it with you. I'm probably
missing a few important details or did something really really stupid along the way
(I'd appreciate comments!), but this process does seem to work. <strong>I'm not going
into essentials of Java-based web development here</strong> -