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

<channel>
	<title>stacyprowell.com &#187; Nuisances</title>
	<atom:link href="http://stacyprowell.com/blog/category/nuisances/feed/" rel="self" type="application/rss+xml" />
	<link>http://stacyprowell.com/blog</link>
	<description>Ugh, Stacy's talking again...</description>
	<lastBuildDate>Tue, 27 Apr 2010 20:09:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>And Another Thing That Bugs Me About Java&#8230;</title>
		<link>http://stacyprowell.com/blog/2009/09/30/and-another-thing-that-bugs-me-about-java/</link>
		<comments>http://stacyprowell.com/blog/2009/09/30/and-another-thing-that-bugs-me-about-java/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 03:05:15 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[const]]></category>
		<category><![CDATA[immutable]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=415</guid>
		<description><![CDATA[Just a short note on an item that bugs me about Java.  In C++, I tend to use exactly three kinds of method parameters.

A const reference.  I don&#8217;t want to copy it, but I promise not to modify it, either.
A reference.  I might modify it.
A copy.  I might modify my local copy, but not the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-116" title="java_logo_2" src="http://stacyprowell.com/blog/wp-content/uploads/2008/07/java_logo_2-150x150.png" alt="java_logo_2" width="120" height="120" />Just a short note on an item that bugs me about Java.  In C++, I tend to use exactly three kinds of method parameters.</p>
<ul>
<li>A const reference.  I don&#8217;t want to copy it, but I promise not to modify it, either.</li>
<li>A reference.  I might modify it.</li>
<li>A copy.  I might modify my local copy, but not the original.  I&#8217;m getting a copy, after all.</li>
</ul>
<p>Easy peasy in C++.  In Java?  Uh, I pass all objects by reference.<span id="more-415"></span> The interface says nothing about modification.  Pass me a Map and maybe I&#8217;ll modify it, maybe not.  You don&#8217;t know, and you can&#8217;t enforce it.  Unless you pass me a Collections.unmodifiableMap().  Then my code might break!  There might be some odd little case left over where I do modify it, in spite of documentation comments to the contrary.  C++?  I declare it to be a const reference, and now the compiler will prevent me from modifying it.  I like that quite a bit.</p>
<p>I also like const methods, and you really can&#8217;t have const without const methods.  The Java way it to throw exceptions.  I&#8217;d rather have the compiler tell me something at compile-time than have the runtime system fail at runtime.  But I&#8217;m weird, I suppose.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F09%2F30%2Fand-another-thing-that-bugs-me-about-java%2F&amp;linkname=And%20Another%20Thing%20That%20Bugs%20Me%20About%20Java%26%238230%3B"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/09/30/and-another-thing-that-bugs-me-about-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good Idea / Bad Idea</title>
		<link>http://stacyprowell.com/blog/2009/08/21/good-idea-bad-idea/</link>
		<comments>http://stacyprowell.com/blog/2009/08/21/good-idea-bad-idea/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 17:52:04 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=350</guid>
		<description><![CDATA[I spend my time (recently) writing a mishmash of Python, C++, and Java.  It&#8217;s interesting to switch back and forth.
What&#8217;s a good idea and what&#8217;s a bad (or dangerous) idea in computer language design?  We&#8217;ve got a lot of candidates, and a lot of opinions.
I&#8217;ll list a few here, along with a few [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_235" class="wp-caption alignright" style="width: 160px"><img class="size-full wp-image-235" title="programming" src="http://stacyprowell.com/blog/wp-content/uploads/2009/05/1ebeb1d2f212046a4e47fcd414dbad9b1-150x150.jpg" alt="Programming" width="150" height="150" /><p class="wp-caption-text">Programming</p></div>
<p>I spend my time (recently) writing a mishmash of Python, C++, and Java.  It&#8217;s interesting to switch back and forth.</p>
<p>What&#8217;s a good idea and what&#8217;s a bad (or dangerous) idea in computer language design?  We&#8217;ve got a lot of candidates, and a lot of opinions.</p>
<p>I&#8217;ll list a few here, along with a few places where they show up.<span id="more-350"></span> I&#8217;m not saying C macros are the same as, or even similar to, Lisp macros.  Just trying to clarify the spectrum.</p>
<p>I&#8217;ve heard someone, at some point, say each one of the items below is a good idea / bad idea.  Dangerous in the hands of a novice?  Yes, but then so is any computer with a network connection.</p>
<ul>
<li>Preprocessors (C, C++)</li>
<li>Macros (C, Lisp)</li>
<li>Multiple Inheritance (C++, Smalltalk)</li>
<li>Operator Overloading (C++, Python)</li>
<li>Closures (Lisp, Haskell)</li>
<li>Generics (Java, Ada)</li>
<li>Template Metaprogramming (C++)</li>
<li>Casts (C, C++)</li>
<li>Strong or Weak Typing (Scala, Lisp, Python, ML)</li>
<li>Fixed-Point Math (C# and COBOL)</li>
<li>Fixed Integer Types vs. &#8220;Numbers&#8221; (C, Lisp, Python)</li>
<li>Garbage Collection (Java, Lisp, ML)</li>
<li>Manual Allocation / Deallocation (C, C++)</li>
<li>Everything is an Object / Some Things are Primitives (Smalltalk, Java)</li>
<li>Auto-(Un)Boxing (Java, C#)</li>
<li>Indentation is Significant (Python)</li>
<li>First-Order Functions (ML, Lisp)</li>
<li>Lambdas (ML, Lisp, Python)</li>
<li>Type Erasure (Java)</li>
</ul>
<p>Did I leave out your favorite / most reviled language feature?  Complain below.  I included type erasure at the end of the list.  Does <em>anyone</em> think this was a good idea for Java???</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F08%2F21%2Fgood-idea-bad-idea%2F&amp;linkname=Good%20Idea%20%2F%20Bad%20Idea"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/08/21/good-idea-bad-idea/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Many Tiny Screws</title>
		<link>http://stacyprowell.com/blog/2009/05/10/many-tiny-screws/</link>
		<comments>http://stacyprowell.com/blog/2009/05/10/many-tiny-screws/#comments</comments>
		<pubDate>Sun, 10 May 2009 06:56:06 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=207</guid>
		<description><![CDATA[The hard drive in my Mac has failed.  Again.  For those of you keeping track, this is the third time.
It&#8217;s a hassle, but it is usually okay, since:

TimeMachine is always there, making backups and keeping them up to date.
Apple support is wonderful.  We can&#8217;t send back the hard drive, but they let me open the [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_211" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-211" title="3d_apple_logo_102" src="http://stacyprowell.com/blog/wp-content/uploads/2009/05/3d_apple_logo_102-150x150.jpg" alt="Apple" width="150" height="150" /><p class="wp-caption-text">Apple</p></div>
<p>The hard drive in my Mac has failed.  Again.  For those of you keeping track, this is the third time.</p>
<p>It&#8217;s a hassle, but it is usually okay, since:</p>
<ul>
<li>TimeMachine is always there, making backups and keeping them up to date.</li>
<li>Apple support is wonderful.  We can&#8217;t send back the hard drive, but they let me open the case and remove the drive without voiding the warranty.</li>
</ul>
<p>Sadly it is also a pain because:</p>
<ul>
<li>The MacBook Pro is some of the most poorly designed hardware I have ever encountered for maintenance.</li>
</ul>
<p><span id="more-207"></span>It&#8217;s not just that it is a laptop.  Disassemble a MacBook Pro and then disassemble a ThinkPad and tell me what you think.  There is a clear difference.  I won&#8217;t speculate as to why things are the way they are&#8230; but they are that way.</p>
<p>Apple listened, and has made it much easier to replace the hard drive in the new MacBook Pro.  They&#8217;ve also made it much harder to replace the battery.  I understand somewhat the reasons for the latter&#8230; but still.</p>
<h1>The Process</h1>
<p>Here&#8217;s how you replace the drive in the MacBook Pro model I own.</p>
<ol>
<li>Four tiny screws on each side of the case.  Phillips.</li>
<li>Two tiny screws in back.  Phillips.</li>
<li>Four long screws on the bottom.  Phillips.</li>
<li>Three tiny screws under the battery holding the memory cover.  Phillips.</li>
<li>Two tiny screws in the battery compartment securing the front.  Phillips.</li>
<li>Remove the memory.</li>
<li>Two tiny screws in the memory compartment.  Torx.</li>
<li>Remove the back, then front of the keyboard panel.  Remove the connector.</li>
<li>Two tiny screws holding a metal shim on one side of the hard drive.  Phillips.</li>
<li>Remove the tape and adhesive-backed connectors from the back of the hard drive.</li>
<li>Carefully remove the hard drive and the metal shim.</li>
<li>Four “bumpers” attached to the hard drive with tiny screws.  Torx.</li>
<li>Congratulations!  Now I have removed the drive.  Out with the old, in with the new.</li>
<li>Now reverse the process to re-assemble the MacBook Pro.</li>
</ol>
<p>It&#8217;s just that easy.</p>
<h1>Reliability?</h1>
<p>I have a ThinkPad X40.  It always works.  It has never failed, and it&#8217;s pretty old for a laptop (2005).  I have a T60p, and it Just Works.  I&#8217;m running Ubuntu on it these days, since it boots in under a minute.  The Mac?  Well&#8230; it has a new drive in it now.  I&#8217;m pretty sure it&#8217;s a lemon.</p>
<p>But I get to use Leopard.  I really, really like the OS.  If I could run Leopard on a ThinkPad&#8230; (yes, I know, you can).</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F05%2F10%2Fmany-tiny-screws%2F&amp;linkname=Many%20Tiny%20Screws"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/05/10/many-tiny-screws/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Generics&#8230;</title>
		<link>http://stacyprowell.com/blog/2009/04/14/java-generics/</link>
		<comments>http://stacyprowell.com/blog/2009/04/14/java-generics/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 16:07:11 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=137</guid>
		<description><![CDATA[Grrr.  I really wish Java had either:

Reified generics or
Closures

In the interim, I offer the following Java code to the world.  Does it help?  Use at your own risk.
This is a class that wraps the collections interface to provide for recovery of the type parameter.  To use it, make a new instance and pass the class [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-176" title="java_logo_21" src="http://stacyprowell.com/blog/wp-content/uploads/2009/04/java_logo_21.png" alt="java_logo_21" width="105" height="139" />Grrr.  I really wish Java had either:</p>
<ul>
<li>Reified generics or</li>
<li>Closures</li>
</ul>
<p>In the interim, I offer the following Java code to the world.  Does it help?  Use at your own risk.</p>
<p><span id="more-137"></span>This is a class that wraps the collections interface to provide for recovery of the type parameter.  To use it, make a new instance and pass the class object for the parameter to the constructor, along with the original collection.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">gypsum.util</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.Collection</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.Iterator</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #008000; font-style: italic; font-weight: bold;">/**
 * This class packages some implementation of {@link Collection} along with
 * the class object for the type parameter of the collection.  This allows
 * getting the type of objects in the collection using the {@link #getType()}
 * method, and then using the resulting class to perform casts.  This basically
 * creates a &quot;reified&quot; generic collection (of sorts).
 *
 * @param    Class of data held in this collection.
 * @author sprowell
 * @version $Revision$ $Date$
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TypedCollection <span style="color: #000000; font-weight: bold;">implements</span> <span style="color: #003399;">Collection</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">Class</span> type<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">Collection</span> implementation<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Make a new instance.
     * @param type              The class object for the type of elements.
     * @param implementation    The implementation.
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> TypedCollection<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">Class</span> type, <span style="color: #003399;">Collection</span> implementation<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>type <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">NullPointerException</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;The type is null.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>implementation <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">NullPointerException</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;The implementation is null.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">type</span> <span style="color: #339933;">=</span> type<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">implementation</span> <span style="color: #339933;">=</span> implementation<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Get the type held in this collection.
     * @return  The type held in this collection.
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">Class</span> getType<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> type<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Recover the original typed collection.  In order for this to work,
     * the correct class must be supplied; otherwise you will get a
     * {@link ClassCastException}.  Use this as follows.
     *
&lt;pre&gt;     * TypedCollection&amp;lt;Foo&amp;gt; coll = oldcoll.recover(oldcoll.getType());
     *
     *
&nbsp;
     * This converts from {@code TypedCollection&amp;lt;?&amp;gt;} to
     * {@code TypedCollection&amp;amp;ltT&amp;gt;}, so you recover the generic type
     * parameter.
     *
&nbsp;
     * This may seem backward, or even a little contrived.  Blame it on
     * the Java generics system.  The reason you must pass the class
     * object &lt;em&gt;in&lt;/em&gt;, even though it is maintained here, is that
     * the compiler must know the type of the object &lt;em&gt;at the point
     * you use this method&lt;/em&gt;.  Thus you can do the following.
     *
&lt;pre&gt;     * public void print(TypedCollection&amp;lt;?&amp;gt; coll) {
     *   if (coll.getType() == String.class) {
     *     TypedCollection&amp;lt;String&amp;gt; coll = coll.recover(String.class);
     *     for (String str : coll) {
     *       System.out.println(str);
     *     }
     *   }
     * }
     * &amp;lt;/pre&amp;gt;
     *
     * @param    The type of the desired collection.
     * @param kind  The class object for type T.
     * @return  The correctly cast generic collection.
     * @throws  ClassCastException
     *          This instance is &lt;em&gt;not&lt;/em&gt; the type desired.
     */</span>
    @SuppressWarnings<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;unchecked&quot;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">public</span>  TypedCollection recover<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">Class</span> kind<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>kind <span style="color: #339933;">==</span> type<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>TypedCollection<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">this</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ClassCastException</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Incorrect cast.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#add(java.lang.Object)
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> add<span style="color: #009900;">&#40;</span>E arg<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>arg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#addAll(java.util.Collection)
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> addAll<span style="color: #009900;">&#40;</span><span style="color: #003399;">Collection</span> arg<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">addAll</span><span style="color: #009900;">&#40;</span>arg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#clear()
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> clear<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        implementation.<span style="color: #006633;">clear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#contains(java.lang.Object)
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> contains<span style="color: #009900;">&#40;</span><span style="color: #003399;">Object</span> arg<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">contains</span><span style="color: #009900;">&#40;</span>arg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#containsAll(java.util.Collection)
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> containsAll<span style="color: #009900;">&#40;</span><span style="color: #003399;">Collection</span> c<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">containsAll</span><span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#isEmpty()
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> isEmpty<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">isEmpty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#iterator()
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Iterator</span> iterator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">iterator</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#remove(java.lang.Object)
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> remove<span style="color: #009900;">&#40;</span><span style="color: #003399;">Object</span> o<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">remove</span><span style="color: #009900;">&#40;</span>o<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#removeAll(java.util.Collection)
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> removeAll<span style="color: #009900;">&#40;</span><span style="color: #003399;">Collection</span> c<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">removeAll</span><span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#retainAll(java.util.Collection)
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> retainAll<span style="color: #009900;">&#40;</span><span style="color: #003399;">Collection</span> c<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">retainAll</span><span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#size()
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> size<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#toArray()
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Object</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> toArray<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * {@inheritDoc}
     * @see java.util.Collection#toArray(T[])
     */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span>  T<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> toArray<span style="color: #009900;">&#40;</span>T<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> a<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> implementation.<span style="color: #006633;">toArray</span><span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</pre>
</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F04%2F14%2Fjava-generics%2F&amp;linkname=Java%20Generics%26%238230%3B"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/04/14/java-generics/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Gibberish</title>
		<link>http://stacyprowell.com/blog/2009/03/17/gibberish/</link>
		<comments>http://stacyprowell.com/blog/2009/03/17/gibberish/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 20:49:57 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=24</guid>
		<description><![CDATA[The field of computer science is probably the area of knowledge that is closest to pure gibberish.]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>computer science</strong>: <em>n.</em> a study akin to numerology and astrology, but lacking the precision of the former and the success of the latter.</p>
<p style="text-align: right;">&#8211; Stan Kelly-Bootle, <em>The Devil&#8217;s DP Dictionary</em></p>
</blockquote>
<p style="text-align: left;">I&#8217;d say the above is no longer true: computer science is successful.  But it really isn&#8217;t very precise.</p>
<p style="text-align: left;">The field of computer science is probably the area of knowledge that is closest to pure gibberish. <span id="more-24"></span>On my shelf are books with the titles <em>Python in a Nutshell</em>, <em>Enterprise Java Beans</em>, and <em>MySQL &amp; mSQL</em>.  A random passage reads:</p>
<blockquote>
<p style="text-align: left;">In this example, gmpy manages to compensate for the float&#8217;s &#8220;representation error&#8221; and emit the exact fraction that you presumably meant rather than the mathematically exact one, which tends to be less useful.</p>
<p style="text-align: right;">&#8211; <em>Python in a Nutshell</em>, p. 374</p>
</blockquote>
<p style="text-align: left;">You get the point.</p>
<p>This is because where other fields invent new names for new concepts, computer science tends to borrow old names for new concepts. Thus &#8220;bean&#8221; and &#8220;object&#8221; take on new meanings. Even mathematics tends to coin terms carefully, and use names for specific concepts, such as &#8220;Jacobi identity.&#8221;  You won&#8217;t confuse that with a desert topping, and other mathematicians will typically know what you mean.</p>
<p>Sometimes things get really confusing as perfectly good words get used up.  Like the word <em>word</em>, which means 16 bits (bits?) on most computers.  Wouldn&#8217;t want to confuse that with a <em>dword</em>, or <em>double word</em>.  You get the confusion of the specific versus the general, when words like <em>object</em>, <em>entity</em>, and <em>attribute</em> get used up.  Then you get text like the following (I plead the Fifth on where this originates):</p>
<blockquote><p>If the entity is a class object then the collection of known object classes is updated with the provided class object.  Otherwise the object&#8217;s class is declared to the container manager prior to being serialized.</p></blockquote>
<p>Fred Brooks pointed out that most fields study what&#8217;s out there; natural phenomena, if you will. Computer science studies its own invented concepts, and they could have been implemented in different ways and often are; there are many competing ways of doing things.</p>
<p>All this is relatively important. Computer scientists, programmers, and others who work in the field develop an affinity for this sort of silliness and help perpetuate it, often just for fun.  Need a name for your just-in-time compiler?  How about ElectricalFire?  (Apparently the other name proposed was, famously, &#8220;sexual chocolate.&#8221;)</p>
<p>The goal isn&#8217;t to be perspicuous (or I wouldn&#8217;t have used that word, after all), but to have fun.  And in the end, isn&#8217;t that what computer science really should be all about?</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F03%2F17%2Fgibberish%2F&amp;linkname=Gibberish"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/03/17/gibberish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security</title>
		<link>http://stacyprowell.com/blog/2009/03/13/security/</link>
		<comments>http://stacyprowell.com/blog/2009/03/13/security/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 21:24:58 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=15</guid>
		<description><![CDATA[I was recently asked what I do to secure my home computer.  This post will tell you some (though not all) of the things I do.  It will probably tell you more than you want to know.  I tried to start simple, and work up to more sophisticated items.
If you have additional advice, let me [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-114 alignright" title="1ebeb1d2f212046a4e47fcd414dbad9b" src="http://stacyprowell.com/blog/wp-content/uploads/2009/03/1ebeb1d2f212046a4e47fcd414dbad9b-150x150.jpg" alt="1ebeb1d2f212046a4e47fcd414dbad9b" width="105" height="105" />I was recently asked what I do to secure my home computer.  This post will tell you some (though not all) of the things I do.  It will probably tell you more than you want to know.  I tried to start simple, and work up to more sophisticated items.</p>
<p>If you have additional advice, let me know and I&#8217;ll add it to this post.  I&#8217;ve tried to keep it simple and make it a summary; I don&#8217;t explicitly tell you the steps to do any of this stuff since you&#8217;ve all got access to Google.  Still, if you want more information on any of this, let me know.<span id="more-15"></span></p>
<h1>My Network</h1>
<p>First, a word about my home network.  We have several machines on the network, including laptops, desktops, palmtops, and &#8220;boxes&#8221; like TiVO&#8217;s and printers.  These machines run Windows XP, Apple OS X, and Linux.  It&#8217;s a fairly diverse network and requires some effort to keep things working, at least the way I want them working.  Some items I can configure to make them secure, some I really can&#8217;t (like the TiVO&#8217;s).</p>
<p>I&#8217;m currently using cable broadband, and it is sufficient for my needs.  I have my home network set up to allow me to access it remotely and (relatively) securely, so I have to think about security more than you might have to.</p>
<p>Are these steps overkill?  Maybe.  But people have had their network connections used to download and upload Bad Stuff such as child pornography, and people have been prosecuted and sent to prison for the contents of their computer hard drives.  Ultimately you are responsible for what&#8217;s on your computers.  I consider most of what is listed here &#8220;reasonable maintenance.&#8221;  But I&#8217;m a computer security professional, so I&#8217;m biased.</p>
<h1>Windows XP</h1>
<p>You are probably running some version of Windows.  Here are some things you should do.</p>
<ol>
<li><strong>Turn on the firewall</strong>.  If you have a third-party firewall, you can use that.  If not, make sure the Windows firewall is on.  If you have an up-to-date installation of Windows, you should be fine.  For the record, I use the Windows firewall that is part of XP.</li>
<li><strong>Install all patches for Windows</strong>.  This means running the Windows Update utility.  Even if you have your machine set to automatically get updates, you should still do this manually, at least once per week.  Do not trust the automatic update!  There are lots of reasons why it might not work.</li>
<li><strong>Install anti-virus software</strong>.  I won&#8217;t make any recommendations here, but I will tell you I use Symantec (or Norton), because it is provided by my employer.  Your employer or ISP may provide you with free antivirus.  You should check.</li>
<li><strong>Keep your anti-virus software up to date</strong>.  Even if you have it set to automatically update itself you should occasionally explicitly update it.  Don&#8217;t trust automatic updates!</li>
<li><strong>Install spyware protection</strong>.  I recommend (and use) Spybot Search &amp; Destroy. You can get it from <a href="http://www.safer-networking.org/en/index.html" target="_blank">here</a>.  You can set it to update itself automatically and to run automatically, but even if you do, you should still update it and run it yourself about once a week.</li>
<li><strong>Stop using Internet Explorer</strong>.  Go and download <a href="http://www.mozilla.org/firefox" target="_blank">Firefox</a> and use it.  I won&#8217;t go into all the reasons for this.</li>
<li><strong>Make sure you have passwords set</strong>.  Set a password for every Windows user, and disable the guest user and remote administration.</li>
</ol>
<p>Now there are a lot of other little things you can do.  For instance, you can install safety plugins for Firefox to block scripts.  The above are what I regard as the <em>bare minimum</em>.</p>
<p>There are lots of other guides available online.  Look <a href="http://www.windowsecurity.com/articles/Windows_XP_Your_Definitive_Lockdown_Guide.html" target="_blank">here</a> for a guide with nice screenshots.</p>
<p>Finally, if you are running Windows XP Home, consider upgrading to Windows XP Professional, or some flavor of Vista.  Actually, at this point, you might want to skip Vista and wait for Windows 7.</p>
<h1>Wireless Networking</h1>
<p>I run a wireless network at home.  Do not be confused; wireless networks are <em>not</em> secure.  You are broadcasting your network packets to anyone and everyone.  If you are pathological about security, don&#8217;t use wireless.  The U.S. government&#8217;s <a href="http://cit.nih.gov/Support/FAQ/Fdcc/" target="_blank">Federal Desktop Core Configuration (FDCC)</a> explicitly forbids wireless, and the reasons are good.  Don&#8217;t believe me?  Run out and buy a copy of <a href="http://www.wi-foo.com/" target="_blank">Wi-Foo</a>.</p>
<p>Okay, so you are going to run a wireless network anyway.  Fine.  Do the following.</p>
<ol>
<li><strong>Set your SSID</strong>.  More wireless routers come with the site ID set to something like &#8220;linksys.&#8221;  Change this.</li>
<li><strong>Enable encryption and do not use WEP</strong>.  Turn on encryption on your router, and pick a good passphrase.  My passphrase is over 20 characters in length.  WEP is trivial to crack, and some computers actually come with software pre-installed that will crack it.  Don&#8217;t use it.  If your wireless router doesn&#8217;t support anything other than WEP, get a new one.  They&#8217;re fairly cheap.</li>
<li><strong>Disable broadcasting your SSID</strong>.  You know your SSID.  There is no reason to broadcast it.  This means you have to manually add your network on your Windows machines, but that&#8217;s okay.  It also means your neighbor doesn&#8217;t immediately see that you have a wireless network.</li>
<li><strong>Turn on your MAC filter</strong>.  Every network card has an associated identity called it&#8217;s MAC address.  Your router should allow you to set it so that only specific MAC addresses can connect.  You have to manually add every computer that will connect wirelessly, but it really isn&#8217;t that hard.</li>
<li><strong>Disable remote administration</strong>.  Many wireless routers feature remote administration, meaning you can configure the router from outside the network.  You don&#8217;t need that, and you don&#8217;t want it.  If it is on, turn if off.  If you have a machine plugged directly into your router (not connecting by wireless), consider disabling configuration over wireless, as well.  You can only configure it from a physically plugged-in machine.</li>
</ol>
<p>Now your wireless network is more secure.  But intruders can still detect your signal, sniff packets, inject packets, capture these packets with software like Kismet, &#8220;spoof&#8221; your MAC addresses, and compromise your network.  The point is that this takes some sophistication; your neighbor probably can&#8217;t do this, and thus can&#8217;t use your network connection to download porn.  There are plenty of unsecured networks; intruders will go somewhere else.</p>
<h1>Routers</h1>
<p>If you have a wireless router, you have a router, and can probably ignore this section.  If, on the other hand, you have the wire that comes in from the wall connected directly to your computer, perhaps by a cable or DSL modem, consider getting a cheap router and installing it between the modem and your computer.  Then <em>configure</em> it.  Often the default configuration of a router allows anyone to modify the settings.  You don&#8217;t want that.  Set a password on your router.</p>
<p>Why?  Routers provide a level of protection between you and the Internet.  Even if ports are open on your machine and it is vulnerable, a router can stop traffic that would otherwise get to your machine.  In fact, most routers are configured to do this by default; you have to explicitly open ports to enable P2P applications, for instance.</p>
<h1>Vulnerability Scanners</h1>
<p><strong>Get and run a vulnerability scanner</strong>.  If you are running Windows you should download and run Microsoft&#8217;s free <a href="http://technet.microsoft.com/en-us/security/cc184924.aspx" target="_blank">Microsoft Baseline Security Analyzer</a>.  Do it now.  I&#8217;ll wait.</p>
<p>I routinely run a tool called <a href="http://www.nessus.org/nessus/" target="_blank">Nessus</a>.  This is a fairly sophisticated network vulnerability scanner, and it can produce some unexpected and occasionally frightening results.  It scans your network for open ports and reports on vulnerabilities it finds.  Sadly the free version is now limited to the &#8220;home&#8221; feed, but you should still consider using it.  <em>Do not run this on a corporate network!</em> Running this kind of tool is something the network admins probably do, but is likely grounds for revoking your network access.  Just run it on your personal, home network.  Nessus runs on Windows, Linux, and OS X, but you only need it installed on one machine since it scans the entire network.</p>
<p>Run the vulnerability scanner periodically.  The list of known vulnerabilities changes, and updates to your operating systems (and family members) can open new vulnerabilities.</p>
<h1>P2P Software</h1>
<p>Using LimeWire?  FrostWire?  Vuze?  Miro?  Transmission?  Or any of the other P2P clients?</p>
<p><strong>Explicitly configure P2P applications</strong>.  These applications can transmit your data over the network (that&#8217;s what they&#8217;re for) and can download information to your computer (that&#8217;s also what they are for).  Make sure you know precisely what files on your computer, if any, are available for download externally.  Also, keep in mind that running these clients advertises your computer on the network.  Make sure the computer you use is reasonably secure by following the advice above.  Oh, and <strong>keep P2P programs up to date</strong>.  Vulnerabilities occur in these programs and new versions are released.  Check them and always use the latest version.</p>
<p>There have been some stories recently about people&#8217;s tax returns and other private data being easily available on the Internet, <a href="http://www.eweek.com/c/a/Security/Cybercriminals-Use-P2P-Tools-for-Identity-Theft-Security-Analyst-Warns/" target="_blank"><em>despite this problem being known for years</em></a>.  This is the result of <em>not configuring P2P software</em> on machines, so that all files are shared by default.</p>
<h1>Encryption</h1>
<p>Encryption is now easy and simple.  Really.  You can use whole-disk encryption from Windows, and you can encrypt folders on OS X.  This is built into both operating systems.</p>
<p><a href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a> is a nice, free, on-the-fly encryption system for keeping your private data private.  It&#8217;s easy to install, runs on most platforms, and let&#8217;s you create and use multiple volumes.  You can get as crazy about security as you want.</p>
<p>The point of this is that information like your tax return, Quicken account, etc., can be stored in an encrypted folder, and transparently decrypted only when being used.  Then if files are stolen off your machine&#8230; they are encrypted.</p>
<h1>Intrusion Detection</h1>
<p>Okay, if you are really getting pathological about security, consider installing and running an intrusion detection system (IDS).  I do this.  These are programs that observe your network traffic and look for &#8220;suspicious&#8221; activity.  I run <a href="http://www.snort.org/" target="_blank">Snort</a>.  This is not for the faint hearted.  Still, if you store company information on your home machines, you might be attacked for that data.  Really.  I&#8217;m not kidding.</p>
<h1>Backup</h1>
<p><strong>Backup your machine</strong>.  If you have a Mac, just get an external hard disk and turn on Time Machine.  If you have Windows, you need to do more.  From My Computer you can right-click a drive, open Properties, and select Tools.  You should see backup options there.  You want an external hard disk and periodic backups.</p>
<p>Good security consists of several items:</p>
<ul>
<li><strong>Detect</strong> intrusion attempts.</li>
<li><strong>Resist</strong> intrusion attempts.</li>
<li>When intrusion is successful, <strong>repair</strong> the damage.  This is where backups come in.</li>
</ul>
<p>You don&#8217;t want to have to throw away all your data if your computer is compromised.  Plus, and I <em>guarantee</em> this, your hard drive <em>will</em> eventually fail.</p>
<h1>Remote Access</h1>
<p>I can access my home network remotely.  If you don&#8217;t need to, I suggest you don&#8217;t.  If you do, here are some things you can do.  I assume a modest level of sophistication here.</p>
<ol>
<li><strong>Use a Linux or FreeBSD box</strong>.  Forward the ports you want on your router to a machine running Linux or FreeBSD, and not some other OS.</li>
<li><strong>Change the port for SSH, VNC, etc</strong>.  Use some port other than 22 for SSH.  For VNC, don&#8217;t use display zero or one.</li>
<li><strong>Set strong passwords, and consider disabling passwords for SSH</strong>.  My SSH server only allows connections authenticated by certificate.</li>
<li><strong>Use port knocking</strong>.  Install knock and knockd, and use them to connect.  Port knocking is a wonderful solution to keeping ports closed, unless you explicitly want to use them.  I use one-time knocks that open a port just long enough to connect.</li>
</ol>
<p>One other final, perhaps funny, item.  My home system sends me text messages for certain events.  I used to do this using my wireless provider&#8217;s web interface and curl, but now I can just send email, thanks to my crackberry.  It&#8217;s nice to know what&#8217;s going on.</p>
<h1>Summary</h1>
<p>Security requires routine maintenance.  Run all updates and scans manually about once a week or so.  Why?  To make sure everything is working and to say conscious of any problems.</p>
<p>Owning a computer is really like owning a car.  Both require care and periodic maintenance.  You should get familiar with how things work on the computer.  You don&#8217;t have to be a network professional, just get familiar with the software that&#8217;s available to help you.  In fact, based on some of the folks I&#8217;ve known with degrees in networking, being a &#8220;network professional&#8221; might not help, and might even hurt.</p>
<p>Hope this helps!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F03%2F13%2Fsecurity%2F&amp;linkname=Security"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/03/13/security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suffering in Java</title>
		<link>http://stacyprowell.com/blog/2008/07/09/suffering-in-java/</link>
		<comments>http://stacyprowell.com/blog/2008/07/09/suffering-in-java/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 18:33:48 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=5</guid>
		<description><![CDATA[I like Java.  Well, that is, I don&#8217;t dislike Java as much as I dislike most other langauges.  I&#8217;d honestly prefer ML, but I&#8217;d be without the massive ball of mud that is the Java class libraries, the wonder that is Eclipse, and ANTLR.  I need these.  It&#8217;s a weakness.
(I know there is ML support [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-116 alignright" title="java_logo_2" src="http://stacyprowell.com/blog/wp-content/uploads/2008/07/java_logo_2.png" alt="java_logo_2" width="90" height="119" />I <em>like</em> Java.  Well, that is, I don&#8217;t <em>dis</em>like Java as much as I dislike most other langauges.  I&#8217;d honestly prefer ML, but I&#8217;d be without the massive ball of mud that is the Java class libraries, the wonder that is Eclipse, and ANTLR.  I <em>need</em> these.  It&#8217;s a weakness.<span id="more-5"></span></p>
<p>(I know there is ML support for Eclipse, but it&#8217;s nowhere near Java support.)</p>
<p>All that said, I complain about Java a <em>lot</em>.  Almost as much as I <em>mis</em>use <em>italics</em>.  Anyway, here is my list of peeves in the current Java, in no particular order.</p>
<ul>
<li>Lack of reified generics.</li>
</ul>
<p>I&#8217;ve written my fair share of C++.  I&#8217;m used to the idea that when you instantiate a template you get a class.  That&#8217;s not how Java works.  The whole type erasure idea makes me crazy almost every day.  I&#8217;d be okay if the type information was available at runtime, but of course it isn&#8217;t.  I&#8217;m not the only one bothered by this.</p>
<ul>
<li>Lack of closures.</li>
</ul>
<p>Did I mention that I like ML?  Haskell?  Lisp?  I understand closures, and I want to use them.  I don&#8217;t want a watered down version like with generics.  I want real closures.  Everyone doesn&#8217;t have to use them; they aren&#8217;t an idiom for idiots.  I can make do without them, but why should I have to?</p>
<ul>
<li>Lack of macros.</li>
</ul>
<p>It&#8217;s not politic to miss #define, but I do.  There are lots of places where I would just love to use a compile-time macro.  Recently we had a problem on a project of lots of strings getting created because of debugging statements (log4j) that were <em>not</em> enabled.  Doesn&#8217;t matter; the string gets created.  The compiler can&#8217;t optimize it out, since debugging can be enabled at runtime, and I get that.  But do I really need that most of the time?</p>
<p>Also, I use certain design patterns that cry out for a macro.  Want a factory?  Most of it is boilerplate.  Could I do this with the new annotation system?  Probably, but&#8230; you can&#8217;t replace a class with an apt-generated class; you can only generate new classes.</p>
<ul>
<li>Lack of delegates.</li>
</ul>
<p>This would probably not be an issue if we had closures.  However delegates are easily understood, and very useful.</p>
<p>Okay, that&#8217;s my Java rant for today.  Back to writing Java&#8230;</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2008%2F07%2F09%2Fsuffering-in-java%2F&amp;linkname=Suffering%20in%20Java"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2008/07/09/suffering-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX</title>
		<link>http://stacyprowell.com/blog/2008/07/07/latex/</link>
		<comments>http://stacyprowell.com/blog/2008/07/07/latex/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 17:20:47 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=4</guid>
		<description><![CDATA[I used to have a site that used LaTeX to render equations.  This worked pretty well, except that I didn&#8217;t have LaTeX installed on the server.  It turns out that you can do pretty well without it.
There&#8217;s an excellent program called mimeTeX that renders math without a TeX installation.  I used it with Drupal [...]]]></description>
			<content:encoded><![CDATA[<p>I used to have a site that used LaTeX to render equations.  This worked pretty well, except that I didn&#8217;t have LaTeX installed on the server.  It turns out that you can do pretty well without it.</p>
<p>There&#8217;s an excellent program called <a href="http://www.forkosh.com/mimetex.html">mimeTeX</a> that renders math without a TeX installation.  I used it with Drupal and DruTeX.  Now I&#8217;m not using Drupal&#8230; so I need to find another way to display math.  Oh, mimeTeX still works, but you have to explicitly encode the link.  I&#8217;m way too lazy to do that.</p>
<p style="text-align: center;"><img src="/cgi-bin/mimetex.cgi?\phi:X^*\to%20Y^*" alt="[equation]" /></p>
<p><strong>Update</strong>: I&#8217;ve been experimenting with using [ tex ]&#8230;[ /tex ] from the mimeTex plugin to WordPress.  It&#8217;s working now, but I needed to do two things to make it work.</p>
<ul>
<li>Create a cache folder under my wp-content folder.</li>
<li>Modify the plugin to point to my local installation of mimetex.cgi.</li>
</ul>
<p>I also had to go into the cache folder and delete all the files that were created during the process, so I could see the effect of the changes.  But now it works!</p>
<p>Here&#8217;s an example of an equation array.  Note that you need to use <tt>&amp;amp;</tt> to insert the required ampersand delimiters.</p>
<p style="text-align: center;"><img src="http://stacyprowell.com/blog/wp-content/cache/tex_5bc4c4397c18d56e55e0639292bde510.gif" class="tex" alt="\begin{eqnarray}<br />
\overset{*}{\triangleright}\!(uvx) &amp; = &amp; \triangleright\!(\overset{*}{\triangleright}\!(uv)x) \\<br />
&amp; = &amp; \triangleright\!(\overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)v)x) \\<br />
&amp; = &amp; \overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)vx)<br />
\end{eqnarray}" /></p>
<pre>[ tex ]\begin{eqnarray}
 \overset{*}{\triangleright}\!(uvx) &amp;amp; = &amp;amp; \triangleright\!(\overset{*}{\triangleright}\!(uv)x) \\
 &amp;amp; = &amp;amp; \triangleright\!(\overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)v)x) \\
 &amp;amp; = &amp;amp; \overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)vx)
 \end{eqnarray}[ /tex ]</pre>
<p>So&#8230; shouldn&#8217;t everyone just install LaTeX by default?  Shouldn&#8217;t all CMS ship with some math solution?  Of course!  <img src='http://stacyprowell.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2008%2F07%2F07%2Flatex%2F&amp;linkname=LaTeX"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2008/07/07/latex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hardware</title>
		<link>http://stacyprowell.com/blog/2008/07/03/hardware/</link>
		<comments>http://stacyprowell.com/blog/2008/07/03/hardware/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 07:18:53 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Nuisances]]></category>
		<category><![CDATA[hard disk]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=3</guid>
		<description><![CDATA[
Over the past month my hard disk failed in my MacBook Pro (again), my wife&#8217;s MacBook, and our old Dell laptop.  The Macs are both still on warranty, but the Dell&#8217;s not.  Odd, you know?  Anyway, this shows the general usefulness of two things: external hard disks and Apple&#8217;s Time Machine software.  I&#8217;m currently running [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-95 alignright" title="ap104s4067" src="http://stacyprowell.com/blog/wp-content/uploads/2008/07/ap104s4067-300x225.jpg" alt="Hard Disk" width="168" height="126" /></p>
<p>Over the past month my hard disk failed in my MacBook Pro (again), my wife&#8217;s MacBook, and our old Dell laptop.  The Macs are both still on warranty, but the Dell&#8217;s not.  Odd, you know?  Anyway, this shows the general usefulness of two things: external hard disks and Apple&#8217;s Time Machine software.  I&#8217;m currently running my Mac off of an external hard disk until I can get it back to Apple.  Fun!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2008%2F07%2F03%2Fhardware%2F&amp;linkname=Hardware"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2008/07/03/hardware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
