<?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>Thomas Brox Røst</title>
	
	<link>http://thomas.broxrost.com</link>
	<description />
	<lastBuildDate>Fri, 12 Feb 2010 23:37:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</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/thomasbroxrost" /><feedburner:info uri="thomasbroxrost" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>AWS cuts data transfer rates: Pricing comparison update</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/-hxzqwI75qg/</link>
		<comments>http://thomas.broxrost.com/2010/02/02/aws-cuts-data-transfer-rates-pricing-comparison-update/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 13:44:16 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=280</guid>
		<description><![CDATA[AWS just cut their outbound data transfer rates from $0.17 to $0.15 per GB/month up until 10TB. I have updated my previous comparison between Go Daddy and AWS with the latest numbers.
Readers who viewed this page, also viewed:Persistent Django on Amazon EC2 and EBS &#8211; The easy wayDjango on Google App Engine in 13 simple [...]]]></description>
			<content:encoded><![CDATA[<p>AWS just cut their outbound data transfer rates from <a href="http://aws.amazon.com/about-aws/whats-new/2010/02/01/aws-announces-lower-pricing-for-outbound-data-transfer/">$0.17 to $0.15 per GB/month up until 10TB</a>. I have updated my <a href="http://thomas.broxrost.com/2009/08/28/updated-awsgo-daddy-dedicated-server-cost-comparison/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">previous comparison between Go Daddy and AWS</a> with the latest numbers.</p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://thomas.broxrost.com/2008/08/21/persistent-django-on-amazon-ec2-and-ebs-the-easy-way/" rel="bookmark" class="wherego_title">Persistent Django on Amazon EC2 and EBS &#8211; The easy way</a></li><li><a href="http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/" rel="bookmark" class="wherego_title">Django on Google App Engine in 13 simple steps</a></li><li><a href="http://thomas.broxrost.com/2009/08/28/updated-awsgo-daddy-dedicated-server-cost-comparison/" rel="bookmark" class="wherego_title">Updated AWS/Go Daddy dedicated server cost comparison</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2010/02/02/aws-cuts-data-transfer-rates-pricing-comparison-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2010/02/02/aws-cuts-data-transfer-rates-pricing-comparison-update/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>Updated AWS/Go Daddy dedicated server cost comparison</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/6xTlwCT-J_k/</link>
		<comments>http://thomas.broxrost.com/2009/08/28/updated-awsgo-daddy-dedicated-server-cost-comparison/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 00:06:34 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=260</guid>
		<description><![CDATA[UPDATE 1: Corrected the bandwidth calculation in the formulas for AWS.
UPDATE 2: Added new data for the February 2010 AWS data transfer price reduction.
In a previous posting I did a cost comparison of a reserved Amazon Web Services EC2 instance and a comparable dedicated server from Go Daddy. Amazon recently announced a set of price [...]]]></description>
			<content:encoded><![CDATA[<p><b>UPDATE 1: Corrected the bandwidth calculation in the formulas for AWS.</b></p>
<p><b>UPDATE 2: Added new data for the February 2010 AWS data transfer price reduction.</b></p>
<p>In a <a href="http://thomas.broxrost.com/2009/03/12/why-amazon-web-services-just-became-a-competitive-web-hosting-provider/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">previous posting</a> I did a cost comparison of a reserved <a href="http://aws.amazon.com/">Amazon Web Services</a> EC2 instance and a comparable dedicated server from <a href="http://www.godaddy.com/">Go Daddy</a>. Amazon recently announced a set of <a href="http://aws.amazon.com/about-aws/whats-new/2009/08/20/New-Lower-Prices-for-Amazon-EC2-Reserved-Instances/">price cuts for reserved instances</a>, so an updated comparison is in order.</p>
<p>The server configurations I&#8217;m comparing are the same as last time:</p>
<table border="0">
<tr>
<th width="220"></th>
<th style="text-align: left">Go Daddy</th>
<th style="text-align: left">AWS</th>
<th style="text-align: left">AWS (new)</th>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>Processor</i></td>
<td>Core 2 Duo 2.66 GHz</td>
<td>4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each) [1 unit equals a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor]</td>
<td>4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each) [1 unit equals a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor]</td>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>Hard Drive(s)</i></td>
<td>Dual 300GB drives</td>
<td>850GB of instance storage</td>
<td>850GB of instance storage</td>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>Memory</i></td>
<td>3.2GB</td>
<td>7.5GB</td>
<td>7.5GB</td>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>1-year plan, w/o bandwidth</i></td>
<td><b>$2,483.46</b></td>
<td><b>$2,351.20</b></td>
<td><b>$1,962.40</b></td>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>3-year plan, w/o bandwidth</i></td>
<td><b>$6,622.56</b></td>
<td><b>$5,153.60</b></td>
<td><b>$4,557.20</b></td>
</tr>
</table>
<p><br/><br />
I have added an extra column for the new EC2 reserved instance pricing scheme. Notably, the prices for the Go Daddy options haven&#8217;t changed in the last six months. For the 1- and 3-year AWS plans, the total costs have dropped by $390 (17%) and $600 (12%), bandwidth excluded.</p>
<p>(For the full discussion, refer to the <a href="http://thomas.broxrost.com/2009/03/12/why-amazon-web-services-just-became-a-competitive-web-hosting-provider/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">previous posting</a>.)</p>
<p>When including bandwidth use, the updated table looks as follows:</p>
<table border="0">
<tr style="vertical-align: top">
<th style="padding-right: 10px"></th>
<th style="padding-right: 10px">1GB/mth</th>
<th style="padding-right: 10px">20GB/mth</th>
<th style="padding-right: 10px">100GB/mth</th>
<th style="padding-right: 10px">400GB/mth</th>
<th style="padding-right: 10px">800GB/mth</th>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>Go Daddy, 1-year plan</i></td>
<td>$2,483.46</td>
<td>$2,483.46</td>
<td>$2,483.46</td>
<td>$2,483.46</td>
<td>$2,723.34</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>AWS, 1-year plan</i></td>
<td>$2,353.24</td>
<td>$2,392.00</td>
<td>$2,555.20</td>
<td>$3,167.20</td>
<td>$3,983.20</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>AWS, 1-year plan (Aug 2009)</i></td>
<td>$1,963.24</td>
<td>$2,002.00</td>
<td>$2,165.20</td>
<td>$2,777.20</td>
<td>$3,593.20</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>AWS, 1-year plan (Feb 2010)</i></td>
<td>$1,963.00</td>
<td>$1,997.20</td>
<td>$2,141.20</td>
<td>$2,681.20</td>
<td>$3,401.20</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>Go Daddy, 3-year plan</i></td>
<td>$6,622.56</td>
<td>$6,622.56</td>
<td>$6,622.56</td>
<td>$6,622.56</td>
<td>$7,342.20</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>AWS, 3-year plan</i></td>
<td>$5,159.72</td>
<td>$5,276.00</td>
<td>$5,765.60</td>
<td>$7,601.60</td>
<td>$10,049.60</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>AWS, 3-year plan (Aug 2009)</i></td>
<td>$4,559.72</td>
<td>$4,676.00</td>
<td>$5,165.60</td>
<td>$7,001.60</td>
<td>$9,449.60</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>AWS, 3-year plan (Feb 2010)</i></td>
<td>$4,559.00</td>
<td>$4,661.60</td>
<td>$5,093.60</td>
<td>$6,713.60</td>
<td>$8,873.60</td>
</tr>
</table>
<p><br/></p>
<p><img src="http://thomas.broxrost.com/wp-content/uploads/2009/08/new_comparison_chart.jpg" alt="Updated comparison between AWS and Go Daddy pricing plans" title="Updated comparison between AWS and Go Daddy pricing plans" width="530" height="294" class="alignnone size-full wp-image-186" /></p>
<p>With the old pricing, the AWS option was preferable unless bandwidth exceeded 100GB per month (for the 1-year plan) or 250GB per month (for the 3-year plan). After the August 2009 price cuts, AWS became an even more competitive option, although one that still falls behind for high bandwidth scenarios.</p>
<p>In February 2010, the price for outgoing data traffic dropped from $0.17 to $0.15. With the 3-year plan, AWS now matches Go Daddy up until almost 400GB per month.</p>
<p><b>Addendum:</b> Some of the background data used in this posting:</p>
<ul>
<li>Go Daddy quotes from August 28, 2009</li>
<li>Go Daddy 3-year plan cost: 2-year plan quote * 1.5</li>
<li>AWS 1-year plan cost (< Aug 2009): $1,300 + (24 * 365 * 1 * $0.12) + (GB/mth * $0.17 * 12)</li>
<li>AWS 1-year plan cost (Aug 2009): $910 + (24 * 365 * 1 * $0.12) + (GB/mth * $0.17 * 12)</li>
<li>AWS 1-year plan cost (Feb 2010): $910 + (24 * 365 * 1 * $0.12) + (GB/mth * $0.15 * 12)</li>
<li>AWS 3-year plan cost (< Aug 2009): $2,000 + (24 * 365 * 3 * $0.12) + (GB/mth * $0.17 * 36)</li>
<li>AWS 3-year plan cost (Aug 2009): $1,400 + (24 * 365 * 3 * $0.12) + (GB/mth * $0.17 * 36)</li>
<li>AWS 3-year plan cost (Feb 2010): $1,400 + (24 * 365 * 3 * $0.12) + (GB/mth * $0.15 * 36)</li>
<li><a href="http://aws.amazon.com/ec2/#pricing">EC2 pricing information</a></li>
<li><a href="http://www.godaddy.com/gdshop/hosting/dedicated.asp">Go Daddy dedicated server pricing information</a></li>
</ul>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://thomas.broxrost.com/2009/03/12/why-amazon-web-services-just-became-a-competitive-web-hosting-provider/" rel="bookmark" class="wherego_title">Why Amazon Web Services just became a competitive web hosting provider</a></li><li><a href="http://thomas.broxrost.com/2010/02/02/aws-cuts-data-transfer-rates-pricing-comparison-update/" rel="bookmark" class="wherego_title">AWS cuts data transfer rates: Pricing comparison update</a></li><li><a href="http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/" rel="bookmark" class="wherego_title">Django on Google App Engine in 13 simple steps</a></li><li><a href="http://thomas.broxrost.com/2008/08/21/persistent-django-on-amazon-ec2-and-ebs-the-easy-way/" rel="bookmark" class="wherego_title">Persistent Django on Amazon EC2 and EBS &#8211; The easy way</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2009/08/28/updated-awsgo-daddy-dedicated-server-cost-comparison/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2009/08/28/updated-awsgo-daddy-dedicated-server-cost-comparison/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>How to compile SimpleParse 2.1.0a1 for Python 2.6 on Windows Vista</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/SN6sxCHCjCI/</link>
		<comments>http://thomas.broxrost.com/2009/06/01/how-to-compile-simpleparse-210a1-for-python-26-on-windows-vista/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 12:20:36 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[SimpleParse]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=235</guid>
		<description><![CDATA[SimpleParse is a fast Python single-pass parser generator that I use regularly. When I finally made the move onto Python 2.6 it turned out that there is no pre-compiled package for 2.6 on Windows. So, here is my procedure for compiling the source package on Windows Vista.
1. Install Cygwin if you don&#8217;t already have it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://simpleparse.sourceforge.net/">SimpleParse</a> is a fast Python single-pass parser generator that I use regularly. When I finally made the move onto <a href="http://www.python.org/download/releases/2.6/">Python 2.6</a> it turned out that there is no pre-compiled package for 2.6 on Windows. So, here is my procedure for compiling the source package on Windows Vista.</p>
<p>1. Install <a href="http://www.cygwin.com/">Cygwin</a> if you don&#8217;t already have it on your system, and make sure that the version of Python you are installing SimpleParse for is on either the system or the Cygwin path.</p>
<p>2. Download and install <a href="http://www.microsoft.com/express/download/">Microsoft Visual C++ 2008 Express Edition</a>. You should ensure that you have the latest Vista service packs installed before attempting this. If the installer quits on you then just reboot the computer and try again. Without this installed, you wil get an &#8216;Unable to find vcvarsall.bat&#8217; error.</p>
<p>3. Download and unpack the <a href="http://sourceforge.net/project/showfiles.php?group_id=55673&#038;package_id=50682&#038;release_id=394687">SimpleParse 2.1.0a1 source</a>. Using the Cygwin shell, place yourself in the root source directory.</p>
<p>4. If we try to run <code>python setup.py install</code> at this point, the Visual C++ compiler will complain:</p>
<pre class="brush: python">
stt/TextTools/mxTextTools/mxTextTools.c(149) : error C2133:
&#039;mxTextSearch_Methods&#039; : unknown size
stt/TextTools/mxTextTools/mxTextTools.c(920) : error C2133:
&#039;mxCharSet_Methods&#039;: unknown size
stt/TextTools/mxTextTools/mxTextTools.c(2103) : error C2133:
&#039;mxTagTable_Methods&#039; : unknown size
error: command &#039;&amp;amp;amp;quot;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe&amp;amp;amp;quot;&#039;
failed with exit status 2
</pre>
<p>We have to add the following lines to <code>stt/TextTools/mxTextTools/mxTextTools.c</code>, starting at line 148 (before <code>staticforward</code> is used for the first time):</p>
<pre class="brush: cpp">
#ifdef _MSC_VER
#define staticforward extern
#endif
</pre>
<p>5. <code>with</code> is a Python 2.6 keyword, meaning it can&#8217;t be used as a variable, as is the case in the SimpleParse source code. So, we have to replace it with something else:</p>
<pre class="brush: python">
$ sed -r &#039;s/with/with_t/g&#039; &amp;amp;amp;lt; stt/TextTools/TextTools.py &amp;amp;amp;gt; tmp.txt
$ cp tmp.txt stt/TextTools/TextTools.py
</pre>
<p>6. Finally, run <code>python setup.py install</code> as usual.</p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://thomas.broxrost.com/2009/05/27/on-the-sadness-of-nouns/" rel="bookmark" class="wherego_title">On the sadness of nouns</a></li><li><a href="http://thomas.broxrost.com/2009/03/12/why-amazon-web-services-just-became-a-competitive-web-hosting-provider/" rel="bookmark" class="wherego_title">Why Amazon Web Services just became a competitive web hosting provider</a></li><li><a href="http://thomas.broxrost.com/2008/08/21/persistent-django-on-amazon-ec2-and-ebs-the-easy-way/" rel="bookmark" class="wherego_title">Persistent Django on Amazon EC2 and EBS &#8211; The easy way</a></li><li><a href="http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/" rel="bookmark" class="wherego_title">Django on Google App Engine in 13 simple steps</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2009/06/01/how-to-compile-simpleparse-210a1-for-python-26-on-windows-vista/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2009/06/01/how-to-compile-simpleparse-210a1-for-python-26-on-windows-vista/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>On the sadness of nouns</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/jqTZ7lUMN7U/</link>
		<comments>http://thomas.broxrost.com/2009/05/27/on-the-sadness-of-nouns/#comments</comments>
		<pubDate>Wed, 27 May 2009 12:25:37 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[Literature]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=212</guid>
		<description><![CDATA[&#8220;Writing, Jen thought, seemed like a very sad pursuit. Like painting, but worse. At least paintings had color. Writing, though, was just black marks on paper, standing in for people and objects and events that could never be seen or felt. It seemed pathetic in a way. Nouns were the saddest words of all, trying [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>&#8220;Writing, Jen thought, seemed like a very sad pursuit. Like painting, but worse. At least paintings had color. Writing, though, was just black marks on paper, standing in for people and objects and events that could never be seen or felt. It seemed pathetic in a way. Nouns were the saddest words of all, trying so hard to summon real objects to life.&#8221;</p></blockquote>
<p>Jon Raymond, &#8220;Words and Things&#8221; (<a href="http://www.amazon.com/Livability-Stories-Jon-Raymond/dp/1596916559/">Livability</a>)</p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://thomas.broxrost.com/2009/06/01/how-to-compile-simpleparse-210a1-for-python-26-on-windows-vista/" rel="bookmark" class="wherego_title">How to compile SimpleParse 2.1.0a1 for Python 2.6 on Windows Vista</a></li><li><a href="http://thomas.broxrost.com/2008/06/15/porting-legacy-databases-to-google-app-engine/" rel="bookmark" class="wherego_title">Porting legacy databases to Google App Engine</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2009/05/27/on-the-sadness-of-nouns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2009/05/27/on-the-sadness-of-nouns/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>When EndNote X2 fails</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/4x8ZxPUrVE8/</link>
		<comments>http://thomas.broxrost.com/2009/04/06/when-endnote-x2-fails/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 21:43:26 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[EndNote]]></category>
		<category><![CDATA[Microsoft Word]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=203</guid>
		<description><![CDATA[The connection between EndNote X2 and Microsoft Word 2007 seems to get corrupted on a regular basis on my Vista setup. Based on hours of web searching and trial and error, here is a short summary of ways of getting it working again. Use these when you get error messages such as &#8217;server threw an [...]]]></description>
			<content:encoded><![CDATA[<p>The connection between <a href="http://www.endnote.com/enx2info.asp">EndNote X2</a> and <a href="http://office.microsoft.com/en-us/word/default.aspx">Microsoft Word 2007</a> seems to get corrupted on a regular basis on my Vista setup. Based on hours of web searching and trial and error, here is a short summary of ways of getting it working again. Use these when you get error messages such as &#8217;server threw an exception&#8217;, &#8217;server execution failed&#8217;, and &#8216;invalid class string&#8217;.</p>
<p>In prioritized order:</p>
<ul>
<li>Run EndNote as an administrator (for Windows Vista).</li>
<li>Reset EndNote defaults (&#8220;Edit -> Preferences -> EndNote defaults&#8221;). This seems to work most of the time. Make sure to close Word first. After having reset EndNote, close it, and then try launching it from Word.</li>
<li>The library may be corrupted. Try running &#8220;Tools -> Recover Library&#8221;.</li>
<li>If all else fails, reinstall EndNote</li>
</ul>
<p>There are other possible problems, especially when upgrading from older versions, but these actions usually work for me.</p>
<p>(For Norwegian readers: If you are using the Norwegian version of EndNote, the error messages will be &#8216;ugyldig klassestreng&#8217; or &#8217;serverutføringen mislyktes&#8217;.)</p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://thomas.broxrost.com/2009/05/27/on-the-sadness-of-nouns/" rel="bookmark" class="wherego_title">On the sadness of nouns</a></li><li><a href="http://thomas.broxrost.com/2009/03/12/why-amazon-web-services-just-became-a-competitive-web-hosting-provider/" rel="bookmark" class="wherego_title">Why Amazon Web Services just became a competitive web hosting provider</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2009/04/06/when-endnote-x2-fails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2009/04/06/when-endnote-x2-fails/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>Why Amazon Web Services just became a competitive web hosting provider</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/o_7elDblJlo/</link>
		<comments>http://thomas.broxrost.com/2009/03/12/why-amazon-web-services-just-became-a-competitive-web-hosting-provider/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 20:31:57 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=157</guid>
		<description><![CDATA[UPDATE 1: There is now an updated version of this posting. The new version incorporates the August 2009 AWS reserved instance pricing changes.
UPDATE 2: Corrected the bandwidth calculation in the formulas for AWS.
Amazon Web Services just announced a new reserved instances pricing plan. In short, this plan allows you to reserve EC2 instances for a [...]]]></description>
			<content:encoded><![CDATA[<p><b>UPDATE 1: There is now an <a href="http://thomas.broxrost.com/2009/08/28/updated-awsgo-daddy-dedicated-server-cost-comparison/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">updated version of this posting</a>. The new version incorporates the August 2009 AWS reserved instance pricing changes.</b></p>
<p><b>UPDATE 2: Corrected the bandwidth calculation in the formulas for AWS.</b></p>
<p><a href="http://aws.amazon.com/">Amazon Web Services</a> just announced a new <a href="http://aws.typepad.com/aws/2009/03/announcing-ec2-reserved-instances.html">reserved instances pricing plan</a>. In short, this plan allows you to reserve EC2 instances for a 1 to 3 year period by paying a one-time reservation fee. The hourly rate for reserved instances is considerably lower than for regular spot-market instances. For comparisons sake, a large standard on-demand instance will set you back $0.40 per hour, while the large standard reserved instance is only $0.12 per hour.</p>
<p>With the old pricing scheme, hosting a web service on AWS instead of on a dedicated server was not a very cost-competitive option, at least not for resource-intensive applications. For my web site, <a href="http://eventseer.net">Eventseer</a>, I require at least a large standard instance&mdash;at $0.40 per hour for 24/7 operation (bandwidth costs not included), this turned out way too expensive compared with offerings from traditional dedicated server providers.</p>
<p>To see if the new pricing scheme fares any better, I have compared the cost of an AWS EC2 reserved large instance with a similar dedicated server from <a href="http://www.godaddy.com/">Go Daddy</a>:</p>
<table border="0">
<tr>
<th width="220"></th>
<th style="text-align: left">Go Daddy</th>
<th style="text-align: left">AWS</th>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>Processor</i></td>
<td>Core 2 Duo 2.66 GHz</td>
<td>4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each) [1 unit equals a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor]</td>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>Hard Drive(s)</i></td>
<td>Dual 300GB drives</td>
<td>850GB of instance storage</td>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>Memory</i></td>
<td>3.2GB</td>
<td>7.5GB</td>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>1-year plan, w/o bandwidth</i></td>
<td><b>$2,483.46</b></td>
<td><b>$2,351.20</b></td>
</tr>
<tr style="vertical-align: top">
<td width="220"><i>3-year plan, w/o bandwidth</i></td>
<td><b>$6,622.56</b></td>
<td><b>$5,153.60</b></td>
</tr>
</table>
<p>I&#8217;m not sure how the 4 EC2 compute units compete with a dedicated Core 2 Duo 2.66 GHz. This probably also depends on the nature of your application. Note that the AWS solution has twice the amount of memory. From what I can see, you can not get a Go Daddy dedicated server with more than 3.2GB of memory, while AWS offers up to 15GB on the extra large instances.</p>
<p>When disregarding bandwidth costs, AWS suddenly makes a lot of sense. As bandwidth use is highly application-dependent, let&#8217;s consider a few different bandwidth use scenarios:</p>
<table border="0">
<tr style="vertical-align: top">
<th style="padding-right: 10px"></th>
<th style="padding-right: 10px">1GB/mth</th>
<th style="padding-right: 10px">20GB/mth</th>
<th style="padding-right: 10px">100GB/mth</th>
<th style="padding-right: 10px">400GB/mth</th>
<th style="padding-right: 10px">800GB/mth</th>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>Go Daddy, 1-year plan</i></td>
<td>$2,483.46</td>
<td>$2,483.46</td>
<td>$2,483.46</td>
<td>$2,483.46</td>
<td>$2,723.34</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>AWS, 1-year plan</i></td>
<td>$2,353.24</td>
<td>$2,392.00</td>
<td>$2,555.20</td>
<td>$3,167.20</td>
<td>$3,983.20</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>Go Daddy, 3-year plan</i></td>
<td>$6,622.56</td>
<td>$6,622.56</td>
<td>$6,622.56</td>
<td>$6,622.56</td>
<td>$7,342.20</td>
</tr>
<tr style="vertical-align: top">
<td style="padding-right: 10px"><i>AWS, 3-year plan</i></td>
<td>$5,159.72</td>
<td>$5,276.00</td>
<td>$5,765.60</td>
<td>$7,601.60</td>
<td>$10,049.60</td>
</tr>
</table>
<p><br/></p>
<p><img src="http://thomas.broxrost.com/wp-content/uploads/2009/06/plan_price_comparison.gif" alt="Comparison between AWS and Go Daddy pricing plans" title="Comparison between AWS and Go Daddy pricing plans" width="465" height="277" class="alignnone size-full wp-image-186" /></p>
<p><b>Conclusion:</b> With a 1-year plan, AWS is the cheapest option until you reach about 100GB of external bandwidth per month. With the 3-year plan, the AWS bandwidth cost isn&#8217;t a problem until about 250GB per month. (Bandwidth is &#8220;free&#8221; with Go Daddy dedicated servers up until 500GB per month; after that it&#8217;s an extra $19.99 per month until you reach 1,000GB).</p>
<p>Considering that the AWS solution gets you twice the amount of RAM, AWS suddenly seems a very viable option even for web service hosting&mdash;as long as you&#8217;re not expecting extreme<br />
amounts of traffic. However, once you get popular the outgoing data transfer pricing will take its toll.</p>
<p><b>Addendum:</b> Some of the background data used in this posting:</p>
<ul>
<li>Go Daddy quotes from March 12, 2009</li>
<li>Formula for Go Daddy 3-year plan cost: 2-year plan quote * 1.5</li>
<li>Formula for AWS 1-year plan cost: $1,300 + (24 * 365 * 1 * $0.12) + (GB/mth * $0.17 * 12)</li>
<li>Formula for AWS 3-year plan cost: $2,000 + (24 * 365 * 3 * $0.12) + (GB/mth * $0.17 * 36)</li>
<li><a href="http://aws.amazon.com/ec2/#pricing">EC2 pricing information</a></li>
<li><a href="http://www.godaddy.com/gdshop/hosting/dedicated.asp">Go Daddy dedicated server pricing information</a></li>
</ul>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://thomas.broxrost.com/2009/08/28/updated-awsgo-daddy-dedicated-server-cost-comparison/" rel="bookmark" class="wherego_title">Updated AWS/Go Daddy dedicated server cost comparison</a></li><li><a href="http://thomas.broxrost.com/2008/08/21/persistent-django-on-amazon-ec2-and-ebs-the-easy-way/" rel="bookmark" class="wherego_title">Persistent Django on Amazon EC2 and EBS &#8211; The easy way</a></li><li><a href="http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/" rel="bookmark" class="wherego_title">Django on Google App Engine in 13 simple steps</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2009/03/12/why-amazon-web-services-just-became-a-competitive-web-hosting-provider/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2009/03/12/why-amazon-web-services-just-became-a-competitive-web-hosting-provider/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>Running pytst 1.15 on a 64-bit platform</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/2htI1sQ09f8/</link>
		<comments>http://thomas.broxrost.com/2009/01/25/running-pytst-115-on-a-64-bit-platform/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 23:49:43 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[pytst]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=130</guid>
		<description><![CDATA[Update: The latest version, 1.17, compiles on 64-bit platforms out of the box, so the patch below is no longer necessary.
Nicolas Lehuen&#8217;s pytst is a C++ ternary search tree implementation with a Python interface. It&#8217;s an excellent tool&#8212;and it is also really, really fast.
Unfortunately version 1.15 doesn&#8217;t compile on 64-bit platforms, giving the following error [...]]]></description>
			<content:encoded><![CDATA[<p><b>Update: The latest version, 1.17, compiles on 64-bit platforms out of the box, so the patch below is no longer necessary.</b></p>
<p>Nicolas Lehuen&#8217;s <a href="http://nicolas.lehuen.com/download/pytst/">pytst</a> is a C++ ternary search tree implementation with a Python interface. It&#8217;s an excellent tool&mdash;and it is also really, really fast.</p>
<p>Unfortunately version 1.15 doesn&#8217;t compile on 64-bit platforms, giving the following error messages:</p>
<pre class="brush: bash">
pythonTST.h:178: error: cannot convert &#039;int*&#039; to &#039;Py_ssize_t*&#039; for argument &#039;3&#039;
to &#039;int PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)&#039;
tst_wrap.cxx: In function &#039;PyObject* _wrap__TST_walk__SWIG_1(PyObject*, int, PyO
bject**)&#039;:
tst_wrap.cxx:3175: error: cannot convert &#039;int*&#039; to &#039;Py_ssize_t*&#039; for argument &#039;3
&#039; to &#039;int PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)&#039;
tst_wrap.cxx: In function &#039;PyObject* _wrap__TST_close_match(PyObject*, PyObject*
)&#039;:
tst_wrap.cxx:3250: error: cannot convert &#039;int*&#039; to &#039;Py_ssize_t*&#039; for argument &#039;3
&#039; to &#039;int PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)&#039;
tst_wrap.cxx: In function &#039;PyObject* _wrap__TST_prefix_match(PyObject*, PyObject
*)&#039;:
[...and so on...]
</pre>
<p>Until Nicolas releases an updated version, here is the quick fix:</p>
<pre class="brush: python">
cp pythonTST.h pythonTST.h.orig
cp tst_wrap.cxx tst_wrap.cxx.orig
sed -r &#039;s/int size/Py_ssize_t size/&#039; &lt; tst_wrap.cxx.orig &gt; tst_wrap.cxx
sed -r &#039;s/int length/Py_ssize_t length/&#039; &lt; pythonTST.h.orig &gt; tmpfile
sed -r &#039;s/sizeof\(int\)/sizeof(long)/&#039; &lt; tmpfile &gt; pythonTST.h
</pre>
<p>Run these commands from the pytst source directory and you should be all set. I&#8217;m not sure if this a fully satisfactory solution, but at least this will get the test suite running again.</p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2009/01/25/running-pytst-115-on-a-64-bit-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2009/01/25/running-pytst-115-on-a-64-bit-platform/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>Dostoevsky on the dangers of science</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/8AP8ollkarg/</link>
		<comments>http://thomas.broxrost.com/2008/10/13/dostoevsky-on-the-dangers-of-science/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 12:19:57 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[Literature]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=103</guid>
		<description><![CDATA[&#8220;He was devoured by the deepest and most insatiable passion, which absorbs a man&#8217;s whole life and does not, for beings like Ordynov, provide any niche in the domain of practical daily activity. This passion was science. Meanwhile it was consuming his youth, marring his rest at night with its slow, intoxicating poison, robbing him [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><a href="http://thomas.broxrost.com/wp-content/uploads/2009/06/200px-dostoevskij_1872.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="size-medium wp-image-107 alignright" style="margin-left: 10px; margin-right: 10px;" title="Dostoevsky, 18872" src="http://thomas.broxrost.com/wp-content/uploads/2008/10/dostoevsky_1872-240x300.jpg" alt="" width="154" height="192" /></a>&#8220;He was devoured by the deepest and most insatiable passion, which absorbs a man&#8217;s whole life and does not, for beings like Ordynov, provide any niche in the domain of practical daily activity. This passion was science. Meanwhile it was consuming his youth, marring his rest at night with its slow, intoxicating poison, robbing him of wholesome food and of fresh air which never penetrated to his stifling corner. Yet, intoxicated by his passion, Ordynov refused to notice it. He was young and, so far, asked for nothing more. His passion made him a babe as regards external existence and totally incapable of forcing other people to stand aside when needful to make some sort of place for himself among them. Some clever people&#8217;s science is a capital in their hands; for Ordynov it was a weapon turned against himself.&#8221;</p></blockquote>
<p>From &#8220;<a title="The Landlady" href="http://books.google.no/books?id=4v3YOmHR4iUC&amp;pg=PA246&amp;lpg=PA246&amp;dq=%22He+was+devoured+by+the+deepest+and+most+insatiable+passion%22&amp;source=web&amp;ots=VIB1iKB8_F&amp;sig=PxBowl7k20N92fCvztST_4TX9S0&amp;hl=en&amp;sa=X&amp;oi=book_result&amp;resnum=1&amp;ct=result">The Landlady</a>&#8221; (1848)</p>
<div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2008/10/13/dostoevsky-on-the-dangers-of-science/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2008/10/13/dostoevsky-on-the-dangers-of-science/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>3 lessons the individual investor can learn from JPMorgan Chase</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/8Cl8DzUrVko/</link>
		<comments>http://thomas.broxrost.com/2008/09/29/3-lessons-the-individual-investor-can-learn-from-jpmorgan-chase/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 22:37:19 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[Finance]]></category>
		<category><![CDATA[Investment]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=80</guid>
		<description><![CDATA[JPMorgan Chase recently picked up the remains of troubled Washington Mutual for a mere $1.9 billion&#8212;a deal described by some as buying the company &#8220;for nothing.&#8221;
Although the takeover carries a fair amount of risk for JPMorgan, the bank looks increasingly likely to emerge as a credit crisis survivor. They still have a &#8220;reasonably strong&#8221; balance [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jpmorganchase.com/">JPMorgan Chase</a> recently picked up the remains of troubled <a href="https://www.wamu.com/">Washington Mutual</a> for a mere $1.9 billion&mdash;a deal described by some as buying the company <a href="http://www.reuters.com/article/innovationNews/idUSTRE48P8SJ20080926?sp=true">&#8220;for nothing.&#8221;</a></p>
<p>Although the takeover carries a fair amount of risk for JPMorgan, the bank looks increasingly likely to emerge as a credit crisis survivor. They still have a <a href="http://www.economist.com/finance/displaystory.cfm?story_id=12321761">&#8220;reasonably strong&#8221;</a> balance sheet and have by and large managed to steer clear of a debacle of historical proportions.</p>
<p>How did this come about? Also, are there elements to this story that you as an individual investor can learn from?</p>
<p>Fortune recently published a comprehensive account of how JPMorgan mostly avoided the subprime debacle (<a href="http://money.cnn.com/2008/08/29/news/companies/tully_dimon.fortune/">&#8220;Jamie Dimon&#8217;s Swat Team&#8221;</a>), which is well worth a read. Based on the article, I have tried to summarize the main principles that have so far kept JPMorgan as a company out of trouble.</p>
<p>These principles are, in my opinion, just as valid on a personal level when you, as an individual investor, are to decide whether or not a company stock is a good buy. So, I have also tried to relate each principle to general best practices of investment.</p>
<p><b>1. It&#8217;s all in the numbers</b></p>
<p>In early 2006, JPMorgan were, like everyone else, dealing in subprime CDOs. By the end of that year, the bank had dumped more or less all of their subprime mortgage holdings. What happened?</p>
<p>First of all, the numbers were no longer looking good.</p>
<p>JPMorgan has a strong tradition of data-mining every aspect of their business and continuously trying to figure out the story behind the numbers. What Jamie Dimon, the CEO, and his team saw was that the subprime market was way to risky for the profits it was generating. Data from their retail banking division showed that subprime loan payments were increasingly late. Moreover, their own data analysis indicated that the supposedly safe AAA ratings lavished upon CDO bonds were bogus.</p>
<p>The numbers were increasingly and consistently negative and in sharp contrast to the conventional wisdom on the subprime market. Trusting the data and its interpretation rather than the general opinion, JPMorgan left the market altogether.</p>
<p><b>Learning points:</b></p>
<p>When evaluating a company as an investment opportunity, you can rely on a barrage of opinion from a sea of sources with a multitude of motivations.</p>
<p>Or, you can go straight to the facts.</p>
<p>The numbers in quarterly reports or annual accounts don&#8217;t lie unless deliberately tampered with. If the balance sheet tells you that a company is heading for trouble, then that company is heading for trouble, no matter what anyone else might be saying.</p>
<ul>
<li>Learn how to read and understand the balance sheet, the income statement and the cash flow statement. Once understood, they tell you more about the company than any financial advisor or industry analyst ever will.</li>
<li>Be diligent in your pursuit of data, both on the company, the sector, and the general state of the economy.</li>
<li>Read the numbers first and then make up your own interpretation. Other people&#8217;s interpretations are not gospel, but rather a challenge to your own interpretation.</li>
<li>The opinionated parts of a company&#8217;s annual report are mostly fluff and should be read as such. Read the annual report from the back. It&#8217;s not a crime to talk about a company in optimistic terms; manipulating the numbers is.</li>
</ul>
<p><b>2. Investment is not about short-term profit</b></p>
<p>JPMorgan exited the subprime market while it was still a booming business. This took a lot of guts when other Wall Street firms were making a killing from subprime.</p>
<p>In the short term they lost ground to competitors by not jumping on the latest Street bandwagon. Their conservative stance and the effect it had on quarterly earnings must have generated immense pressure, both internally and externally. From 2005 to 2007, JPMorgan fell from third to sixth place in fixed-income underwriting. This is the sort of development that causes ruckus in board meetings.</p>
<p>Nonetheless: In the long term they prevailed.</p>
<p>Their decision to trust their analysis of subprime being too risky turned out to be a sensible one, even if this meant a very negative short-term impact on their balance sheets.</p>
<p>By focusing on core company values rather than pursuing immediate profit, JPMorgan emerged on top.</p>
<p><b>Learning points:</b></p>
<p>You can certainly make money from overhyped stocks whose valuation belies the true worth of their business. This, however, requires you to play the game of getting out before the bubble of irrational exuberance pops.</p>
<p>Timing the market is ultimately about luck. Luck is a property that is best reserved for the lottery rather than your savings.</p>
<p>Fashion does not imply quality. Just because everyone else is ecstatic about something&mdash;be it dot-com companies or the mullet&mdash;does not mean you should be as well. Only get with the crowd if there is a fundamentally sane reason for doing so. Dare to be different.</p>
<ul>
<li>Be prepared to stick it out as long as the underlying fundamentals of your analysis does not change. Quality always prevails in the long term.</li>
<li>Even fundamentally good stocks go down if they are unpopular. This is the way the market rolls; don&#8217;t lose any sleep over it.</li>
<li>You will not be able to consistently time the ups and downs of the market, so don&#8217;t even try to. Learn to live with the fact that good stocks will sometimes go down for no good reason.</li>
<li>Don&#8217;t check your portfolio every five minutes. Apart from keeping you from getting any other work done, it will only lead you to perceive the market as more volatile than it really is. Think the market is too volatile? Just reduce your sampling frequency. Remember that you are in it for the long run.</li>
<li>Listen to other people but don&#8217;t let them make your decisions. Even if they have a compelling chain of arguments there are likely more conclusions that can be drawn from the same set of underlying facts. Your explanation of why to invest should always be your own.</li>
</ul>
<p><b>3. Question and diversify</b></p>
<p>JPMorgan operating-committee meetings are described as &#8220;loud and unsubtle&#8221;. According to <a href="http://money.cnn.com/2008/08/29/news/companies/tully_dimon.fortune/index2.htm">Bill Daley, head of corporate responsibility</a> and former Secretary of Commerce, &#8220;[p]eople were challenging Jamie, debating him, telling him he was wrong. It was like nothing I&#8217;d seen in a Bill Clinton cabinet meeting, or anything I&#8217;d ever seen in business.&#8221;</p>
<p>This culture of allowing, encouraging and listening to dissent ultimately made it easier for JPMorgan to make the right decisions. Getting all facts and viewpoints on the table while continously questioning what they were doing was a major success factor.</p>
<p>Still, JPMorgan made their own share of mistakes.</p>
<p>In 2007 a short-term secured loans unit bought a $2 billion subprime CDO&mdash;upper management claims they never knew. Other billion-dollar write-offs had to be endured as well. Their principle of <a href="http://money.cnn.com/2008/08/29/news/companies/tully_dimon.fortune/index4.htm">only taking risks when you are paid well for doing so</a> is anything but perfect. It also remains to be seen how well timed their shotgun purchase of Washington Mutual turns out&mdash;among its assets are an estimated <a href="http://www.economist.com/finance/displaystory.cfm?story_id=12321761">$30 billion&#8217;s worth of loans</a> that have to be written down. However, on the whole they look to be emerging from the credit crisis as a much healthier company than their surviving competitors.</p>
<p><b>Learning points:</b></p>
<p>There is no such thing as a risk-free investment, so be prepared to accept losses. JPMorgan&#8217;s competitors put themselves in a position where some of them could not weather a downturn in one of their business segments. JPMorgan, on the other hand, were doing what they could to make sure their good moves outweighed their bad moves.</p>
<p>Making bold investment choices always carries the probability of failure. Use diversification as a cushion for when failure strikes.</p>
<p>In bicycle racing, one does not talk in terms of <i>if</i> a rider will take a tumble but rather about <i>when</i>. The same should apply to your investments.</p>
<p>Moreover, be prepared to continuously question your own judgment. The premises for earlier decisions will change, so be prepared to revert on them. If faith becomes a stronger motivation than reason for holding on to stock it&#8217;s probably time to let go.</p>
<ul>
<li>Hedge your investments. No matter the soundness of your strategy or how diligently you stick to your principles, things will still go wrong from time to time. Don&#8217;t allow mishaps to take you down.</li>
<li>Be prepared to change your position. Things change, the world keeps turning, and so should you.</li>
<li>Don&#8217;t get emotional about a stock. Your favorite company might turn from making mostly good decisions to making mostly bad decisions. These things happen, so be prepared to get out even if this means taking a loss.</li>
<li>If your sole reason for hanging on to a stock is the belief of future recovery then you have already lost. Get rid of it, count your losses, and learn from the experience. </li>
</ul>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/" rel="bookmark" class="wherego_title">Django on Google App Engine in 13 simple steps</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2008/09/29/3-lessons-the-individual-investor-can-learn-from-jpmorgan-chase/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2008/09/29/3-lessons-the-individual-investor-can-learn-from-jpmorgan-chase/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
		<item>
		<title>Hacking comments in Django 1.0</title>
		<link>http://feedproxy.google.com/~r/thomasbroxrost/~3/cNfjzo0wc88/</link>
		<comments>http://thomas.broxrost.com/2008/09/05/hacking-comments-in-django-10/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 11:59:02 +0000</pubDate>
		<dc:creator>Thomas Brox Røst</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://thomas.broxrost.com/?p=60</guid>
		<description><![CDATA[The recent release of Django 1.0 included a full rewrite of the comments framework. Comments have been available in Django for a while but were never properly documented until now.
This article will show you how to adapt and extend the comments framework so that it fits the needs of your application. Why extend it? Well, [...]]]></description>
			<content:encoded><![CDATA[<p>The recent release of <a href="http://www.djangoproject.com/weblog/2008/sep/03/1/" target="_blank">Django 1.0</a> included a full rewrite of the <a href="http://docs.djangoproject.com/en/dev/ref/contrib/comments/#ref-contrib-comments-index" target="_blank">comments framework</a>. Comments have been available in Django for a while but were never properly documented until now.</p>
<p>This article will show you how to adapt and extend the comments framework so that it fits the needs of your application. Why extend it? Well, mainly because the framework does what it says on the box&mdash;and nothing more. It allows you to attach comments to any Django object instance but for the rest of the business logic&mdash;e.g. regulating who can modify and delete comments&mdash;you are on your own.</p>
<p>Also, the current documentation does not cover all features so what I am writing here should hopefully fill a few gaps.</p>
<p><b>Prerequisites</b></p>
<p>You need to be familiar with Django. If you&#8217;re not, then have a look at the <a href="http://docs.djangoproject.com/en/dev/" target="_blank">tutorial</a> in the official documentation or alternatively at my <a href="http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">previous article</a> on how to get started with Django on Google App Engine.</p>
<p><b>How comments work</b></p>
<p>It&#8217;s really simple&mdash;just skim through <a href="http://docs.djangoproject.com/en/dev/ref/contrib/comments/" target="_blank">the well-written documentation</a> and you should pretty much be able to figure it out.</p>
<p>For example, to show a comment form for an instance of a model called <code>my_model_instance</code>, you just need two lines of template code:</p>
<pre class="brush: html">
{% load comments %}
{% render_comment_form for my_model_instance %}
</pre>
<p>The magic behind the comments framework lies in its use of <a href="http://www.djangoproject.com/documentation/models/generic_relations/" target="_blank">generic model relations</a>. This is a very powerful (and well-hidden) Django feature that allows your models to have generic foreign keys, meaning they can link to any other model. The comments framework uses this technique to ensure that comments can be attached to an arbitrary model in your application.</p>
<p><b>The scenario</b></p>
<p>I will be describing a real-life case from my company web site, <a href="http://eventseer.net" target="_blank">Eventseer.net</a>. Eventseer is an event tracker that helps researchers stay informed on upcoming conferences and workshops. It uses the comments framework for two different purposes.</p>
<p>Firstly, registered users can add comments to each event in our database. Secondly, all users can claim a personal profile page where they get what we call a whiteboard&mdash;which is simply a blogging application. Each entry on a whiteboard can be commented on by other registered users.</p>
<p><b>The problem</b></p>
<p>There are some limitations when it comes to adding comments on Eventseer. For example, only registered users are allowed to add comments. After a comment has been added, only the user who added it or an administrator are allowed to delete it.</p>
<p>These are fairly typical requirements&mdash;which are not supported out of the box in the comments framework. There is some support for using the built-in permissions system, but this will still not let you exercise fine-grained per user access control.</p>
<p>Moreover, the default comment templates are ugly as sin and will have to adapted to fit your application.</p>
<p><b>Step 1: Enabling comments</b></p>
<p>This is described well enough in the standard documentation. However, if we want to add extra functionality there are a couple of extra things to be done.</p>
<p>First, we add the comments framework to <code>INSTALLED_APPS</code> in <code>settings.py</code>:</p>
<pre class="brush: python">
# eventseer/settings.py

INSTALLED_APPS = (
    ...
    &#039;django.contrib.comments&#039;,
    &#039;eventseer.mod_comments&#039;,
    ...
)
</pre>
<p>Note that I also added an app called <code>eventseer.mod_comments</code>. This is where our comments wrapper code will reside. (I will be using the <code>eventseer</code> project name for the rest of this tutorial).</p>
<p>Now synchronize the database:</p>
<pre class="brush: bash">
$ python manage.py syncdb
</pre>
<p>This creates the tables necessary for storing the comments.</p>
<p>Finally, add an entry in your base <code>urls.py</code>:</p>
<pre class="brush: python">
# eventseer/urls.py

from django.conf.urls.defaults import *

urlpatterns = patterns(&#039;&#039;,
    ...
    (r&#039;^comments/&#039;, include(&#039;eventseer.mod_comments.urls&#039;)),
)
</pre>
<p>This is where we deviate from the standard documentation: Instead of routing all comment URLs to the bundled comments application we instead route them to our own custom application. This allows us to intercept comment URLs as required.</p>
<p><b>Step 2: Add the modified comments application</b></p>
<p>This is done the usual way:</p>
<pre class="brush: bash">
$ python manage.py startapp mod_comments
</pre>
<p>In the previous step we added a reference to <code>urls.py</code> in the <code>mod_comments</code> application, so this file must be added:</p>
<pre class="brush: python">
# eventseer/mod_comments/urls.py

from django.conf.urls.defaults import *

urlpatterns = patterns(&#039;&#039;,
    (r&#039;^delete/(?P&lt;comment_id&gt;\d+)/$&#039;, &#039;eventseer.mod_comments.views.delete&#039;),
    (r&#039;&#039;, include(&#039;django.contrib.comments.urls&#039;)),
)
</pre>
<p>The first line routes requests to <code>/comments/delete/</code> to a custom delete view which we will create in the next step. For this example this is the only behavior we wish to modify. The last line ensures that all other requests are passed through to <code>django.contrib.comments.urls</code>.</p>
<p><b>Step 3: Create the wrapper view</b></p>
<p>We want to make sure that only the user who wrote a comment or administrators are allowed to delete it. This can be taken care of in <code>mod_comments/views.py</code>:</p>
<pre class="brush: python">
# eventseer/mod_comments/views.py

from django.contrib.auth.decorators import login_required
from django.contrib.comments.models import Comment
from django.http import Http404
from django.shortcuts import get_object_or_404
import django.contrib.comments.views.moderation as moderation

@login_required
def delete(request, comment_id):
    comment = get_object_or_404(Comment, pk=comment_id)
    if request.user == comment.user or \
       request.user.is_staff:
        return moderation.delete(request, comment_id)
    else:
        raise Http404
</pre>
<p>First we wrap the delete function with the <code>login_required</code> decorator so as to keep out non-authenticated users. We then check if the user who made the delete request actually owns the comment or if the user has administrator permissions. If either case holds true we pass the request on to the original <code>delete</code> method. Otherwise a 404 (page not found) error is raised.</p>
<p>We can of course modify the view method signature as required. In fact, the original delete method can be completely bypassed if that is what we want.</p>
<p><b>Step 4: Modifying delete behavior</b></p>
<p>By default the delete view shows a confirmation page (<code>comments/delete.html</code>) on GET requests and does the actual deletion on POST requests. After the deletion is done you will be shown the standard <code>deleted.html</code> template. Alternatively, adding a <code>next</code> parameter to the POST request will send the user to the given URL.</p>
<p>Say we wish to make some changes to the confirmation page, <code>comments/delete.html</code>. Instead of modifying the original in the Django distribution we create our own version. Create the directory <code>eventseer/mod_comments/templates/comments</code> and copy <code>delete.html</code> into it.</p>
<p>You will typically find this file in <code>/usr/lib/python2.5/site-packages/django/contrib/comments/templates/comments</code> on Linux systems or <code>C:/Python2.5/Lib/site-packages/django/contrib/comments/templates/comments</code> on Windows systems&mdash;your mileage may vary.</p>
<p>Typically you will wish to change this template to fit in with your site design, for instance by inheriting from your base templates.</p>
<p>To make the modified template take precedence, just add the new directory to <code>settings.py</code>:</p>
<pre class="brush: python">
# eventseer/settings.py

TEMPLATE_DIRS = (
    ...
    &#039;/home/eventseer/src/eventseer/mod_comments/templates&#039;,
    ...
)
</pre>
<p>This will make sure that the Django URL resolver queries the <code>eventseer/mod_comment/templates</code> directory&mdash;where it will find our alternative version of <code>comments/delete.html</code>. Requests to other comment views that use the other default templates will be passed through to the correct default location.</p>
<p><b>Conclusion</b></p>
<p>The Django comments framework is the easiest and quickest way to add commenting functionality to your application. The flip side of this simplicity is that you will often have to extend the framework to make it behave according to your requirements. As this tutorial have shown, this can be done without making changes to the comments framework itself. One of the core strengths of Django is how it provides a set of reusable building blocks upon which you can add your own advanced functionality as required.</p>
<p>At the time of writing, the comments framework documentation is somewhat sparse. If you want to learn more about the inner workings of Django comments you will have to consult <a href="http://code.djangoproject.com/browser/django/trunk/django/contrib/comments" target="_blank">the source code</a>&mdash;there are quite a few undocumented features that are really useful.</p>
<p><b>UPDATE</b></p>
<p>Tim Hoelscher <a href="#comment-7357#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">noticed that</a> I hadn&#8217;t said anything about how to work around the Django permission system, which was an unintentional omission.</p>
<p>The original <code>delete</code> method in <code>django.contrib.comments.views.moderation</code> requires that the user who wants to delete a comment has the <code>comments.can_moderate</code> permission. Regular users do not have this permission by default, so we have to set it for all users who are allowed to delete comments. (Remember, the wrapper <code>delete</code> makes sure that they can only delete their own comments.)</p>
<p>An easy way to solve this is to create a &#8216;user&#8217; group, assign the <code>comments.can_moderate</code> permission to this group, and finally assign all users to this group. This can be done through the admin interface, with a few lines of SQL, or within your Django application. Refer to the <a href="http://docs.djangoproject.com/en/dev/topics/auth/#permissions">Django permissions</a> documentation for more information on how permissions work.</p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://thomas.broxrost.com/2009/04/06/when-endnote-x2-fails/" rel="bookmark" class="wherego_title">When EndNote X2 fails</a></li><li><a href="http://thomas.broxrost.com/2008/04/08/django-on-google-app-engine/" rel="bookmark" class="wherego_title">Django on Google App Engine in 13 simple steps</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thomas.broxrost.com/2008/09/05/hacking-comments-in-django-10/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://thomas.broxrost.com/2008/09/05/hacking-comments-in-django-10/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</feedburner:origLink></item>
	</channel>
</rss>
