<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>jkwiens.com</title>
	
	<link>http://www.jkwiens.com</link>
	<description />
	<lastBuildDate>Sun, 07 Mar 2010 00:00:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Jkwienscom" /><feedburner:info uri="jkwienscom" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>[Link] Programming Books, part 2: The Elements of Programming Style</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/x6S3K2Qw7og/</link>
		<comments>http://www.jkwiens.com/2010/03/06/link-programming-books-part-2-the-elements-of-programming-style-2/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 00:00:05 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/03/06/link-programming-books-part-2-the-elements-of-programming-style-2/</guid>
		<description><![CDATA[Programming Books, part 2: The Elements of Programming Style (The Reinvigorated Programmer » Programming Books, part 2: The Elements of Programming Style)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://reprog.wordpress.com/2010/03/06/programming-books-part-2-the-elements-of-programming-style">Programming Books, part 2: The Elements of Programming Style</a> (<a href="http://reprog.wordpress.com">The Reinvigorated Programmer » Programming Books, part 2: The Elements of Programming Style</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/03/06/link-programming-books-part-2-the-elements-of-programming-style-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/03/06/link-programming-books-part-2-the-elements-of-programming-style-2/</feedburner:origLink></item>
		<item>
		<title>[Link] Joel Spolsky On Why He Is Quitting Blogging</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/ZhZLwVPqbhI/</link>
		<comments>http://www.jkwiens.com/2010/03/03/link-joel-spolsky-on-why-he-is-quitting-blogging/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 08:20:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/03/03/link-joel-spolsky-on-why-he-is-quitting-blogging/</guid>
		<description><![CDATA[Joel Spolsky On Why He Is Quitting Blogging (Hacker News)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.inc.com/magazine/20100301/lets-take-this-offline.html">Joel Spolsky On Why He Is Quitting Blogging</a> (<a href="http://news.ycombinator.com/">Hacker News</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/03/03/link-joel-spolsky-on-why-he-is-quitting-blogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/03/03/link-joel-spolsky-on-why-he-is-quitting-blogging/</feedburner:origLink></item>
		<item>
		<title>[Link] Breaking Habits</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/QWbJv3D_Hrc/</link>
		<comments>http://www.jkwiens.com/2010/02/24/link-breaking-habits/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 01:50:02 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/02/24/link-breaking-habits/</guid>
		<description><![CDATA[Breaking Habits (InsightbyDesign)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.insightbydesign.biz/?p=305">Breaking Habits</a> (<a href="http://www.insightbydesign.biz">InsightbyDesign</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/24/link-breaking-habits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/24/link-breaking-habits/</feedburner:origLink></item>
		<item>
		<title>[Link] TEDTalks : Bill Gates on energy: Innovating to zero! – Bill Gates (2010)</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/qbQFp99GzUE/</link>
		<comments>http://www.jkwiens.com/2010/02/23/link-tedtalks-bill-gates-on-energy-innovating-to-zero-bill-gates-2010/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 08:40:04 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/02/23/link-tedtalks-bill-gates-on-energy-innovating-to-zero-bill-gates-2010/</guid>
		<description><![CDATA[TEDTalks : Bill Gates on energy: Innovating to zero! &#8211; Bill Gates (2010) (TEDTalks (hd))
]]></description>
			<content:encoded><![CDATA[<p><a href="http://feedproxy.google.com/~r/TedtalksHD/~3/kv8ysh8TfME/767">TEDTalks : Bill Gates on energy: Innovating to zero! &#8211; Bill Gates (2010)</a> (<a href="http://www.ted.com/talks/browse">TEDTalks (hd)</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/23/link-tedtalks-bill-gates-on-energy-innovating-to-zero-bill-gates-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/23/link-tedtalks-bill-gates-on-energy-innovating-to-zero-bill-gates-2010/</feedburner:origLink></item>
		<item>
		<title>[Link] Convert m4a tracks to mp3 on linux  aareet krsna</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/OaUbXtJVuSg/</link>
		<comments>http://www.jkwiens.com/2010/02/14/link-convert-m4a-tracks-to-mp3-on-linux-aareet-krsna/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 05:40:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/02/14/link-convert-m4a-tracks-to-mp3-on-linux-aareet-krsna/</guid>
		<description><![CDATA[Convert m4a tracks to mp3 on linux « aareet krsna (aareet.com)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://aareet.com/2009/05/26/convert-m4a-to-mp3-on-ubuntu-linux/">Convert m4a tracks to mp3 on linux « aareet krsna</a> (<a href="http://aareet.com/">aareet.com</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/14/link-convert-m4a-tracks-to-mp3-on-linux-aareet-krsna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/14/link-convert-m4a-tracks-to-mp3-on-linux-aareet-krsna/</feedburner:origLink></item>
		<item>
		<title>[Link] Free advice: show up early    Jeffrey Zeldman Presents The Daily Report</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/4vChQhYmUX0/</link>
		<comments>http://www.jkwiens.com/2010/02/14/link-free-advice-show-up-early-jeffrey-zeldman-presents-the-daily-report/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 01:10:04 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/02/14/link-free-advice-show-up-early-jeffrey-zeldman-presents-the-daily-report/</guid>
		<description><![CDATA[Free advice: show up early – Jeffrey Zeldman Presents The Daily Report (www.zeldman.com)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zeldman.com/2010/02/05/free-advice-show-up-early/">Free advice: show up early – Jeffrey Zeldman Presents The Daily Report</a> (<a href="http://www.zeldman.com/">www.zeldman.com</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/14/link-free-advice-show-up-early-jeffrey-zeldman-presents-the-daily-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/14/link-free-advice-show-up-early-jeffrey-zeldman-presents-the-daily-report/</feedburner:origLink></item>
		<item>
		<title>[Link] Ragged Trousered Philosopher</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/DtJIcNwzZFw/</link>
		<comments>http://www.jkwiens.com/2010/02/13/link-ragged-trousered-philosopher/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 20:20:06 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/02/13/link-ragged-trousered-philosopher/</guid>
		<description><![CDATA[Ragged Trousered Philosopher (www.fullmoon.nu)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fullmoon.nu/articles/art.php?id=tal">Ragged Trousered Philosopher</a> (<a href="http://www.fullmoon.nu/">www.fullmoon.nu</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/13/link-ragged-trousered-philosopher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/13/link-ragged-trousered-philosopher/</feedburner:origLink></item>
		<item>
		<title>[Link] Sten  s Blog  Blog Archive  I Heart Joel on Software</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/5ymrb4pFmog/</link>
		<comments>http://www.jkwiens.com/2010/02/12/link-sten-s-blog-blog-archive-i-heart-joel-on-software/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 07:30:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/02/12/link-sten-s-blog-blog-archive-i-heart-joel-on-software/</guid>
		<description><![CDATA[Sten’s Blog » Blog Archive » I Heart Joel on Software (blogs.citytechinc.com)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.citytechinc.com/sanderson/?p=284">Sten’s Blog » Blog Archive » I Heart Joel on Software</a> (<a href="http://blogs.citytechinc.com/">blogs.citytechinc.com</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/12/link-sten-s-blog-blog-archive-i-heart-joel-on-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/12/link-sten-s-blog-blog-archive-i-heart-joel-on-software/</feedburner:origLink></item>
		<item>
		<title>[Link] Using py2exe with SciPy</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/JCLnF0fH-wg/</link>
		<comments>http://www.jkwiens.com/2010/02/12/link-using-py2exe-with-scipy/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 19:20:04 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/02/12/link-using-py2exe-with-scipy/</guid>
		<description><![CDATA[Using py2exe with SciPy (The Endeavour)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://feedproxy.google.com/~r/TheEndeavour/~3/Sb-olw_wJII/">Using py2exe with SciPy</a> (<a href="http://www.johndcook.com/blog">The Endeavour</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/12/link-using-py2exe-with-scipy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/12/link-using-py2exe-with-scipy/</feedburner:origLink></item>
		<item>
		<title>Quantum Oscillator</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/QdmzHuW_bHU/</link>
		<comments>http://www.jkwiens.com/2010/02/06/quantum-oscillator/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 19:10:13 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Quantum Mechanics]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/?p=782</guid>
		<description><![CDATA[Every Friday evening the graduate students at SFU have a problem solving session where we try to solve a problem as a group that one of the faculty proposed. This week we were asked to numerically compute the solution to the quantum oscillator. The solution to the problem is really neat and it is something [...]]]></description>
			<content:encoded><![CDATA[<p>Every Friday evening the graduate students at SFU have a problem solving session where we try to solve a problem as a group that one of the faculty proposed. This week we were asked to numerically compute the solution to the <a href="http://en.wikipedia.org/wiki/Quantum_harmonic_oscillator">quantum oscillator</a>. The solution to the problem is really neat and it is something that you don&#8217;t usually get to see. Most physics programs don&#8217;t bother to show you how the quantum oscillator moves.</p>
<div class="center"><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9254186&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9254186&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></div>
<p>For those of you that care, we were solving the following equation:</p>
<div class="center"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/2fc9f92f6d260b29153ac9ce8047a9a5_3.5pt.gif' title=' i \epsilon u_t + \epsilon^2 u_{xx} = (x^2) u' alt=' i \epsilon u_t + \epsilon^2 u_{xx} = (x^2) u'  style="vertical-align:-3.5pt;" ></div>
<p>with periodic boundary conditions, and an off-centered Gaussian as the initial conditions. We ended up using a <a href="http://en.wikipedia.org/wiki/Spectral_method">spectral method</a> to solve the problem using python. You can check out the code <a href="http://www.jkwiens.com/quantum-oscillator-code/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/06/quantum-oscillator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/06/quantum-oscillator/</feedburner:origLink></item>
		<item>
		<title>How do you deal with programmers who are intellectually bored at work?</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/jOrkxZTa47w/</link>
		<comments>http://www.jkwiens.com/2010/02/05/how-do-you-deal-with-programmers-who-are-intellectually-bored-at-work/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 07:27:33 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/?p=757</guid>
		<description><![CDATA[I finally had the guts to ask a question on the Stackoverflow Podcast. My question was&#8230;

Hello Joel and Jeff,
My name is Jeffrey Wiens and I have been a developer for around 4 years. I am currently in a applied mathematics graduate program because I needed something more challenging than what my previous jobs could offer.
As [...]]]></description>
			<content:encoded><![CDATA[<p>I finally had the guts to ask a <a href="http://blog.stackoverflow.com/2010/02/podcast-82/">question on the Stackoverflow Podcast</a>. My question was&#8230;</p>
<blockquote><p>
Hello Joel and Jeff,</p>
<p>My name is Jeffrey Wiens and I have been a developer for around 4 years. I am currently in a applied mathematics graduate program because I needed something more challenging than what my previous jobs could offer.</p>
<p>As a manager, how would you deal with programmers like me that are intellectually bored at work? And how do you balance this with your company&#8217;s immediate needs which may be intellectually unrewarding?
</p></blockquote>
<p> I think Joel and Jeff kinda missed the point. Well at least Joel missed my point (I think). Either way, you should still listen to the podcast. Instead of answering what managers should do with bored programmers, they answered what I (or bored programmers) should be doing. To summarize their response, they thought that boredom has more to do with your metal state instead of the task at hand (which I totally agree with). Also, that any programming project can be interesting if you are working at the correct level of abstraction (which I tentatively agree with).</p>
<p>I totally get that your metal state has more to do with boredom than with the task at hand. For any task, I bet that you can find at least one person that finds it interesting. However, I wouldn&#8217;t say that every person could find any task interesting. Now, in a previous life, I used to be a contractor for <a href="http://powerschool.com/">Powerschool</a>. This company sells software that manages general student information (ie. grades, attendance, etc) for public schools. In order to get funding, every school in the US needs to submit a set of reports to the government. One of the benefits of using Powerschool is that they create these reports for you. My job was to create some of these reports. The annoying thing about these reports is that they varied from state to state. The work was really not interesting. It involved reading a lot of government documentation and writing simple programs in a domain specific language. When it came to programming, all we needed to do was grab fields from the database, do some minor calculations, and then dump the data to text. To make things worse the domain specific language was horrific. If I had the power, I would have created an environment to address these issues using a more standard technology. However, the decision was not for me to make. For some of the programmers, the job was satisfying. However, it was not satisfying to me. Reading government documentation was boring and there was no inherit difficulties in the problems we were solving. The best choice for me was to obviously leave. However, when I left, I took a year&#8217;s worth of knowledge with me. Personally, I don&#8217;t really care. I took the job because I needed experience and I was tied to a certain location. However, as soon as I had another opportunity, I took it. But this leads to my original question about managing bored programmers. How could have Powerschool have kept me? If they had no desire to keep me, that is also fine. I am far happier because of it. However, what if Powerschool did want to keep me? What could have they have done?</p>
<p>This was the point of my question. I personally don&#8217;t care if your company hires me or not. Likewise, I don&#8217;t care if your company is intellectually engaging or not. However, my life is way to short and precious to waste it. If I am not enjoying my work, why should I stay? However, the problem is that managers should care that I stay. When programmers leave, they take the knowledge with them. This is a big problem.</p>
<p>I think that part of the answer to my question can be found in my next job at <a href="http://www.twu.ca/">Trinity Western University</a>. The university had an in house development team which created custom solutions for the university. The job could have been just as boring as my last one. However, the manager and team made it an awesome place to work. It is by far the best place I have ever worked.  The thing that continues to surprise me is how they managed to hire so many high quality developers. I think the answer lies on how they handled intellectual boredom. The first thing that they did well was that they allowed you to experiment. Instead of taking the easiest/simplest route, they allowed you to try new things. These experiments didn&#8217;t always turn out. However, some of them did and offered huge improvements to the old system. As a manager, it is very tempting to take the cheapest and easiest solution. However, if you want good developers, you won&#8217;t get them by doing this. The second thing that Trinity did was create Professional Development Days. I learned a lot of stuff through them. For example, one friday I created a spam filter for our support system. Did we really need a spam filter? Not Really. However, I learnt a lot about Machine Learning because of it. The great thing about Professional Development Days from a managers perspective is that these side-projects often snowball into larger personal projects. This is knowledge that could help your company.</p>
<p>Anyways, despite all the positive attributes of Trinity, I still decided to go back to school. As much as I loved working there, I still couldn&#8217;t see myself working for them in ten years. Either way, I was hoping that Jeff and Joel would shed some light into my question. Perhaps boredom is just a personal problem. However, some companies seem to be less boring than others. I thought Joel would have some insight on what companies could do to make the job more interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/05/how-do-you-deal-with-programmers-who-are-intellectually-bored-at-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/05/how-do-you-deal-with-programmers-who-are-intellectually-bored-at-work/</feedburner:origLink></item>
		<item>
		<title>[Link] Dear Python</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/6S2gRoVuKJA/</link>
		<comments>http://www.jkwiens.com/2010/02/02/link-dear-python/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 07:00:08 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/02/02/link-dear-python/</guid>
		<description><![CDATA[Dear Python (Hacker News)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zideck.com/blog/article.php?id=5">Dear Python</a> (<a href="http://news.ycombinator.com/">Hacker News</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/02/02/link-dear-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/02/02/link-dear-python/</feedburner:origLink></item>
		<item>
		<title>[Link] Statisticians take themselves too seriously</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/8fMK9ED1nnU/</link>
		<comments>http://www.jkwiens.com/2010/01/28/link-statisticians-take-themselves-too-seriously-2/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 17:00:05 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/28/link-statisticians-take-themselves-too-seriously-2/</guid>
		<description><![CDATA[Statisticians take themselves too seriously (The Endeavour)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://feedproxy.google.com/~r/TheEndeavour/~3/wgGadlvsOoI/">Statisticians take themselves too seriously</a> (<a href="http://www.johndcook.com/blog">The Endeavour</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/28/link-statisticians-take-themselves-too-seriously-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/28/link-statisticians-take-themselves-too-seriously-2/</feedburner:origLink></item>
		<item>
		<title>[Link] Windows 3.1 Online – With Minesweeper!</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/KOiCPKhHHT4/</link>
		<comments>http://www.jkwiens.com/2010/01/23/link-windows-3-1-online-with-minesweeper/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 05:30:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/23/link-windows-3-1-online-with-minesweeper/</guid>
		<description><![CDATA[Windows 3.1 Online &#8211; With Minesweeper! (Hacker News)
This is absolutely amazing. This guy basically created Windows 3.1 using nothing but javascript and html. The DOS shell even works!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.michaelv.org/">Windows 3.1 Online &#8211; With Minesweeper!</a> (<a href="http://news.ycombinator.com/">Hacker News</a>)<br />
<blockquote class='link_comment'>This is absolutely amazing. This guy basically created Windows 3.1 using nothing but javascript and html. The DOS shell even works!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/23/link-windows-3-1-online-with-minesweeper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/23/link-windows-3-1-online-with-minesweeper/</feedburner:origLink></item>
		<item>
		<title>The Dark Side of Perl</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/0kGIPgvh-Rc/</link>
		<comments>http://www.jkwiens.com/2010/01/16/dark-side-perl/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 08:08:08 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Entertainment]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/?p=746</guid>
		<description><![CDATA[Code!  Yes.  A programmer&#8217;s strength flows from code maintainability.
      But beware of Perl.  Terse syntax&#8230; more than one way to do it&#8230;
      default variables.  The dark side of code maintainability are they.
      Easily they flow, quick [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Code!  Yes.  A programmer&#8217;s strength flows from code maintainability.<br />
      But beware of Perl.  Terse syntax&#8230; more than one way to do it&#8230;<br />
      default variables.  The dark side of code maintainability are they.<br />
      Easily they flow, quick to join you when code you write.  If once<br />
      you start down the dark path, forever will it dominate your destiny,<br />
      consume you it will. </p>
<p>- <a href="http://www.netfunny.com/rhf/jokes/99/Nov/perl.html">Yoda [1]</a>
</p></blockquote>
<p>[1] http://www.netfunny.com/rhf/jokes/99/Nov/perl.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/16/dark-side-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/16/dark-side-perl/</feedburner:origLink></item>
		<item>
		<title>[Link] Soft maximum</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/VbPCRe81gXM/</link>
		<comments>http://www.jkwiens.com/2010/01/13/link-soft-maximum/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 02:00:04 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/13/link-soft-maximum/</guid>
		<description><![CDATA[Soft maximum (The Endeavour)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://feedproxy.google.com/~r/TheEndeavour/~3/kj_m3wXKCgI/">Soft maximum</a> (<a href="http://www.johndcook.com/blog">The Endeavour</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/13/link-soft-maximum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/13/link-soft-maximum/</feedburner:origLink></item>
		<item>
		<title>[Link] Dimensional Analysis</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/k3CVhYMupsI/</link>
		<comments>http://www.jkwiens.com/2010/01/11/link-dimensional-analysis/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 16:50:04 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/11/link-dimensional-analysis/</guid>
		<description><![CDATA[Dimensional Analysis (xkcd.com)
Hehe&#8230; Buckingham Pi to the rescue
]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com/687/">Dimensional Analysis</a> (<a href="http://xkcd.com/">xkcd.com</a>)<br />
<blockquote class='link_comment'>Hehe&#8230; Buckingham Pi to the rescue</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/11/link-dimensional-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/11/link-dimensional-analysis/</feedburner:origLink></item>
		<item>
		<title>[Link] What boyfriends and girlfriends search for on Google</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/oDZOHYfmhBA/</link>
		<comments>http://www.jkwiens.com/2010/01/10/link-what-boyfriends-and-girlfriends-search-for-on-google/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 19:10:04 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/10/link-what-boyfriends-and-girlfriends-search-for-on-google/</guid>
		<description><![CDATA[What boyfriends and girlfriends search for on Google (Predictably Irrational)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.predictablyirrational.com/?p=704">What boyfriends and girlfriends search for on Google</a> (<a href="http://www.predictablyirrational.com">Predictably Irrational</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/10/link-what-boyfriends-and-girlfriends-search-for-on-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/10/link-what-boyfriends-and-girlfriends-search-for-on-google/</feedburner:origLink></item>
		<item>
		<title>Simulating when a Green Light turns Red</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/3i35U_I0g9M/</link>
		<comments>http://www.jkwiens.com/2010/01/09/simulating-when-a-green-light-turns-red/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 21:52:29 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Discrete Math]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/?p=736</guid>
		<description><![CDATA[In a previous post, I talked about the Stochastic Traffic Cellular Automaton. I am finally going to post some simulations of this method. If you want to see the code, please leave a comment.
In this simulation, I will be modeling the traffic flow of an intersection when a green light turns red. From personal experience, [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://www.jkwiens.com/2009/11/17/stochastic-traffic-cellular-automaton/">previous post</a>, I talked about the Stochastic Traffic Cellular Automaton. I am finally going to post some simulations of this method. If you want to see the code, please leave a comment.</p>
<p>In this simulation, I will be modeling the traffic flow of an intersection when a green light turns red. From personal experience, you know that traffic will slowly get backed-up behind the red light. This can be described as a shock wave.</p>
<p>In <a href="http://www.holmes.rpi.edu/FOAM/index.foam.html">Chapter 5</a> in Mark Holmes book &#8220;Introduction to the Foundations of Applied Mathematics&#8221;, he sets-up the exact same problem. If you want more details on the problem, you can download the chapter for free on his website.</p>
<p>In my simulation, I have discretized the road into 1000 segments and evenly distribute 250 cars as the initial data. I then set the max speed <img src='http://www.jkwiens.com/plugins/latexrender/pictures/69691c7bdcc3ce6d5d8a1361f22d04ac_1.0pt.gif' title='M' alt='M'  style="vertical-align:-1.0pt;" > to 2 and the probability to slow-down <img src='http://www.jkwiens.com/plugins/latexrender/pictures/83878c91171338902e0fe0fb97a8c47a_2.94444pt.gif' title='p' alt='p'  style="vertical-align:-2.94444pt;" > to .25. </p>
<p>The following picture shows you how the simulation ran. Each row (left to right) represents the entire road where the black spots represent cars. As you move down, you will see how the road changed for each time-step. It might take you some time to make sense of the picture.</p>
<div class="center"><img src="http://pictures.jkwiens.com/stoplight_chapter5.png" style="border: 2px solid rgb(149, 149, 149);"></div>
<p>As you can see, the traffic on the right hand side starts to pile-up more and more as time goes on. This can be easily seen by the following movie.</p>
<div class="center">
<object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8640247&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8640247&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
</div>
<p>The top plot shows the simulation for the Stochastic Traffic Cellular Automaton model. The plot below it shows the exact solution to the continuous Lighthill-Whitham PDE Model which I described in my <a href="http://www.jkwiens.com/2009/12/17/poster-presentation-on-traffic-flow/">poster presentation</a>. As you can see, the two models behave very similarly.</p>
<p>Lastly, I ran the simulation 10,000 times. After running the simulations, I calculated the probability that a car exists in a particular road segment. This created a traffic density curve similar to the Lighthill-Whitham model which is shown in the following video.</p>
<div class="center">
<object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8640397&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8640397&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/09/simulating-when-a-green-light-turns-red/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/09/simulating-when-a-green-light-turns-red/</feedburner:origLink></item>
		<item>
		<title>[Link] CCHS Library Learning Commons: 2010</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/A3GWimTj27I/</link>
		<comments>http://www.jkwiens.com/2010/01/09/link-cchs-library-learning-commons-2010/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 19:30:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/09/link-cchs-library-learning-commons-2010/</guid>
		<description><![CDATA[CCHS Library Learning Commons: 2010 (concordcarlislelibrary.blogspot.com)
I find community libraries are as good as useless. The library is never up to date. Forget the idea that you could borrow Predictably Irrational or some other semi-new book. Also, I find that they are horrible for any specialized information. For example, community libraries NEVER have any decent math, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://concordcarlislelibrary.blogspot.com/2009/12/2010.html">CCHS Library Learning Commons: 2010</a> (<a href="http://concordcarlislelibrary.blogspot.com/">concordcarlislelibrary.blogspot.com</a>)<br />
<blockquote class='link_comment'>I find community libraries are as good as useless. The library is never up to date. Forget the idea that you could borrow Predictably Irrational or some other semi-new book. Also, I find that they are horrible for any specialized information. For example, community libraries NEVER have any decent math, physics, or computer science. I don&#8217;t see why anyone would want to go to a community library when there are university libraries. Either way, unless community libraries fix these problems, I won&#8217;t miss them. Perhaps if community libraries started lending ebooks, it could fix a lot of there problems. This would fix the financial problems that often plague community libraries. They would then be able to get a collection big enough that would interest me.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/09/link-cchs-library-learning-commons-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/09/link-cchs-library-learning-commons-2010/</feedburner:origLink></item>
		<item>
		<title>Changing PDF Metadata on Ubuntu</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/yZ86vlIL2lg/</link>
		<comments>http://www.jkwiens.com/2010/01/04/changing-pdf-metadata-on-ubuntu/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 23:52:20 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/?p=730</guid>
		<description><![CDATA[I got a Sony E-Reader as a Christmas present from my parents this year. I absolutely love it! It will definitely change how I read books. I no longer have to lug around several books everywhere I go. The best part is that I can put all my journal articles in it. I no longer [...]]]></description>
			<content:encoded><![CDATA[<p>I got a Sony E-Reader as a Christmas present from my parents this year. I absolutely love it! It will definitely change how I read books. I no longer have to lug around several books everywhere I go. The best part is that I can put all my journal articles in it. I no longer have to print off hundreds of pages of journal articles. However, there is one thing that I have found really annoying. It is practically impossible to find programs that change the pdf&#8217;s metadata. It took me awhile to find one that actually worked. </p>
<p>I ended up finding a Linux Program called PDFTK. I wanted to go over some basic commands (mainly so that I can find them easily).</p>
<p><b>Installing PDFTK:</b></p>
<pre language="bash">sudo apt-get install pdftk</pre>
<p><b>Edit Existing Meta-Data:</b></p>
<pre language="bash">pdftk book.pdf dump_data output report.txt</pre>
<p>You can then edit the data in report.txt which we can later upload back to the pdf. The text file will contain key value pairs like:</p>
<pre language="bash">
InfoKey: Title
InfoValue: Coders At Work
InfoKey: Author
InfoValue: Peter Seivel
InfoKey: Subject
InfoValue: Programming
</pre>
<p>After you edit this file, you can update the new meta-data to the pdf.</p>
<p><b>Update PDF Meta-Data:</b></p>
<pre language="bash">pdftk book.pdf update_info report.txt output bookcopy.pdf</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/04/changing-pdf-metadata-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/04/changing-pdf-metadata-on-ubuntu/</feedburner:origLink></item>
		<item>
		<title>[Link] 15 Things Worth Knowing About Coffee – The Oatmeal</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/Lw4BwvdotE8/</link>
		<comments>http://www.jkwiens.com/2010/01/04/link-15-things-worth-knowing-about-coffee-the-oatmeal/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 22:30:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/04/link-15-things-worth-knowing-about-coffee-the-oatmeal/</guid>
		<description><![CDATA[15 Things Worth Knowing About Coffee &#8211; The Oatmeal (theoatmeal.com)
Here are some fun things to know about coffee. And yes, I am a coffee addict.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://theoatmeal.com/comics/coffee">15 Things Worth Knowing About Coffee &#8211; The Oatmeal</a> (<a href="http://theoatmeal.com/">theoatmeal.com</a>)<br />
<blockquote class='link_comment'>Here are some fun things to know about coffee. And yes, I am a coffee addict.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/04/link-15-things-worth-knowing-about-coffee-the-oatmeal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/04/link-15-things-worth-knowing-about-coffee-the-oatmeal/</feedburner:origLink></item>
		<item>
		<title>[Link] Transfer Applications from iPhone to iTunes</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/6NU2RloYWjU/</link>
		<comments>http://www.jkwiens.com/2010/01/03/link-transfer-applications-from-iphone-to-itunes/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 02:40:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/03/link-transfer-applications-from-iphone-to-itunes/</guid>
		<description><![CDATA[Transfer Applications from iPhone to iTunes (theappleblog.com)
Transferring between itunes can be such a pain.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://theappleblog.com/2008/07/22/transfer-applications-from-iphone-to-itunes/">Transfer Applications from iPhone to iTunes</a> (<a href="http://theappleblog.com/">theappleblog.com</a>)<br />
<blockquote class='link_comment'>Transferring between itunes can be such a pain.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/03/link-transfer-applications-from-iphone-to-itunes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/03/link-transfer-applications-from-iphone-to-itunes/</feedburner:origLink></item>
		<item>
		<title>Finite Difference Heat Equation using NumPy</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/cTWZLIycxlE/</link>
		<comments>http://www.jkwiens.com/2010/01/02/finite-difference-heat-equation-using-numpy/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 06:24:07 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Numerical Calculations]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/?p=700</guid>
		<description><![CDATA[To expand my experience with NumPy during the Christmas holiday, I decided to solve the heat equation using a finite difference technique. I know this is a trivial problem to solve. However, like I said in my previous post, the goal is to learn NumPy and not to solve complicated mathematical problems. Likewise, the purpose [...]]]></description>
			<content:encoded><![CDATA[<p>To expand my experience with NumPy during the Christmas holiday, I decided to solve the heat equation using a <a href="http://en.wikipedia.org/wiki/Finite_difference">finite difference</a> technique. I know this is a trivial problem to solve. However, like I said in my <a href="http://www.jkwiens.com/2010/01/02/creating-movies-with-pyplotpylab/">previous post</a>, the goal is to learn NumPy and not to solve complicated mathematical problems. Likewise, the purpose of this post is not to explain how finite difference methods work, but how to implement it using Python and NumPy.</p>
<p>The problem we are solving is the <a href="http://en.wikipedia.org/wiki/Heat_equation">heat equation</a></p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/37f4825ddd5ec21acf768c821fb96618_4.44841pt.gif' title='\frac{ \partial u}{\partial t} = \frac{ \partial^2 u}{\partial x^2} ' alt='\frac{ \partial u}{\partial t} = \frac{ \partial^2 u}{\partial x^2} '  style="vertical-align:-4.44841pt;" ></div>
<p>with Dirichlet Boundary Conditions ( <img src='http://www.jkwiens.com/plugins/latexrender/pictures/362f0fd8d8a1303acafd868d06919112_3.5pt.gif' title='u(0,t) = u(1,t) = 0' alt='u(0,t) = u(1,t) = 0'  style="vertical-align:-3.5pt;" > ) over the domain <img src='http://www.jkwiens.com/plugins/latexrender/pictures/0107766c9b9cdceb2b0cdb20ad842cd4_2.35971pt.gif' title='0 \le x \le 1' alt='0 \le x \le 1'  style="vertical-align:-2.35971pt;" > with the initial conditions</p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/665b3a8abb0d53d9cef5dadd5ae9bcc6_3.5pt.gif' title='u(x,0) = 10~sin( \pi x )' alt='u(x,0) = 10~sin( \pi x )'  style="vertical-align:-3.5pt;" ></div>
<p>You can think of the problem as solving for the temperature in a one-dimensional metal rod when the ends of the rod is kept at 0 degrees. Intuitively, you know that the temperature is going to go to zero as time goes to infinite. </p>
<p>To solve this problem using a finite difference method, we need to discretize in space first. I will be using a second-order centered difference to approximate <img src='http://www.jkwiens.com/plugins/latexrender/pictures/d033fa69f961f774bdb6b1b1c9da0129_4.44841pt.gif' title='\frac{ \partial^2 u}{\partial x^2} ' alt='\frac{ \partial^2 u}{\partial x^2} '  style="vertical-align:-4.44841pt;" >. This will give the following semi-discrete problem:</p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/fb41132177e7d87ee318966724f3225d_4.44841pt.gif' title='\frac{ \partial U}{\partial t} = A~\vec{U}' alt='\frac{ \partial U}{\partial t} = A~\vec{U}'  style="vertical-align:-4.44841pt;" ></div>
<p>where</p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/e04ef39b1ca887bec40301b57ee4cd89_37.82779pt.gif' title='A = \frac{1}{\Delta x^2} \left( \begin{array}{cccccccc}-2 &amp; 1 &amp; 0 &amp; 0 &amp; \ldots &amp; 0 &amp; 0 &amp; 0 \\1 &amp; -2 &amp; 1 &amp; 0  &amp; \ldots &amp; 0 &amp; 0 &amp; 0 \\0 &amp; 1 &amp; -2 &amp; 1 &amp; \ldots &amp; 0 &amp; 0 &amp; 0 \\\vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots \\0 &amp; 0 &amp; 0 &amp; 0 &amp; \ldots &amp; 1 &amp; -2 &amp; 1 \\0 &amp; 0 &amp; 0 &amp; 0 &amp; \ldots &amp; 0 &amp; 1 &amp; -2 \end{array} \right)' alt='A = \frac{1}{\Delta x^2} \left( \begin{array}{cccccccc}-2 &amp; 1 &amp; 0 &amp; 0 &amp; \ldots &amp; 0 &amp; 0 &amp; 0 \\1 &amp; -2 &amp; 1 &amp; 0  &amp; \ldots &amp; 0 &amp; 0 &amp; 0 \\0 &amp; 1 &amp; -2 &amp; 1 &amp; \ldots &amp; 0 &amp; 0 &amp; 0 \\\vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots \\0 &amp; 0 &amp; 0 &amp; 0 &amp; \ldots &amp; 1 &amp; -2 &amp; 1 \\0 &amp; 0 &amp; 0 &amp; 0 &amp; \ldots &amp; 0 &amp; 1 &amp; -2 \end{array} \right)'  style="vertical-align:-37.82779pt;" > </div>
<p>and</p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/da104c59c39166c46cd9088caea50987_37.82779pt.gif' title='\vec{U}= \left( \begin{array}{c} u(0,t) \\ u(\Delta x,t) \\ u( 2 \Delta x, t) \\ \vdots \\ u(1-\Delta x,t) \\ u(1,t) \end{array} \right)' alt='\vec{U}= \left( \begin{array}{c} u(0,t) \\ u(\Delta x,t) \\ u( 2 \Delta x, t) \\ \vdots \\ u(1-\Delta x,t) \\ u(1,t) \end{array} \right)'  style="vertical-align:-37.82779pt;" > </div>
<p>The next step is to discretize in time. We can do this by using the <a href="http://en.wikipedia.org/wiki/Crank%E2%80%93Nicolson_method">Crank-Nicolson method</a> which is</p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/0985e5680480b33eec6e587cc1f53daf_4.44841pt.gif' title='\frac{\partial y}{\partial t} \approx \frac{ u_{n+1}-u_n }{\Delta t} = \frac{1}{2} ( f_{n+1}(x) + f_n(x) )' alt='\frac{\partial y}{\partial t} \approx \frac{ u_{n+1}-u_n }{\Delta t} = \frac{1}{2} ( f_{n+1}(x) + f_n(x) )'  style="vertical-align:-4.44841pt;" ></div>
<p>where</p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/db7e7e8aca6330298f877f0851b420ee_4.44841pt.gif' title='\frac{\partial y}{\partial t} = f(x)' alt='\frac{\partial y}{\partial t} = f(x)'  style="vertical-align:-4.44841pt;" ></div>
<p>If we apply this method to the semi-discrete problem, we will get</p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/50833168391bb6c4d9d2374c8d66eec2_4.44841pt.gif' title=' \frac{ \vec{U}_{n+1}-\vec{U}_n }{\Delta t} = \frac{1}{2} ( A~\vec{U}_{n+1} + A~\vec{U}_n)' alt=' \frac{ \vec{U}_{n+1}-\vec{U}_n }{\Delta t} = \frac{1}{2} ( A~\vec{U}_{n+1} + A~\vec{U}_n)'  style="vertical-align:-4.44841pt;" ></div>
<p>If we want to solve for <img src='http://www.jkwiens.com/plugins/latexrender/pictures/8b9142327e85e73f10a953aa44a85a4b_3.33333pt.gif' title='\vec{U}_{n+1}' alt='\vec{U}_{n+1}'  style="vertical-align:-3.33333pt;" >, we get the following system of equations</p>
<div class="indent"><img src='http://www.jkwiens.com/plugins/latexrender/pictures/526c44e3899edd12ef5b841024d62e9b_4.44841pt.gif' title='  (I -\frac{\Delta t}{2}~A)~\vec{U}_{n+1} = ( I + \frac{\Delta t}{2}~A)~\vec{U}_n' alt='  (I -\frac{\Delta t}{2}~A)~\vec{U}_{n+1} = ( I + \frac{\Delta t}{2}~A)~\vec{U}_n'  style="vertical-align:-4.44841pt;" ></div>
<p>We can implement this method using the following <a href="http://www.jkwiens.com/heat-equation-using-finite-difference/">python code</a>. This code will then generate the following movie.</p>
<div class="center">
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="195"><param name="src" value="http://pictures.jkwiens.com/1dheatequation.mp4"><param name="autoplay" value="false"><param name="controller" value="true"><embed height="300" pluginspage="http://www.apple.com/quicktime/download/" src="http://pictures.jkwiens.com/1dheatequation.mp4" type="video/quicktime" width="400" controller="true" autoplay="false" SCALE = "aspect"><br />
</object>
</div>
<p>Please note that the movie was sped up by a factor of ten.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/02/finite-difference-heat-equation-using-numpy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pictures.jkwiens.com/1dheatequation.mp4" length="722392" type="video/mp4" />
		<feedburner:origLink>http://www.jkwiens.com/2010/01/02/finite-difference-heat-equation-using-numpy/</feedburner:origLink></item>
		<item>
		<title>[Link] Creating Movies with PyPlot / PyLab</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/6rFTSVD_ob8/</link>
		<comments>http://www.jkwiens.com/2010/01/02/link-creating-movies-with-pyplot-pylab/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 05:00:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/02/link-creating-movies-with-pyplot-pylab/</guid>
		<description><![CDATA[Creating Movies with PyPlot / PyLab (Hacker News)
Yeah, I got on hacker news! Make sure to vote me up.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jkwiens.com/2010/01/02/creating-movies-with-pyplotpylab/">Creating Movies with PyPlot / PyLab</a> (<a href="http://news.ycombinator.com/">Hacker News</a>)<br />
<blockquote class='link_comment'>Yeah, I got on hacker news! Make sure to vote me up.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/02/link-creating-movies-with-pyplot-pylab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/02/link-creating-movies-with-pyplot-pylab/</feedburner:origLink></item>
		<item>
		<title>[Link] Your Best Shot 2009: Starry Sky</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/Xq2odBxi1Jg/</link>
		<comments>http://www.jkwiens.com/2010/01/02/link-your-best-shot-2009-starry-sky/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 20:40:04 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2010/01/02/link-your-best-shot-2009-starry-sky/</guid>
		<description><![CDATA[Your Best Shot 2009: Starry Sky (Flickr Blog)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.flickr.net/en/2010/01/02/your-best-shot-2009-starry-sky/">Your Best Shot 2009: Starry Sky</a> (<a href="http://blog.flickr.net/">Flickr Blog</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/02/link-your-best-shot-2009-starry-sky/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2010/01/02/link-your-best-shot-2009-starry-sky/</feedburner:origLink></item>
		<item>
		<title>Creating Movies with PyPlot/PyLab</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/C1dd_4OmhEo/</link>
		<comments>http://www.jkwiens.com/2010/01/02/creating-movies-with-pyplotpylab/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 18:36:00 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/?p=679</guid>
		<description><![CDATA[Over the Christmas holidays, I started to dive more into Python. I have been trying to learn more about NumPy,  SciPy, and PyLab. So far, I love these libraries. However, there doesn&#8217;t seem to be a good way to create movies/animations. 
The best way to create a movie using Python is to generate plots [...]]]></description>
			<content:encoded><![CDATA[<p>Over the Christmas holidays, I started to dive more into Python. I have been trying to learn more about <a href="http://numpy.scipy.org/">NumPy</a>,  <a href="http://numpy.scipy.org/">SciPy</a>, and <a href="http://matplotlib.sourceforge.net/">PyLab</a>. So far, I love these libraries. However, there doesn&#8217;t seem to be a good way to create movies/animations. </p>
<p>The <a href="http://matplotlib.sourceforge.net/faq/howto_faq.html#make-a-movie">best way</a> to create a movie using Python is to generate plots using PyLab or PyPlot and save them as pictures. You can then use another program to stitch them together (ie. mencoder or ffmpeg). This process takes substantial amount of time and seems a little bit hacky at best. Please leave comments if you know of a better way.</p>
<p>It took some time to figure out how to get everything configured on MacOS X. My first problem was trying to get a copy of mencoder or ffmpeg. We need one of these programs in order to stitch all the pictures together. I found an <a href="http://www.macosxhints.com/article.php?story=20061220082125312">interesting post</a> which allowed me to easily install ffmpeg onto my mac. You can download my code and a copy of ffmpeg <a href="http://pictures.jkwiens.com/pythonmovie.zip">here</a>.</p>
<p>Once you downloaded the zip file, you will need to</p>
<ol>
<li>Copy <i>ffmpeg</i> to <span style="color:red">/usr/local/bin</span></li>
<li>Execute the following commands from your terminal:
<div class="indent" style="color:red">
sudo chown root:wheel /usr/local/bin/ffmpeg<br />
sudo chmod 755 /usr/local/bin/ffmpeg
</div>
</li>
</ol>
<p>Once you have installed ffmpeg, we can look at how to create a movie. I created a function called CreateMovie which will easily create a movie</p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">def</span> CreateMovie<span style="color: black;">&#40;</span>plotter, numberOfFrames, fps=<span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">sys</span>
	<span style="color: #ff7700;font-weight:bold;">import</span> matplotlib.<span style="color: black;">pyplot</span> as plt
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span>numberOfFrames<span style="color: black;">&#41;</span>:
		plotter<span style="color: black;">&#40;</span>i<span style="color: black;">&#41;</span>
		fname = <span style="color: #483d8b;">'_tmp%05d.png'</span>%i
&nbsp;
		plt.<span style="color: black;">savefig</span><span style="color: black;">&#40;</span>fname<span style="color: black;">&#41;</span>
		plt.<span style="color: black;">clf</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;rm movie.mp4&quot;</span><span style="color: black;">&#41;</span>
	<span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;ffmpeg -r &quot;</span>+<span style="color: #008000;">str</span><span style="color: black;">&#40;</span>fps<span style="color: black;">&#41;</span>+<span style="color: #483d8b;">&quot; -b 1800 -i _tmp%05d.png movie.mp4&quot;</span><span style="color: black;">&#41;</span>
	<span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;rm _tmp*.png&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>This function creates a movie called movie.mp4 in the current working directory which has a default frame rate of 10 frames per second. Make sure that you don&#8217;t have any files called movie.mp4 and _tmp*.png in the current working directory because they will be deleted.</p>
<p>The function takes the following parameters:</p>
<div class="indent"><i>plotter</i>: This parameter is a function with the following form:</p>
<div class="center"><i>def plotter(frame_number)</i></div>
<p>where frame_number is the current frame that needs to be plotted using the matplotlib.pyplot library.
</p></div>
<div class="indent"><i>numberOfFrames</i>: The total number of frames in the movie.</div>
<p></p>
<div class="indent"><i>fps</i>: The frames per second. The default is 10.</div>
<p>In order to illustrate the use of this function, check out this code for a moving gaussian.</p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> CreateMovie as movie
<span style="color: #ff7700;font-weight:bold;">import</span> matplotlib.<span style="color: black;">pyplot</span> as plt
<span style="color: #ff7700;font-weight:bold;">import</span> numpy as np
&nbsp;
x = np.<span style="color: black;">linspace</span><span style="color: black;">&#40;</span>-.<span style="color: #ff4500;">5</span>,<span style="color: #ff4500;">4</span>,<span style="color: #ff4500;">500</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Plots a given frame</span>
<span style="color: #ff7700;font-weight:bold;">def</span> plotFunction<span style="color: black;">&#40;</span> frame <span style="color: black;">&#41;</span>:
	plt.<span style="color: black;">plot</span><span style="color: black;">&#40;</span>x, np.<span style="color: black;">exp</span><span style="color: black;">&#40;</span> <span style="color: #ff4500;">-10</span>*<span style="color: black;">&#40;</span>x - frame/<span style="color: #ff4500;">10.0</span><span style="color: black;">&#41;</span>**<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
	plt.<span style="color: black;">axis</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>-.<span style="color: #ff4500;">5</span>,<span style="color: #ff4500;">4</span>,<span style="color: #ff4500;">0</span>,<span style="color: #ff4500;">1.1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
movie.<span style="color: black;">CreateMovie</span><span style="color: black;">&#40;</span>plotFunction, <span style="color: #ff4500;">50</span><span style="color: black;">&#41;</span></pre></div></div>

<p>This code will generate the following movie.</p>
<div class="center">
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="195"><param name="src" value="http://pictures.jkwiens.com/pythonmovie.mp4"><param name="autoplay" value="false"><param name="controller" value="true"><embed height="300" pluginspage="http://www.apple.com/quicktime/download/" src="http://pictures.jkwiens.com/pythonmovie.mp4" type="video/quicktime" width="400" controller="true" autoplay="false" SCALE = "aspect"><br />
</object>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2010/01/02/creating-movies-with-pyplotpylab/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://pictures.jkwiens.com/pythonmovie.mp4" length="344415" type="video/mp4" />
		<feedburner:origLink>http://www.jkwiens.com/2010/01/02/creating-movies-with-pyplotpylab/</feedburner:origLink></item>
		<item>
		<title>[Link] Top ten iPhone apps for people who could build iPhone apps (but who choose to make web things instead)</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/oGIaGsKcti4/</link>
		<comments>http://www.jkwiens.com/2009/12/24/link-top-ten-iphone-apps-for-people-who-could-build-iphone-apps-but-who-choose-to-make-web-things-instead/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 02:10:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2009/12/24/link-top-ten-iphone-apps-for-people-who-could-build-iphone-apps-but-who-choose-to-make-web-things-instead/</guid>
		<description><![CDATA[Top ten iPhone apps for people who could build iPhone apps (but who choose to make web things instead) (warpedvisions.org)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://feedproxy.google.com/~r/warpedvisions/~3/JdudIqHGhsc/">Top ten iPhone apps for people who could build iPhone apps (but who choose to make web things instead)</a> (<a href="http://warpedvisions.org">warpedvisions.org</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2009/12/24/link-top-ten-iphone-apps-for-people-who-could-build-iphone-apps-but-who-choose-to-make-web-things-instead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2009/12/24/link-top-ten-iphone-apps-for-people-who-could-build-iphone-apps-but-who-choose-to-make-web-things-instead/</feedburner:origLink></item>
		<item>
		<title>[Link] Christmas Plans</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/QgAIBQLets8/</link>
		<comments>http://www.jkwiens.com/2009/12/22/link-christmas-plans/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 05:50:04 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2009/12/22/link-christmas-plans/</guid>
		<description><![CDATA[Christmas Plans (xkcd.com)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com/679/">Christmas Plans</a> (<a href="http://xkcd.com/">xkcd.com</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2009/12/22/link-christmas-plans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2009/12/22/link-christmas-plans/</feedburner:origLink></item>
		<item>
		<title>[Link] Backup Ubuntu using rdiff-backup|Ubuntu Geek</title>
		<link>http://feedproxy.google.com/~r/Jkwienscom/~3/YJwki4SWpoY/</link>
		<comments>http://www.jkwiens.com/2009/12/19/link-backup-ubuntu-using-rdiff-backupubuntu-geek/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 23:10:03 +0000</pubDate>
		<dc:creator>eldila</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.jkwiens.com/2009/12/19/link-backup-ubuntu-using-rdiff-backupubuntu-geek/</guid>
		<description><![CDATA[Backup Ubuntu using rdiff-backup &#124; Ubuntu Geek (www.ubuntugeek.com)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ubuntugeek.com/backup-ubuntu-using-rdiff-backup.html">Backup Ubuntu using rdiff-backup | Ubuntu Geek</a> (<a href="http://www.ubuntugeek.com/">www.ubuntugeek.com</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkwiens.com/2009/12/19/link-backup-ubuntu-using-rdiff-backupubuntu-geek/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.jkwiens.com/2009/12/19/link-backup-ubuntu-using-rdiff-backupubuntu-geek/</feedburner:origLink></item>
	</channel>
</rss>
