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

<channel>
	<title>Łukasz Podolak</title>
	<atom:link href="http://lukaszpodolak.pl/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://lukaszpodolak.pl</link>
	<description>Has just come up with a new idea for</description>
	<lastBuildDate>Tue, 04 Nov 2008 22:02:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding Intellisense support for jQuery in VS 2008</title>
		<link>http://lukaszpodolak.pl/index.php/2008/10/29/adding-intellisense-support-for-jquery-in-vs-2008/</link>
		<comments>http://lukaszpodolak.pl/index.php/2008/10/29/adding-intellisense-support-for-jquery-in-vs-2008/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 19:54:59 +0000</pubDate>
		<dc:creator>lpodolak</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Intellisense]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://lukaszpodolak.pl/?p=12</guid>
		<description><![CDATA[Since recently, I&#8217;m a big fan of the jQuery framework. If your daily job requires you to write javascript then you know how tough and unfriendly it can be (especially when you have experienced coding the true OO environments before). If you don&#8217;t know what does jQuery offer to you, here is the quick list [...]]]></description>
			<content:encoded><![CDATA[<p>Since recently, I&#8217;m a big fan of the <a href="http://jquery.com/">jQuery</a> framework. If your daily job requires you to write javascript then you know how tough and unfriendly it can be (especially when you have experienced coding the true OO environments before). If you don&#8217;t know what does jQuery offer to you, here is the quick list that comes to my mind:</p>
<ol>
<li>Helps you separate the presentation (XHTML) with the client side logic &#8211; following the &#8220;<a href="http://en.wikipedia.org/wiki/Unobtrusive_JavaScript">Unobtrusive JavaScript</a>&#8221; principle.</li>
<li>Let&#8217;s you forget about having to code like &#8220;if (IE) write_yet_another_hack()&#8221;. It abstracts 90% of code that needs to be browser-specific and smart enough to catch the different browser divergences (especially the &#8220;blue e&#8221; on your desktop).</li>
<li>Makes your code fly with its <a href="http://en.wikipedia.org/wiki/Fluent_interface">fluent design</a> &#8211; chaining methods like $(&#8220;.nav&#8221;).show().addClass(&#8220;red&#8221;) &#8211; can the code be more beautiful ?</li>
<li>Writing your own plugins is extremely easy. This is why you have tons of <a href="http://plugins.jquery.com/">extensions</a> to choose from if what jQuery offers to you out of the box is still not enough.</li>
<li>Rounding corners, adding animation effects, working with ajax and other popular client code tasks haven&#8217;t been that easy before.</li>
</ol>
<p>I&#8217;m currently finishing reading the <a href="http://www.manning.com/bibeault/">&#8220;jQuery in Action&#8221;</a> book and I can tell that I definitely fell in love with this framework and I am more than sure that I will never go back and write plain old JavaScript when I only have a choice.</p>
<p>There was actually one drawback &#8211; the lack of intellisense. If it is a drawback indeed, because simple JavaScript intellisense support in VS hasn&#8217;t really blown me away either. However, since recently intellisense for jQuery is available to download as a standalone .js file, that you need to reference inside your script files.</p>
<div id="attachment_13" class="wp-caption alignnone" style="width: 463px"><a href="http://lukaszpodolak.pl/wp-content/uploads/2008/10/jqueryintellisense_0.jpg"><img class="size-full wp-image-13" title="jqueryintellisense_0" src="http://lukaszpodolak.pl/wp-content/uploads/2008/10/jqueryintellisense_0.jpg" alt="Intellisense in jQuery" width="453" height="274" /></a><p class="wp-caption-text">Intellisense in jQuery</p></div>
<p>Sweet! isn&#8217;t it?  Check for more information about intellisense support on<a href="http://blogs.msdn.com/webdevtools/archive/2008/10/28/rich-intellisense-for-jquery.aspx"> Visual Web Developer Team&#8217;s</a> blog.</p>
 <img src="http://lukaszpodolak.pl/wp-content/plugins/feed-statistics.php?view=1&post_id=12" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://lukaszpodolak.pl/index.php/2008/10/29/adding-intellisense-support-for-jquery-in-vs-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Explaining the String Interning</title>
		<link>http://lukaszpodolak.pl/index.php/2008/10/07/explaining-the-string-interning/</link>
		<comments>http://lukaszpodolak.pl/index.php/2008/10/07/explaining-the-string-interning/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 11:20:04 +0000</pubDate>
		<dc:creator>lpodolak</dc:creator>
				<category><![CDATA[CLR]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://lukaszpodolak.pl/index.php/2008/10/07/explaining-the-string-interning/</guid>
		<description><![CDATA[Probably most of you have already heard about string interning,  but if not, let me introduce this concept briefly.
When you application uses string frequently, and I&#8217;m 99,9% sure it does, then think about how much memory would be wasted if the same strings that appear in your application repeatedly had been memory allocated every time [...]]]></description>
			<content:encoded><![CDATA[<p>Probably most of you have already heard about <strong>string interning,  </strong>but if not, let me introduce this concept briefly.</p>
<p>When you application uses string frequently, and I&#8217;m 99,9% sure it does, then think about how much memory would be wasted if the same strings that appear in your application repeatedly had been memory allocated every time they are used? CLR has it&#8217;s remedy for that situation. Once the AppDomain is being loaded, CLR creates an internal<strong> hashtable</strong> which keys are the actual strings and values are pointed to the objects on the managed heap. This hashtable is initially empty, and is being populated with new string entries that come while the program executes.  This means that no longer duplicated string objects are created on the heap. You may wonder, &#8220;hey, but what if I modify one instance of that &#8220;grouped&#8221; string objects? Will it affect the strings in other places that just before a while were identical to the modified one? The answer is of course <em>no</em><strong>. </strong>Remember that strings are <strong>immutable </strong>- which means that you are not allowed to modify the string instance (unless using unsafe operations). Once you <em>&#8220;modify&#8221;  </em>the string object, the new instance is created and returned under the hood and the previous instance is now ready to be GC-ed (of course the condition for this is that the <em>&#8220;old&#8221; </em>string was unique in the AppDomain).</p>
<p>When you are using the 2.0 version of the CLR (remember, please <a href="http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx">distinct </a>the CLR versions from the .NET Framework versions) you should get the String Interning mechanism working  by default out of the box. However, there is some weirdness behind it.</p>
<p>Assemblies under CLR 2.0 are by default marked with the <strong>System.Runtime.CompilerServices.CompilationRelaxations.NoStringInterning</strong> flag value. According to what ECMA specification says, because of that the CLR <em>may </em>choose not to intern all of the strings defined in that assembly metadata.  That would seem that we have to control the interning mechanism by using the <a href="http://msdn.microsoft.com/en-us/library/system.string.intern.aspx">Intern </a>or <a href="http://msdn.microsoft.com/en-us/library/system.string.isinterned.aspx">IsInterned</a> methods manually. Finally, let me say <u>that 2.0 version of the CLR ignores the mentioned flag</u> that is produced by the C# compiler. Pretty confusing, isn&#8217;t it? All this mess is because the concerns about performance. By default, when an assembly is loaded  CLR interns all the strings that exist in an assembly&#8217;s metadata. This process can hurt the performance significantly, that is why Microsoft choosed to &#8220;turn this feature off&#8221; by default.</p>
<p>Concluding, you can design your CLR 2.0 applications with the string interning mechanism provided by default, so this code:</p>
<p><!-- {\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset238\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red163\green21\blue21;\red43\green145\blue175;\red0\green128\blue0;}??\fs20 \cf1 private\cf0  \cf1 static\cf0  \cf1 void\cf0  Main(\cf1 string\cf0 [] args)\par ??\{\par ??    \cf1 string\cf0  firstInstance = \cf4 "D'oh!"\cf0 ;\par ??    \cf1 string\cf0  stillSameInstance = \cf4 "D'oh!"\cf0 ;\par ??    \cf5 Console\cf0 .WriteLine(ReferenceEquals(firstInstance, stillSameInstance)); \cf6 // True - under CLR 2.0\par ??\cf0 \}} --></p>
<p style="background: transparent none repeat scroll 0% 0%; font-family: Courier New; font-size: 8pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; line-height: 14px">&nbsp;</p>
<p style="margin: 0px"><span style="color: blue">private</span> <span style="color: blue">static</span> <span style="color: blue">void</span> Main(<span style="color: blue">string</span>[] args)</p>
<p style="margin: 0px">{</p>
<p style="margin: 0px">    <span style="color: blue">string</span> firstReference = <span style="color: #a31515">&#8220;D&#8217;oh!&#8221;</span>;</p>
<p style="margin: 0px">    <span style="color: blue">string</span> stillSameReference = <span style="color: #a31515">&#8220;D&#8217;oh!&#8221;</span>;</p>
<p style="margin: 0px">&nbsp;</p>
<p style="margin: 0px">    <span style="color: green">// True &#8211; under CLR 2.0</span></p>
<p style="margin: 0px">    <span style="color: #2b91af">Console</span>.WriteLine(ReferenceEquals(firstReference, stillSameReference)); <span style="color: green"></span></p>
<p style="margin: 0px">}</p>
<p>This code snipped should be predictable under the CLR 2.0 and print &#8220;True&#8221; to the output. However, as Jeff Richter<a href="http://www.microsoft.com/MSPress/books/6522.aspx"> in his fantastic book </a>explains,<strong> you should not rely on this mechanism</strong> and leverage string interning manually by using the appropriate methods (Intern, IsInterned) because we do not know how the next versions of the CLR will interpret the NoStringInterning flag.</p>
 <img src="http://lukaszpodolak.pl/wp-content/plugins/feed-statistics.php?view=1&post_id=5" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://lukaszpodolak.pl/index.php/2008/10/07/explaining-the-string-interning/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>&#8220;Yellow world&#8221;</title>
		<link>http://lukaszpodolak.pl/index.php/2008/10/06/yellow-world/</link>
		<comments>http://lukaszpodolak.pl/index.php/2008/10/06/yellow-world/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 22:38:05 +0000</pubDate>
		<dc:creator>lpodolak</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://lukaszpodolak.pl/index.php/2008/10/06/yellow-world/</guid>
		<description><![CDATA[Yellow World!
I&#8217;ve just managed to install this new wordpress (thank you,  smashingmagazine for the lovely theme) blog and hope you and I will learn something new everyday (probably to be updated to every occassion). Yes, you should comment as much as possible here, because I am always willing to be proven wrong, frankly.
 ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.funnyhub.com/jokes/pages/green-pink-yellow.html">Yellow </a>World!</p>
<p>I&#8217;ve just managed to install this new <a href="http://wordpress.org/" title="WordPress">wordpress</a> (thank you,  <a href="http://smashingmagazine.com/">smashingmagazine </a>for the lovely theme) blog and hope you and I will learn something new everyday (probably to be updated to every occassion). Yes, you should comment as much as possible here, because I am always willing to be proven wrong, frankly.</p>
 <img src="http://lukaszpodolak.pl/wp-content/plugins/feed-statistics.php?view=1&post_id=4" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://lukaszpodolak.pl/index.php/2008/10/06/yellow-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
