<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://joshuakugler.com/feeds/atom.xml" rel="self" title="TechOpinionation" type="application/atom+xml" />
    <link href="http://joshuakugler.com/"                        rel="alternate"    title="TechOpinionation" type="text/html" />
    <link href="http://joshuakugler.com/rss.php?version=2.0"     rel="alternate"    title="TechOpinionation" type="application/rss+xml" />
    <title type="html">TechOpinionation</title>
    <subtitle type="html">The life of a programmer/system admin</subtitle>
    <icon>http://joshuakugler.com/templates/default/img/s9y_banner_small.png</icon>
    <id>http://joshuakugler.com/</id>
    <updated>2010-01-11T14:57:00Z</updated>
    <generator uri="http://www.s9y.org/" version="1.5.1">Serendipity 1.5.1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://joshuakugler.com/archives/31-Creating-new-Mailman-lists-on-cPanel-from-the-command-line.html" rel="alternate" title="Creating new Mailman lists on cPanel from the command line" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2010-01-11T14:57:00Z</published>
        <updated>2010-01-11T14:57:00Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=31</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=31</wfw:commentRss>
    
    
        <id>http://joshuakugler.com/archives/31-guid.html</id>
        <title type="html">Creating new Mailman lists on cPanel from the command line</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, it appears there is no way built in to cPanel to script the creation of a large number of Mailman lists.  Since we are migrating around 50 lists, I was not looking forward to a lot of copy, paste, click, etc.  There <em>had</em> to be a better way. Turns out, there was.<br />
<br />
<div class="bash" style="text-align: left">wget --no-check-certificate --<span style="color: #0000ff;">user=</span>your_cpanel_user <span style="color: #ff0000;">"--password=your_cpanel_password"</span> --post-data <span style="color: #ff0000;">"email=$L&amp;domain=lists.yourhost.com&amp;password=listpass&amp;password2=listpass"</span> https://your.cpanel.host.com:<span style="color: #cc66cc;">2083</span>/frontend/x3/mail/doaddlist.html</div><br />
Some notes:<br />
<br />
<ul><br />
<li>I use the SSL connection to cPanel which has a self-signed certificate, thus the --no-check-certificate option</li><br />
<li>for domain=... use the domain you want to use for the list.  In our case, we've created a "lists" subdomain, so all lists will be of the form listname@lists.ourdomain.com.  If you simply want "listname@yourdomain.com"  put "yourdomain.com" as the domain parameter.</li><br />
</ul>For a large number of lists, wrap that in the appropriate for...in...do...done shell syntax.<br />
<br />
You'll still have to configure the lists manually, or copy over the config files (if you have root access), but at least the creation is scripted. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/30-BetweenDict,-a-Python-dict-for-value-ranges.html" rel="alternate" title="BetweenDict, a Python dict for value ranges" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-12-31T14:50:04Z</published>
        <updated>2009-12-31T15:04:24Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=30</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=30</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/6-Python" label="Python" term="Python" />
    
        <id>http://joshuakugler.com/archives/30-guid.html</id>
        <title type="html">BetweenDict, a Python dict for value ranges</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I was doing some programming today (no, really?) and had need of a data structure that would return a value based on the key falling within a given range.  Kind of like a dict, but each key in the dict would be two values, between which the querying key would fall. Thus was born BetweenDict.  It's short and sweet, and to the point. And works for what I need.<br />
<div class="python" style="text-align: left"><br /><span style="color: #ff7700;font-weight:bold;">class</span> BetweenDict<span style="color: black;">&#40;</span><span style="color: #008000;">dict</span><span style="color: black;">&#41;</span>:<br />&#160; &#160; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, d = <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>:<br />&#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">for</span> k,v <span style="color: #ff7700;font-weight:bold;">in</span> d.<span style="color: black;">items</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #008000;">self</span><span style="color: black;">&#91;</span>k<span style="color: black;">&#93;</span> = v<br /><br />&#160; &#160; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__getitem__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, key<span style="color: black;">&#41;</span>:<br />&#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">for</span> k, v <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">self</span>.<span style="color: black;">items</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">if</span> k<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> &lt;= key &lt; k<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">return</span> v<br />&#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #008000;">KeyError</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">"Key '%s' is not between any values in the BetweenDict"</span> % key<span style="color: black;">&#41;</span><br /><br />&#160; &#160; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__setitem__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, key, value<span style="color: black;">&#41;</span>:<br />&#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">try</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>key<span style="color: black;">&#41;</span> == <span style="color: #ff4500;">2</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">if</span> key<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> &lt; key<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #008000;">dict</span>.<span style="color: #0000cd;">__setitem__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, <span style="color: black;">&#40;</span>key<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>, key<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>, value<span style="color: black;">&#41;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">else</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #008000;">RuntimeError</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'First element of a BetweenDict key '</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<span style="color: #483d8b;">'must be strictly less than the '</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<span style="color: #483d8b;">'second element'</span><span style="color: black;">&#41;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">else</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #008000;">ValueError</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Key of a BetweenDict must be an iterable '</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<span style="color: #483d8b;">'with length two'</span><span style="color: black;">&#41;</span><br />&#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">TypeError</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #008000;">TypeError</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Key of a BetweenDict must be an iterable '</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<span style="color: #483d8b;">'with length two'</span><span style="color: black;">&#41;</span><br /><br />&#160; &#160; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__contains__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, key<span style="color: black;">&#41;</span>:<br />&#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">try</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">bool</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#91;</span>key<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">or</span> <span style="color: #008000;">True</span><br />&#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">KeyError</span>:<br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">False</span><br />&#160;</div> 
            </div>
        </content>
        <dc:subject>between</dc:subject>
<dc:subject>dict</dc:subject>
<dc:subject>python</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/28-Basie-sounds-good...but-only-SVN.html" rel="alternate" title="Basie sounds good...but only SVN?" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-12-23T16:26:08Z</published>
        <updated>2009-12-23T16:26:08Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=28</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=28</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/13-Django" label="Django" term="Django" />
            <category scheme="http://joshuakugler.com/categories/6-Python" label="Python" term="Python" />
    
        <id>http://joshuakugler.com/archives/28-guid.html</id>
        <title type="html">Basie sounds good...but only SVN?</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <em>Started a comment on <a href="http://pyre.third-bit.com/blog/archives/3350.html">this post</a> but it got a little long.</em><br />
<br />
So, I follow <a href="http://planet.python.org/">Planet Python</a> and have seen <a href="http://pyre.third-bit.com/blog">Greg Wilson's</a> posts on the <a href="http://basieproject.org/">Basie</a> project.<br />
<blockquote>Basie is a web-based software project forge that integrates revision control, issue tracking, mailing lists, wikis, status dashboards, and other tools that developers need to work effectively in teams.</blockquote><br />
Basie uses <a href="http://www.djangoproject.com/">Django</a> and <a href="http://jquery.com/">jQuery</a> among other technologies to make a leaner, meaner, multi-project "forge."<br />
<br />
I've read up a bit on Basie.  Modern framework! jQuery! Multiple projects! Python! Only Subversion!  What?  Nearly every other* project tracking system out there (even Trac's shoe-horned support) has support for alternate VCS's: Git, Darcs, Bzr, Mercurial, etc.  Are you serious?  With countless hours invested, and probably 30+ people having worked on the code base, couldn't "multi VCS" have been a requirement from the get-go?  Granted, I've never tried it, but as Trac hacks, and Redmine, have proven, it can be done.<br />
<br />
I think it's great that we have a project tracking system that is based on modern web framework technologies, but I really think Basie is going to be at a disadvantage out of the gate because it does not support (granted, minority, but growing) VCS's. I hope they are able to rectify this soon: I'd love to see Basie grow into a viable competitor to Redmine.  Side note: I love Redmine, but a system in Python allows us to use our intellectual investment to contribute to our VCS; there is very little Ruby knowledge in our shop, so it's harder to give back.<br />
<br />
Something else that caught my eye on the Basie site:<br />
<blockquote>Why Build Another Forge?<br />
Because none of the others meet our needs.... Redmine provides many of the features we want, but is still immature;</blockquote><br />
Can it be clarified when this was written?  We currently run Redmine 0.8.6 (with 0.9 around the corner).  It has been VERY stable, very able, and everything we need in a PTS.  Other than using Python, is there any reason you did not simply choose to invest the time of 30+ people in an existing PTS instead of starting your own from scratch?<br />
<br />
Again, this isn't a rant, or to put down the project: I think it's great, and I hope it gets traction in the PTS world. It's just a design decision and your rationale of an "immature Redmine" that got me curious.<br />
<br />
*"Every other" meaning "Every other that I am aware of."  I'm sure there are plenty of PTS's that I'm not aware of. 
            </div>
        </content>
        <dc:subject>basie</dc:subject>
<dc:subject>django</dc:subject>
<dc:subject>git</dc:subject>
<dc:subject>jquery</dc:subject>
<dc:subject>python</dc:subject>
<dc:subject>redmine</dc:subject>
<dc:subject>svn</dc:subject>
<dc:subject>vcs</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/27-Dont-use-strptime,-use-a-regex.html" rel="alternate" title="Don't use strptime, use a regex" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-09-23T11:28:48Z</published>
        <updated>2009-09-24T07:43:49Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=27</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=27</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/6-Python" label="Python" term="Python" />
    
        <id>http://joshuakugler.com/archives/27-guid.html</id>
        <title type="html">Don't use strptime, use a regex</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I am using Python to do some data file processing, converting data from a horrendously verbose, repetitive format to a nice, clean, CSV format.  The date and time are in two different fields, and the date is in MM/DD/YYYY format, plus, the MM and DD might be one or two characters. That is, January is 1, not 01.<br />
<br />
I am converting the timestamp to ISO format, so I was using time.strptime to extract the date/time and time.strftime to generate to proper ISO formatted date, like so:<br />
<br />
<div class="python" style="text-align: left"><span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">time</span>.<span style="color: black;">strftime</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">"%Y-%m-%d %H:%M:%S"</span>, <span style="color: #dc143c;">time</span>.<span style="color: black;">strptime</span><span style="color: black;">&#40;</span>ts, <span style="color: #483d8b;">"%m/%d/%Y %H:%M:%S"</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></div><br />
On the smallest of my data files, the processing was taking 13 to 15 seconds.  I profiled it, and found that in a 13 second run, strptime was taking 8.755 seconds of that, and it was calling _getlang(), _parse_localename(), and the like very time.<br />
<br />
So, thought I, regexes are pretty efficient, I wonder if that would reduce the run time any.<br />
<br />
<div class="python" style="text-align: left">ts_re = <span style="color: #dc143c;">re</span>.<span style="color: #008000;">compile</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'^(<span style="color: #000099; font-weight: bold;">\d</span>{1,2})/(<span style="color: #000099; font-weight: bold;">\d</span>{1,2})/(<span style="color: #000099; font-weight: bold;">\d</span>{4}) (<span style="color: #000099; font-weight: bold;">\d</span>{2}:<span style="color: #000099; font-weight: bold;">\d</span>{2}:<span style="color: #000099; font-weight: bold;">\d</span>{2})'</span><span style="color: black;">&#41;</span><br />m = ts_re.<span style="color: black;">match</span><span style="color: black;">&#40;</span>ts<span style="color: black;">&#41;</span>.<span style="color: black;">groups</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br /><span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">"%s-%02d-%02d %s"</span><span style="color: black;">&#41;</span> % <span style="color: black;">&#40;</span>m<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>, <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>m<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>, <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>m<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>, m<span style="color: black;">&#91;</span><span style="color: #ff4500;">3</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></div><br />
(The re.compile() call is at the module level, outside the function, so it is only run once.)<br />
<br />
My overall run time dropped to about 5 seconds, a little over 1/3 of the time it took previously.  My convert_timestamp() function, which previously had consumed nearly 10 seconds, was only taking about 1.3 seconds now.<br />
<br />
Sometimes regexes <strong>are</strong> the answer.<br />
<br />
 
            </div>
        </content>
        <dc:subject>profiling</dc:subject>
<dc:subject>python</dc:subject>
<dc:subject>regex</dc:subject>
<dc:subject>strftime</dc:subject>
<dc:subject>strptime</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/26-Generating-PDF-thumbnails.html" rel="alternate" title="Generating PDF thumbnails" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-09-04T14:27:00Z</published>
        <updated>2009-09-04T14:31:14Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=26</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=26</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/4-Miscellaneous" label="Miscellaneous" term="Miscellaneous" />
    
        <id>http://joshuakugler.com/archives/26-guid.html</id>
        <title type="html">Generating PDF thumbnails</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Had the need recently to generate a bunch of thumbnails for some PDFs we had.  ImageMagick to the rescue.<br />
<br />
<div class="bash" style="text-align: left"><span style="color: #b1b100;">for</span> P <span style="color: #b1b100;">in</span> `ls *.pdf`<br />&#160; <span style="color: #b1b100;">do</span> <span style="color: #000066;">echo</span> <span style="color: #0000ff;">$P</span><br />&#160; <span style="color: #0000ff;">outfile=</span><span style="color: #ff0000;">"thumbs/`echo $P|cut -d . -f 1`.jpg"</span><br />&#160; convert -quality <span style="color: #cc66cc;">50</span> -geometry 64x82 <span style="color: #0000ff;">$P</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> <span style="color: #0000ff;">$outfile</span><br /><span style="color: #b1b100;">done</span><br />&#160;</div><br />
<br />
The [0] tells it to only do the first page, and the quality setting of 50 created thumbnails that were only 2-4K, but still quite functional for the purpose.<br />
<br />
If not already pulled in as a dependency, Ghostscript (/usr/bin/gs) will need to be installed too. 
            </div>
        </content>
        <dc:subject>convert</dc:subject>
<dc:subject>imagemagick</dc:subject>
<dc:subject>jpg</dc:subject>
<dc:subject>pdf</dc:subject>
<dc:subject>thumbnails</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/25-I-couldnt-have-said-it-any-better,-Dell.html" rel="alternate" title="I couldn't have said it any better, Dell" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-07-05T12:50:37Z</published>
        <updated>2009-07-05T12:50:37Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=25</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=25</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/5-Humor" label="Humor" term="Humor" />
    
        <id>http://joshuakugler.com/archives/25-guid.html</id>
        <title type="html">I couldn't have said it any better, Dell</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a class='serendipity_image_link' href='http://joshuakugler.com/uploads/DellBonus.jpg' onclick="F1 = window.open('/uploads/DellBonus.jpg','Zoom','height=783,width=1039,top=216,left=448,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;"><!-- s9ymdb:1 --><img class="serendipity_image_left" width="110" height="83" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="http://joshuakugler.com/uploads/DellBonus.serendipityThumb.jpg" alt="" /></a> Dell sent me another one of their catalogs recently, which included this entry.  You can get Windows Vista, or a "bonus" of an Windows XP Professional downgrade. I have nothing left to add. 
            </div>
        </content>
        <dc:subject>bonus</dc:subject>
<dc:subject>dell</dc:subject>
<dc:subject>downgrade</dc:subject>
<dc:subject>vista</dc:subject>
<dc:subject>windows</dc:subject>
<dc:subject>xp</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/24-When-marketing-gets-ahead-of-engineering.html" rel="alternate" title="When marketing gets ahead of engineering" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-07-05T12:29:42Z</published>
        <updated>2009-07-05T12:29:42Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=24</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=24</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/5-Humor" label="Humor" term="Humor" />
    
        <id>http://joshuakugler.com/archives/24-guid.html</id>
        <title type="html">When marketing gets ahead of engineering</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a class='serendipity_image_link' href='http://joshuakugler.com/uploads/marketing.jpg' onclick="F1 = window.open('/uploads/marketing.jpg','Zoom','height=783,width=1039,top=216,left=448,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;"><!-- s9ymdb:2 --><img class="serendipity_image_left" width="110" height="83" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="http://joshuakugler.com/uploads/marketing.serendipityThumb.jpg" alt="" /></a><br />
Bob (from marketing): I have this great new idea for our product!<br />
Joe (from engineering): Lay it on me!<br />
Bob: Let's make our product easier to use!  People will love it!<br />
Joe: OK, we'll need three months to develop and test that feature.<br />
Bob: Great! We'll start advertising the new feature immediately.<br />
Joe: Uh.....<br />
<br />
What happened next? The photo says it all. 
            </div>
        </content>
        <dc:subject>bad timing</dc:subject>
<dc:subject>engineering</dc:subject>
<dc:subject>marketing</dc:subject>
<dc:subject>miscommunication</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/21-Figuring-out-why-I-cant-resume-any-more.html" rel="alternate" title="Figuring out why I can't resume any more" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-05-17T11:54:05Z</published>
        <updated>2009-05-17T11:54:05Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=21</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=21</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/3-Linux" label="Linux" term="Linux" />
    
        <id>http://joshuakugler.com/archives/21-guid.html</id>
        <title type="html">Figuring out why I can't resume any more</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I recently installed the <a href="https://wiki.kubuntu.org/Kubuntu/Kde3/Jaunty" title="Kubuntu/Kde3/Jaunty">Jaunty/KDE3.5 remix</a>.  I had some interesting issues in that I was trying to install on an existing LUKS/LVM setup. Whole-disk encryption on LVM rocks, but if the installer doesn't support it, you'll have to fiddle to get things working right.<br />
<br />
It was up and working, but of course I was still fiddling around.  At some point I ran mkswap on my swap partition.  After this, I noticed I could no longer suspend to disk (hibernate), but I did not yet corelate the two events, as I had changed /etc/fstab to use the new UUID of the swap partition.<br />
<br />
I then noticed that upon boot I now had two swap partitions active: my swap partition, and another one mounted on /dev/ramzswap0.  I turned off that swap device, and behold, I could suspend to disk!  BUT, when I resumed, it went through normal boot...but not resume.<br />
<br />
So, I began looking through the files under /etc/initramfs-tools.  I came across one in conf.d called "resume" which contained this line:<br />
<br />
RESUME=UUID=some-uuid-that-wasn't-correct-anymore<br />
<br />
AHA!  I replaced the UUID with the correct one, ran<br />
<br />
<div class="bash" style="text-align: left">update-initramfs -k all -c<br />&#160;</div> and now I <em>can</em> suspend to disk and resume. 
            </div>
        </content>
        <dc:subject>hibernate</dc:subject>
<dc:subject>linux</dc:subject>
<dc:subject>luks</dc:subject>
<dc:subject>lvm</dc:subject>
<dc:subject>resume</dc:subject>
<dc:subject>suspend</dc:subject>
<dc:subject>swap</dc:subject>
<dc:subject>uuid</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/20-Chaining-SSH-Connections.html" rel="alternate" title="Chaining SSH Connections" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-05-06T12:58:22Z</published>
        <updated>2009-05-06T13:09:35Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=20</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=20</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/4-Miscellaneous" label="Miscellaneous" term="Miscellaneous" />
    
        <id>http://joshuakugler.com/archives/20-guid.html</id>
        <title type="html">Chaining SSH Connections</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Today I was trying to figure out how to ssh into one system, and then automatically ssh into another system.  The logical way:<br />
<br />
<div class="bash" style="text-align: left">ssh user@outside_host <span style="color: #ff0000;">"user@inside_host"</span></div><br />
wasn't working.  The logs on both inside and outside hosts would show a connection, but I would get no prompt.  I tried typing a command, hit enter, and saw the output of the command!  OK, that's odd.<br />
<br />
So, I hit #openssh and posted my problem.  User dmlloyd and I started dialoging and figured out that a TTY wasn't being allocated.  OK, why not. AH! openssh's -t parameter to the rescue.  So this does work:<br />
<br />
<div class="bash" style="text-align: left">ssh -t user@outside_host <span style="color: #ff0000;">"ssh user@inside_host"</span></div><br />
NOTE: Yes, I know I could just set up port forwarding or DNAT firewall rules, but the inside hosts don't need any access from the outside at all, so the chained SSH method was much better.<br />
<br />
 
            </div>
        </content>
        <dc:subject>bash</dc:subject>
<dc:subject>chaining</dc:subject>
<dc:subject>ssh</dc:subject>
<dc:subject>tty</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/19-Woohoo!-Im-published!.html" rel="alternate" title="Woohoo! I'm &quot;published!&quot;" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-05-06T10:18:10Z</published>
        <updated>2009-05-06T10:18:10Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=19</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=19</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/1-Programming" label="Programming" term="Programming" />
    
        <id>http://joshuakugler.com/archives/19-guid.html</id>
        <title type="html">Woohoo! I'm &quot;published!&quot;</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So today I discovered that my first ever contribution to an Open Source project was accepted.  Before I was let go from WordStream, my boss was having me work on a feature addition to <a href="http://buildbot.net/trac" title="The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes.">Buildbot</a>.<br />
<br />
I was allowed to contribute that addition, under my own name, and today <a href="http://github.com/djmitche/buildbot/commit/163a3fad119dd6076e24d2af0afcedd0c023777d" title="Merge branch 'transposed_grid' of git://github.com/jkugler/buildbot">that change</a> was merged in.  It comprised these commits: <a href="http://github.com/djmitche/buildbot/commit/d175036fa3800901a4c1fd5e1c759a82e339a810" title="d175036fa3800901a4c1fd5e1c759a82e339a810">1</a>, <a href="http://github.com/djmitche/buildbot/commit/19fcf45c60d3058b2ed3688d78f33979ba9fe001" title="19fcf45c60d3058b2ed3688d78f33979ba9fe001">2</a>, <a href="http://github.com/djmitche/buildbot/commit/8763836af826d2190814c2b196c2bbb2d5015cc4" title="8763836af826d2190814c2b196c2bbb2d5015cc4">3</a><br />
<br />
Needless to say, I'm pretty jazzed! 
            </div>
        </content>
        <dc:subject>buildbot</dc:subject>
<dc:subject>contribution</dc:subject>
<dc:subject>git</dc:subject>
<dc:subject>jazzed</dc:subject>
<dc:subject>open source</dc:subject>
<dc:subject>published</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/18-Looking-for-work-again.html" rel="alternate" title="Looking for work again" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-04-30T17:41:37Z</published>
        <updated>2009-04-30T17:41:37Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=18</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=18</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/4-Miscellaneous" label="Miscellaneous" term="Miscellaneous" />
    
        <id>http://joshuakugler.com/archives/18-guid.html</id>
        <title type="html">Looking for work again</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, WordStream decided my skillset didn't fit what they wanted, and I am once again in the ranks of the unemployed.  If you know of any programming or system administration positions you could point me to, that would be greatly appreciated!<br />
<br />
My resume is linked over on the right side of this page.  Feel free to pass it around. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/17-Be-Careful-Who-You-Prank.html" rel="alternate" title="Be Careful Who You Prank" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-04-29T09:53:21Z</published>
        <updated>2009-04-29T09:53:21Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=17</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=17</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/5-Humor" label="Humor" term="Humor" />
    
        <id>http://joshuakugler.com/archives/17-guid.html</id>
        <title type="html">Be Careful Who You Prank</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I had this conversation this morning via a random AOL IM sent to me:<br />
<br />
<blockquote>(10:09:04)  AtypicalCoho:        If you respond with an away message containing a phone number, I will laugh... then rickroll you by phone.    <br />
(10:10:08)  Me:  I am not available. If you need to contact me, please call 907-451-5100 <br />
(10:11:42)  AtypicalCoho:        who the h*** is this?    <br />
(10:12:08)  Me:  You tell me...you IM'ed me.</blockquote><br />
I can only assume he tried the number.  It's for the Fairbanks office of the Alaska State Troopers. I don't think I'll be hearing from him again.<br />
 
            </div>
        </content>
        <dc:subject>aol</dc:subject>
<dc:subject>humor</dc:subject>
<dc:subject>im</dc:subject>
<dc:subject>rickroll</dc:subject>
<dc:subject>troopers</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/16-Skills-vs.-Theory-Which-Should-Be-Taught.html" rel="alternate" title="Skills vs. Theory: Which Should Be Taught?" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-04-29T08:47:09Z</published>
        <updated>2009-04-29T09:15:15Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=16</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=16</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/15-Education" label="Education" term="Education" />
    
        <id>http://joshuakugler.com/archives/16-guid.html</id>
        <title type="html">Skills vs. Theory: Which Should Be Taught?</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                [The meat of this post was actually a reply to a UAF (Univeristy of Alaska Fairbanks) LUG (Linux User's Group) mailing-list thread a few months back.  It's been reworked for this blog post.  In addition, this post was moved from my person blog, <a href="http://jjncj.com/blog/" title="JJ and CJ's blog">jjncj.com</a> where it was originally posted March 25 of last year.]<br />
<br />
<em>I was reminded of this topic by a post on CodeJustin that had a poll about <a href="http://codejustin.com/did-you-go-to-college-for-programming-poll/">whether or not you went to college for programming</a>.  For me the answer is yes and no.  I went to college to learn many skills and much theory about computer systems, but 95%+ of what I use in my day-to-day job I've taught myself.  However, that learned theory has formed a solid foundation for my learned skills.</em><br />
<br />
This has been hashed out many, many times, but I'll jump into the fray again. If you want a foundation in computer science, and the ability to learn: get a theory-based CS degree.  If you just want the skills you need for a job, take a class for it, read it on the web, or take a university course that is more geared toward certifications (for example: <a href="http://www.tvc.uaf.edu/programs/infotech/index.html"  title="UAF TVC">see the UAF Info Tech program</a>).<br />
<br />
But as to practical skills, the UAF CS program does offer many.  If you want to program, take Operating Systems (321) and Assembly (301).  Architecture (471) is a good one too.  Those classes will make understanding programming so much easier, because you understand what the system is doing as your program executes.  If you want to be a network guru, take CS 442 first (or the grad level 642).  Will it teach you to set up a windows AD network and configure roaming profiles?  No, but it will give you a base-line knowledge level that will make understanding how that network works, and troubleshooting that network, so much easier.<br />
<br />
I've taken the full complement of CS classes to earn my BS, and almost my MS. There are classes I may never use again.  But I'm glad I had CS 201/202 (I've used C/C++ since in job and school); 301 (Assembly language; understanding of a computer's operation); 331/631 (Compiler and language theory; better understanding of how compilers work, and the complexities thereof); 401 (senior project, better understanding of process and project management); Computer Architecture (gives me a good idea of how all the hardware fits together so I understand the system better when working on it); 311 (Algorithms and data structures; will I being doing heavy algorithm design, maybe, but I also know I can evaluate possible algorithms for efficiency and the load they will put on the system); 321 (Operating systems; especially helps when running on "sane" systems such as Linux or Mac OS X); 447 (software engineering: gave me so much insight into the proper ways to go about designing programs.  Something I'm about to put into heavy use at my current job); and there are others.<br />
<br />
Among the things I've learned on my own or via "on the job training": Python, Perl; SQL; Visual Basic; Linux administration; Apache administration; Postfix administration; a little Sendmail too; general system administration; network setup, with some routing (My friend Todd Medbury could still make my head hurt); hardware/software troubleshooting/assembly; Qt programming; CGI/web programming; Bind (DNS Server); HTML; VMWare Server; Bacula (backup server); as well as other skills I've probably failed to mention.  I'm not bragging, I'm simply pointing out that taking classes in all those would have been prohibitively expensive, taken a LOT of time, and in the end I would have learned less than my on-the-job training taught me.<br />
<br />
For another example of what all that theory got me, see <a href="http://jjncj.com/papers/VotingVirtually.pdf"  title="Voting Virtually">this paper</a>. Careful design and development led to a successful election with software that was designed, coded, and debugged (very little debugging, due to careful coding) in 80 hours.<br />
<br />
My point is, with a  CS degree from UAF (or another college that is more on the theory side), you will be able to drop into any job and pick up the skills quickly.  With a purely skills-based degree, if you do not have the learn-on-your-own-itude that is needed in this industry, you will be totally<br />
lost when faced with a new paradigm or language.<br />
<br />
Bottom line: if one requires a university class to learn a job skill, then a CS degree won't do one much good in the real world, whether theoretical or practical. 
            </div>
        </content>
        <dc:subject>education</dc:subject>
<dc:subject>experience</dc:subject>
<dc:subject>learning</dc:subject>
<dc:subject>skills</dc:subject>
<dc:subject>theory</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/15-Real-dependencies,-not-convenient-dependencies.html" rel="alternate" title="Real dependencies, not convenient dependencies" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-04-28T07:19:57Z</published>
        <updated>2009-04-28T07:50:05Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=15</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=15</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/3-Linux" label="Linux" term="Linux" />
    
        <id>http://joshuakugler.com/archives/15-guid.html</id>
        <title type="html">Real dependencies, not convenient dependencies</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Over on his <a href="http://www.raphink.info/">blog</a>, Raphael Pinson has a <a href="http://www.raphink.info/2009/04/minimal-dependencies-and-backports.html" title="Minimal dependencies and backports">post</a> about creating a package with "minimal dependencies."  In short, make the dependencies of the package the "real" dependencies, not just the latest and greatest version of the package you rely on.<br />
<br />
I have been waiting way too long for someone to say this.  This has especially bitten me when trying to back port things like Python modules.  Both debhelper and python-central versions are automatically bumped to the latest, when they will compile and install just fine with versions that are one or two distro releases old.<br />
<br />
Then, a request for backports is bounced with the message "too many dependencies" when in reality there wouldn't be "too many" if the dependencies were really set to what they need to be and not just whatever version is in the latest release.<br />
<br />
In the case of Ubuntu, I personally would like to see all packages test-compiled with the versions of software that comes with the current LTS releases.  Then, if it truly cannot be compiled with those versions, but the dependency to what it needs to be, but not any higher.<br />
<br />
Related gripe: I have seen bugs in Ubuntu closed when a fix is released for the latest version, but the LTS version of the package was ignored.  Maintainers: LTS means "Long Term Support," and as long as the support window is open for that release, the package should be supported and all bug fixes backported to the package (without having to enable backports, incedentally).<br />
<br />
Thank you Raphael for bringing this up!  Hopefully this will spark discussion and make it easier in the future to backport the "latest and greatest" to the current LTS release.  <br />
 
            </div>
        </content>
        <dc:subject>backports</dc:subject>
<dc:subject>dependencies</dc:subject>
<dc:subject>lts</dc:subject>
<dc:subject>minimal</dc:subject>
<dc:subject>packaging</dc:subject>
<dc:subject>ubuntu</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/14-Get-a-better-one.html" rel="alternate" title="Get a better one" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2009-04-24T14:42:27Z</published>
        <updated>2009-04-24T14:42:27Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=14</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=14</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/5-Humor" label="Humor" term="Humor" />
    
        <id>http://joshuakugler.com/archives/14-guid.html</id>
        <title type="html">Get a better one</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Last January, coming home from my Boston trip, I was sitting in Chicago O'Hare aiport, desperately searching for free wifi, when I looked at my kernel log messages.  But, what to my frustrated eyes should appear, than another example of the humor of Open Source developers, specifically, the developers of the NetworkManager framework:<br />
<br />
<blockquote>NetworkManager: <WARN>  request_and_convert_scan_results(): card took too much time scanning.  Get a better one.</blockquote><br />
<br />
Granted, this warning is probably warranted.  I was using a 802.11b card that is several years old, plus the calls are going through NDIS Wrapper.  It was time to get a new laptop.  The one was using was a Dell Inspiron 4000: PIII-800, 384MB of RAM, no built LAN or WiFi. 
            </div>
        </content>
        <dc:subject>hardware</dc:subject>
<dc:subject>humor</dc:subject>
<dc:subject>old</dc:subject>
<dc:subject>wireless</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/13-Building-Python-Eggs-with-C-Extensions-on-Windows.html" rel="alternate" title="Building Python Eggs with C Extensions on Windows" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-11-14T15:13:31Z</published>
        <updated>2008-11-14T15:36:49Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=13</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=13</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/6-Python" label="Python" term="Python" />
    
        <id>http://joshuakugler.com/archives/13-guid.html</id>
        <title type="html">Building Python Eggs with C Extensions on Windows</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I recently had the task of building Python Eggs on Windows that had C extensions.  I did the usual googling, and found a few HOWTOs, but nothing I could find was very concise and straightforward.  So, I present to you a very concise, very straightforward guide.<br />
<br />
<h1>Setting up the Build Environment</h1><br />
<br />
We are assuming all installers are allowed to install to their default locations.<br />
<br />
Download and install Python 2.5 and/or Python 2.4 from python.org. You may have to use Python 2.4.4 since that was the latest 2.4 series to have an installer at time of writing.  Whichever you want associated with .py files, install last.<br />
<br />
Download and install SetupTools for Python (both 2.4 and 2.5) <a href="http://pypi.python.org/pypi/setuptools/">here</a>.<br />
<br />
MingW files are <a href="http://sourceforge.net/project/showfiles.php?group_id=2435">here</a>. Download and run the latest version of "Automated MinGW Installer." You only need to install g++, and maybe not even that. When it prompts you for old/current/preview version of the MinGW system, select current.<br />
<br />
Download and run the current version of "MSYS Base System."<br />
<br />
Open up the MinGW shell, and execute these commands:<br />
<br />
<div class="bash" style="text-align: left"><span style="color: #000066;">cd</span> /<br />mkdir mingw<br />mkdir code <span style="color: #808080; font-style: italic;">#Convenience, if you want to mount your code's dir at an &quot;easy&quot; spot</span><br /><span style="color: #000066;">echo</span> <span style="color: #ff0000;">"c:/MinGW /mingw<br />c:/path/to/code /code"</span> &gt; /etc/fstab<br />&#160;</div><br />
Create the file <code>c:\PythonNN\Lib\distutils\distutils.cfg</code> and put the following in it, where NN is replaced with 24 or 25, depending on version::<br />
<blockquote>[build]<br />
compiler = mingw32</blockquote><br />
Do this for each version installed.<br />
<br />
<h1>Building the Eggs</h1><br />
MinGW mounts your drives on the root directory, so your C: drive will be at /c, D: drive at /d, and so on.  Open up a MinGW shell, and:<br />
<br />
<div class="bash" style="text-align: left"><span style="color: #000066;">cd</span> /code <span style="color: #808080; font-style: italic;"># or /c/path/to/code, if you didn't mount /code</span><br /><span style="color: #808080; font-style: italic;"># Depending on which package you're building, you'll either use setup.py</span><br /><span style="color: #808080; font-style: italic;"># or extended_setup.py.&#160; I'm using setup.py here as a placeholder. Replace as appropriate.</span><br /><span style="color: #808080; font-style: italic;"># Python 2.4:</span><br />/c/python24/python setup.py build_static <span style="color: #808080; font-style: italic;"># if needed</span><br />/c/python24/python setup.py bdist_egg<br /><br /><span style="color: #808080; font-style: italic;"># Python 2.5:</span><br />/c/python25/python setup.py build_static <span style="color: #808080; font-style: italic;"># if needed</span><br />/c/python25/python setup.py bdist_egg<br />&#160;</div><br />
You'll now have eggs for your architecture and OS.  Enjoy!<br />
 
            </div>
        </content>
        <dc:subject>bash</dc:subject>
<dc:subject>c</dc:subject>
<dc:subject>eggs</dc:subject>
<dc:subject>extensions</dc:subject>
<dc:subject>mingw</dc:subject>
<dc:subject>msys</dc:subject>
<dc:subject>python</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/12-A-near-computer-death-experience.html" rel="alternate" title="A near (computer) death experience" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-11-12T22:59:02Z</published>
        <updated>2008-11-13T10:08:28Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=12</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=12</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/14-Hardware" label="Hardware" term="Hardware" />
    
        <id>http://joshuakugler.com/archives/12-guid.html</id>
        <title type="html">A near (computer) death experience</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                It's amazing the things that can cause a lump in your throat.  Say, for instance, your computer not booting.<br />
<br />
Tonight I was trouble-shooting a trackball I thought to be dead, and I went to plug it in to a USB port on the front of my work computer.  I had not properly grounded myself first, and this being Alaska in the winter, and me wearing sweats, and my chair's cushions being very much made out of polyester, I had acquired quite the static potential.<br />
<br />
As soon as the trackball's USB plug contacted the metal around the computer's USB port, there was a nice "pop" and the power on the computer dropped hard.  No graceful shutdown, just went black.<br />
<br />
Oops.  So I pressed the power button.  The fans started, but nothing else.  Shut it off, tried again.  Still nothing after a couple more attempts.  Now, I'm a little nervous for a few reasons: 1) This is my work computer 2) The computer is on loan; 3) I have no spare; 4) I just started a new job three days prior and calling in with a sick computer the next day was not going to look good.<br />
<br />
So after a little consternation, and some prayer (this <strong>is</strong> my livelihood we're talking about after all), I remembered a little peculiarity I'd run into in the past.  Computers, being electronic devices, often contain capacitors, whether those capacitors be in the power supply, or on the motherboard.  Since most computers these days never truly turn off (it's a "soft" power switch) those capacitors might not fully drain. Somehow, in certain situations, the system gets "wedged" due to various reasons (a static discharge, for instance).<br />
<br />
So, the fix was thus:  1) unplug computer, 2) hold down power button for a while (I did a minute, I think I've heard 30 seconds will work).  This drains the capacitors fully. 3) Plug computer back in and press the power button.  It's Aliiiiiive!  And working fine.<br />
<br />
That's enough excitement for the night, thanks!<br />
<br />
P.S. Anyone care to enlighten me as to why the capacitor drain trick works?<br />
<br />
<b>UPDATE:</b> Some interesting discussion of this on <a href="http://www.reddit.com/r/hardware/comments/7d3fr/can_someone_explain_the_capacitor_drain_trick/">Reddit</a><br />
<br />
Note to xzxzzx: Sorry that you couldn't link.  I thought I had those enabled. 
            </div>
        </content>
        <dc:subject>capacitor</dc:subject>
<dc:subject>drain</dc:subject>
<dc:subject>esd</dc:subject>
<dc:subject>static</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/11-Starting-up-at-a-Startup.html" rel="alternate" title="Starting up at a Startup" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-11-09T23:21:56Z</published>
        <updated>2008-11-19T15:50:28Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=11</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=11</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/4-Miscellaneous" label="Miscellaneous" term="Miscellaneous" />
    
        <id>http://joshuakugler.com/archives/11-guid.html</id>
        <title type="html">Starting up at a Startup</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                After being out of full-time work for 17 business days, I'm starting up a full time job!  I'm going to be doing, as I have been for the past 2.5 years, programming and system administration.  My title is still in flux, but my duties will be a combination of two jobs I applied for with this company, which were "Linux Web Application Server Architect" and "Python/Adobe Flex Programmer."  For the first couple months (or less) I'm basically on as a contractor.  Then, if we like each other, we'll negotiate for a full-time hire.<br />
<br />
The company in question is called <a href="http://www.wordstream.com">WordStream</a>, "a venture-backed startup engaged in providing search engine marketing software solutions for PPC/SEM [pay-per-click/search engine marketing] and SEO [search engine optimization]," among other things.  Basically, they help advertisers get the best deal and exposure for their dollar.<br />
<br />
They do have a product they've released, but they're still very much in startup mode, so I'm sure it will be fast and furious.  Not quite the low-key environment I was used to with S&amp;K Aerospace.  Financially, they're quite sound, having recently landed <a href="http://www.xconomy.com/boston/2008/08/15/netgraviton-inc-garners-4000000-series-a-funding-round/">USD4 million in Series A funding</a> from <a href="http://www.sigmapartners.com/">Sigma Partners</a>, a very strong and stable venture capitalist group which currently has over USD2 billion under management.<br />
<br />
So, off we go.  Sounds like it's going to be lots of fun!<br />
<br />
Oh, yes, I'll still be working from home.  No relocation required. 
            </div>
        </content>
        <dc:subject>employment</dc:subject>
<dc:subject>job</dc:subject>
<dc:subject>job hunting</dc:subject>
<dc:subject>startup</dc:subject>
<dc:subject>telecommuting</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/10-Can-you-effectively-enforce-reciprocity.html" rel="alternate" title="Can you effectively enforce reciprocity?" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-11-05T12:53:34Z</published>
        <updated>2008-11-05T23:37:36Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=10</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=10</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/1-Programming" label="Programming" term="Programming" />
    
        <id>http://joshuakugler.com/archives/10-guid.html</id>
        <title type="html">Can you effectively enforce reciprocity?</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a href="http://www.cilk.com" title="Parallelism for the Masses">Cilk Arts</a> is very close to releasing their multi-core programming library called Cilk++, and with it, a new license, the <a href="http://www.cilk.com/multicore-products/cilk-arts-public-license" title="CAPL">Cilk Arts Public License</a>.  Using this license, they attempt to close the "IDO [Internal Development Organizations] loophole" they believe exists with the current GPL.  Namely: an organization can take a piece of GPL code, create a derivative work, and, if they do not distribute it outside their organization, they do not have to give it back to the community.<br />
<br />
Cilk Arts' new license seeks to prevent this, basically, be redefining "distribution" to mean within the company as well:<br />
<blockquote>If you are an IDO building applications for use by others but not "distributed" under the existing open source definitions (e.g., GPL) and you want to keep your Cilk++-based derivative work proprietary, then there is an impact. The CAPL requires you to make a fair exchange in order to use Cilk++. If you share your software with everyone, we share ours with you. If you do not wish to share, you can give back to the project by purchasing a commercial license.</blockquote><br />
I believe,that while a laudable goal, this will at best be ineffective, and at worst, stymie, or at least slow, the adoption of Cilk++; and yes, I have reasons.<br />
<br />
There are, at least, three types of Open Source consumers:<br />
<ol><li>Those who have full intention to give back</li><li>Those who have no intention to give back, and don't, despite the legal obligation to do so.  See the archives of <a href="http://lists.gpl-violations.org/pipermail/legal/">GPL Violations</a> for plenty of examples.</li><li>Those who don't initially have an intention to give back, but after using the library, decide that they'd like to, or can, give back.</li></ol><br />
The first two types of consumers will not be affected by this license.  The givers will give, and the keepers will keep.  It is the third type of consumer where Cilk++ will lose out: the "potential givers" (PG) category.<br />
<br />
When a PG is evaluating various libraries to use for their new multi-core program, their license and distribution model (even internally) may be in doubt.  They may even have a (wrong headed) policy about giving back to open source programs.  Thus, when they see "you can't distribute derivative works (even internally)" it may completely turn them off, and they'll go on to the next library.  Which would be sad; I've not personally reviewed Cilk++, but as it is coming out of an MIT project, I would assume it to be created by some rather bright people.  So, the PG will completely pass over the chance to use this library without any further evaluation.  Cilk++ will lose in this case. If the PG would have decided not to give back, Cilk++ would have not lost or gained either way.  However, if the PG would have decided to give back down the line (say, enough internal rumbling by developers, or management changing policy), then Cilk++ will have gained a contributor.  But, because they say off the top that you <i>have</i> to give back, they will have lost everybody in the "potential giver" category.  In addition, they may also lose out on a possible license sale by those who want to try the library, and then end up buying a commercial license because they wish to distribute their application as closed-source.<br />
<br />
So, my feedback to Cilk Arts is: go with the standard GPL (or even BSD license).  Those who want to give back will, those who don't, won't, and those who might will give you a try and possibly become a contributor (with code or money) when they might not have otherwise.<br />
<br />
Your thoughts? 
            </div>
        </content>
        <dc:subject>bsd</dc:subject>
<dc:subject>capl</dc:subject>
<dc:subject>cilk</dc:subject>
<dc:subject>cilk++</dc:subject>
<dc:subject>gpl</dc:subject>
<dc:subject>legal</dc:subject>
<dc:subject>licenses</dc:subject>
<dc:subject>multi-core</dc:subject>
<dc:subject>reciprocity</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/9-Youre-using-what!.html" rel="alternate" title="You're using what!?" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-10-27T14:55:40Z</published>
        <updated>2008-10-27T14:55:40Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=9</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=9</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/1-Programming" label="Programming" term="Programming" />
    
        <id>http://joshuakugler.com/archives/9-guid.html</id>
        <title type="html">You're using what!?</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Yet another reason I will avoid PHP at all costs.  The head developers of PHP have decided, after much discussion, to make the back-slash the name-space separator when referencing classes.  Thats's right, this\is\a\tree\valid\variable.  I'm sorry, a back-slash?  This will create no end of confusion and frustration when it comes to parsers and syntax highlighters.  What was wrong with the period? How about '::' as in: a::valid::namespace?<br />
<br />
One of the (small) reasons I like Linux that the only reason I have to use a back-slash is for special control characters.  Seeing back-slashes all over my code would be even more jarring than the supposed "white space" problem some people have with Python.<br />
<br />
For more on the decision, read <a href="http://wiki.php.net/rfc/namespaceseparator">the RFC</a>.  For discussion, <a href="http://www.reddit.com/r/programming/comments/79cut/php_is_going_to_use_backslash_as_a_namespace/">Reddit has the usual</a>.<br />
<br />
It boggles the mind. 
            </div>
        </content>
        <dc:subject>flabbergasted</dc:subject>
<dc:subject>name space</dc:subject>
<dc:subject>php</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/8-Job-Hunting.html" rel="alternate" title="Job Hunting" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-10-10T15:41:36Z</published>
        <updated>2008-10-10T15:41:36Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=8</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=8</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/4-Miscellaneous" label="Miscellaneous" term="Miscellaneous" />
    
        <id>http://joshuakugler.com/archives/8-guid.html</id>
        <title type="html">Job Hunting</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, due to lack of projects at my current employer, I might be getting laid off come Wednesday.  Not the news one wants to hear. <img src="http://joshuakugler.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
<br />
If anyone has any leads for telecommuting tech jobs, please let me know.  There is a link to my resume at the right of this page.<br />
<br />
Thanks! 
            </div>
        </content>
        <dc:subject>job hunting</dc:subject>
<dc:subject>layoff</dc:subject>
<dc:subject>resume</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/7-Dont-use-Brightline-Compliance.html" rel="alternate" title="Don't use Brightline Compliance" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-09-10T10:34:24Z</published>
        <updated>2008-09-10T11:26:55Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=7</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=7</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/4-Miscellaneous" label="Miscellaneous" term="Miscellaneous" />
    
        <id>http://joshuakugler.com/archives/7-guid.html</id>
        <title type="html">Don't use Brightline Compliance</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                As part of yearly compliance, I have to go through some sort of training on sexual harassment. (Yes, even though I work at home and can't really harass anyone.)  I don't particularly mind, it's not that onerous.  What I do mind, however, is having to redo sections of the training that I've already done.<br />
<br />
The Brightline courses use a flash application that walks you through the various modules.  You listen to dialog, training, and such, and answer questions.  It keeps track of which modules you've completed...kind of.  That problem arises when the application can't connect to its server.  Instead of retrying, it pops up a message saying "You seem to have lost connectivity. Instead of using the wireless connection, connect to the LAN using a wired connection before restarting the course."  It then simply closes out the flash application.  Which wouldn't be so bad, I suppose, but it doesn't always save your progress, so I am now in the process of redoing a 20 minute module that I've already done.<br />
<br />
I'm not having any other bandwidth or connectivity issues today, so it would seem to be their servers, not my connection.<br />
<br />
So, two suggestions for those doing online courses:<br />
<ul><li>Save state often!  Every page of a module, or more</li><br />
<li>When connectivity to the server seems to be lost, try again, several times, instead of just dumping the student out of the application, and forcing them to login again.  At least consider the possibility that the problem may be on your end, and not the student's.</li><br />
</ul><b>Edit:</b> Then, after completing the entire course, and exiting as instructed, it logged me out. Upon logging back in, it told my I had not completed the last three modules.  Sigh. 
            </div>
        </content>
        <dc:subject>bad design</dc:subject>
<dc:subject>brightline</dc:subject>
<dc:subject>connectivity</dc:subject>
<dc:subject>flash</dc:subject>
<dc:subject>saving state</dc:subject>
<dc:subject>training</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/5-Encouraging-strong-passwords.html" rel="alternate" title="Encouraging strong passwords" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-08-14T11:18:00Z</published>
        <updated>2008-11-13T12:01:01Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=5</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=5</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/7-Security" label="Security" term="Security" />
    
        <id>http://joshuakugler.com/archives/5-guid.html</id>
        <title type="html">Encouraging strong passwords</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Passwords are a part of life.  They're needed, but they're a pain.  But their ubiquity often leads users to create short, or otherwise easily-guessable passwords.  Not good.<br />
<br />
I recently signed up for an account on <a href="http://www.odesk.com">oDesk</a>, a site for connecting IT free-lancers and service-providers, and those looking for said services.  While a lot of sites discourage the use of strong passwords by saying you can only use letters and numbers, or limiting your length, oDesk requires you to have at least one letter and at least one number or symbol, and they even tell you how strong they think your password is.  They give you a little bar that turns different colors based on how good your password is.  Looking at their page reveals this:<br />
<br />
<div class="javascript" style="text-align: left"><br /><span style="color: #003366; font-weight: bold;">function</span> get_str_pass_lvl<span style="color: #66cc66;">&#40;</span>password<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; <span style="color: #003366; font-weight: bold;">var</span> str = password.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />&#160; <span style="color: #003366; font-weight: bold;">var</span> l = str.<span style="color: #006600;">length</span>;<br />&#160; <span style="color: #003366; font-weight: bold;">var</span> c = <span style="color: #CC0000;">0</span>;<br /><br />&#160; <span style="color: #009900; font-style: italic;">//a-z</span><br />&#160; regEx = RegExp<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'([a-zA-Z]+)'</span>, <span style="color: #3366CC;">'gi'</span><span style="color: #66cc66;">&#41;</span>;<br />&#160; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>str.<span style="color: #006600;">match</span><span style="color: #66cc66;">&#40;</span>regEx<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; c++;<br />&#160; <span style="color: #66cc66;">&#125;</span><br /><br />&#160; <span style="color: #009900; font-style: italic;">//0-9</span><br />&#160; regEx = RegExp<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'(<span style="color: #000099; font-weight: bold;">\\</span>d+)'</span>, <span style="color: #3366CC;">'gi'</span><span style="color: #66cc66;">&#41;</span>;<br />&#160; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>str.<span style="color: #006600;">match</span><span style="color: #66cc66;">&#40;</span>regEx<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; c++;<br />&#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; <span style="color: #009900; font-style: italic;">//non-word</span><br />&#160; &#160; regEx = RegExp<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'(<span style="color: #000099; font-weight: bold;">\\</span>W+)'</span>, <span style="color: #3366CC;">'gi'</span><span style="color: #66cc66;">&#41;</span>;<br />&#160; &#160; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>str.<span style="color: #006600;">match</span><span style="color: #66cc66;">&#40;</span>regEx<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; &#160; c++;<br />&#160; &#160; <span style="color: #66cc66;">&#125;</span><br />&#160; <span style="color: #66cc66;">&#125;</span><br /><br />&#160; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">0</span> == l<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; &#160; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">0</span>;<br />&#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>l &lt; <span style="color: #CC0000;">8</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; &#160; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">1</span>;<br />&#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>l &gt;= <span style="color: #CC0000;">8</span> &amp;&amp; c &lt; <span style="color: #CC0000;">2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; &#160; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">2</span>;<br />&#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>l &gt;= <span style="color: #CC0000;">8</span> &amp;&amp; l &lt; <span style="color: #CC0000;">14</span> &amp;&amp; c == <span style="color: #CC0000;">2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; &#160; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">3</span>;<br />&#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>l &gt;= <span style="color: #CC0000;">14</span> &amp;&amp; c == <span style="color: #CC0000;">2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />&#160; &#160; &#160; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">4</span>;<br />&#160; <span style="color: #66cc66;">&#125;</span><br /><span style="color: #66cc66;">&#125;</span><br />&#160;</div><br />
<br />
They believe best passwords are 14 characters or longer, and have a letter or special character in there.  I'd have to say I agree. 
            </div>
        </content>
        <dc:subject>passwords</dc:subject>
<dc:subject>security</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/4-Defect-Feature-request-Who-decides.html" rel="alternate" title="Defect? Feature request? Who decides?" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-08-13T10:42:20Z</published>
        <updated>2008-11-21T11:07:55Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=4</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=4</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/1-Programming" label="Programming" term="Programming" />
    
        <id>http://joshuakugler.com/archives/4-guid.html</id>
        <title type="html">Defect? Feature request? Who decides?</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Scott Westfall has a post about <a href="http://blog.slickedit.com/?p=242" title="Defect or Feature Request?">defects vs. features</a>.  He notes:<br />
<blockquote>I like the generic term, “change request” for all changes in a system. But it’s very important to know whether it is a defect or a feature request. In my lexicon, a “defect” is something that doesn’t work as spec’ed; a feature request is a request to alter the intended behavior.</blockquote><br />
He goes on to point out that customers generally don't care which it is, they just want things changed.  Programmers often care about the definition because if it's a defect, it might mean their code is flawed.  Yes, programmers can have egos, often huge ones.<br />
<br />
But what he doesn't answer seem to answer is: who, ultimately, decides whether a submitted "change request" is a defect or a feature request?  And does unexpected behavior, even if it specified as such, or simply undefined, qualify as a bug?<br />
<br />
I've run in to this exact issue on a "change request" for a product I use: the Adept package updater in Kubuntu.  On May 10, 2006, I <a href="https://bugs.launchpad.net/ubuntu/+source/adept/+bug/44105" title="Adept not very smart about network being down">reported</a> that Adept doesn't behave properly when the network is down, but simply says the transaction failed.  I finally discovered that it didn't properly determine if the network was up before it attempted to start the upgrade process.<br />
<br />
After submitting this change request as a bug, it was changed to a "wishlist" priority.  After it was changed, I wrote:<br />
<blockquote>I don't agree with this bug being a "wishlist" bug. If a user does not know their network is not up, and they try to update, they are immediately going to write for help saying "Updates aren't working," or they are simply going to give up on Ubuntu because it "doesn't work right." I know I would have given up if I hadn't known to go to the prompt and type "apt-get upgrade," which is how I found out my network was down.</blockquote><br />
The change <em>back</em> to whishlist was accompanied by this comment:<br />
<blockquote>You don't have to agree. It is wishlist though. You are asking for a totally new feature. And missing features != bugs in my world. Please leave it on wishlist, there is absolutely no point in bloating the severity. Thanks.</blockquote><br />
Now, I'm not sure if, or where, the specification is for Adept, but if a network-aware program I was using didn't tell me the network was down, but simply failed with no explanation, I would qualify that as a bug.  I think that view is justified, considering that 1) another user agreed with me, and 2) my original report now has three other reports attached to it as "duplicates."<br />
<br />
So, I agree fully with Scott that not all change requests are defects.  However, when a program violates expected (and/or reasonable) behavior, the programmers/project managers/whoever really need to take a hard look at either the specification (if the program is in fact following the specification), or they need to define the behavior for the given case, and possibly bring it in to alignment with users' expectation[1].<br />
<br />
[1] Yes, I know user expectations can vary wildly.  Maybe a usability study is in order, but that's a topic for another post entirely.<br />
<br />
<b>Update:</b> Good <a href="http://www.codinghorror.com/blog/archives/001189.html" title="That's Not a Bug, It's a Feature Request">additional discussion</a> of the problem.  With a good example of something that should be classified as a bug in Visual Studio 2008, but still has not been fixed; and some discussion of how the bug/feature request dichotomy is bad for software projects as a whole since it can create friction between users and developers. 
            </div>
        </content>
        <dc:subject>bugs</dc:subject>
<dc:subject>defects</dc:subject>
<dc:subject>features</dc:subject>
<dc:subject>programming</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/3-Geek-bands.html" rel="alternate" title="Geek bands" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-08-11T17:53:35Z</published>
        <updated>2008-08-11T17:53:35Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=3</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=3</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/5-Humor" label="Humor" term="Humor" />
    
        <id>http://joshuakugler.com/archives/3-guid.html</id>
        <title type="html">Geek bands</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                A band for programmers tired of automata:<br />
<br />
<em>Rage Against the State Machine</em><br />
<br />
Thanks, I'll be here all year. 
            </div>
        </content>
        <dc:subject>automata</dc:subject>
<dc:subject>rage</dc:subject>
<dc:subject>state machine</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/2-Relative-Difficulty.html" rel="alternate" title="Relative Difficulty" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-08-10T20:47:00Z</published>
        <updated>2008-08-16T08:01:42Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=2</wfw:comment>
    
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=2</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/11-Backup" label="Backup" term="Backup" />
            <category scheme="http://joshuakugler.com/categories/12-Operating-Systems" label="Operating Systems" term="Operating Systems" />
    
        <id>http://joshuakugler.com/archives/2-guid.html</id>
        <title type="html">Relative Difficulty</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                The other day, at work, we were working on setting up an automated qurk-and-dirty back up for some files from one Linux box to another.  The link was a long distance one (from a data center in Dallas to our office in Anchorage).  The solution was simple and elegant:<br />
<br />
On the host being backed up:<br />
<div class="bash" style="text-align: left"><br />tar -cv&#160; /etc|bzip2 -<span style="color: #cc66cc;">9</span> -c | ssh -i /path/to/id_rsa user@backuphost.com \<br /><span style="color: #ff0000;">"(cat &gt; /path/to/backup.tar.bz2)"</span> <br />&#160;</div><br />
Tar up the files, pipe it through bzip2, pipe the output of bzip2 through SSH, which connects to the remote host via a keyed login, and output the result of that stream to a file on the other side.<br />
<br />
Any idea how much contortion you'd have to go through to do the same thing on Windows?  Difficulty: assume no use of SSH, and no interactive login (i.e. must be able to run completely unattended).<br />
<br />
I asked my programming lead that question, and he said, "An order of a magnitude more." <br />
<br />
"Only one order?"<br />
<br />
"I said OR MORE.  OR MORE with windows always means MORE."<br />
<br />
<strong>Edit:</strong> Yes, run <em>unattended</em>, not unintended.  Although I like cubiculum's  comment on reddit: "Windows does that sort of thing all the time." 
            </div>
        </content>
        <dc:subject>backup</dc:subject>
<dc:subject>difficulty</dc:subject>
<dc:subject>linux</dc:subject>
<dc:subject>windows</dc:subject>

    </entry>
    <entry>
        <link href="http://joshuakugler.com/archives/1-Making-stew.html" rel="alternate" title="Making stew" />
        <author>
            <name>Joshua Kugler</name>
                    </author>
    
        <published>2008-08-10T15:30:00Z</published>
        <updated>2008-11-05T18:10:21Z</updated>
        <wfw:comment>http://joshuakugler.com/wfwcomment.php?cid=1</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://joshuakugler.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=1</wfw:commentRss>
    
            <category scheme="http://joshuakugler.com/categories/5-Humor" label="Humor" term="Humor" />
            <category scheme="http://joshuakugler.com/categories/1-Programming" label="Programming" term="Programming" />
    
        <id>http://joshuakugler.com/archives/1-guid.html</id>
        <title type="html">Making stew</title>
        <content type="xhtml" xml:base="http://joshuakugler.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Original, as far as I know.  Correct me if you know otherwise.<br />
<br />
Q: How do you program a computer to make beef stew?<br />
<br />
A: You use bullion logic.<br />
<br />
As bad, but not as good:<br />
<br />
Q: How do you solve a math equation involving beef stew?<br />
<br />
A: You use bullion algebra.<br />
<br />
<b>Edit:</b> For those of you who got here by searching for "bullion logic" what you're actually searching for is <a href="http://www.google.com/search?q=boolean+logic" target="_blank">boolean logic</a>. 
            </div>
        </content>
        
    </entry>

</feed>