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

<channel>
	<title>Chui's counterpoint</title>
	<atom:link href="http://www.redmountainsw.com/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.redmountainsw.com/wordpress</link>
	<description>pulling the rug</description>
	<lastBuildDate>Sun, 13 Dec 2009 00:52:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Factors in IT decision-making</title>
		<link>http://www.redmountainsw.com/wordpress/archives/factors-in-it-decision-making</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/factors-in-it-decision-making#comments</comments>
		<pubDate>Sun, 13 Dec 2009 00:52:38 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=882</guid>
		<description><![CDATA[Interesting study commisioned by Google on SMB buying behaviours for IT products. In order of importance:

Reliable 73%
Integrates easily with existing systems
Service/support
Appropriate for a company of my size
Flexible  44%
Inexpensive to service/ maintain
Lower cost 37%
Requires minimal training/ education
Company is a well-known, established brand
Scalable
Includes comprehensive training/education
Discounts/promotions
Have purchased from company in the past 27 %



]]></description>
			<content:encoded><![CDATA[<div>Interesting study commisioned by Google on <a href="http://www.techmarketer.com.au/techsmbinsights/">SMB buying behaviours for IT products</a>. In order of importance:</div>
<ol>
<li>Reliable 73%</li>
<li>Integrates easily with existing systems</li>
<li>Service/support</li>
<li>Appropriate for a company of my size</li>
<li>Flexible  44%</li>
<li>Inexpensive to service/ maintain</li>
<li>Lower cost 37%</li>
<li>Requires minimal training/ education</li>
<li>Company is a well-known, established brand</li>
<li>Scalable</li>
<li>Includes comprehensive training/education</li>
<li>Discounts/promotions</li>
<li>Have purchased from company in the past 27 %</li>
</ol>
<div><span style="font-family: monospace;"><span style="line-height: normal; white-space: pre-wrap;"><br />
</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/factors-in-it-decision-making/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Memory Usage using __slots__</title>
		<link>http://www.redmountainsw.com/wordpress/archives/python-memory-usage-using-__slots__</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/python-memory-usage-using-__slots__#comments</comments>
		<pubDate>Fri, 27 Nov 2009 16:59:33 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=880</guid>
		<description><![CDATA[I have been trying to reduce memory usage on our application server, and experimented with using __slots__ to reduce memory usage.
The memory overhead of using __dict__ vs __slots__ turned out to be 147 bytes per object.
Here are my results



Test
Total Memory
Bytes per object


slots
40880K
41


dicts
183840K
188



Using the following test script

class C(object):
#__slots__ = (&#039;abc&#039;, &#039;defg&#039;)
pass

a = []
for i in xrange(1000000):
c [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying to reduce memory usage on our application server, and experimented with using __slots__ to reduce memory usage.</p>
<p>The memory overhead of using __dict__ vs __slots__ turned out to be 147 bytes per object.</p>
<p>Here are my results</p>
<table border="0">
<tbody>
<tr>
<th>Test</th>
<th>Total Memory</th>
<th>Bytes per object</th>
</tr>
<tr>
<td>slots</td>
<td>40880K</td>
<td>41</td>
</tr>
<tr>
<td>dicts</td>
<td>183840K</td>
<td>188</td>
</tr>
</tbody>
</table>
<p>Using the following test script</p>
<pre class="brush: python">
class C(object):
#__slots__ = (&#039;abc&#039;, &#039;defg&#039;)
pass

a = []
for i in xrange(1000000):
c = C()
c.abc = 1
c.defg = 2
a.append(c)
</pre>
<p>That&#8217;s quite promising. Now, if I can make that work with our in-house ORM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/python-memory-usage-using-__slots__/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Intelligence Gathering on Winning an Account</title>
		<link>http://www.redmountainsw.com/wordpress/archives/intelligence-gathering-on-winning-an-account</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/intelligence-gathering-on-winning-an-account#comments</comments>
		<pubDate>Wed, 11 Nov 2009 02:35:07 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Marketing]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=874</guid>
		<description><![CDATA[Sometimes winning projects can make one forget to gather competitive intelligence. Here is a list of questions one should ask the clients during a de-briefing:

Customer Details

Organisation name
Name, title


Opportunity Details

Products
Deal Value (License fee, Annual License fee, Consulting)
Main decision-makers (Name, title, role)
Main competitors (Organisation, products)
Main reason for win/loss


Process

Engagement &#8211; when first engaged
What did customer know about us [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes winning projects can make one forget to gather competitive intelligence. Here is a list of questions one should ask the clients during a de-briefing:</p>
<ul>
<li>Customer Details
<ol>
<li>Organisation name</li>
<li>Name, title</li>
</ol>
</li>
<li>Opportunity Details
<ol>
<li>Products</li>
<li>Deal Value (License fee, Annual License fee, Consulting)</li>
<li>Main decision-makers (Name, title, role)</li>
<li>Main competitors (Organisation, products)</li>
<li>Main reason for win/loss</li>
</ol>
</li>
<li>Process
<ol>
<li>Engagement &#8211; when first engaged</li>
<li>What did customer know about us before they started the selection process</li>
</ol>
<ol>
<li>Reference Sites (site, comments)</li>
<li>Feedback from our reference sites</li>
<li>Feedback from competitors reference sites</li>
<li>Proposal and Presentation
<ul>
<li>What was their view of the quality of proposal/tender response</li>
<li>Competitors?</li>
</ul>
</li>
<li>Presentations
<ul>
<li>What was their view of the quality of presentations</li>
<li>Competitors? Like/dislike?</li>
</ul>
</li>
<li>Functionality
<ul>
<li>Were products considered functionally superior/inferior to competitors?</li>
<li>What were the main functional advantages, be as specific as possible</li>
<li>What were the main functional disadvantages?</li>
<li>Was there anything that particularly impressed them with our competitors products or ours</li>
<li>How did our technologies compare</li>
</ul>
</li>
<li>Implementation and Support
<ul>
<li>Were they happy with the type and extent of the services proposed?</li>
<li>Were they comfortable with the quality of our implementations?</li>
<li>Were they comfortable with the quality of our support services?</li>
<li>Were there other services they would have liked us to propose?</li>
</ul>
</li>
<li>Prices
<ul>
<li>How did our prices compare to our competitors?</li>
<li>Was it considered that our price represented good value for money?</li>
<li>Were there specific areas of advantage or disadvantage on price?</li>
</ul>
</li>
<li>Service/Sales Process
<ul>
<li>Were they happy wit hthe level of contact we had with them during the sales process?</li>
<li>Were there things our competitors did that they particularly liked?</li>
</ul>
</li>
<li>Other &#8211; were there other ares of differentiation</li>
</ol>
</li>
<li>Summary
<ol>
<li>What were the three key factors for them that led them to their decision?</li>
<li>Lessons learnt</li>
<li>Referrals
<ul>
<li>Are they aware of any other organisations who are/will be looking for a similar solution in the near future. Ask this twice using different wording</li>
</ul>
</li>
</ol>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/intelligence-gathering-on-winning-an-account/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding News Corp&#8217;s Thrust</title>
		<link>http://www.redmountainsw.com/wordpress/archives/understanding-news-corps-thrust</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/understanding-news-corps-thrust#comments</comments>
		<pubDate>Tue, 10 Nov 2009 23:27:35 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=870</guid>
		<description><![CDATA[There has been a lot of commentary written about News Corp playing with the idea of exiting Google&#8217;s search index. Cringely said that News Corp would be denying themselves valuable traffic, handing them to competitors. Mark Cuban, on the other wrote that Twitter is heading to be THE news search site, leaving Google News has [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of commentary written about News Corp playing with the idea of exiting Google&#8217;s search index. Cringely said that News Corp would be denying themselves valuable traffic, <a href="http://www.cringely.com/2009/11/news-corp-to-offer-plaid-stamps/">handing them to competitors</a>. Mark Cuban, on the other wrote that Twitter is heading to be <em>THE</em> news search site, leaving Google News has little impact.</p>
<p>Both these comments misunderstand Rupert Murdoch.</p>
<p>Murdoch doesn&#8217;t care about news.</p>
<p>He cares about loyalty and eye balls. Listen carefully to <a href="http://mumbrella.com.au/murdoch-well-probably-remove-our-sites-from-googles-index-11366">Murdoch&#8217;s interview</a> on Sky News.</p>
<h2>On visitor loyalty</h2>
<p>It is about &#8220;News <em>You</em> can Trust&#8221;, not &#8220;<em>News</em> You can Trust&#8221;. Hence, the bundling of Fox News with operators like Hannity and Beck. In doing so,  Fox becomes <em>the</em><em> </em>destination because Fox validates what their visitors already believed in, and hands out new corroborating facts every day.</p>
<p>For those people who don&#8217;t read the news, there is Myspace. A site that again appeals to the <a href="http://thelastpsychiatrist.com/narcissism/">narcissist</a> by reminding them how important <em>they</em> were to the rest of the world.</p>
<h2>On eye-balls</h2>
<p>The visitor from Google does not stay on their property because visiting from aggregator sites do not instill a rabid following. These types of visitors are of low value.</p>
<p>Rupert wants the old days back, when you paid your dollar for the paper, the paper holds you captive for the rest of the day. Advertising is sold on the circulation numbers x number of pages on newspaper. This is different from selling advertising on CPM basis, since one page-view lacks the multiplier effect of &#8220;number of pages on the newspaper&#8221;. A once-only web visitor is only worth a fraction of the advertising dollars.</p>
<p>To get the old days back, one has to recognize that the desire for deep news is merely another compulsion. People have got by in the past without them. Since there is no way News Corp can own all the coverage for a particular news item, it is necessary for them to either cut off the fuel from aggregator sites, or to own one themselves. Through their experiments with Fox, they have shown that it is not necessary for opinions to be separated from facts, hence the positioning of Fox as a cross of Huffington Post and CNN &#8211; Newstertainment at its finest.</p>
<h2>What next for News Corp</h2>
<p>Firstly, after walling off News Corp articles from Google&#8217;s indexes, reorganize news content around visitor profiles than news similarity. Instead of listing similar news articles alongside a piece of news, for instance instead of listing news of other shooting beside the Fort Hood shooter, News might link to articles on radical Islam, or Barack Obama is a Muslim.  There is a little narcissist in every one. While the visitor profile to Washington Post may be different, they are no less obsessive about their own world-views.</p>
<p>Secondly, prove to other news proprietors that a paywall works. News may be free, but <a href="http://www.foxnews.com/politics/2009/04/15/thousands-anti-tax-tea-party-protesters-turn-cities/">causes aren&#8217;t</a>. By taking a hardline position on a set of issues, News Corp can extract more rent than a politician can.</p>
<p>Thirdly, use a paywall to cognitively engender value, and hence extract more page-views. If one has paid $1 for the day&#8217;s news, one is more likely to stay on the news property to read everything else that is there. In truth, $1 a day is cheap entertainment. The <a href="http://www.theage.com.au/news/technology/biztech/murdoch-looks-for-new-ways-to-monetise-myspace-traffic/2009/02/08/1234027900076.html">poor showing at Myspace</a> has been ostensibly due to <a href="http://www.businessinsider.com/henry-blodget-facebook-accounts-for-1-in-4-internet-pageviews-2009-10">the ever-increasing web inventory</a> pushing down advertising rates. However, it appears that someone used his playbook better.</p>
<h2>So, is Rupert Murdoch a Narcissist?</h2>
<p>No. But the rest of us are. And he consistently shows how wrong we are about the narcissists inside us.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/understanding-news-corps-thrust/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TCP Provider, error: 0- An existing connection was forcibly closed by the remote host</title>
		<link>http://www.redmountainsw.com/wordpress/archives/tcp-provider-error-0-an-existing-connection-was-forcibly-closed-by-the-remote-host</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/tcp-provider-error-0-an-existing-connection-was-forcibly-closed-by-the-remote-host#comments</comments>
		<pubDate>Thu, 05 Nov 2009 00:30:01 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=864</guid>
		<description><![CDATA[Once in a while, one comes across a problem that is so totally perplexing, and people have various success with different approaches that it makes me think of the tale of the blind men and the elephant.
Recently, in a production environment, we are seeing errors in our SQL Server clients: reporting
TCP Provider, error: 0 - [...]]]></description>
			<content:encoded><![CDATA[<p>Once in a while, one comes across a problem that is so totally perplexing, and people have various success with different approaches that it makes me think of the tale of the blind men and the elephant.</p>
<p>Recently, in a production environment, we are seeing errors in our SQL Server clients: reporting</p>
<p><code>TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host</code></p>
<p>Summary: The TCP connection from client to server no longer exists.</p>
<p>Here are a sundry list of possible reasons gleaned from web searches.</p>
<p>Reasons:</p>
<ol>
<li>Most likely reason &#8211; <a href="#snp">TCP Chimney Offload feature was enabled</a></li>
<li><a href="#net">Flaky TCP connections</a></li>
<li><a href="#snp">Scalable Networking Pack</a></li>
<li>Flaky Network Cards/Drivers</li>
<li><a href="#dos">Denial of Service Protection</a></li>
<li><a href="#pool">Connection Pooling fetched a dead connection from the pool</a></li>
<li><a href="#misc">Makes no sense</a></li>
</ol>
<h2><a name="net"></a>Flaky Network Connections</h2>
<p>Source: <a href="http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx#4432410">Matt Neerincx (MSFT)</a></p>
<blockquote><p><code><br />
net stop sqlbrowser</code></p>
<p><code>cd "C:\Program Files\Microsoft SQL Server\90\Shared"</code></p>
<p><code> </code><code>sqlbrowser -c<br />
</code><br />
This will show you in real time when incoming requests hit the browser.</p></blockquote>
<p>Source:<a href="http://channel9.msdn.com/forums/TechOff/234271-Conenction-forcibly-closed-SQL-2005/">MSDN forums</a><br />
<code><br />
==== This may be helpful as well, if there are alot of returned @@PACKET_ERRORS ===</code></p>
<p><code>USE tempdb<br />
GO<br />
set nocount on<br />
go</code></p>
<p><code>PRINT ':: Relative time spent on I/O, CPU, and idle since server start'<br />
SELECT @@CPU_BUSY AS [@@CPU_BUSY], @@IDLE AS [@@IDLE], @@IO_BUSY AS [@@IO_BUSY],<br />
CONVERT (varchar(8), CONVERT (numeric (6, 4), (100.0 * @@CPU_BUSY / (@@CPU_BUSY + @@IDLE + @@IO_BUSY)))) + '%' AS Pct_CPU_BUSY,<br />
CONVERT (varchar(8), CONVERT (numeric (6, 4), (100.0 * @@IDLE / (@@CPU_BUSY + @@IDLE + @@IO_BUSY)))) + '%' AS Pct_IDLE,<br />
CONVERT (varchar(8), CONVERT (numeric (6, 4), (100.0 * @@IO_BUSY / (@@CPU_BUSY + @@IDLE + @@IO_BUSY)))) + '%' AS Pct_IO_BUSY<br />
PRINT ''<br />
PRINT ':: Misc network and I/O stats'<br />
SELECT @@PACK_RECEIVED AS [@@PACK_RECEIVED], @@PACK_SENT AS [@@PACK_SENT],<br />
@@PACKET_ERRORS AS [@@PACKET_ERRORS (network errors e.g. 17824)]<br />
SELECT @@TOTAL_READ AS [@@TOTAL_READ], @@TOTAL_WRITE AS [@@TOTAL_WRITE],<br />
@@TOTAL_ERRORS AS [@@TOTAL_ERRORS (disk read/write I/O errors)]<br />
PRINT ''<br />
PRINT ':: GETDATE()'<br />
PRINT CONVERT (varchar, GETDATE(), 109)<br />
PRINT ''<br />
PRINT 'Done.'<br />
GO<br />
</code></p>
<h2><a name="snp"></a>Scalable Networking Pack</h2>
<p>Source: <a href="http://support.microsoft.com/?kbid=942861">MS KB 942861</a> (via <a href="http://www.phwinfo.com/forum/ms-sqlserver-server/302099-existing-connection-forcibly-closed-remote-host-resolved.html#post1351608">Raman Gosala</a>)</p>
<blockquote><p><em>Cause</em> —This problem occurs because the TCP Chimney Offload feature is enabled on the server. The TCP Chimney Offload feature is enabled by the Windows Server 2003 Scalable Networking Pack.</p>
<p>Typically, this problem occurs when the network adapter uses the Broadcom 5708 chipset. For example, the following network adapters use the Broadcom 5708 chipset:</p>
<ul>
<li>Broadcom NetXtreme II</li>
<li>Hewlett-Packard NC373i Multifunction Gigabit Server Adapter</li>
</ul>
<p>This problem may also occur when the network adapter uses other chipsets</p></blockquote>
<p>Source: <a href="http://blogs.msdn.com/cindygross/archive/2009/10/22/sql-server-and-tcp-chimney.aspx">SQL Server and TCP Chimney &#8211; Cindy Gross</a></p>
<blockquote><p>If you are using SQL Server or Analysis Services: I suggest you double check that your SNP settings, especially TCP Chimney Offset, are all OFF unless your NIC vendor has verified they support it and you have installed their version of drivers that support it. Windows 2003 SP2 turned it on by default, you can disable it with a hotfix (which updates three registry key values) or manually set the registry key values yourself. If the NIC vendor does support the settings they can improve your network performance, but when they don&#8217;t support it you can see odd connectivity problems.</p></blockquote>
<h2><a name="dos"></a>Denial of Service Protection</h2>
<p>Source: <a href="http://msdn.microsoft.com/en-us/library/ms187005.aspx">MSDN &#8211; Troubleshooting Connection Forcibly Closed</a><strong><a name="pool"></a></strong></p>
<table style="margin-top: 5px; margin-bottom: 5px; margin-left: 0px; width: 1130px; border-collapse: collapse; border: 1px solid #e5e5e5;" border="0">
<tbody>
<tr style="vertical-align: top;">
<th style="background-color: #e5e5e5; color: black; border-bottom-color: #c8cdde; border-bottom-width: 1px; border-bottom-style: solid; text-align: left; padding: 4px;">Cause</th>
<th style="background-color: #e5e5e5; color: black; border-bottom-color: #c8cdde; border-bottom-width: 1px; border-bottom-style: solid; text-align: left; padding: 4px;">Resolution</th>
</tr>
<tr style="vertical-align: top;">
<td style="background-color: white; line-height: 15px; padding: 4px; margin: 1px; border: 1px solid #d5d5d3;">Client is connecting with an unsupported version of the SQL Server Native Client.</td>
<td style="background-color: white; line-height: 15px; padding: 4px; margin: 1px; border: 1px solid #d5d5d3;">Update the client computer to the server version of the SQL Server Native Client.</td>
</tr>
<tr style="vertical-align: top;">
<td style="background-color: white; line-height: 15px; padding: 4px; margin: 1px; border: 1px solid #d5d5d3;">Faulty network hardware is dropping portions of the TCP traffic.</td>
<td style="background-color: white; line-height: 15px; padding: 4px; margin: 1px; border: 1px solid #d5d5d3;">Use network monitoring programs to analyze TCP SYN, ACK, and FIN messages.</td>
</tr>
<tr style="vertical-align: top;">
<td style="background-color: white; line-height: 15px; padding: 4px; margin: 1px; border: 1px solid #d5d5d3;">The <strong>SynAttackProtect</strong> setting may be dropping connections.</td>
<td style="background-color: white; line-height: 15px; padding: 4px; margin: 1px; border: 1px solid #d5d5d3;">See the section &#8220;Connections May Be Forcibly Closed When Running on Windows Server 2003 SP1&#8243; that follows.</td>
</tr>
</tbody>
</table>
<p>Occurs on Windows Server 2003 SP1</p>
<p>To resolve this issue, use the regedit.exe utility to add the following registry key:</p>
<h3 class="subHeading"><!----></h3>
<table border="0">
<tbody>
<tr>
<th> Key</th>
<th> Type</th>
<th> Name</th>
<th> Value</th>
</tr>
<tr>
<td>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\</td>
<td>DWORD</td>
<td>SynAttackProtect</td>
<td>00000000</td>
</tr>
</tbody>
</table>
<h2><a name="pool"></a>Connection Pooling</h2>
<p>Turn off connection pooling. Note: this has adverse performance issues if you are constantly reconnecting to the server on every request.</p>
<h2><a name="misc"></a>Miscellaneous</h2>
<p>Source: <a href="http://dbaspot.com/forums/ms-sqlserver/218527-sqlclient-existing-connection-forcibly-closed.html#post908416">DBASpot</a></p>
<blockquote><p>I went into the Sql Server Configuration Manager, Sql Native Client Configuration -&gt; Protocols and disabled Shared Memory and made the TCP/IP protocol #1 in order. Then just restarted the Sql Service and it all started working!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/tcp-provider-error-0-an-existing-connection-was-forcibly-closed-by-the-remote-host/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Database Patterns with ASP.net MVC</title>
		<link>http://www.redmountainsw.com/wordpress/archives/4gl-patterns-asp-net-mvc</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/4gl-patterns-asp-net-mvc#comments</comments>
		<pubDate>Wed, 28 Oct 2009 14:12:22 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[4GL]]></category>
		<category><![CDATA[rad]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=862</guid>
		<description><![CDATA[Brad Wilson has a nice long post about the use of model metadata in ASP.NET MVC.
While most of these do not deal with database operations, they have a certain place in database modelling. The following are must haves:

Short Display Names &#8211; a sane toString() for tabular listings
Simple Display Text &#8211; a sane toString() for summarizing [...]]]></description>
			<content:encoded><![CDATA[<p>Brad Wilson has a nice long post about the <a href="http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-2-modelmetadata.html">use of model metadata in ASP.NET MVC</a>.</p>
<p>While most of these do not deal with database operations, they have a certain place in database modelling. The following are must haves:</p>
<ul>
<li>Short Display Names &#8211; a sane toString() for tabular listings</li>
<li>Simple Display Text &#8211; a sane toString() for summarizing complex displays</li>
</ul>
<p>I&#8217;m sure there are more gems to be mined from ASP.Net MVC. If anyone who knows more, please e-mail me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/4gl-patterns-asp-net-mvc/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting a .dotx file to a .docx file with Python</title>
		<link>http://www.redmountainsw.com/wordpress/archives/converting-a-dotx-file-to-a-docx-file-with-python</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/converting-a-dotx-file-to-a-docx-file-with-python#comments</comments>
		<pubDate>Mon, 19 Oct 2009 02:42:58 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=859</guid>
		<description><![CDATA[It used to be that one could simply rename a Word Template .dot file to .doc. However, Microsoft has made it somewhat harder today.
One way to do this is through using Word Automation. However, another way is to do some XML manipulation, given that .dotx and .dotcx files are actually zip archives.

import xml.dom.minidom
import zipfile

def dotx2docx(src, [...]]]></description>
			<content:encoded><![CDATA[<p>It used to be that one could simply rename a Word Template .dot file to .doc. However, Microsoft has made it somewhat harder today.</p>
<p>One way to do this is through using Word Automation. However, another way is to do some XML manipulation, given that .dotx and .dotcx files are actually zip archives.</p>
<pre class="brush: python">
import xml.dom.minidom
import zipfile

def dotx2docx(src, dst)

    OLD_CONTENT_TYPE = &quot;application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml&quot;
    NEW_CONTENT_TYPE = &quot;application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml&quot;
    CONTENTTYPE_FILENAME = &#039;[Content_Types].xml&#039;
    arc_in  = zipfile.ZipFile(src, &#039;r&#039;)
    arc_out = zipfile.ZipFile(dst, &#039;w&#039;)
    for zinfo in arc_in.infolist():
        if zinfo.filename == CONTENTTYPE_FILENAME:
                doc = xml.dom.minidom.parseString(arc_in.read(CONTENTTYPE_FILENAME))
                els = doc.getElementsByTagName(&#039;Override&#039;)
                for el in els:
                    attr_contenttype = el.getAttribute(&#039;ContentType&#039;)
                    if attr_contenttype == OLD_CONTENT_TYPE:
                        if el.getAttribute(&#039;PartName&#039;) == &#039;/word/document.xml&#039;:
                            el.setAttribute(&#039;ContentType&#039;, NEW_CONTENT_TYPE)
                arc_out.writestr(CONTENTTYPE_FILENAME, doc.toxml())
                doc.unlink()
        else:
            contents = arc_in.read(zinfo.filename)
            arc_out.writestr(zinfo.filename, contents)
    arc_in.close()
    arc_out.close()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/converting-a-dotx-file-to-a-docx-file-with-python/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is obesity contagious?</title>
		<link>http://www.redmountainsw.com/wordpress/archives/is-obesity-contagious</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/is-obesity-contagious#comments</comments>
		<pubDate>Mon, 05 Oct 2009 05:50:18 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/archives/is-obesity-contagious</guid>
		<description><![CDATA[I don&#8217;t know if you recall this article from the New Scientist discussing whether obesity is spreading through social norms.
However, there may be another pathway.
A 2007 Scientific American article mentions that bacteria can cause subjects to gain weight faster.
For one thing, bacteria produce chemicals that help us harness energy and nutrients from our food, Huffnagle [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if you recall this <a href="http://www.newscientist.com/article/dn12343-is-obesity-contagious.html">article from the New Scientist</a> discussing whether obesity is spreading through social norms.</p>
<p>However, there may be another pathway.</p>
<p>A 2007 Scientific American article mentions that <a href="http://www.scientificamerican.com/article.cfm?id=strange-but-true-humans-carry-more-bacterial-cells-than-human-ones">bacteria can cause subjects to gain weight faster</a>.</p>
<blockquote><p>For one thing, bacteria produce chemicals that help us harness energy and nutrients from our food, Huffnagle explains. Germ-free rodents have to consume nearly a third more calories than normal rodents to maintain their body weight, and when the same animals were later given a dose of bacteria, their body fat levels spiked, even if they didn&#8217;t eat any more than they had before.</p></blockquote>
<p>One day, we would not longer recognize ourselves as distinct organisms, but as composites.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/is-obesity-contagious/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Japan observations</title>
		<link>http://www.redmountainsw.com/wordpress/archives/japan-observations</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/japan-observations#comments</comments>
		<pubDate>Sun, 04 Oct 2009 23:07:44 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=854</guid>
		<description><![CDATA[Over the term 3 school holidays, we (my family) spent 11 days travelling in Japan, and I&#8217;d like to share some observations.

Osteoporosis is common among the elderly, far more prevalent than Australia for example. Despite the (relatively) higher consumption of soy products in Japan, this comes across as a little surprising
People are generally taller in [...]]]></description>
			<content:encoded><![CDATA[<p>Over the term 3 school holidays, we (my family) spent 11 days travelling in Japan, and I&#8217;d like to share some observations.</p>
<ul>
<li>Osteoporosis is common among the elderly, far more prevalent than Australia for example. Despite the (relatively) higher consumption of soy products in Japan, this comes across as a little surprising</li>
<li>People are generally taller in Tokyo compared to Kyoto. I thought this might be related to nutrition. However, I was reminded that the northern Chinese were taller than the southern Chinese. Perhaps there is a genetic basis as well?</li>
<li>I was surprised eating out wasn&#8217;t much more expensive than eating out at comparable places in Australia.</li>
<li>Fruits like nashi was cheap compared with Australia. In Japan, a nashi costs 120 Yen (AUD 1.60), while in Australia it costs $3.80 yesterday (imported from China). Rockmelons were 1000 Yen (AUD 14.00), while here in Toowoomba, we just bought one for AUD 2.50.</li>
<li>Meat was expensive, and there is a lot of batter and frying to bulk meat up. What surprised me though is how expensive vegetables were, particularly beans. There was a kind of broad bean which sells for around 300 Yen for what looks like 100 g</li>
<li>I enjoyed trying out the different kinds of mushrooms. In Australia, anything other than the basic white mushrooms command premium dollars</li>
<li>Relatively little waste is generated. Waste is tied up in white plastic bags and placed on the kerbside for pick up. At Nagoya, it is twice a week. Australian waste is held in large wheelie bins, and is picked up by a truck operated by a single person. However, the Japanese are more serious about recycling than Australia, with waste sorted into PET, bottles, paper and the rest which is suitable for incineration. I wondered what the Japanese would do with old batteries though.</li>
<li>The Japanese love their mobile phones. On any bench on the subway, one could count three people texting or surfing. I looked over the shoulders of a few, and these appear to be text applications. There was the occasional person who plays the PSP (one was a female in her 30s playing some kind of hacking and slashing FPS). </li>
<li>I have read about how common vending machines were in Japan, but I was still surprised. In Kyoto, near where we stayed, I found one nearly on every street corner. These were little backstreets, and don&#8217;t get much foot traffic. I wondered how this can be justified economically&#8230; unless Kyoto folks were especially thirsty.</li>
<li>Japanese women walk fast, even in heels, even on staircases. It is a remarkable skill.</li>
<li>There seems to be a lot of elderly men working as traffic police. On one relatively quiet intersection, I counted four.</li>
<li>I had a quick glance at the prices over at McDonalds, and they seem roughly in line with Australian prices. They had 100 Yen deals, which is a bit cheaper than the AUD 2.00 deals here (AUD 2.00 = 150 Yen).</li>
<li>The coins were a little confusing at first, but probably no more confusing for a Japanese visitor figuring out the Australian coins. There were as many denominations as in Australia, but the size of the coins were all over the place. Copper coins were used for 10 Yen and 5 Yen (5 Yen coin has a hole in it), but they were similar in size to the 100 Yen and 50 Yen coins. There is also a 500 Yen coin, about the size of a 50 cent coin in Australia. It feels odd to have a coin that&#8217;s worth nearly 7 dollars. (In Australia, the $2 coin is smaller than the $1 coin, which in turn is smaller than the 50c coin)</li>
<li>My wife thought women were more heavily made up in Japan compared to Australia, but I think it is an observation bias. I noticed plenty of women who applied little make-up.</li>
</ul>
<p>That&#8217;s all for now, I&#8217;ll update if I think of anything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/japan-observations/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Some keywords are going be getting expensive.</title>
		<link>http://www.redmountainsw.com/wordpress/archives/some-keywords-are-going-be-getting-expensive</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/some-keywords-are-going-be-getting-expensive#comments</comments>
		<pubDate>Thu, 17 Sep 2009 00:44:35 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=850</guid>
		<description><![CDATA[According to The Register article here:
[Special Operations contractor] will, at a minimum, develop Internet-based marketing procedures such as use of Google AdWords and Search Engine Optimization to prioritize search result listing of the applicable websites
What next? Affiliate programs? Cost per action? I know! email submits. Any creatives with landing page ideas?
Here&#8217;s a visualization of what [...]]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://www.theregister.co.uk/2009/09/16/socom_psyops_against_uk/page2.html">The Register</a> article here:</p>
<blockquote><p>[Special Operations contractor] will, at a minimum, develop Internet-based marketing procedures such as use of Google AdWords and Search Engine Optimization to prioritize search result listing of the applicable websites</p></blockquote>
<p>What next? Affiliate programs? <strong>Cost per action</strong>? I know! <font size="+1"><strong>email submits</strong></font>. Any creatives with landing page ideas?</p>
<p>Here&#8217;s a visualization of what may happen in the near future:<br />
<img src="/wordpress/wp-content/uploads/makejoke.png"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/some-keywords-are-going-be-getting-expensive/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
