<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://jeff.jke.net"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>jeffrey k eliasen</title>
 <link>http://jeff.jke.net</link>
 <description></description>
 <language>en</language>
<item>
 <title>AWS</title>
 <link>http://jeff.jke.net/post/1794/aws</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;Amazon Web Services is the Budweiser of cloud computing.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/development&quot;&gt;Development&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 13 Jan 2016 21:54:43 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1794 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/post/1794/aws#comments</comments>
</item>
<item>
 <title>Setting up virtual environments for Python in OSX</title>
 <link>http://jeff.jke.net/book-page/1793/setting-virtual-environments-python-osx</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;One of the things I wish I had known more about when I first started working with Python (and, really, any time before I &lt;em&gt;finally&lt;/em&gt; learned about it a couple years ago) is the power of virtual environments for Python using the &lt;code&gt;virtualenv&lt;/code&gt; tool.&lt;/p&gt;

&lt;p&gt;The basic idea with virtual environments is that you have a project that might need a specific version of Python (2.7, 3, whatever), and specific versions of whichever packages you are using. For a developer working on multiple projects, this specifically allows you to avoid version hell where upgrading a package for one project breaks an unrelated project. This also ensures everyone on the team is using the same version of every package without having to add all the package source to the team&#039;s repository. All the virtual Python environments will exist in one place and you can switch between them with a single command.&lt;/p&gt;

&lt;p&gt;This page will guide you through setting up virtual environments in OSX. The steps are similar for Linux but very different for Windows. Here are the highlights:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;#install&quot;&gt;install the &lt;code&gt;virtualenvwrapper&lt;/code&gt; package at the system level&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#configure&quot;&gt;set up your environment&lt;/a&gt;

&lt;ol&gt;&lt;li&gt;disable &lt;code&gt;pip&lt;/code&gt; for the system-level Python installation so that all packages are only ever installed in virtual environments (&lt;em&gt;optional&lt;/em&gt;)&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#mkdir&quot;&gt;set up your top-level virtual environment directory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#create&quot;&gt;create your first virtual environment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#commandref&quot;&gt;learn the commands for using virtual environments&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;h2&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;You will need to have &lt;code&gt;pip&lt;/code&gt; installed for this to work properly. In a terminal window, type &lt;code&gt;pip&lt;/code&gt;. If you get a dump of how to use the command, you&#039;re all set. If you see a &#039;command not found&#039; error, type the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo easy_install pip
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You will need to enter your password. Accept the defaults for any options it gives you.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;install&quot; id=&quot;install&quot;&gt;&lt;/a&gt;Install the virtualenvwrapper package&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;mkvirtualenv&lt;/code&gt; is the tool you will use to quickly create a new virtual environment or remove one you are no longer using. It&#039;s part of a package called &lt;code&gt;virtualenvwrapper&lt;/code&gt;. To install this package, open a Terminal window and type:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo pip install virtualenvwrapper
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You will need to enter your password. Accept the defaults for any options it gives you.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;configure&quot; id=&quot;configure&quot;&gt;&lt;/a&gt;Set up your environment&lt;/h2&gt;

&lt;p&gt;You will need to set a couple environment variables for &lt;code&gt;virtualenvwrapper&lt;/code&gt; to work properly. Open your &lt;code&gt;.profile&lt;/code&gt; with TextEdit (or your favorite editor):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ open ~/.profile
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;... and put the following three lines anywhere in the file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export WORKON_HOME=~/dev/virtualenv
export PIP_REQUIRE_VIRTUALENV=true
source /usr/local/bin/virtualenvwrapper.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The first line tells the &lt;code&gt;virtualenvwrapper&lt;/code&gt; set of commands where to find your virtual environments. I have a directory in my home directory called &#039;dev&#039; and I put all external libraries and SDKs there... it&#039;s a reasonable place to put this as well. Some people put it at &lt;code&gt;~/.virtualenv&lt;/code&gt;, so you might see instructions elsewhere recommending this location. It doesn&#039;t really matter where it goes, but these two choices are probably better than most others if you have no strong reason to put it somewhere else.&lt;/p&gt;

&lt;p&gt;The second line tells &lt;code&gt;pip&lt;/code&gt; to refuse to install packages unless you are working in a virtual environment. This is a &lt;strong&gt;good thing&lt;/strong&gt;. You might even consider removing all the packages you&#039;ve previously installed so that you don&#039;t accidentally use one when you think you are in a virtual environment.&lt;/p&gt;

&lt;p&gt;The third line tells &lt;code&gt;bash&lt;/code&gt; (your terminal shell) to always turn on the &lt;code&gt;virtualenvwrapper&lt;/code&gt; tools automatically.&lt;/p&gt;

&lt;p&gt;You need to make these changes active in your terminal window because they weren&#039;t there when you started it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ source ~/.profile
$ echo $WORKON_HOME
/Users/seawolf/dev/virtualenv
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can also just close and restart the Terminal window and type the &lt;code&gt;echo $WORKON_HOME&lt;/code&gt; command to make sure &lt;code&gt;.profile&lt;/code&gt; is being loaded automatically.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;mkdir&quot; id=&quot;mkdir&quot;&gt;&lt;/a&gt;Set up your top-level virtual environment directory&lt;/h2&gt;

&lt;p&gt;You need to create the directory where your virtual environments will live:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkdir -p $WORKON_HOME
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&#039;s it!&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;create&quot; id=&quot;create&quot;&gt;&lt;/a&gt;Create your first virtual environment&lt;/h2&gt;

&lt;p&gt;I have a general virtual environment I call &#039;system&#039; where I keep a hodge-podge collection of packages for testing, exploring, and just playing around.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkvirtualenv system
New python executable in system/bin/python2.7
Also creating executable in system/bin/python
Installing setuptools, pip...done.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That was easy. You might see more lines of output as a few low-level tools are installed for the first time.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;commandref&quot; id=&quot;commandref&quot;&gt;&lt;/a&gt;Commands for using virtual environments&lt;/h2&gt;

&lt;p&gt;The commands you will use the most are the commands to:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;start a virtual environment&lt;/li&gt;
&lt;li&gt;switch to a different virtual environment&lt;/li&gt;
&lt;li&gt;install a package&lt;/li&gt;
&lt;li&gt;uninstall a package&lt;/li&gt;
&lt;li&gt;list all the installed packages&lt;/li&gt;
&lt;li&gt;create a &lt;code&gt;requirements.txt&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;install all packages listed in a &lt;code&gt;requirements.txt&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;exit the virtual environment&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Starting a virtual environment is easy: just type &lt;code&gt;workon &amp;lt;environment name&amp;gt;&lt;/code&gt; (insert the correct name in place of the placeholder, obviously). Your command prompt will change to show you the name of the environment you are currently in:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ workon system
(system)$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To switch between environments, you use the same command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(system)$ workon my_happy_project
(my_happy_project)$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Tab works in all the commands to auto-complete where possible. In my case, &lt;code&gt;system&lt;/code&gt; is the only virtualenv that starts with an &#039;s&#039;, so I can just type &lt;code&gt;workon s&amp;lt;tab&amp;gt;&lt;/code&gt; and it will auto-fill in the rest of the command for me.&lt;/p&gt;

&lt;p&gt;Installing a package works just like you would expect using &lt;code&gt;pip&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(system)$ pip install numpy
Downloading/unpacking numpy
  Downloading numpy-1.9.2-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x
  Downloading numpy-1.9.2-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x
  ... (lines removed) ...
86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB): 3.7MB downloaded
Installing collected packages: numpy
Successfully installed numpy
Cleaning up...
(system)$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Uninstalling is equally easy:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(system)$ pip uninstall numpy
Uninstalling numpy:
  /Users/seawolf/dev/py_virtualenv/my_happy_project/bin/f2py
  /Users/seawolf/dev/py_virtualenv/my_happy_project/lib/python2.7/site-packages/numpy-1.9.2.dist-info/DESCRIPTION.rst
  /Users/seawolf/dev/py_virtualenv/my_happy_project/lib/python2.7/site-packages/numpy-1.9.2.dist-info/METADATA
  ... (lines removed) ...
Proceed (y/n)? y
  Successfully uninstalled numpy
(system)$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Listing all installed packages is done with &lt;code&gt;pip freeze&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(system)$ pip freeze
numpy==1.9.2
wsgiref==0.1.2
(system)$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Notice that version numbers are shown, which makes it easy to see (and recreate) the combination of packages you are using.&lt;/p&gt;

&lt;p&gt;By redirecting the output of &lt;code&gt;pip freeze&lt;/code&gt; into a separate file, you capture the list for later use:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(system)$ pip freeze &amp;gt; requirements.txt
(system)$ more requirements.txt
numpy==1.9.2
wsgiref==0.1.2
(system)$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can later use this file to recreate your environment on another machine (or in a different virtualenv):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(system)$ pip install -r requirements.txt
... (output as all packages are installed) ...
(system)$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pip is smart enough to tell you if a particular package is already installed and will skip those, so you can just install from requirements any time someone else changes the file.&lt;/p&gt;

&lt;p&gt;Finally, to exit the virtual environment altogether when you are finished:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(system)$ deactivate
$
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&#039;s it! Happy programming in your new virtual environments!&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sun, 21 Jun 2015 19:26:44 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1793 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/book-page/1793/setting-virtual-environments-python-osx#comments</comments>
</item>
<item>
 <title>Sorry I slapped you...</title>
 <link>http://jeff.jke.net/post/sorry-i-slapped-you</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;&lt;img src=&quot;/sites/files/uploads/2014-06/sorry_i_slapped_you.jpg&quot; alt=&quot;sorry I slapped you, but you didn&#039;t seem like you would ever stop talking and I panicked&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/humor&quot;&gt;Humor&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 17 Jun 2014 23:24:43 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1791 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/post/sorry-i-slapped-you#comments</comments>
</item>
<item>
 <title>I&#039;ve got a package for you</title>
 <link>http://jeff.jke.net/post/ive-got-package-you</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Clever &lt;a href=&quot;http://vimeo.com/94502406&quot;&gt;animated short&lt;/a&gt;:&lt;/p&gt;

&lt;iframe src=&quot;//player.vimeo.com/video/94502406&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/humor&quot;&gt;Humor&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 10 May 2014 21:09:34 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1790 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/post/ive-got-package-you#comments</comments>
</item>
<item>
 <title>Fresh guacamole</title>
 <link>http://jeff.jke.net/post/fresh-guacamole</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Awesome &lt;a href=&quot;https://www.youtube.com/watch?v=dNJdJIwCF_Y&quot;&gt;animated short&lt;/a&gt;:&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/dNJdJIwCF_Y&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/humor&quot;&gt;Humor&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 06 May 2014 03:32:00 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1789 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/post/fresh-guacamole#comments</comments>
</item>
<item>
 <title>Riding without a helmet may be good for you</title>
 <link>http://jeff.jke.net/post/1788/riding-without-helmet-may-be-good-you</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Yes, you read that right... &lt;em&gt;riding your bike without a helmet may be safer than riding with one&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Statistics are an interesting thing. They can very quickly relate large amounts of information. The problem is that without careful analysis they can create the wrong impression or give an altogether false understanding of the world.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href=&quot;http://www.howiechong.com/journal/2014/2/bike-helmets&quot;&gt;Why It Makes Sense to Bike Without a Helmet&lt;/a&gt;&lt;/em&gt; is a simple example of this very concept:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;People have tried to reason with me that because I’ve spent so much money and time developing my brain, and the cost of an injury would be so devastating, it’s clearly more important to wear a helmet. But if we start looking into the research, there’s a strong argument to be made that wearing a bike helmet may actually increase your risk of injury, and increase the risk of injury of all the cyclists around you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The main points he makes are all valid, the sources are legitimate. What he&#039;s essentially saying is that &lt;em&gt;if&lt;/em&gt; you get into certain kinds of accidents then having a helmet on is likely to decrease the severity of your injuries, &lt;em&gt;but&lt;/em&gt; (and this is a &lt;strong&gt;big&lt;/strong&gt; but) the fact that you are wearing a helmet possibly increases the likelihood that you will get into an accident in the first place.&lt;/p&gt;

&lt;p&gt;That second point is important, but it is often overlooked. After all, our goal should be to reduce measurable injuries, right?&lt;/p&gt;

&lt;p&gt;Well, no, it shouldn&#039;t be. The goal should be to teach awareness and responsibility. That&#039;s hard to do.&lt;/p&gt;

&lt;p&gt;But we &lt;em&gt;can&lt;/em&gt; at least try to reduce the overall number of accidents resulting in any kind of hospitalization. With this in mind, the fact that wearing a helmet increases the likelihood of an accident in the first place is an important piece of information. We don&#039;t know for sure that wearing helmets is a risk factor for accidents, but there are correlations that indicate something might be going on.&lt;/p&gt;

&lt;p&gt;This sort of secondary effect is hard to measure, but it is important to understand. Simplistic rules or laws fail to recognize that the world is a made up of complex interactions between multiple systems. Just because a simple statistic sounds good doesn&#039;t mean it&#039;s actually good for society.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/politics&quot;&gt;Politics&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 06 May 2014 03:30:27 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1788 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/post/1788/riding-without-helmet-may-be-good-you#comments</comments>
</item>
<item>
 <title>Building a log of songs played in iTunes over time</title>
 <link>http://jeff.jke.net/2014/04/16/building-log-songs-played-itunes-over-time</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Recently I decided I wanted to perform a statistical analysis of all the music I&#039;ve ever played in iTunes. This is non-trivial, as iTunes only stores the date and time each song was played last and does not keep any log showing previous plays.&lt;/p&gt;

&lt;p&gt;With several copies of my iTunes library file, I can reconstruct the overall history. Luckily, I am using Time Machine and can therefore retrieve snapshots of the library. This is enough to reconstruct the history going back over a year.&lt;/p&gt;

&lt;p&gt;The only problem is that Time Machine does not back up the .xml files, only the proprietary .itl files used by iTunes natively. This means that I must perform all the following steps:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;retrive historical &lt;em&gt;iTunes Library.itl&lt;/em&gt; files&lt;/li&gt;
&lt;li&gt;convert each .itl file into the corresponding .xml file&lt;/li&gt;
&lt;li&gt;parse each .xml file and build a log of songs played based on the last played parameter for each song

&lt;ol&gt;&lt;li&gt;fill in any blanks with fuzzy data (for instance, if a song has been played twice since the previously-determined date, make a guess as to when the last-1 listening may have occurred)&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;The full description of each step is detailed in the pages that follow.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 17 Apr 2014 01:26:51 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1783 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2014/04/16/building-log-songs-played-itunes-over-time#comments</comments>
</item>
<item>
 <title>The strange human ritual of curling</title>
 <link>http://jeff.jke.net/2014/02/22/strange-human-ritual-curling</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Hilarious commentary by, of all people, David Attenborough:&lt;/p&gt;

&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;http://www.liveleak.com/ll_embed?f=5a6f5eecf87c&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://www.theguardian.com/media/2014/feb/19/sochi-2014-bbc-david-attenborough-curling&quot; rel=&quot;nofollow&quot;&gt;Sochi 2014: BBC&amp;#039;s David Attenborough reveals the frisky side of curling&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/humor&quot;&gt;Humor&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 22 Feb 2014 12:46:04 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1778 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2014/02/22/strange-human-ritual-curling#comments</comments>
</item>
<item>
 <title>At this moment in the world...</title>
 <link>http://jeff.jke.net/2014/02/22/moment-world</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Get enough people together and suddenly the world is a busy place (click the image for the fully-animated display):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://xkcd.com/1331/&quot;&gt;&lt;img src=&quot;http://imgs.xkcd.com/comics/frequency.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://xkcd.com/1331/&quot; rel=&quot;nofollow&quot;&gt;Frequency&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/science&quot;&gt;Science&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 22 Feb 2014 12:35:53 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1777 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2014/02/22/moment-world#comments</comments>
</item>
<item>
 <title>Complex interactions</title>
 <link>http://jeff.jke.net/2014/02/22/complex-interactions</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;The environment is complex. I love studying complexity, and observing ecosystems fascinates me because they are made up of many moving parts that each interact with the others in ways that are simple but in an overall way that is too complicated to predict reliably.&lt;/p&gt;

&lt;p&gt;Several years ago, wolves were reintroduced to Yellowstone National Park. The expectation was that this would help manage the populations of deer and other large game. It did. But it also impacted the environment in a slew of unexpected ways in what&#039;s called a &lt;em&gt;trophic cascade&lt;/em&gt;. This video explains it well:&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/ysa5OBhXz-Q&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;Our earth&#039;s climate is undergoing small changes in median temperature (you know, that &quot;climate change&quot; or &quot;global warming&quot; think you&#039;re hearing about). One of the major sides in the debate is that, well, we can adapt to small changes in temperature... &quot;so what if things warm up a little?&quot;. Here&#039;s the problem: there will be similar cascading effects, and in this case they will be on a scale we can&#039;t imagine or predict and affect every corner of the globe.&lt;/p&gt;

&lt;p&gt;Take this year&#039;s massive cold events across North America: these are one of the major effects predicted by climate models from a decade ago. Yes, for you deniers out there, &quot;global warming&quot; can include significant cold spells in localized regions. But the models in this case were only designed to predict certain kinds of weather events; they were not designed (and could not be) to predict what this would do to to plant life, tourism patterns, electricity usage, or how many people would stay inside and watch an entire season of House of Cards who otherwise would have been outside hiking. And all these effects impact other systems in ways that are simple in isolation but extremely complex in aggregate. Some of those decisions feed back into the carbon emissions cycle and further compound the climate changes that caused them.&lt;/p&gt;

&lt;p&gt;Our decisions as individuals and as a society impact our lives in ways that are too complicated to predict reliably. This has always been the case. Our challenge is to recognize when some aspect of our lives is causing changes that are significant, and then &lt;em&gt;changing our ways&lt;/em&gt; to protect our future selves.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So what&lt;/em&gt; if the temperature goes up a few degrees?&lt;/p&gt;

&lt;p&gt;So what, indeed.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://twistedsifter.com/videos/how-wolves-changed-an-ecosystem-trophic-cascade/?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A%20Twistedsifter%20%28TwistedSifter%20%29&quot; rel=&quot;nofollow&quot;&gt;How Wolves Changed an Entire Ecosystem&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=ysa5OBhXz-Q&quot; rel=&quot;nofollow&quot;&gt;How Wolves Change Rivers&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/science&quot;&gt;Science&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 22 Feb 2014 12:25:58 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1776 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2014/02/22/complex-interactions#comments</comments>
</item>
<item>
 <title>Tron Dance</title>
 <link>http://jeff.jke.net/2013/10/27/tron-dance</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Sometimes something really different comes along. This is one of those times:&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/-Rot9uaVO8s&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://youtu.be/-Rot9uaVO8s&quot; rel=&quot;nofollow&quot;&gt;Amazing Tron Dance performed by Wrecking Orchestra&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/general&quot;&gt;General&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sun, 27 Oct 2013 10:35:41 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1775 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/10/27/tron-dance#comments</comments>
</item>
<item>
 <title>Fixing Homebrew on OSX Mavericks</title>
 <link>http://jeff.jke.net/2013/10/25/fixing-homebrew-osx-mavericks</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;If you&#039;re using OSX and &lt;a href=&quot;http://brew.sh/&quot;&gt;Homebrew&lt;/a&gt; and are about to (or already have) upgrade to Mavericks, know that your packages won&#039;t work after the upgrade. Here&#039;s what you need to do to fix things:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ xcode-select --install
$ brew update
$ brew doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If &lt;code&gt;brew doctor&lt;/code&gt; returns any errors, you should fix them.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ brew upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;At this point, everything mostly seems to be working. I did have to manually re-install Maven:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ brew install mvn
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;... I&#039;m not sure why.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/development&quot;&gt;Development&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 26 Oct 2013 02:26:32 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1774 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/10/25/fixing-homebrew-osx-mavericks#comments</comments>
</item>
<item>
 <title>Coding conventions gone haywire</title>
 <link>http://jeff.jke.net/2013/10/24/coding-conventions-gone-haywire</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;I generally have coding standards that I follow for every language I write in. For the most part, they make my code more readable and make spotting errors easier. Sometimes a business has standards that don&#039;t make sense. And sometimes, &lt;a href=&quot;http://stackoverflow.com/a/220101/1886109&quot;&gt;they are flat out horrible&lt;/a&gt;. &lt;a href=&quot;http://stackoverflow.com&quot;&gt;StackOverflow&lt;/a&gt; has a thread all about the &lt;a href=&quot;http://stackoverflow.com/questions/218123/what-was-the-strangest-coding-standard-rule-that-you-were-forced-to-follow/1357845#1357845&quot;&gt;worst coding conventions seen in the workplace&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;All C/C++ arrays shall start at index 1, instead of 0. Indeed, the use of 0 as first index of an array is obsolete, and has been superseded by Visual Basic 6&#039;s insightful array index management.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;... and:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;a friend of mine - we&#039;ll call him CodeMonkey - got his first job out of college [many years ago] doing in-house development in COBOL. His first program was rejected as &#039;not complying with our standards&#039; because it used... [shudder!] nested IF statements&lt;/p&gt;
  
  &lt;p&gt;the coding standards banned the use of nested IF statements&lt;/p&gt;
  
  &lt;p&gt;now, CodeMonkey was not shy and was certain of his abilities, so he persisted in asking everyone up the chain and down the aisle why this rule existed. Most claimed they did not know, some made up stuff about &#039;readability&#039;, and finally one person remembered the original reason: the first version of the COBOL compiler they used had a bug and didn&#039;t handle nested IF statements correctly.&lt;/p&gt;
  
  &lt;p&gt;This compiler bug, of course, had been fixed for at least a decade, but no one had challenged the standards. [baaa!]&lt;/p&gt;
  
  &lt;p&gt;CodeMonkey was successful in getting the standards changed - eventually!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Coding conventions are good practice, but the best advice I can give in general is to use the conventions everyone else uses for the language you are using unless you have a &lt;strong&gt;damn&lt;/strong&gt; good reason not to.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/development&quot;&gt;Development&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Fri, 25 Oct 2013 03:28:14 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1773 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/10/24/coding-conventions-gone-haywire#comments</comments>
</item>
<item>
 <title>Using drush and XAMPP together on OSX</title>
 <link>http://jeff.jke.net/2013/10/20/using-drush-and-xampp-together-osx</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;I am using &lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot;&gt;XAMPP&lt;/a&gt; to host local websites I&#039;m developing, and one of those sites is built on &lt;a href=&quot;http://drupal.org&quot;&gt;Drupal&lt;/a&gt;. Recently I ran into an interesting problem: In trying to administer a site with &lt;a href=&quot;https://drupal.org/project/drush&quot;&gt;drush&lt;/a&gt; I was getting the following error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;seawolf$ drush status
PDO::__construct(): [2002] No such file or directory (trying to connect   [warning]
via unix:///var/mysql/mysql.sock) environment.inc:523
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I know my database is working, but drush can&#039;t see it.&lt;/p&gt;

&lt;p&gt;Several people have posted a solution that changes your settings.php file for your Drupal site to point to &lt;code&gt;127.0.0.1&lt;/code&gt; instead of &lt;code&gt;localhost&lt;/code&gt;, but this didn&#039;t work for me (plus, there&#039;s a subtle downside to that approach: the connection is slower because of the overhead).&lt;/p&gt;

&lt;p&gt;A very simple solution is to just create a link from the file path that drush is looking for to the actual socket created by XAMPP:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;seawolf$ sudo ln -s /Applications/XAMPP/xamppfiles/var/mysql /var/mysql
seawolf$ drush status
 PHP executable        :  /usr/bin/php 
 PHP configuration     :               
 PHP OS                :  Darwin       
 Drush version         :  6.0          
 Drush configuration   :               
 Drush alias files     :               
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: if you also have a local installation of mysql &lt;em&gt;other&lt;/em&gt; than the one in XAMPP, this probably won&#039;t work for you (/var/mysql will already exist and can&#039;t be both a link and a working directory).&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/development&quot;&gt;Development&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 21 Oct 2013 06:21:43 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1771 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/10/20/using-drush-and-xampp-together-osx#comments</comments>
</item>
<item>
 <title>Data-Intensive Text Processing with Map Reduce</title>
 <link>http://jeff.jke.net/2013/10/12/data-intensive-text-processing-map-reduce</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Lately I have been learning Map/Reduce programming on clusters such as Hadoop. While there are many books teaching how to get a cluster up and running, the number of resources teaching advanced map/reduce algorithms are much more limited.&lt;/p&gt;

&lt;p&gt;One excellent resource for learning these algorithms is &lt;a href=&quot;http://lintool.github.io/MapReduceAlgorithms/&quot;&gt;Data-Intensive Text Processing with MapReduce&lt;/a&gt; (&lt;a href=&quot;http://lintool.github.io/MapReduceAlgorithms/MapReduce-book-final.pdf&quot;&gt;free download&lt;/a&gt;) by Lin and Dyer (2010). This paper presents algorithms for &lt;a href=&quot;http://en.wikipedia.org/wiki/Co-occurrence&quot;&gt;word co-occurrence frequencies&lt;/a&gt;, building an &lt;a href=&quot;http://en.wikipedia.org/wiki/Inverted_index&quot;&gt;inverted index&lt;/a&gt;, and computing &lt;a href=&quot;http://en.wikipedia.org/wiki/PageRank&quot;&gt;PageRank&lt;/a&gt;, just to name a few. All algorithms are presented as pseudo-code.&lt;/p&gt;

&lt;p&gt;In this series of posts I will be sharing the code I have written to implement these algorithms specifically within Hadoop. Each post describes one algorithm&#039;s implementation. It is assumed that you can follow basic Java without extensive explanation.&lt;/p&gt;

&lt;p&gt;The posts also assume you have a Hadoop installation you can compile and run against. If you are running Mac OSX, you can &lt;a href=&quot;http://jeff.jke.net/2012/10/28/installing-hadoop-dev-environment-mac-osx-snow-leopard&quot;&gt;install Hadoop in about 5 minutes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While this is not intended to be a beginner&#039;s introduction to programming for Hadoop (there are many great online resources for that), I do explain why I do things the way I do when they deviate from the defaults. The algorithms themselves come directly from the document described above; please use it as a reference to understand the algorithmic choices.&lt;/p&gt;

&lt;p&gt;Code can be downloaded from the &lt;a href=&quot;https://github.com/seawolf42/text-processing-with-map-reduce-practicum&quot;&gt;repository on Github&lt;/a&gt;. Once you have a local copy, simply type &lt;code&gt;mvn package&lt;/code&gt; in the top directory. The repository is an Eclipse package and can be imported the usual way.&lt;/p&gt;

&lt;p&gt;Let&#039;s get into the code!&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sun, 13 Oct 2013 00:53:41 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1746 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/10/12/data-intensive-text-processing-map-reduce#comments</comments>
</item>
<item>
 <title>Government eavesdropping hubbub</title>
 <link>http://jeff.jke.net/2013/06/24/government-eavesdropping-hubbub</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Since the NSA leaks a few weeks ago, government eavesdropping has been in the news daily. I&#039;ve been talking with people about this quite a bit, but haven&#039;t posted anything to date. Today I&#039;m summarizing a few things that I feel are important into a single post.&lt;/p&gt;

&lt;p&gt;First, on the leaks themselves. Snowden broke the law in releasing classified information. However, he hasn&#039;t done anything that will fundamentally endanger anyone. He should be treated as a whistleblower, not as US enemy number 1.&lt;/p&gt;

&lt;p&gt;Next, about the government programs. The question really comes down to whether these programs should be tolerated in the first place.&lt;/p&gt;

&lt;p&gt;It&#039;s clear that &quot;national security&quot; is being used as a blanket of fear to ease us into greater and greater surveillance, and that &lt;a href=&quot;http://www.wired.com/threatlevel/2013/06/nsa-numbers/&quot;&gt;the public is generally mislead on the extent of this invasion&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks to the Guardian’s scoop, we now know definitively just how misleading these numbers are. You see, while the feds are required to disclose the number of orders they apply for and receive (almost always the same number, by the way), they aren’t required to say how many people are targeted in each order. So a single order issued to Verizon Business Solutions in April covered metadata for every phone call made by every customer. That’s from one order out of what will probably be about 200 reported in next year’s numbers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We&#039;re also &lt;a href=&quot;http://www.schneier.com/blog/archives/2013/06/us_offensive_cy.html&quot;&gt;ramping up offensive capabilities&lt;/a&gt; against governments and organizations:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;All of this mapping of vulnerabilities and keeping them secret for offensive use makes the Internet less secure, and these pretargeted, ready-to-unleash cyberweapons are destabilizing forces on international relationships. Rooting around other countries&#039; networks, analyzing vulnerabilities, creating back doors, and leaving logic bombs could easily be construed as acts of war. And all it takes is one overachieving national leader for this all to tumble into actual war.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In &lt;a href=&quot;https://chronicle.com/blogs/conversation/2013/06/13/3-questions-about-nsa-surveillance/&quot;&gt;3 Questions About NSA Surveillance&lt;/a&gt;, the authors ask the following important questions:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;Why were the programs secret?&lt;/li&gt;
    &lt;li&gt;What have the programs accomplished?&lt;/li&gt;
    &lt;li&gt;How much do the programs cost?&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;I believe all of these questions are relevant, but most important is the first one. The secrecy of these programs accomplished nothing with respect to catching terrorists; it only served to avoid the kind of oversight that would likely curtail them. If the programs are not effective, they should be stopped; if they are, their secrecy still doesn&#039;t increase their effectiveness. They should not be classified.&lt;/p&gt;

&lt;p&gt;In &lt;a href=&quot;http://www.wired.com/opinion/2013/06/why-i-have-nothing-to-hide-is-the-wrong-way-to-think-about-surveillance/&quot;&gt;Why ‘I Have Nothing to Hide’ Is the Wrong Way to Think About Surveillance&lt;/a&gt;, the authors point out that:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
    &lt;p&gt;We Won’t Always Know When We Have Something To Hide: you are very likely breaking laws you don&#039;t even know about, and that could be used against you in unexpected ways in the future.&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;p&gt;We Should Have Something To Hide: the ability to break the law has been instrumental in achieving sweeping social change (think gay marriage); groups being unable to participate in social forums in an anonymous manner prevents the betterment of society in crucial ways.&lt;/p&gt;
    &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;But they are &lt;a href=&quot;http://www.wired.com/opinion/2013/06/phew-it-was-just-metadata-not-think-again/&quot;&gt;just collecting metadata&lt;/a&gt;, right? You should still care:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Context yields insights into who we are and the implicit, hidden relationships between us. A complete set of all the calling records for an entire country is therefore a record not just of how the phone is used, but, coupled with powerful software, of our importance to each other, our interests, values, and the various roles we play.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We need to understand the programs in order to decide whether we as a people think they are moral, ethical, and allowable. And we can&#039;t do that if their very existence is secretly hidden under the blanket claim of &quot;national security&quot;. We need public discourse, not secret courts giving secret organizations permission to perform secret acts against secret targets.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;https://chronicle.com/blogs/conversation/2013/06/13/3-questions-about-nsa-surveillance/&quot; rel=&quot;nofollow&quot;&gt;3 Questions About NSA Surveillance&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;http://www.wired.com/opinion/2013/06/why-i-have-nothing-to-hide-is-the-wrong-way-to-think-about-surveillance/&quot; rel=&quot;nofollow&quot;&gt;Why ‘I Have Nothing to Hide’ Is the Wrong Way to Think About Surveillance&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://www.wired.com/threatlevel/2013/06/nsa-numbers/&quot; rel=&quot;nofollow&quot;&gt;Also Revealed by Verizon Leak: How the NSA and FBI Lie With Numbers&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;http://www.schneier.com/blog/archives/2013/06/us_offensive_cy.html&quot; rel=&quot;nofollow&quot;&gt;US Offensive Cyberwar Policy&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://www.wired.com/opinion/2013/06/phew-it-was-just-metadata-not-think-again/&quot; rel=&quot;nofollow&quot;&gt;Phew, NSA Is Just Collecting Metadata. (You Should Still Worry)&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/politics&quot;&gt;Politics&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/category/security&quot;&gt;Security&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 25 Jun 2013 00:40:15 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1743 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/06/24/government-eavesdropping-hubbub#comments</comments>
</item>
<item>
 <title>I don&#039;t know why I find this so funny...</title>
 <link>http://jeff.jke.net/2013/06/10/i-dont-know-why-i-find-so-funny</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;... I really don&#039;t know. But I do find it funny:&lt;/p&gt;

&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/7vCOlraUDaQ&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=7vCOlraUDaQ&quot; rel=&quot;nofollow&quot;&gt;Babbling cow&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/humor&quot;&gt;Humor&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 10 Jun 2013 16:25:56 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1742 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/06/10/i-dont-know-why-i-find-so-funny#comments</comments>
</item>
<item>
 <title>Attention to Amazonian details</title>
 <link>http://jeff.jke.net/2013/06/02/attention-amazonian-details</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;I look at details... it&#039;s just something I naturally do. So I caught this when I was looking at some music on Amazon the other day:&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;/sites/files/images/Screen Shot 2013-05-13 at 15_51_29 .png&quot; style=&quot;width: 516px; height: 558px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Apparently, I can get the CD &lt;strong&gt;plus&lt;/strong&gt; the digital album for less than the cost of the digital album alone.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/humor&quot;&gt;Humor&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 03 Jun 2013 03:28:32 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1741 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/06/02/attention-amazonian-details#comments</comments>
</item>
<item>
 <title>The flipped classroom</title>
 <link>http://jeff.jke.net/2013/03/24/flipped-classroom</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Our entire educational system is in need of a paradigm shift. I happen to prefer the &quot;&lt;a href=&quot;http://www.knewton.com/flipped-classroom/&quot;&gt;Flipped Classroom&lt;/a&gt;&quot; approach. I believe knowledge is abundant and students should be gleaning it from sources other than the classroom, and that the role of school is twofold:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;teach students how to learn&lt;/li&gt;
    &lt;li&gt;teach students how to search&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;If a student can find answers to their questions and adaptively grow as new information, approaches, systems, and data becomes available, they can accomplish just about anything they want. If they can&#039;t, they can&#039;t.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://ilovecharts.tumblr.com/post/21023440952/life-v-school&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://25.media.tumblr.com/tumblr_m2c4mgOCQG1qa0uujo1_1280.jpg&quot; style=&quot;height: 427px; width: 640px;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The flipped classroom embraces this by making the teacher a mentor and coach rather than a source of knowledge. Teachers help you build your skill set to do homework or complete projects.&lt;/p&gt;

&lt;p&gt;The knowledge comes from online sources, which is better for a variety of reasons. Most simply, the best teacher for any particular topic is rarely the person in front of you. Imagine learning each lesson from someone who is an expert in that field and also a skilled presenter! MIT could put out a series on programming (oh, wait, they already have!), another university could put out a series on psychology, another on philosophy, another on biology, another on mathematics...&lt;/p&gt;

&lt;p&gt;Many schools have already started doing this, so teachers have a plethora of resources to teach the knowledge. Now the teacher can focus on the individual students as he or she notices that they are getting stuck on a particular facet of the lecture or one kind of problem.&lt;/p&gt;

&lt;p&gt;I sincerely hope that we start seeing this kind of change soon.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://knewton.marketing.s3.amazonaws.com/images/infographics/flipped-classroom.jpg&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://knewton.marketing.s3.amazonaws.com/images/infographics/flipped-classroom.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://www.knewton.com/flipped-classroom/&quot; rel=&quot;nofollow&quot;&gt;The Flipped Classroom Infographic&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;http://ilovecharts.tumblr.com/post/21023440952/life-v-school&quot; rel=&quot;nofollow&quot;&gt;Life v School&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://www.knewton.com/&quot; rel=&quot;nofollow&quot;&gt;Knewton&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/disruption&quot;&gt;Disruption&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/category/politics&quot;&gt;Politics&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/science&quot;&gt;Science&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sun, 24 Mar 2013 23:16:28 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1732 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/03/24/flipped-classroom#comments</comments>
</item>
<item>
 <title>How to write a love song</title>
 <link>http://jeff.jke.net/2013/02/19/how-write-love-song</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;The Axis of Awesome teaches us &lt;a href=&quot;http://youtu.be/L2cfxv8Pq-Q&quot;&gt;how to write a love song&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/L2cfxv8Pq-Q&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-link field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://youtu.be/L2cfxv8Pq-Q&quot; rel=&quot;nofollow&quot;&gt;The Axis of Awesome: How to Write a Love Song&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-6 field-type-taxonomy-term-reference field-label-inline clearfix&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Category:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/category/humor&quot;&gt;Humor&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 20 Feb 2013 05:09:37 +0000</pubDate>
 <dc:creator>jeff</dc:creator>
 <guid isPermaLink="false">1731 at http://jeff.jke.net</guid>
 <comments>http://jeff.jke.net/2013/02/19/how-write-love-song#comments</comments>
</item>
</channel>
</rss>
