<?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" version="2.0">

<channel>
	<title>Pedro Santos</title>
	
	<link>http://psantos-blog.zi-yu.com</link>
	<description>gamedev and software development blog</description>
	<pubDate>Wed, 11 Nov 2009 08:47:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/PedroSantos" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">PedroSantos</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Equalization of pressure within the ear</title>
		<link>http://psantos-blog.zi-yu.com/?p=319</link>
		<comments>http://psantos-blog.zi-yu.com/?p=319#comments</comments>
		<pubDate>Wed, 11 Nov 2009 08:13:36 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=319</guid>
		<description><![CDATA[When at a plane I usually get a lot of pain when the plane starts to descend. I never knew why, but now, thanks to my diving lessons I know what&#8217;s happening and how to act on it. The pain comes for the air pressure inside the ear. Just like when under water, the pressure change makes [...]]]></description>
			<content:encoded><![CDATA[<p>When at a plane I usually get a lot of pain when the plane starts to descend. I never knew why, but now, thanks to my <a href="http://en.wikipedia.org/wiki/Scuba_diving">diving</a> lessons I know what&#8217;s happening and how to act on it. The pain comes for the <a href="http://en.wikipedia.org/wiki/Ear_clearing">air pressure inside the ear</a>. Just like when under water, the pressure change makes all the pain that we feel. What we need to do is to clear the amount of air, and new new air that will enter the ear will be at the correct pressure and it won&#8217;t hurt.</p>
<p>To do so, you&#8217;ll need to follow one of the <a href="http://en.wikipedia.org/wiki/Ear_clearing#Methods">several methods listed at wikipedia</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=1k1JkQsoiKs:hl-iM4B3Y9o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=1k1JkQsoiKs:hl-iM4B3Y9o:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=1k1JkQsoiKs:hl-iM4B3Y9o:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=1k1JkQsoiKs:hl-iM4B3Y9o:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=1k1JkQsoiKs:hl-iM4B3Y9o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=1k1JkQsoiKs:hl-iM4B3Y9o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=1k1JkQsoiKs:hl-iM4B3Y9o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=1k1JkQsoiKs:hl-iM4B3Y9o:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=319</wfw:commentRss>
		</item>
		<item>
		<title>When someone reviews our product</title>
		<link>http://psantos-blog.zi-yu.com/?p=316</link>
		<comments>http://psantos-blog.zi-yu.com/?p=316#comments</comments>
		<pubDate>Tue, 10 Nov 2009 19:29:30 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[orionsbelt]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=316</guid>
		<description><![CDATA[It&#8217;s great when someone that we don&#8217;t know reviews our project and makes a great review of it. The article really shows that the author took the time to properly play and learn the game, and he made a great analysis of it, concluding on the pros and cons of the game, which I agree:

Pros:
- Graphics-centered [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s great when someone that we don&#8217;t know reviews <a href="http://www.orionsbelt.eu/">our project</a> and makes a <a href="http://www.onrpg.com/MMO/Orions-Belt/review/Orions-Belt-Review-Tactical-browser-gaming-at-its-best">great review of it</a>. The article really shows that the author took the time to properly play and learn the game, and he made a great analysis of it, concluding on the pros and cons of the game, which I agree:</p>
<blockquote>
<h3><strong>Pros:</strong></h3>
<p>- Graphics-centered interface<br />
- Simple yet very addictive battle system<br />
- Very accommodating community.</p>
<h3><strong>Cons:</strong></h3>
<p>- Not joining the competitive battles takes out most of the fun<br />
- Some game systems are too familiar and is better done by other browser games<br />
- Moving and exploring takes a lot of time.</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=xkB_h6FBuHs:kEA6f3FpnhI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=xkB_h6FBuHs:kEA6f3FpnhI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=xkB_h6FBuHs:kEA6f3FpnhI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=xkB_h6FBuHs:kEA6f3FpnhI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=xkB_h6FBuHs:kEA6f3FpnhI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=xkB_h6FBuHs:kEA6f3FpnhI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=xkB_h6FBuHs:kEA6f3FpnhI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=xkB_h6FBuHs:kEA6f3FpnhI:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=316</wfw:commentRss>
		</item>
		<item>
		<title>OpenSSL Love</title>
		<link>http://psantos-blog.zi-yu.com/?p=311</link>
		<comments>http://psantos-blog.zi-yu.com/?p=311#comments</comments>
		<pubDate>Mon, 02 Nov 2009 10:08:23 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[opinion]]></category>

		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=311</guid>
		<description><![CDATA[Just got to an article that says everything I&#8217;d like to say about OpenSSL. It makes me think about the definition of software quality. At first sight, OpenSSL&#8217;s code seams a mess, but the point is: it&#8217;s one of the most used libraries out there, it works, it&#8217;s stable and it&#8217;s reliable. But using it is a [...]]]></description>
			<content:encoded><![CDATA[<p>Just got to an article that <a href="http://www.peereboom.us/assl/html/openssl.html">says everything I&#8217;d like to say about OpenSSL</a>. It makes me think about the definition of software quality. At first sight, OpenSSL&#8217;s code seams a mess, but the point is: it&#8217;s one of the most used libraries out there, it works, it&#8217;s stable and it&#8217;s reliable. But using it is a major PITA.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=-u1c-qQtfgA:rla1yU58fwA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=-u1c-qQtfgA:rla1yU58fwA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=-u1c-qQtfgA:rla1yU58fwA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=-u1c-qQtfgA:rla1yU58fwA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=-u1c-qQtfgA:rla1yU58fwA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=-u1c-qQtfgA:rla1yU58fwA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=-u1c-qQtfgA:rla1yU58fwA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=-u1c-qQtfgA:rla1yU58fwA:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=311</wfw:commentRss>
		</item>
		<item>
		<title>Cross-platform .NET</title>
		<link>http://psantos-blog.zi-yu.com/?p=309</link>
		<comments>http://psantos-blog.zi-yu.com/?p=309#comments</comments>
		<pubDate>Mon, 02 Nov 2009 09:27:41 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[.net]]></category>

		<category><![CDATA[mono]]></category>

		<category><![CDATA[opinion]]></category>

		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=309</guid>
		<description><![CDATA[I&#8217;ve had a lot of feedback on my running mono article. The majority of feedback was something like: .NET isn&#8217;t cross platform, Mono is evil, MS is evil. How can someone say to me that .NET isn&#8217;t cross platform when I have an average sized product running out of the box on MS .NET and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a lot of feedback on my <a href="http://psantos-blog.zi-yu.com/?p=298">running mono</a> article. The majority of feedback was something like: <em>.NET isn&#8217;t cross platform, Mono is evil, MS is evil</em>. How can someone say to me that .NET isn&#8217;t cross platform when I have an average sized product running out of the box on MS .NET and Mono? I used to participate on a lot of discussions about this a couple of years ago. But then I realized that it was more productive to actually do something instead of discussing these kind of issues.</p>
<p>What makes a Java application cross-platform? Will a Java application be cross-platform if use reference resources like: c:\MyApp\MyApp.ini? And if we have a file named MyApp.ini and get it like getResource(&#8221;myapp.ini&#8221;)? And if we use specific operating system resources?</p>
<p>The same goes for .NET applications. If the developers are careful, it&#8217;s easy to have a cross-platform application. Having a desktop application is hard, that&#8217;s true. Microsoft made Windows Forms very Windows specific (using stuff like windows handles), and it&#8217;s hard for Mono to make a cross-platform Windows Forms implementation. But there are other alternatives, like <a href="http://www.mono-project.com/GtkSharp">GTK#</a>. Even so, I realize that this issue is the least cross-platform of .NET.</p>
<p>But on a web/services scenario, Mono is as cross-platform as you can get.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=KUCBNi0tRb4:DxdJ_XfQVxs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=KUCBNi0tRb4:DxdJ_XfQVxs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=KUCBNi0tRb4:DxdJ_XfQVxs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=KUCBNi0tRb4:DxdJ_XfQVxs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=KUCBNi0tRb4:DxdJ_XfQVxs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=KUCBNi0tRb4:DxdJ_XfQVxs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=KUCBNi0tRb4:DxdJ_XfQVxs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=KUCBNi0tRb4:DxdJ_XfQVxs:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=309</wfw:commentRss>
		</item>
		<item>
		<title>Running Mono - an Overview</title>
		<link>http://psantos-blog.zi-yu.com/?p=298</link>
		<comments>http://psantos-blog.zi-yu.com/?p=298#comments</comments>
		<pubDate>Thu, 29 Oct 2009 10:34:02 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[.net]]></category>

		<category><![CDATA[industry]]></category>

		<category><![CDATA[mono]]></category>

		<category><![CDATA[orionsbelt]]></category>

		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=298</guid>
		<description><![CDATA[We&#8217;ve been using Mono for the production server of Orion&#8217;s Belt for a couple of months now. On this article I&#8217;d like to share our experiences using Mono. We developed our project fully on Windows with Visual Studio 2005, and at a time we started to consider Mono for a production server. Do note that [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been using <a href="http://mono-project.com/Main_Page">Mono</a> for the production server of <a href="http://www.orionsbelt.eu">Orion&#8217;s Belt</a> for a couple of months now. On this article I&#8217;d like to share our experiences using Mono. We developed our project fully on Windows with Visual Studio 2005, and at a time we started to consider Mono for a production server. Do note that the Orion&#8217;s Belt team has a Windows background, and little experience administrating Linux machines.</p>
<p>Here are the web applications that we are serving with Mono:</p>
<ul>
<li><a href="http://www.orionsbelt.eu/">orionsbelt.eu</a> - The institutional website, almost all static ASPX, very little dynamic content</li>
<li><a href="http://s1.orionsbelt.eu/">s1.orionsbelt.eu</a> - A game server, the most complex web application from our suite</li>
<li><a href="http://manual.orionsbelt.eu/en/">manual.orionsbelt.eu</a> - The manual: +300 aspx pages statically generated per language</li>
<li><a href="http://lang.orionsbelt.eu/">lang.orionsbelt.eu</a> - Translation project, simple ASP.net application</li>
</ul>
<h2>Step 1 - Preparing the Server</h2>
<p>The game is running on an Ubuntu server. We downloaded the source code and installed it manually. We could have used the packages, but that isn&#8217;t versatile enough. Packages aren&#8217;t always up to date and we find them hard to manage. For example, how could we have two versions of Mono installed and choose which  to run? How could we always have an up to date version? To fix this problem we chose to install by source, having as a guideline the <a href="http://mono-project.com/Parallel_Mono_Environments">Parallel Mono Environments</a> article. This was great because we could change to use Mono from SVN or a specific version, just by changing some variables. We wouldn&#8217;t want to install a new version, getting problems, and having a bad time to rollback.</p>
<p>We use <a href="http://mono-project.com/FastCGI_Nginx">FastCGI with Nginx</a> to serve the game. <a href="http://nginx.net/">Nginx</a>&#8217;s really cool, and very easy to configure and manage. We also installed <a href="http://www.mysql.com/">MySQL</a>. Not considering Mono, all the other necessary software was very easy to install and configure, with the help of Google of course. We managed to get the server displaying ASPX pages easily.</p>
<h2>Step 2 - Running the Application</h2>
<p>The <a href="http://www.orionsbelt.eu">Orion&#8217;s Belt</a> project is fairly big, and after some months coding fully on Windows, the move to Linux was peaceful. We had some file case issues, but that was it. We have a <a href="http://nant.sourceforge.net/">NAnt</a> script that creates a deploy package, and we were able to upload it to the mono server and run it. There were some problems at that time, sometimes Mono&#8217;s web server would throw <a href="http://lists.ximian.com/pipermail/mono-list/2009-March/041586.html">compile errors while compiling ASPX pages</a>. But fortunately, at that time, Mono implemented <a href="http://gonzalo.name/blog/archive/Mono/2009/Feb-20.html">Precompiled ASP.NET web sites in Mono</a>. We incorporated a step on NAnt to precompile the deploy package and everything was faster and we didn&#8217;t get those errors anymore.</p>
<p>Other problem we had was the <a href="http://lists.ximian.com/pipermail/mono-list/2009-April/042176.html">mono web process and the resources it used</a>. Going to 600-900Mb RAM and wasting a lot of CPU, even at idle time. So we started to kill the process from time to time. Sometimes the process would die unexpectedly, so we also started to use <a href="http://cr.yp.to/daemontools/supervise.html">supervise</a>, to <em>supervise </em>mono&#8217;s process.</p>
<p>There are also some other issues we got along the way: touching Web.config isn&#8217;t as stable as it should be. And also when we deployed new versions, mono would not behave properly, it would shutdown or just stop responding. So, we got used to just kill mono when we deployed or needed a reset. It&#8217;s very easy, you just kill mono&#8217;s process, and supervise will bring it up.</p>
<h2>Supporting multi OS makes your code better</h2>
<p>It may sound weird, but it&#8217;s true. We had a lot of bugs showing up only on mono. For example, we use <a href="http://nhforge.org/Default.aspx">NHibernate</a> and everything worked fine on Windows, but on Linux sometimes it didn&#8217;t. We found out that we needed a <em>flush</em> here and there. On Windows it worked, but on Linux it wasn&#8217;t that permissive.</p>
<p>Using Mono brought an interesting mindset to the team. Every time there was a problem, we&#8217;d blame it on Mono. But the majority of times, it was our code that wasn&#8217;t up to it.</p>
<p>The Linux issues also made us create specific guidelines for file case, forced the use of <a href="http://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx">Path.Combine</a> and related methods. We also tried <a href="http://mono-project.com/MoMA">MoMa</a>, the mono&#8217;s problem reporting tool, but we didn&#8217;t find it to be that useful on our situation.</p>
<h2>Running the Tick</h2>
<p>The game&#8217;s tick runs every ten minutes. It&#8217;s a very heavy process that loads a lot of data from the database, operates on it, and then persists it. This process needs a lot of RAM and CPU to run, and it&#8217;s a good performance test. On this specific process we find Mono to be very lacking. If running the process on Mono would take 60 seconds, running the same process on the windows development machine, connecting to the production database, would take 30 seconds. And the development machine is worst than the production server.</p>
<p>However, for the cost of a Windows license, we could buy a great machine just for tick processing. Would it be worth it? We don&#8217;t know at the moment.</p>
<h2>Conclusion</h2>
<p>Preparing the Mono environment was fun and interesting, and the issues we got from porting the code were minimal. We did need some help, and I find the mono list not that friendly to newcomers, but Google provided the help we needed. Even so, it&#8217;s not easy for developers without experience administrating Linux machines to prepare mono. There are always some issues here and there, that we&#8217;d know how to fix on Windows, but that we loose a lot of time figuring it out on Linux.</p>
<p>Although mono&#8217;s behaving nicely most of the times, we don&#8217;t find it as stable as a Windows machine. Even so, it&#8217;s a great option, that&#8217;s for sure. I already have a <a href="http://www.slicehost.com/">slicehost</a> account with an ubuntu+mono running all my private ASP.NET sites. It&#8217;s cheaper and runs really well.</p>
<p>But for the production server for the game, we aren&#8217;t convinced yet if we should continue using mono or not. Maybe we&#8217;ll release another server using Windows and then we&#8217;ll have a good performance comparison showcase.</p>
<p><script type="text/javascript"><!--
  reddit_url = "http://psantos-blog.zi-yu.com/?p=298";
// --></script><br />
<script src="http://www.reddit.com/r/programming/button.js?t=3" type="text/javascript"></script></p>
<p><script type="text/javascript"><!--
var dzone_url = 'http://psantos-blog.zi-yu.com/?p=298';
// --></script><br />
<script type="text/javascript"><!--
var dzone_style = '1';
// --></script><br />
<script src="http://widgets.dzone.com/links/widgets/zoneit.js"></script></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=cwlRZr5J4iY:EGTmNkZ9qo4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=cwlRZr5J4iY:EGTmNkZ9qo4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=cwlRZr5J4iY:EGTmNkZ9qo4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=cwlRZr5J4iY:EGTmNkZ9qo4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=cwlRZr5J4iY:EGTmNkZ9qo4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=cwlRZr5J4iY:EGTmNkZ9qo4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=cwlRZr5J4iY:EGTmNkZ9qo4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=cwlRZr5J4iY:EGTmNkZ9qo4:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=298</wfw:commentRss>
		</item>
		<item>
		<title>How to invoke/run Stored Procedures on the Entity Framework</title>
		<link>http://psantos-blog.zi-yu.com/?p=295</link>
		<comments>http://psantos-blog.zi-yu.com/?p=295#comments</comments>
		<pubDate>Fri, 23 Oct 2009 11:05:46 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[problem shooting]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=295</guid>
		<description><![CDATA[This one was a hard one to guess. But it's something like:
PLAIN TEXT
C#:




DbConnection conn = Entities.Connection;


DbCommand cmd = conn.CreateCommand&#40;&#41;;


&#160;


string spname= "DoSomething";


string entities = "Entities";


&#160;


cmd.CommandType = CommandType.StoredProcedure;


cmd.CommandText = string.Format&#40;"{0}.{1}", entities, spname&#41;; 






You need to go to the edmx file, right click, add -> function. The tricky part on this was guessing the Entities.DoSomething name for the [...]]]></description>
			<content:encoded><![CDATA[<p>This one was a hard one to guess. But it's something like:</p>
<div class="igBar"><span id="lcsharp-2"><a href="#" onclick="javascript:showPlainTxt('csharp-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C#:</span>
<div id="csharp-2">
<div class="csharp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DbConnection conn = Entities.<span style="color: #0000FF;">Connection</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DbCommand cmd = conn.<span style="color: #0000FF;">CreateCommand</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #FF0000;">string</span> spname= <span style="color: #808080;">"DoSomething"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #FF0000;">string</span> entities = <span style="color: #808080;">"Entities"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cmd.<span style="color: #0000FF;">CommandType</span> = CommandType.<span style="color: #0000FF;">StoredProcedure</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cmd.<span style="color: #0000FF;">CommandText</span> = <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Format</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">"{0}.{1}"</span>, entities, spname<span style="color: #000000;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You need to go to the edmx file, right click, add -> function. The tricky part on this was guessing the Entities.DoSomething name for the stored procedure. <a href="http://nunos.zi-yu.com">Nuno</a> did the guessing part.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=qaFLrZHMp2I:2Pa343RYZ7A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=qaFLrZHMp2I:2Pa343RYZ7A:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=qaFLrZHMp2I:2Pa343RYZ7A:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=qaFLrZHMp2I:2Pa343RYZ7A:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=qaFLrZHMp2I:2Pa343RYZ7A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=qaFLrZHMp2I:2Pa343RYZ7A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=qaFLrZHMp2I:2Pa343RYZ7A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=qaFLrZHMp2I:2Pa343RYZ7A:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=295</wfw:commentRss>
		</item>
		<item>
		<title>How to export to SQL from MS SQL Server</title>
		<link>http://psantos-blog.zi-yu.com/?p=292</link>
		<comments>http://psantos-blog.zi-yu.com/?p=292#comments</comments>
		<pubDate>Fri, 23 Oct 2009 10:53:07 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[problem shooting]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=292</guid>
		<description><![CDATA[This works on MS SQL Server 2008, don't know if it's available on other version. If you want a full raw SQL export with data, go to the database options, Tasks -&#62; Generate Scripts and on the Script Orions select Script Data.

]]></description>
			<content:encoded><![CDATA[<p>This works on MS SQL Server 2008, don't know if it's available on other version. If you want a full raw SQL export with data, go to the database options, Tasks -&gt; Generate Scripts and on the Script Orions select <em>Script Data</em>.</p>
<p><img class="alignnone size-medium wp-image-293" title="Script Data" src="http://psantos-blog.zi-yu.com/wp-content/uploads/2009/10/scriptdata.gif" alt="" width="300" height="270" /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=vY5AlH1Bkkw:YogKJ8je62s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=vY5AlH1Bkkw:YogKJ8je62s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=vY5AlH1Bkkw:YogKJ8je62s:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=vY5AlH1Bkkw:YogKJ8je62s:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=vY5AlH1Bkkw:YogKJ8je62s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=vY5AlH1Bkkw:YogKJ8je62s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=vY5AlH1Bkkw:YogKJ8je62s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=vY5AlH1Bkkw:YogKJ8je62s:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=292</wfw:commentRss>
		</item>
		<item>
		<title>World of Goo Birthday Results</title>
		<link>http://psantos-blog.zi-yu.com/?p=287</link>
		<comments>http://psantos-blog.zi-yu.com/?p=287#comments</comments>
		<pubDate>Tue, 20 Oct 2009 13:21:25 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[e-marketing]]></category>

		<category><![CDATA[gamedev]]></category>

		<category><![CDATA[games]]></category>

		<category><![CDATA[industry]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=287</guid>
		<description><![CDATA[The guys at World of Goo have just released the results of their pay what you want for World of Goo campaign. I don't know if they are just developers or have a background in marketing. But one thing's for sure: they made a hell of a job promoting the game. And it's amazing how one year [...]]]></description>
			<content:encoded><![CDATA[<p>The guys at World of Goo have just <a href="http://2dboy.com/2009/10/19/birthday-sale-results/">released the results</a> of their <a href="http://2dboy.com/2009/10/13/happy-birthday-world-of-goo/">pay what you want for World of Goo</a> campaign. I don't know if they are just developers or have a background in marketing. But one thing's for sure: they made a hell of a job promoting the game. And it's amazing how one year later they manage to sell so much of the game... again!</p>
<p>The method is very simple: allow anyone to buy the game for any amount. And it worked. And now, they released preliminary results and and charts about the sales. I guess this article will be mentioned on a lot of places, and that the sales for this promotion are far from over...</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=_8iOWHBgCKU:KB6DawkgVXk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=_8iOWHBgCKU:KB6DawkgVXk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=_8iOWHBgCKU:KB6DawkgVXk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=_8iOWHBgCKU:KB6DawkgVXk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=_8iOWHBgCKU:KB6DawkgVXk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=_8iOWHBgCKU:KB6DawkgVXk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=_8iOWHBgCKU:KB6DawkgVXk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=_8iOWHBgCKU:KB6DawkgVXk:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=287</wfw:commentRss>
		</item>
		<item>
		<title>Google has no face</title>
		<link>http://psantos-blog.zi-yu.com/?p=285</link>
		<comments>http://psantos-blog.zi-yu.com/?p=285#comments</comments>
		<pubDate>Fri, 16 Oct 2009 08:18:41 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=285</guid>
		<description><![CDATA[I use a lot of Google products: the search engine, docs, gmail, picasa, analytics, chrome, etc, etc. And I'm satisfied. But a problem in picasa web albums that I'm having brought to my attention something interesting: google has no face. We can't contact google, we don't get feedback from google, nothing. I registered a bug, [...]]]></description>
			<content:encoded><![CDATA[<p>I use a lot of Google products: the search engine, docs, gmail, picasa, analytics, chrome, etc, etc. And I'm satisfied. But a problem in picasa web albums that I'm having brought to my attention something interesting: google has no face. We can't contact google, we don't get feedback from google, nothing. I registered a bug, and I got no follow up from the google staff. Note that google doesn't even allow comments on their blogs. There's a completely blackout posture regarding the costumers.</p>
<p>This posture is understandable. I manage a small scale project and I know how much noise we can get. Google has a good approach on this (like so many other companies): it provides a forum for help topics and there are always senior users that answer the basic questions, leaving only the complex ones unhanded.</p>
<p>Although the lack of direct customer support, google products aren't known for their bugs. So I guess they have strict error handling policies and statistics and they focus on that. No one answered me, but I guess all that <em>internal server errors</em> I'm getting, are being monitored by someone and will be fixed in time.</p>
<p>Even so, it's interesting that a company that focus so much on making collaborative and communication tools, doesn't communicate with their user base.  Guess they don't need it. I remember I once switched banking services exactly to have better customer care. I didn't care that the new bank was <em>smaller </em>and <em>weaker</em>, because that meant that the bank would value me much more as a client. And that was what I wanted.</p>
<p>It seams that as companies start to grow, they loose interest on pleasing every customer. Why would they, they have so many of them. While small companies have a strong focus on the customer, because they need all the customers they can get, and can't afford to loose any.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=HQgWVwzAnmg:tFtKvGjfSow:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=HQgWVwzAnmg:tFtKvGjfSow:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=HQgWVwzAnmg:tFtKvGjfSow:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=HQgWVwzAnmg:tFtKvGjfSow:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=HQgWVwzAnmg:tFtKvGjfSow:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=HQgWVwzAnmg:tFtKvGjfSow:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=HQgWVwzAnmg:tFtKvGjfSow:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=HQgWVwzAnmg:tFtKvGjfSow:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=285</wfw:commentRss>
		</item>
		<item>
		<title>Sins of a Solar Empire</title>
		<link>http://psantos-blog.zi-yu.com/?p=282</link>
		<comments>http://psantos-blog.zi-yu.com/?p=282#comments</comments>
		<pubDate>Mon, 12 Oct 2009 07:56:06 +0000</pubDate>
		<dc:creator>Pedro Santos</dc:creator>
		
		<category><![CDATA[gamedev]]></category>

		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://psantos-blog.zi-yu.com/?p=282</guid>
		<description><![CDATA[The other day I played with a friend of mine Sins of a Solar Empire. Sins is a great 4X RTS sci-fi game. We like a lot of games like Civilization, but the new Civs are so slow on modern machines. This Sins was a great surprise, nice graphics, great gameplay, lots of fun. Later [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I played with a friend of mine <a href="http://www.sinsofasolarempire.com/">Sins of a Solar Empire</a>. Sins is a great 4X RTS sci-fi game. We like a lot of games like Civilization, but the new Civs are so slow on modern machines. This Sins was a great surprise, nice graphics, great gameplay, lots of fun. Later I searched for the game's site and I found out that the game was elected as the Game of The Year on several important sites such as <a href="http://bestof.ign.com/2008/pc/22.html">IGN</a> or <a href="http://goty.gamespy.com/2008/pc/3.html">GameSpy</a>, winning against games like Fallout 3 on some sites.</p>
<p><img class="alignnone" title="Sins Box" src="http://www.sinsofasolarempire.com/images/sins_box_big.png" alt="" width="185" height="256" /></p>
<p>This is really interesting. The game is pretty, but not that pretty. Here we have a game that won because of a great game design. This should be a lesson to a lot of game development companies out there.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/PedroSantos?a=H3c_PeQn9RE:XnRTMEsNQhU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=H3c_PeQn9RE:XnRTMEsNQhU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=H3c_PeQn9RE:XnRTMEsNQhU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=H3c_PeQn9RE:XnRTMEsNQhU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/PedroSantos?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=H3c_PeQn9RE:XnRTMEsNQhU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=H3c_PeQn9RE:XnRTMEsNQhU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PedroSantos?a=H3c_PeQn9RE:XnRTMEsNQhU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PedroSantos?i=H3c_PeQn9RE:XnRTMEsNQhU:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://psantos-blog.zi-yu.com/?feed=rss2&amp;p=282</wfw:commentRss>
		</item>
	</channel>
</rss>
