<?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:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Kartones Blog</title><link>http://kartones.net/blogs/kartones/default.aspx</link><description>Be the change you wanna see in this world</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Kartones" type="application/rss+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FKartones" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FKartones" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/Kartones" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FKartones" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FKartones" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FKartones" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>Think Generic</title><link>http://feedproxy.google.com/~r/Kartones/~3/mECUcV9DXzI/think-generic.aspx</link><pubDate>Sat, 07 Nov 2009 21:28:28 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50462</guid><dc:creator>Kartones</dc:creator><slash:comments>0</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/11/07/think-generic.aspx#comments</comments><description>&lt;p&gt;Sometimes, thinking in generic terms, instead of specific cases/problems, pays off later with greater benefits. I’m going to show you a small real world example.&lt;/p&gt;  &lt;p&gt;When you develop a mobile website, you usually create at least two visual themes, and usually go up to three:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Wireless_Markup_Language"&gt;WML&lt;/a&gt; layer: Limited, almost text only, and very crappy because of the limitations of the devices requesting this version of the site. &lt;/li&gt;    &lt;li&gt;XHTML layer, low/med-end capabilities: Devices that can render XHTML, some CSS, etcetera, but have small resolutions or some other problems (like no javascript, or a terrible CSS implementation, like PocketIE). &lt;/li&gt;    &lt;li&gt;“Full” browsers: mostly WebKit and Opera for mobile devices. Capable of standard javascript, really good resolutions (and zoom), can run almost perfectly any website, just with a lower resolution than a computer. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;If your website is properly developed, all the “mobile versions” will have a common logic layer and data layer (or if it’s an MVC, common Models and Controllers), so it’s just a matter of detecting what version the visitor falls into and rendering the appropiate view(s).&lt;/p&gt;  &lt;p&gt;For WML is quite easy with the HTTP Accepts header, but with the more capable devices, we usually rely on checking the HTTP User Agent header.&lt;/p&gt;  &lt;p&gt;As an example, this is an iPhone with 3.0 OS user agent string:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Mozilla/5.0 (&lt;strong&gt;iPhone&lt;/strong&gt;; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A542a Safari/419.3&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;For an iPod Touch is almost the same, just changing the “iPhone” with an “iPod”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;At first glance, a small regular expression to detect the words iPhone and iPod would solve the problem, no?    &lt;br /&gt;    &lt;br /&gt;Well, it does, but not in a generic scope. Let’s see now how an Android user agent looks:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Mozilla/5.0 (Linux; U; Android 1.5; en; HTC Magic) AppleWebKit/528+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Using the proposed approach we would have to add “Android” to the “nice devices” list, but until then we would be rendering on all Androids the less fancy XHTML version.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But the alternative, is to search inside the user agent for two words, “Mobile” + “Safari” (order matters!). If you look at both user agents, they both are WebKit implementations, so both are Mobile Safari browsers. Using this second approach we already support all present and future Android devices without changing our code. In fact, we will support any new browser based on Mobile Safari!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So the lesson here is to try to go for a generic approach. In this example, targeting for browser type instead of specific device id gives a lot more flexibility with the same effort and even lowers the need of modifying the code in the future.&lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50462" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/mECUcV9DXzI" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/Patterns+_2600_amp_3B00_+Practices/default.aspx">Patterns &amp;amp; Practices</category><category domain="http://kartones.net/blogs/kartones/archive/tags/User+Agent/default.aspx">User Agent</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Mobile/default.aspx">Mobile</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/11/07/think-generic.aspx</feedburner:origLink></item><item><title>Two VirtualBox tricks</title><link>http://feedproxy.google.com/~r/Kartones/~3/Etj_v9qZIY4/two-virtualbox-tricks.aspx</link><pubDate>Thu, 29 Oct 2009 00:09:52 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50453</guid><dc:creator>Kartones</dc:creator><slash:comments>0</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/10/29/two-virtualbox-tricks.aspx#comments</comments><description>&lt;p align="justify"&gt;&lt;a href="http://kartones.net/blogs/kartones/archive/2009/02/18/installing-debian-5-0-in-virtual-pc-2007.aspx"&gt;At the beggining of the year&lt;/a&gt;, I was told to try &lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt; as a Virtualization solution for my personal needs (trying Linux, and having a few VMs for things like beta versions of software). After fighting with VirtualPC, and not being convinced with VMWare, I must admit VirtualBox is almost perfect: USB support, 3D acceleration (experimental and not for games, but its faster than software rendering anyway), almost every OS (whenever its a Linux or Windows)…&lt;/p&gt;  &lt;p&gt;But sometimes is not as easy to use as the others, hiding actions that, at least in my opinion, should be clearly visible and easy to perform. The two most common ones are this two:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Change UID of a VM&lt;/b&gt;: If you create a base VM, and copy the .vdi file, VirtualBox will complain that the UID is already in use. To change it on the copy, open a command prompt and execute (the executable is located in the VirtualBox install folder):      &lt;br /&gt;&lt;font face="Courier New"&gt;VBoxManage internalcommands setvdiuuid xxxxxxx.vdi&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;Mount a shared folder&lt;/b&gt;: To share folders between the host and guest operating systems, you have to use shared folders. But once you add one to VirtualBox, it doesn’t appear, does it? Well, you have to mount it manually (under my PC), because it is a network share instead of a virtual drive:      &lt;br /&gt;&lt;font face="Courier New"&gt;\\vboxsrv\xxxxxxxxxxxx&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This are two actions you’ll end up performing sooner or later, so I hope they prove useful!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;P.S.: As an offtopic note, I’m going to PHP Conference Barcelona this weekend so if you’re around and/or going just search for the &lt;a href="http://www.tuenti.com"&gt;Tuenti&lt;/a&gt; folks and I’ll be among them :)&lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50453" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/Etj_v9qZIY4" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/Tutorials/default.aspx">Tutorials</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Virtualization/default.aspx">Virtualization</category><category domain="http://kartones.net/blogs/kartones/archive/tags/VirtualBox/default.aspx">VirtualBox</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/10/29/two-virtualbox-tricks.aspx</feedburner:origLink></item><item><title>Building a very basic Google Wave extension</title><link>http://feedproxy.google.com/~r/Kartones/~3/f_yih5mU740/building-a-very-basic-google-wave-extension.aspx</link><pubDate>Tue, 20 Oct 2009 23:43:02 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50447</guid><dc:creator>Kartones</dc:creator><slash:comments>0</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/10/21/building-a-very-basic-google-wave-extension.aspx#comments</comments><description>&lt;p&gt;Alhough seems that all of us who have been invited recently to Google Wave have some limitations (can’t invite others, don’t have the “Extension Installer” wave…), we can still play a little with it and develop some wave extensions.&lt;/p&gt;  &lt;p&gt;I’ve based my article in the &lt;a href="http://code.google.com/apis/wave/extensions/gadgets/guide.html"&gt;official gadgets tutorial&lt;/a&gt;. You can’t create &lt;a href="http://code.google.com/apis/wave/extensions/robots/index.html"&gt;robots&lt;/a&gt; too, but to get the feeling of how all works I prefered something very simple. I’m going to create a small extension to be able to search in the posts of &lt;a href="http://kartones.net/"&gt;Kartones.Net&lt;/a&gt; and list the results inside the wave (google names ‘wave’ to a conversation thread).&lt;/p&gt;  &lt;p&gt;An extension is just an XML file, containing two parts:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;XML nodes detailing all configuration options, name, default size, etcetera. &lt;/li&gt;    &lt;li&gt;A special XML node containing the full HTML of the wave. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Yes, as you will have noticed this is a bit clumsy and not the best option to debug, but at least works (I suggest to build the basic HTML and Javascript first in an HTML file and then add the extension XML and rename it).&lt;/p&gt;  &lt;p&gt;I’m not going to repeat what it’s perfectly explained in the tutorials, so I’ll just show what my extension contains:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;?xml&lt;/font&gt;&lt;font color="#ff0000"&gt; version&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;1.0&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; encoding&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;UTF-8&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; ?&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Module&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;ModulePrefs&lt;/font&gt;&lt;font color="#ff0000"&gt; title&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Kartones.Net Wave&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; height&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;50&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Require&lt;/font&gt;&lt;font color="#ff0000"&gt; feature&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;dynamic-height&amp;quot;/&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Require&lt;/font&gt;&lt;font color="#ff0000"&gt; feature&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;wave&amp;quot;/&amp;gt;        &lt;br /&gt;&amp;#160; &amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;ModulePrefs&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Content&lt;/font&gt;&lt;font color="#ff0000"&gt; type&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;html&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Courier New"&gt;&amp;lt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#800000"&gt;![CDATA[        &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160;&amp;#160; ]]&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;Content&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;Module&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The &lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Content&amp;gt;&lt;/font&gt;&lt;/font&gt; node will contain the HTML and javascript, we will store data inside the wave (&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Require&lt;/font&gt;&lt;font color="#ff0000"&gt; feature&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;wave&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;) and the extension will change its height when needed (&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Require&lt;/font&gt;&lt;font color="#ff0000"&gt; feature&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;dynamic-height&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Our HTML will be quite simple:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;p&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;img&lt;/font&gt;&lt;font color="#ff0000"&gt; src&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;http://kartones.net/images/mb_kartonesnet.gif&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; alt&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Kartones.Net&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; title&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Kartones.Net&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;      &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; style&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;=&amp;quot;vertical-align:middle&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;/&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;input&lt;/font&gt;&lt;font color="#ff0000"&gt; type&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;searchText&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; size&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;20&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;/&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;input&lt;/font&gt;&lt;font color="#ff0000"&gt; type&lt;/font&gt;&lt;font color="#0000ff"&gt;=button&lt;/font&gt;&lt;font color="#ff0000"&gt; value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Search content&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;searchButton&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; onClick&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;SearchButtonClicked()&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;/&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;br&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;/&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;font color="#ff0000"&gt; id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;searchResultsContainer&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;amp;bnsp;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;div&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;p&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And the JS a bit more but nothing too complex:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;&amp;lt;script type&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;text/javascript&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;&amp;gt;        &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;function &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;SearchButtonClicked()&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;var &lt;/font&gt;&lt;font color="#000000"&gt;currentSearch &lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;font color="#000000"&gt;wave.getState().&lt;/font&gt;&lt;font color="#0000ff"&gt;get&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;search&amp;#39;&lt;/font&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;&amp;#39;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var &lt;/font&gt;&lt;font color="#000000"&gt;new_search &lt;/font&gt;&lt;font color="#0000ff"&gt;= document&lt;/font&gt;&lt;font color="#000000"&gt;.getElementById(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;searchText&amp;#39;&lt;/font&gt;&lt;font color="#000000"&gt;).&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;value;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if &lt;/font&gt;&lt;font color="#000000"&gt;(new_search !&lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;&amp;#39; &lt;/font&gt;&lt;font color="#000000"&gt;&amp;amp;&amp;amp; new_search !&lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;currentSearch)        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;wave.getState().submitDelta({&lt;/strong&gt;&lt;/font&gt;&lt;strong&gt;&lt;font color="#808080"&gt;&amp;#39;search&amp;#39;&lt;/font&gt;&lt;font color="#000000"&gt;: new_search})&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Courier New"&gt;&lt;strong&gt;;        &lt;br /&gt;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;}        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }         &lt;br /&gt;&amp;#160;&amp;#160; &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;function &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;StateUpdated()&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;strong&gt;&lt;font color="#0000ff"&gt;var &lt;/font&gt;&lt;font color="#000000"&gt;currentSearch &lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;font color="#000000"&gt;wave.getState().&lt;/font&gt;&lt;font color="#0000ff"&gt;get&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;search&amp;#39;&lt;/font&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;&amp;#39;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&lt;strong&gt;;&lt;/strong&gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if &lt;/font&gt;&lt;font color="#000000"&gt;(currentSearch !&lt;/font&gt;&lt;font color="#0000ff"&gt;= null &lt;/font&gt;&lt;font color="#000000"&gt;&amp;amp;&amp;amp; currentSearch !&lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;&amp;#39;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;)        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;document&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;.all)        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;var &lt;/font&gt;&lt;font color="#000000"&gt;resultsDiv &lt;/font&gt;&lt;font color="#0000ff"&gt;= document&lt;/font&gt;&lt;font color="#000000"&gt;.all(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;searchResultsContainer&amp;#39;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Courier New"&gt;;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000" face="Courier New"&gt;}      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff" face="Courier New"&gt;else      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;{        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;var &lt;/font&gt;&lt;font color="#000000"&gt;resultsDiv &lt;/font&gt;&lt;font color="#0000ff"&gt;= document&lt;/font&gt;&lt;font color="#000000"&gt;.getElementById(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#39;searchResultsContainer&amp;#39;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Courier New"&gt;;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;}        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; resultsDiv.innerHTML &lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;&amp;lt;iframe id=&amp;#39;resultsFrame&amp;#39; width=&amp;#39;600&amp;#39; height=&amp;#39;600&amp;#39; src=&amp;#39;http://kartones.net/search/SearchResults.aspx?q=&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;+ currentSearch + &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;&amp;#39;&amp;gt;&amp;lt;/iframe&amp;gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Courier New"&gt;;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#006400"&gt;// Tells gadget to resize itself        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;strong&gt;&lt;font color="#000000"&gt;gadgets.&lt;/font&gt;&lt;font color="#0000ff"&gt;window&lt;/font&gt;&lt;font color="#000000"&gt;.adjustHeight()&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Courier New"&gt;&lt;strong&gt;;&lt;/strong&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;}        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }         &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;function &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;WaveInit()&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if &lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" face="Courier New"&gt;(&lt;strong&gt;wave &amp;amp;&amp;amp; wave.isInWaveContainer()&lt;/strong&gt;)&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&lt;strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; wave.setStateCallback(StateUpdated)&lt;/strong&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Courier New"&gt;&lt;strong&gt;;&lt;/strong&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000" face="Courier New"&gt;}      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#006400"&gt;// Initialization code        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;&lt;strong&gt;gadgets.util.registerOnLoadHandler(WaveInit)&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;&lt;strong&gt;;&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Basically, if we’re inside a wave, we setup a callback handler for state changes (&lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;SearchButtonClicked&lt;/font&gt;&lt;/font&gt;() sends state changes, that are nothing else than variables) and &lt;font face="Courier New"&gt;&lt;font color="#000000"&gt;StateUpdated()&lt;/font&gt;&lt;/font&gt; gets called when we input something and click on the Search Content button (to avoid too many calls, if we haven’t wrote anything or is the same as was previously, no data is sent).&lt;/p&gt;  &lt;p&gt;We use an iframe to render the search results, and we tell our gadget to update its height (to the iframe’s one in this example).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is the final result (with a search performed):&lt;/p&gt;  &lt;p&gt;&lt;img title="Screenshot" alt="Screenshot" src="http://Kartones.net/images_posts/kartonesblog/kartonesnet_wave_01.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;If you are on a wave with multiple users, you can all search. Just remember that as this state is shared between all participants of the wave, only one search can be active at once (last value will override previous one).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can test this extension inside Google Wave by adding this gadget url: http://Kartones.net/Demos/015/kartonesnet_wave.xml    &lt;br /&gt;&lt;img title="Gadget URL" alt="Gadget URL" src="http://Kartones.net/images_posts/kartonesblog/kartonesnet_wave_02.jpg" /&gt;&lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50447" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/f_yih5mU740" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/Javascript/default.aspx">Javascript</category><category domain="http://kartones.net/blogs/kartones/archive/tags/XML/default.aspx">XML</category><category domain="http://kartones.net/blogs/kartones/archive/tags/HTML/default.aspx">HTML</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Google+Wave/default.aspx">Google Wave</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/10/21/building-a-very-basic-google-wave-extension.aspx</feedburner:origLink></item><item><title>ASP.NET: Flushing files to browser with Response.AddHeader()</title><link>http://feedproxy.google.com/~r/Kartones/~3/2RFcOyDU0UI/asp-net-flushing-files-to-browser-with-response-addheader.aspx</link><pubDate>Sun, 18 Oct 2009 20:49:01 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50443</guid><dc:creator>Kartones</dc:creator><slash:comments>0</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/10/18/asp-net-flushing-files-to-browser-with-response-addheader.aspx#comments</comments><description>&lt;p&gt;This post should be nothing new for people used to ASP.NET 2.0 or higher, but at my last job I had to fix a summary download page that was not flushing correctly the content to the browser (it appeared as downloading the .aspx page instead of a csv file).&lt;/p&gt;  &lt;p&gt;Probably because of the configuration of IIS, the content header was not being applied correctly with &lt;font face="Courier New"&gt;Response.AppendHeader()&lt;/font&gt;, so just changing it to &lt;font face="Courier New"&gt;Response.AddHeader()&lt;/font&gt; it was solved.&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000" face="Courier New"&gt;Response.Clear()&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;;        &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Response.ClearHeaders()&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;;        &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Response.ClearContent()&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;;        &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Response.ContentType &lt;/font&gt;&lt;font color="#0000ff"&gt;= &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;text/plain&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;;        &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Response.AddHeader(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Content-disposition&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;inline; filename=&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;+ summaryFilename + &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;.csv&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;;        &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Response.Write(summaryResults)&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;;        &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Response.End()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So, if &lt;em&gt;AppendHeader&lt;/em&gt; doesn’t works as it should, give a try to &lt;em&gt;AddHeader&lt;/em&gt;. &lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50443" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/2RFcOyDU0UI" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/.NET/default.aspx">.NET</category><category domain="http://kartones.net/blogs/kartones/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://kartones.net/blogs/kartones/archive/tags/CSV/default.aspx">CSV</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/10/18/asp-net-flushing-files-to-browser-with-response-addheader.aspx</feedburner:origLink></item><item><title>5 Technological gurus I admire</title><link>http://feedproxy.google.com/~r/Kartones/~3/nFqpx1TyAbk/5-technological-gurus-i-admire.aspx</link><pubDate>Mon, 12 Oct 2009 23:32:58 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50437</guid><dc:creator>Kartones</dc:creator><slash:comments>2</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/10/13/5-technological-gurus-i-admire.aspx#comments</comments><description>&lt;p&gt;It is common to have models in life, to dream to be like them someday. Some people chose actors, others singers or rock stars… I’m selecting 5 technology-related individuals that I think are real gurus, people I really admire for their intelligence and the work they have produced.&lt;/p&gt;  &lt;p&gt;Note: The list is in no particular order.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/John_carmack"&gt;John Carmack&lt;/a&gt;: One of the fathers of the 3D first person view shooters (FPS), and early adopter of the shareware model in the 90s. A guy who loves creating 3D game engines and probably a math expert, who developed Doom RPG “&lt;em&gt;because of the challenge of developing in such a limited hardware as J2ME mobile phones&lt;/em&gt;”. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Peter_Molyneux"&gt;Peter Molyneux&lt;/a&gt;: Creator of some games that marked my AMIGA and first PC years of gaming, Molyneux can be credited both for having fantastic and different game ideas, and for hyping so much his latest creations with features that end up simplified (Black &amp;amp; White, Fable). Nobody is perfect and innovation sometimes leads to dead-ends, but Bullfrog games were and will always be among my favourites. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Shigeru_Miyamoto"&gt;Shigeru Miyamoto&lt;/a&gt;: As TIME magazine said, he’s “&lt;em&gt;the Walt Disney of electronic gaming&lt;/em&gt;”. Creator of so many all-time classics for Nintendo consoles that the list &lt;a href="http://en.wikipedia.org/wiki/List_of_Nintendo_games_created_by_Shigeru_Miyamoto"&gt;has its own Wikipedia page&lt;/a&gt;. Mario or Zelda wouldn’t exist without him. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Charles_Petzold"&gt;Charles Petzold&lt;/a&gt;: A 56 year old developer that started with Assembler in the 70s and now has written two books about 3D programming using WPF. Somebody with such a mind to still be developing and learning the latest technologies and programming language is simply amazing. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Mark_Russinovich"&gt;Mark Russinovich&lt;/a&gt;: As I like to say, its “&lt;em&gt;the man that knows more about Windows than Microsoft&lt;/em&gt;”. Logically, Microsoft hired him on 2006, but his Windows Internals books (and &lt;a href="http://blogs.technet.com/MarkRussinovich/"&gt;his blog&lt;/a&gt;) are the deepest sources of Windows knowledge by far.       &lt;br /&gt;Apart from the things noted in the Wikipedia entry, Russinovich is the kind of guy that finds a problem with a driver, debugs it, finds the source and sends feedback to the owners of the driver X) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Apart from these five, I want to make two special mentions to “finalists” that didn’t made it because lately the quality of their work is (in my oppinion) going down drastically:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Hideo_Kojima"&gt;Hideo Kojima&lt;/a&gt;: Apart from defining the stealth action genre with its Metal Gear series, those games (beggining with Metal Gear Solid) had deeper than initially apparent themes, emotional scenes, fantastic orchestal music and fantastic narrative. The problem is that instead of letting rest the MGS series and creating a new franchise, too much related games have appeared, most of them with questionable innovation (and quality in some cases). But technically the MGS games have been showcases of all the three Playstations “horsepower” (excluding the PSP).&lt;/li&gt;    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Will_Wright_%28game_designer%29"&gt;Will Wright&lt;/a&gt;: The creator of the “Sim” label, he is another videogame designer genius, but loses points for me because lately seems to have become lazy: Since The Sims (the original one), only Spore promised something different, and ended being a group of editors badly joined, a fantastic idea (control a civilitation lifespan from the bacteria level to inter-galactic expansion) gone a too simplistic approach. And Spore expansions and spin-offs seem to follow the Sims path (try to get as much money as possible until exhaustion of the franchise).&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So, this is the list. Probably you won’t agree with it (I know I’m very influenced by videogames ;) , or maybe you have better gurus, so I encourage you to leave your comments!&lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50437" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/nFqpx1TyAbk" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/Videogames/default.aspx">Videogames</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Offtopic/default.aspx">Offtopic</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Design/default.aspx">Design</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Gurus/default.aspx">Gurus</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/10/13/5-technological-gurus-i-admire.aspx</feedburner:origLink></item><item><title>Kartones.Net CS2007 Addon 1.4, Related Posts and a bit of caching</title><link>http://feedproxy.google.com/~r/Kartones/~3/YTROBJ9MFB0/kartones-net-cs2007-addon-1-4-related-posts-and-a-bit-of-caching.aspx</link><pubDate>Sun, 04 Oct 2009 23:28:50 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50426</guid><dc:creator>Kartones</dc:creator><slash:comments>0</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/10/05/kartones-net-cs2007-addon-1-4-related-posts-and-a-bit-of-caching.aspx#comments</comments><description>&lt;p&gt;This post is a 3x1 because I prefer to not write multiple smaller posts when they are so related.&lt;/p&gt;  &lt;p&gt;First, I want to announce a new revision of my &lt;a href="http://kartones.net/files/folders/communityserver/entry2400.aspx"&gt;CS2007 Addon Pack&lt;/a&gt;, 1.4.0. The news are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Internal refactoring of the Assembly&lt;/strong&gt;. I’ve created a separate Assembly for all &lt;a href="http://Kartones.Net"&gt;Kartones.Net&lt;/a&gt; specific features so this public one has now fewer classes and weights a few kilobytes less. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Internal refactoring of Twitter related components&lt;/strong&gt;. This is still in semi-beta, but seems to work perfectly except when Twitter is down or going too slow (drop me a comment or &lt;a href="http://kartones.net/blogs/kartones/contact.aspx"&gt;email&lt;/a&gt; if it doesn’t). The only downside is that now the source appears always as “web”, I have to investigate it.      &lt;br /&gt;I expect to finish soon with a few stuff and there will be small but interesting changes related to it. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;RelatedPosts Community Server 2007 component&lt;/strong&gt;. It’s a blog feature that it’s starting to spread, and if done correctly (I didn’t check what blog engine they were using, but I’ve seen multiple terrible examples) can help to engage new readers to your blog.       &lt;br /&gt;My implementation, altough not perfect, has the following features:       &lt;ul&gt;       &lt;li&gt;Searching of related posts by tags &lt;/li&gt;        &lt;li&gt;5 Results maximum &lt;/li&gt;        &lt;li&gt;Caching of the results to ease SQL usage on subsequent calls &lt;/li&gt;        &lt;li&gt;Only appears when viewing a single blog post. Not in a post list, not in RSS… I don’t want to waste anybody’s time so it’s mainly focused for web visitors arriving for example from Google search results.          &lt;br /&gt;&lt;img title="related posts example" alt="related posts example" src="http://kartones.net/images_posts/kartonesblog/related_posts.jpg" /&gt; &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And now, the third part of the subject: a bit of caching.&lt;/p&gt;  &lt;p&gt;As I’ve just mentioned, the Related Posts component caches the results for 30 minutes. In fact, the final HTML markup is cached so almost nothing is done server-side, apart from cheching the cache and retrieving the string containing the markup.    &lt;br /&gt;So its a per-post cache (the keys are “&lt;strong&gt;RELATEDPOSTS_{0}&lt;/strong&gt;”).&lt;/p&gt;  &lt;p&gt;This approach works fast as hell, and if you have tons of visits and tons of RAM you’ll be good to go. But it is really reusable?&lt;/p&gt;  &lt;p&gt;Not really, each post ID is unique for a given post and not used anywhere else. So I made an internal version for this blog community that works differently when managing the cache.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;First, as part of my CS optimization, I’ve created a &lt;font face="Courier New"&gt;WeblogPostLite&lt;/font&gt; class containing just the critical and minimal fields needed to operate with a post, returned by a new &lt;font face="Courier New"&gt;WeblogPost.GetLite()&lt;/font&gt; method. I plan to use it in multiple places that do heavy operations with post objecs (but using just few common fields of them), but for now, they provide me 00% serializable and fast objects.&lt;/p&gt;  &lt;p&gt;When I search for related posts, I (as in the normal component) get 5 posts of each category (the generic component allows to choose for most viewed or most recent ordering). And here comes the trick: I insert into the cache a &lt;font face="Courier New"&gt;List&amp;lt;WeblogPostLite&amp;gt;&lt;/font&gt; per blog and per tag (cache key could be “&lt;strong&gt;&lt;strong&gt;RELATEDPOSTSLITE&lt;/strong&gt;_{0}_{1}&lt;/strong&gt;”).&lt;/p&gt;  &lt;p&gt;This caching means that for a low amount of posts, I use more memory (4-5 fields per “lite” post, up to 5 posts per category, easily 5 or 6 categories per real post,…). But as soon as visits are spread upon multiple posts, benefits start to appear: Any decently used tagging of posts will achieve a great percentage of cache hits. And the amount of memory consumed is not linear (stabilizes, unless you use insane amount of tags).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In my opinion, caching is itself not hard to do, but strategical decisions about how, what and when to optimally cache data. And as usual, is really subjective and different in each scenario.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The related posts search is not perfect, and while it yields nice results most of the time, sometimes it doesn’t :) I plan to do “something else” more interesting to actually have the best related results but needs one important change in CS core and, most important, time (my greatest problem, lack of free time!).&lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50426" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/YTROBJ9MFB0" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/Kartones.Net/default.aspx">Kartones.Net</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Community+Server/default.aspx">Community Server</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Blogging/default.aspx">Blogging</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Twitter/default.aspx">Twitter</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Caching/default.aspx">Caching</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/10/05/kartones-net-cs2007-addon-1-4-related-posts-and-a-bit-of-caching.aspx</feedburner:origLink></item><item><title>ASP.NET: Split AppSettings and ConnectionStrings to separate files</title><link>http://feedproxy.google.com/~r/Kartones/~3/uF9lr4nx40E/asp-net-split-appsettings-and-connectionstrings-to-separate-files.aspx</link><pubDate>Mon, 28 Sep 2009 23:24:59 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50402</guid><dc:creator>Kartones</dc:creator><slash:comments>0</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/09/29/asp-net-split-appsettings-and-connectionstrings-to-separate-files.aspx#comments</comments><description>&lt;p&gt;This is a simple yet not always known &amp;quot;trick&amp;quot;.&lt;/p&gt;  &lt;p&gt;We usually have in our ASP.NET Web.Config files the app settings variables and connection strings:&lt;/p&gt;  &lt;pre class="code"&gt;  &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;appSettings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyAppSetting1&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&amp;quot; &lt;span style="color:blue;"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyAppSetting2&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&amp;quot; &lt;span style="color:blue;"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyAppSetting3&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&amp;quot; &lt;span style="color:blue;"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;appSettings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;

&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Conn1&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;connectionString&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;xxx&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;providerName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data.SqlClient&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Conn2&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;connectionString&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;xxx&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;providerName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data.SqlClient&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;What is not so commonly known is that you can split both sections, using special attributes on the nodes:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;appSettings &lt;/span&gt;&lt;strong&gt;&lt;span style="color:red;"&gt;file&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;AppSettings.config&lt;/span&gt;&amp;quot;&lt;/strong&gt;&lt;span style="color:blue;"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyAppSetting1&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&amp;quot; &lt;span style="color:blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyAppSetting2&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&amp;quot; &lt;span style="color:blue;"&gt;/&amp;gt;    
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;appSettings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;

&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;connectionStrings &lt;/span&gt;&lt;strong&gt;&lt;span style="color:red;"&gt;configSource&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;ConnectionStrings.config&lt;/span&gt;&amp;quot;&lt;/strong&gt; &lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;The &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;appSettings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; node can have some or all keys in another file, like this AppSettings.config sample file:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;appSettings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyAppSetting2&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&amp;quot; &lt;span style="color:blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;MyAppSetting3&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&amp;quot; &lt;span style="color:blue;"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;appSettings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Now, we would end having the same 3 keys as in the original web.config file, but &lt;span style="color:blue;"&gt;MyAppSetting2&lt;/span&gt; would be overwritten in AppSettings.config and &lt;span style="color:blue;"&gt;MyAppSetting3&lt;/span&gt; would be created in the same file. 

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;With the &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; node we can take out all conn strings (beware, you can&amp;#39;t split between the two, if you specify a &lt;span style="color:red;"&gt;configSource&lt;/span&gt; then &lt;strong&gt;all&lt;/strong&gt; must go on that file):&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Conn1&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;connectionString&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;xxx&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;providerName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data.SqlClient&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;add &lt;/span&gt;&lt;span style="color:red;"&gt;name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;Conn2&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;connectionString&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;xxx&lt;/span&gt;&amp;quot; &lt;span style="color:red;"&gt;providerName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data.SqlClient&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Both &lt;span style="color:blue;"&gt;AppSettings.config&lt;/span&gt; and &lt;span style="color:blue;"&gt;ConnectionStrings.config&lt;/span&gt; must &lt;strong&gt;only&lt;/strong&gt; contain &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;appSettings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; and &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; as the root XML nodes. Do not place any other xml tag (not even the &lt;span style="color:blue;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#a31515;"&gt;xml &lt;/span&gt;&lt;span style="color:red;"&gt;version&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;1.0&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;?&amp;gt;&lt;/span&gt; definition tag). &lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50402" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/uF9lr4nx40E" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/.NET/default.aspx">.NET</category><category domain="http://kartones.net/blogs/kartones/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Configuration/default.aspx">Configuration</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/09/29/asp-net-split-appsettings-and-connectionstrings-to-separate-files.aspx</feedburner:origLink></item><item><title>Working with PHP, six months later</title><link>http://feedproxy.google.com/~r/Kartones/~3/Zvilg7JdfAs/working-with-php-six-months-later.aspx</link><pubDate>Tue, 22 Sep 2009 22:38:57 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50388</guid><dc:creator>Kartones</dc:creator><slash:comments>6</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/09/23/working-with-php-six-months-later.aspx#comments</comments><description>&lt;p&gt;Now that I’m back from a small vacations, time to get back to blogging too!&lt;/p&gt;  &lt;p&gt;A bit more than six months ago, &lt;a href="http://kartones.net/blogs/kartones/archive/2009/03/01/programming-languages-are-tools.aspx"&gt;I changed once again where I work&lt;/a&gt;, but this time it was not only a new company, but a new world, with PHP as the flagship. Six months later, I’m not only still alive, but I have learned a lot more than just a new programming language.&lt;/p&gt;  &lt;p&gt;Things like the subtle (but vital) difference that supposes working with a fully scripted language (everything ends when the HTTP request ends) from a compiled, object oriented and instanced language (memory pool, state, garbage collection,…). &lt;/p&gt;  &lt;p&gt;Things like why PHP has the horrible fame among all object oriented developers, and yes, the language needs a serious internal flamethrower purge that gets rid of all backwards compatibility with un-scoped, function-like development, but as with human actions, not everything is bad, beautiful things can be created too: PHP can implement a lot of design patterns, PHP 5 has object orientation (not perfect, but enough to properly code), PHPUnit allows for some unit testing, and Sellenium to do even flow and UI testing.&lt;/p&gt;  &lt;p&gt;“Think big” they say; yes, think big, as big as if a single “SELECT COUNT(*) FROM xxxx” could bring down your entire site if not properly &lt;a href="http://kartones.net/blogs/kartones/archive/2009/07/06/five-basic-concepts-of-scalability.aspx"&gt;scaled&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;But I’ve not only adquired knowledge on a new language. I have now a broader vision of things (I think ;). &lt;/p&gt;  &lt;p&gt;I now know that many of those apparent “linux trolls” are not so &lt;a href="http://kartones.net/blogs/kartones/archive/2009/08/01/your-worst-enemy-ignorance.aspx"&gt;but just ignorant&lt;/a&gt; of current state of “the Windows ecosystem”, that some Mac users are real fanatics, but others know exactly the correct state of &lt;strike&gt;monopolism&lt;/strike&gt; things and perfectly talk about Apple’s flaws, that even Linux machines give kernel panics, that Linux Terminals/shells have an incredible hidden power that now I only wish I had in MS-DOS or Windows Command Prompts…&lt;/p&gt;  &lt;p&gt;I can now switch from 8 daily hours of PHP coding to one or two related to .NET/C# without problems, and I’m happy to start to become some kind of hybrid coding monster. I’m even starting to care a bit about “presentation” of stuff (at least to try to not do dirty CSS things), thanks to the fantastic designers I work with.&lt;/p&gt;  &lt;p&gt;It’s a curious mutation? evolution? Well see in another six months or so :P&lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50388" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/Zvilg7JdfAs" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Patterns+_2600_amp_3B00_+Practices/default.aspx">Patterns &amp;amp; Practices</category><category domain="http://kartones.net/blogs/kartones/archive/tags/.NET/default.aspx">.NET</category><category domain="http://kartones.net/blogs/kartones/archive/tags/PHP/default.aspx">PHP</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Methodology/default.aspx">Methodology</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/09/23/working-with-php-six-months-later.aspx</feedburner:origLink></item><item><title>Transitioning from a synchronous model to an asynchronous one?</title><link>http://feedproxy.google.com/~r/Kartones/~3/C9FsziIpvws/transitioning-from-a-synchronous-model-to-an-asynchronous-one.aspx</link><pubDate>Tue, 08 Sep 2009 06:34:00 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50379</guid><dc:creator>Kartones</dc:creator><slash:comments>2</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/09/08/transitioning-from-a-synchronous-model-to-an-asynchronous-one.aspx#comments</comments><description>&lt;p&gt;I’ve been lately analysing how my habits have changed in some aspects of my daily computer use. This might not be the case for everyone, but in general I see it happening too to a lot of my friends.&lt;/p&gt;  &lt;p&gt;Around 2001, when I started my computers degree at university, we were in the IRC/Chat boom, but it had some limitations, mostly related to how non-power users using it: Either you had to learn how IRC works and create private channels to talk with your friends, or you had to rely on web-based chats (this was a boom of Java Applets too, now almost forgotten because of Flash).    &lt;br /&gt;The Instant Messaging networks and clients got hype and they spread like a virus. I had an ICQ account, a Yahoo one, and a Windows Messenger one (later rebranded to MSN Messenger, and now called Windows Live Messenger). Everyone started to have at least modem connections (DSL lines were still spreading at least over Spain), so we started to spend hours and hours connected to IM clients (in my case, mostly Messenger) chatting with our friends. It was the cheaper substitute of phone/mobile conversations. Instant, synchronous communication.&lt;/p&gt;  &lt;p&gt;Now, IM clients are still there and widely used, but both for technical constraints (proxys/firewalls blocking access, crappy protocols that at the minimum network loss disconnect, weak wifi signals,…) and time constraints (while working you have to concentrate on your tasks instead of on offtopic chatting), it is being moved to a second, less interest layer, in favor of social networks.&lt;/p&gt;  &lt;p&gt;At Facebook, Tuenti, or whatever social network you use (even Twitter if we consider it like a micro-social network), there’s a lot of activity. I have lots of friends with whom, having them on IM clients, I speak way more now via social networks. The few times I logged in into Facebook until I disabled the chat (I mostly only login to reply to comment or private message notifications) usually were a lot of friends connected/online, friends to whom usually if you send an email it takes from hours to days to get a reply. But if I comment on their walls or send a private message inside the social network, they reply sometimes instantly ;)&lt;/p&gt;  &lt;p&gt;At first I thought it was curious, but it makes some sense, because in a social network, you don’t need to reply at once if you don’t want or you can’t. In a IM client you must be synchronous, reply from time to time. On a social network, you decide when you do it, you have the control and the pace. You don’t feel the same stress of real-time bidirectional communication.&lt;/p&gt;  &lt;p&gt;Something similar happened to me with the news sources. In the past, I had lot of email subscriptions to various news.    &lt;br /&gt;Then, RSS came and transformed the way of receiving data to an asynchronous model. Data gets fetched when appears, but gets stored until you have the time to read it.     &lt;br /&gt;I now get stressed if I have too many pending emails (although doing a simple psychological trick of marking them as read on GMail after adding a “PENDING” tag to them works like a charm), but I don’t feel pressure if I see +200 unread feeds.&lt;/p&gt;  &lt;p&gt;Even in development we’re switching… In the past, sockets programming was used for almost everything, even applications that didn’t need instant responses. Now, excepting online multiplayer games and a few specific areas, the use of web services is so widely spread that for example in .NET Remoting has become a rare knowledge, but almost everybody knows how to create a ASP.NET Web Service or WCF layer. Everything that doesn’t requires a synchronous communication it is created as an asynchronous one now by default.&lt;/p&gt;  &lt;p&gt;So probably yes, we’re moving from a synchronous communication model to an asynchronous one. Partly because this way time stops being a constraint factor, but partly too because with an async. model we have the control of when to pause and when to resume the flow of communication (at least to some extent).&lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50379" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/C9FsziIpvws" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/Social+Networks/default.aspx">Social Networks</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Social/default.aspx">Social</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Social+Behaviors/default.aspx">Social Behaviors</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/09/08/transitioning-from-a-synchronous-model-to-an-asynchronous-one.aspx</feedburner:origLink></item><item><title>Book Review: Design Patters (Gang of Four)</title><link>http://feedproxy.google.com/~r/Kartones/~3/X9V1pcrKHik/book-review-design-patters-gang-of-four.aspx</link><pubDate>Mon, 31 Aug 2009 20:35:58 GMT</pubDate><guid isPermaLink="false">b86c0850-82e5-42ed-a9d8-bde9e8f94ec1:50375</guid><dc:creator>Kartones</dc:creator><slash:comments>0</slash:comments><comments>http://kartones.net/blogs/kartones/archive/2009/08/31/book-review-design-patters-gang-of-four.aspx#comments</comments><description>&lt;p&gt;&lt;img title="Design Patterns Book" alt="Design Patterns Book" src="http://kartones.net/images_posts/screenshots/book_design_patterns_gof.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;Today a review of a maybe not so fresh book, but basic and highly recommended one, &lt;a href="http://kartones.net/blogs/kartones/pages/book-reviews.aspx#book009"&gt;the Design Patterns book by the gang of four&lt;/a&gt; (GoF). &lt;/p&gt;  &lt;p&gt;I have a few more books halfway read (I cheated, because I read this book a while ago) so I’ll try to post another review soon ;)&lt;/p&gt;&lt;img src="http://kartones.net/aggbug.aspx?PostID=50375" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Kartones/~4/X9V1pcrKHik" height="1" width="1"/&gt;</description><category domain="http://kartones.net/blogs/kartones/archive/tags/Patterns+_2600_amp_3B00_+Practices/default.aspx">Patterns &amp;amp; Practices</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Books/default.aspx">Books</category><category domain="http://kartones.net/blogs/kartones/archive/tags/Design+Patterns/default.aspx">Design Patterns</category><feedburner:origLink>http://kartones.net/blogs/kartones/archive/2009/08/31/book-review-design-patters-gang-of-four.aspx</feedburner:origLink></item></channel></rss>
