<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://devlicious.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Sergio Pereira</title><subtitle type="html">There are no half-solutions because there isn&amp;#39;t half a problem</subtitle><id>http://devlicious.com/blogs/sergio_pereira/atom.aspx</id><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/default.aspx" /><link rel="self" type="application/atom+xml" href="http://devlicious.com/blogs/sergio_pereira/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20416.853">Community Server</generator><updated>2008-11-22T17:33:00Z</updated><entry><title>Gamers Need Not Apply</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2009/01/08/gamers-need-not-apply.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2009/01/08/gamers-need-not-apply.aspx</id><published>2009-01-09T01:51:00Z</published><updated>2009-01-09T01:51:00Z</updated><content type="html">		

		&lt;p&gt;Recently I came across &lt;a href="http://forums.f13.net/index.php?topic=15577.0"&gt;this 
		forum message&lt;/a&gt; where the author describes a conversation he had in Australia with 
		a recruiter who, at some point, said that:&lt;/p&gt;
		
		&lt;blockquote&gt;
		&amp;quot;employers specifically instruct him not to send them 
		World of Warcraft players. He said there is a belief that WoW players cannot give 
		100% because their focus is elsewhere, their sleeping patterns are often not great, etc.&amp;quot; 
		&lt;/blockquote&gt;
		
		&lt;blockquote&gt;
			&amp;quot;He has been specifically asked to avoid WoW players.&amp;quot;
		&lt;/blockquote&gt;
		
		&lt;p&gt;This post is not about gaming. I&amp;#39;m not a gamer (just so you know, wink, wink) and 
		I&amp;#39;m not going to attempt
		to get into behavioral patterns or stereotypes of gamers. I want to understand
		the rationale behind a request like the quoted one.
		Replace &lt;i&gt;gamer&lt;/i&gt;
		with &lt;i&gt;audiophile&lt;/i&gt;, or &lt;i&gt;sports fanatic&lt;/i&gt;, or someone that is too
		deeply consumed with other activities (e.g. parenting, church, small business on
		the side, etc) and you get the same issue.&lt;/p&gt;
		
		&lt;h3&gt;No one needs to be as passionate as you&lt;/h3&gt;
		
		&lt;p&gt;As much as we would like everyone to be as passionate as we are for our
		job (I&amp;#39;m assuming you are,) that doesn&amp;#39;t represent the real situation in 
		the vast majority of the workplaces. &lt;/p&gt;
		
		&lt;p&gt;For many people, arguably most of them, what they do from 9 to 5 is
		&lt;i&gt;just their job&lt;/i&gt;. When they get home, they shut off or, more likely,
		the better part of their day starts.&lt;/p&gt;
		
		&lt;p&gt;I have even &lt;a href="http://devlicio.us/blogs/sergio_pereira/archive/2008/03/28/the-long-road-to-rescuing-wally.aspx" title="The Long Road To Rescuing Wally - Sergio Pereira"&gt;talked about Wally&lt;/a&gt; before, which
		represents a much more deteriorated stage.&lt;/p&gt;
		
		&lt;p&gt;The following quote from 
		&lt;a href="http://tech.groups.yahoo.com/group/altdotnet/message/18358"&gt;a message&lt;/a&gt;
		posted by &lt;a href="http://www.charliepoole.org/" title="Charlie Poole"&gt;Charlie Poole&lt;/a&gt;
		pretty much summarizes how I try to deal with this situation and how to recognize
		brightness and passion even in someone that doesn&amp;#39;t share the same thirst I have,
		24h a day.&lt;/p&gt;
		
		&lt;blockquote&gt;
			...
			&lt;blockquote&gt;		
				&lt;i&gt;[Kurt]: To me the separation seems to between .net programmers of the
				type that wouldn&amp;#39;t consider letting their job interfere with
				their leisure time by reading development books and blogs,
				and taking part in mailing lists and user groups, or
				programming at home, and those that do who are also likely to
				follow most alt.net principles and practices (even if they
				haven&amp;#39;t heard of alt.net)&lt;/i&gt;
			&lt;/blockquote&gt;
			
			[Charlie]: I used to make that separation. Well, I still do, but without
			the implied value judgement. IMO, folks have a right to a
			life outside of the development world and the vast majority
			of professional programmers don&amp;#39;t live and breathe it the
			way some of us do. Those folks need to be reached as well.&lt;br /&gt;&lt;br /&gt;

			I did a gig a while back with a bunch of mainframe COBOL guys,
			helping to re-invent agile techniques for their environment.
			Most of them had families and wanted to go home to them at
			the end of the day. But during the day, they wanted to learn
			new things and do the best job possible. I respect their
			choice - maybe it makes more sense than it does for me to be
			typing this note in the wee hours of the morning. :-)

			I think there is room for folks like that - there as to be,
			since they seem to be the majority. We just have to figure
			out how to reach them.&lt;br /&gt;
			...
		&lt;/blockquote&gt;
		
		&lt;h3&gt;But it is still your job&lt;/h3&gt;
		
		&lt;p&gt;&lt;i&gt;Everything has a healthy limit, even gaming.&lt;/i&gt;&lt;/p&gt;
		
		&lt;p&gt;
			At the end of the day, you&amp;#39;re (hopefully) still earning your pay
			for the job you perform. If these other activities start taking
			their toll on your focus and stamina to get your work done,
			it&amp;#39;s a sign you need to exercise some moderation or find a
			job that allows you keep them or, better yet, make them your job.
		&lt;/p&gt;
		
		
		&lt;p&gt;&lt;i&gt;Everything has a healthy limit, even the passion for your job.&lt;/i&gt;&lt;/p&gt;
		
		&lt;p&gt;
			Moderation applies here too. I&amp;#39;m in a constant struggle to manage my
			time responsibly. Even if the activities are (somewhat) job-related,
			many times they are not appropriate during billable time.
		&lt;/p&gt;
		
		&lt;p&gt;
			Some examples of things I avoid or moderate during work hours &amp;mdash;
			and leave them for before or after work:
		&lt;/p&gt;
		
		&lt;ul&gt;
			&lt;li&gt;Twitter - a huge attention whore. I try not to have it on during the
				day or at least disable the pop-up and minimize it, checking it only
				when I have or need a break.&lt;/li&gt;
			&lt;li&gt;IM - mine is usually very quiet. I use the busy status when needed&lt;/li&gt;
			&lt;li&gt;Reading tech blogs or news - a few before work. If they pile up I&amp;#39;ll 
				catch up at night&lt;/li&gt;
			&lt;li&gt;Writing a blog post - any blog post worth reading takes time to be written. This
				is &lt;i&gt;my&lt;/i&gt; blog, so I&amp;#39;ll have to use &lt;i&gt;my&lt;/i&gt; time feed it.&lt;/li&gt;
			&lt;li&gt;Mailing lists - I don&amp;#39;t actually spend too much time on these. I only 
				monitor a handful of them and only one is fairly active. I check new
				topics once or twice a day. Only read if sounds interesting.&lt;/li&gt;
		&lt;/ul&gt;
		
		&lt;h3&gt;So, can we hire gamers?&lt;/h3&gt;
		
		&lt;p&gt;
			Although I can understand the rationale behind not hiring someone
			that has an extreme, obsessive compulsion for playing video games,
			which could prevent him/her from performing the job, I could
			never agree with the implied blanket statement that all gamers
			will become bad employees and should be avoided. Again, replace 
			gamers with...
		&lt;/p&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43675" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term="Development" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Development/default.aspx" /></entry><entry><title>Chicago ALT.NET Plans for 2009</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2009/01/07/chicago-alt-net-plans-for-2009.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2009/01/07/chicago-alt-net-plans-for-2009.aspx</id><published>2009-01-08T00:22:00Z</published><updated>2009-01-08T00:22:00Z</updated><content type="html">		&lt;p&gt;
			Due to scheduling problems we had to delay this announcement
			more than we would like to. But we will still have our
			monthly &lt;a href="http://www.chicagoalt.net/event/January2009Meeting-Planningfor2009"&gt;meeting on Wednesday, January 14&lt;sup&gt;th&lt;/sup&gt;&lt;/a&gt;.
		&lt;/p&gt;
		
		&lt;h3&gt;Planning for 2009&lt;/h3&gt;
		&lt;p&gt;
		&lt;span style="font-size:x-small;"&gt;6:00 pm&lt;/span&gt; 
		&lt;br /&gt;

			Pizza and networking time

		&lt;/p&gt;
		
		&lt;p&gt;
		&lt;span style="font-size:x-small;"&gt;6:30 pm&lt;/span&gt; 
		&lt;br /&gt;

			We had a guest speaker for this month&amp;#39;s meeting but
			unfortunately we had to change plans at the last minute. 
		&lt;/p&gt;
		&lt;p&gt;
			Instead of that we will use the opportunity to do some
			group housekeeping.
		&lt;/p&gt;
		
		&lt;ul&gt;
			&lt;li&gt;What worked well and what didn&amp;#39;t in 2008&lt;/li&gt;
			&lt;li&gt;What direction should we take with our group&lt;/li&gt;
			&lt;li&gt;Viability of our group organizing a CodeCamp soon&lt;/li&gt;
			&lt;li&gt;Global ALT.NET participation: as suggested in 
				&lt;a href="http://tech.groups.yahoo.com/group/altdotnet/message/18650"&gt;this message&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		
		&lt;p&gt;
			If you want to help define our meetings format and group actions, then
			come and help us in this discussion.
		&lt;/p&gt;

		&lt;p&gt;
		&lt;span style="font-size:x-small;"&gt;7:45 pm&lt;/span&gt; 
		&lt;br /&gt;
			We have skipped the open discussion portion of our meetings
			last couple of times. This time, after we cover the items in the 
			agenda, let&amp;#39;s make sure we reserve some time for this activity.
		&lt;/p&gt;
		&lt;p&gt;
			There&amp;#39;s a chance we have someone from Red Point lead a discussion
			about Agile development.
		&lt;/p&gt;
		
		&lt;p&gt;
			We&amp;#39;ll update this description if we receive confirmation or not of the
			Agile discussion.
		&lt;/p&gt;

	&lt;p&gt;
	&lt;a href="http://altnetchicago.eventbrite.com"&gt;&lt;img src="http://www.eventbrite.com/static/images/button_ext/attend_this_event.gif" border="0" alt="" /&gt;&lt;/a&gt;
	&lt;/p&gt;
	&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43669" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term="alt.net" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/alt.net/default.aspx" /><category term="Announcement" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Announcement/default.aspx" /><category term="Community" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Community/default.aspx" /></entry><entry><title>Language Envy - hash literals</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2009/01/05/language-envy-hash-literals.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2009/01/05/language-envy-hash-literals.aspx</id><published>2009-01-05T08:38:00Z</published><updated>2009-01-05T08:38:00Z</updated><content type="html">&lt;p&gt;
	It&amp;#39;s easy to let a small language feature go unnoticed. The more I spend
	time writing JavaScript and Ruby, the more one little detail shows itself
	loud and clear when I go back to my trusty C# (well, it shows itself by not being absent, 
if that makes any sense.)
&lt;/p&gt;

&lt;p&gt;
	The little language detail I&amp;#39;m writing about today is the literal syntax
	for hashes. Especially in JavaScript, because all objects are just hashes
	on steroids, which makes the literal object syntax become one and the same
	with the hash literals.
&lt;/p&gt;
&lt;p&gt;
	In JavaScript it&amp;#39;s easy as 1-2-3. It&amp;#39;s not surprising so many libraries are
	adopting hash parameters.
&lt;/p&gt;

		&lt;pre name="code" class="js"&gt;//Prototype.js sample
var elements = { success: &amp;#39;myDiv&amp;#39;, failure: &amp;#39;errorDiv&amp;#39; };
var ajax = new Ajax.Updater(
	elements, 
	&amp;#39;getData.aspx&amp;#39;, 
	{ method: &amp;#39;get&amp;#39;, onFailure: reportError }
	);
//jQuery sample (jQuery UI)
$(&amp;#39;#fromDate&amp;#39;).datepicker({rangeSelect: true, firstDay: 1});
$(&amp;quot;#search&amp;quot;).autocomplete(&amp;quot;/product/find&amp;quot;,
	{ autoFill: true, delay: 10, minChars: 3 }
	);&lt;/pre&gt;

&lt;p&gt;
	Now, I understand that part of the popularity of hashes in JavaScript 
	and Ruby is due to the loose typing of these languages. But if the syntax
	wasn&amp;#39;t light, APIs like the above ones would be much more painful to use.  
&lt;/p&gt;

&lt;p&gt;
	C# 3 does have a hash syntax (or, more accurately, a dictionary one.)
	Unfortunately, dictionary initializers, although being a step forward,
	still leave noise to be removed.
&lt;/p&gt;

&lt;pre name="code" class="csharp"&gt;// hypothetical search API 
var books = FindWithCriteria&amp;lt;Product&amp;gt;(
              new Dictionary&amp;lt;string,object&amp;gt;
              {
                {&amp;quot;Category&amp;quot;, Category.Books},
                {&amp;quot;MinPrice&amp;quot;, 33.45},
                {&amp;quot;MaxPrice&amp;quot;, 50.00},
                {&amp;quot;Contains&amp;quot;, &amp;quot;asp.net&amp;quot;}
              });&lt;/pre&gt;

&lt;p&gt;
	Hmmm, no, thanks. Maybe that&amp;#39;s the reason we are starting to see some
	APIs that use (abuse?) anonymous objects and reflection to create hashes.
&lt;/p&gt;

&lt;pre name="code" class="csharp"&gt;// hypothetical search API 
var books = FindWithCriteria&amp;lt;Product&amp;gt;(
              new { 
                Category = Category.Books,  
                MinPrice = 33.45,
                MaxPrice = 50.00, 
                Contains = &amp;quot;asp.net&amp;quot; 
              });&lt;/pre&gt;
&lt;p&gt;
	This last one doesn&amp;#39;t look so bad on the surface, but we know what is going on
	under the covers so it&amp;#39;s like &lt;i&gt;&lt;a href="http://www.urbandictionary.com/define.php?term=putting%20lipstick%20on%20a%20pig"&gt;putting lipstick on a pig&lt;/a&gt;&lt;/i&gt;. If, instead of using reflection at run-time, the compiler had
	support for converting the above anonymous object into a 
	&lt;code&gt;IDictionary&amp;lt;string,object&amp;gt;&lt;/code&gt;, then we would have a more
	convenient and efficient way of creating hashes. Maybe it&amp;#39;s too late to introduce a feature
        like that while maintaining backwards compatibility.
&lt;/p&gt;
&lt;p&gt;
	I believe when you add a language feature that is elegantly designed (i.e. clean and unnoticeable,)
	it becomes popular more quickly &amp;mdash; just like 
      &lt;a href="http://devlicio.us/blogs/sergio_pereira/archive/tags/Designing+With+Lambdas/default.aspx"&gt;what is 
   happening with lambdas&lt;/a&gt; . 
       The existing alternatives for creating hashes in C# 3
	are still too noisy or inefficient to be integrated in our code without reducing
	the readability or incurring a performance penalty. 
&lt;/p&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43597" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term=".NET" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/.NET/default.aspx" /><category term="Ruby" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Ruby/default.aspx" /><category term="Series" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Series/default.aspx" /><category term="JavaScript" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/JavaScript/default.aspx" /><category term="Language Envy" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Language+Envy/default.aspx" /></entry><entry><title>Playing with Ruby 1.9 - named parameters (sort of)</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/31/playing-with-ruby-1-9-name-parameters-sort-of.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/31/playing-with-ruby-1-9-name-parameters-sort-of.aspx</id><published>2008-12-31T18:53:00Z</published><updated>2008-12-31T18:53:00Z</updated><content type="html">          
        &lt;p&gt;
            I just installed Ruby 1.9.1 RC1 alongside my stable 1.8.6 installation.
            I&amp;#39;m planning to experiment with the &lt;a href="http://eigenclass.org/hiki.rb?Changes+in+Ruby+1.9"&gt;changes
            and new language features&lt;/a&gt;
            for both using them in new code and upgrade old code (or at least protect
            old code from potential breaking changes.)
        &lt;/p&gt;

        &lt;p&gt;
            In light of the upcoming &lt;a href="http://code.msdn.microsoft.com/csharpfuture"&gt;changes in C# 4&lt;/a&gt;,
            more specifically the addition of named and optional parameters, one of the new Ruby 1.9
            features called my attention immediately.
        &lt;/p&gt;

        &lt;p&gt;
            Ruby, even 1.9, doesn&amp;#39;t support named parameters in method calls.
            Instead, a common pattern is to provide a &lt;a href="http://www.ruby-doc.org/core/classes/Hash.html"&gt;&lt;code&gt;Hash&lt;/code&gt;&lt;/a&gt; parameter
            and call it something like 
			&lt;a href="http://api.rubyonrails.org/classes/ActionController/Base.html#M000512" title="Rails ActionController::Base#render method"&gt;options&lt;/a&gt;. 
			Any optional argument is passed as an item of this hash, normally using a &lt;a href="http://www.rubytips.org/2008/01/26/what-is-a-ruby-symbol-symbols-explained/"&gt;&lt;code&gt;Symbol&lt;/code&gt;&lt;/a&gt; for the key.
            It helps that Ruby has special support for hash arguments, making the call look much cleaner:
        &lt;/p&gt;
        
        &lt;pre name="code" class="ruby"&gt;def my_method(arg1, arg2, options)
  opt1 = options[:option1] || &amp;quot;default value for opt1&amp;quot;
  opt2 = options[:option2] || &amp;quot;default value for opt2&amp;quot;
  # ... etc ...
end

#calling the method:
my_method(val1, val2, { :option2 =&amp;gt; &amp;quot;opt val 2&amp;quot;, :something =&amp;gt; &amp;quot;whatever&amp;quot;})
# simplified syntax
my_method(val1, val2, :option2 =&amp;gt; &amp;quot;opt val 2&amp;quot;, :something =&amp;gt; &amp;quot;whatever&amp;quot;)&lt;/pre&gt;

        &lt;p&gt;
            In a way this is &lt;i&gt;the poor man&amp;#39;s version of named parameters&lt;/i&gt;, but it
            seems to do the job.
        &lt;/p&gt;
        &lt;p&gt;
            This is a very popular Ruby idiom (you can see that a lot in JavaScript as well,)
            so truly popular that the syntax was further simplified in 1.9. We can now 
            ditch the &lt;i&gt;arrow&lt;/i&gt; thingy and write the same exact code as follows:
        &lt;/p&gt;
        
        &lt;pre name="code" class="ruby"&gt;#calling the method:
my_method(val1, val2, { option2: &amp;quot;opt val 2&amp;quot;, something: &amp;quot;whatever&amp;quot;} )
# simplified syntax
my_method(val1, val2, option2: &amp;quot;opt val 2&amp;quot;, something: &amp;quot;whatever&amp;quot;)&lt;/pre&gt;

        &lt;p&gt;
            The first syntax is identical to what you&amp;#39;d use in JavaScript.
            The second one is the same of named parameters in C# 4. I thought
            this was a welcome coincidence. See the C# 4 version below.
        &lt;/p&gt;

		&lt;pre name="code" class="csharp"&gt;//NOTE: C# 4 code
void my_method(string arg1, string arg2, 
      string option1 = &amp;quot;default 1&amp;quot;, string option2 = &amp;quot;default 2&amp;quot;,
      string something = &amp;quot;&amp;quot;)
{
  // ... method body here ...
}

//calling the method:
my_method(val1, val2, option2: &amp;quot;opt val 2&amp;quot;, something: &amp;quot;whatever&amp;quot;);&lt;/pre&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43570" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term=".NET" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/.NET/default.aspx" /><category term="Ruby" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Ruby/default.aspx" /></entry><entry><title>jQuery Character Table</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/29/jquery-character-table.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/29/jquery-character-table.aspx</id><published>2008-12-30T01:31:00Z</published><updated>2008-12-30T01:31:00Z</updated><content type="html">	&lt;p&gt;
		The other day I was looking for the HTML code for the ⌘ (in case you can&amp;#39;t see it, that&amp;#39;s 
              the command key symbol), found in 
		mac keyboards. It was not the first time I was looking for the HTML code
		for one of those funky characters. I remember having a hard time trying to
		represent some Math symbols, like sums and integral equations from my
		college Calculus days.
	&lt;/p&gt;


	&lt;p&gt;
		I thought this would be a nice opportunity to create a small jQuery sample
		that renders a range (or ranges) of HTML characters along with their codes.
	&lt;/p&gt;


	&lt;p&gt;
		I started with a simple HTML page, leaving all the JavaScript in an external file.
	&lt;/p&gt;

	&lt;pre name="code" class="html"&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;HTML Characters&amp;lt;/title&amp;gt;
    &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; 
      content=&amp;quot;text/html; charset=utf-8&amp;quot;&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; 
      src=&amp;quot;jquery-1.2.6.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; 
      src=&amp;quot;char-table.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    From (hex): &amp;lt;input id=&amp;quot;range_from&amp;quot; type=&amp;quot;text&amp;quot;  /&amp;gt; &amp;lt;br/&amp;gt;
    To (hex): &amp;lt;input id=&amp;quot;range_to&amp;quot; type=&amp;quot;text&amp;quot;  /&amp;gt; &amp;lt;br/&amp;gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Load&amp;quot; id=&amp;quot;btnLoad&amp;quot; /&amp;gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Load Example&amp;quot; id=&amp;quot;btnLoadEx&amp;quot; /&amp;gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Load Keyboard Symbols&amp;quot; 
         onclick=&amp;quot;CHARTABLE.loadKeyboardSymbols();&amp;quot; /&amp;gt;
    &amp;lt;table id=&amp;quot;char_table&amp;quot; border=&amp;quot;1&amp;quot; /&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;

	&lt;p&gt;
		Here&amp;#39;s the JavaScript in the file &lt;i&gt;char-table.js&lt;/i&gt;.
	&lt;/p&gt;

&lt;pre name="code" class="js"&gt;$(function(){
  //here we put everything that will run when the page is ready

  $(&amp;#39;#btnLoad&amp;#39;).click(function(){
    // notice how we get the value of the input fields using val()
    // notice how to parse hex numbers in JS
    var from = parseInt($(&amp;#39;#range_from&amp;#39;).val(), 16);
    var to = parseInt($(&amp;#39;#range_to&amp;#39;).val(), 16);
    CHARTABLE.loadRange(from, to);
  });

  $(&amp;#39;#btnLoadEx&amp;#39;).click(function(){
  //setting the value of each input field
    $(&amp;#39;#range_from&amp;#39;).val(&amp;#39;2190&amp;#39;);
    $(&amp;#39;#range_to&amp;#39;).val(&amp;#39;2195&amp;#39;);
  //fire the click event of the Load button
    $(&amp;#39;#btnLoad&amp;#39;).click();
  });

});

// the CHARTABLE object acts as a namespace
var CHARTABLE = {
   loadRanges: function() {
    this.clearTable();
    for(var i=0; i&amp;lt;arguments.length; i++) {
      this.appendRange(
        parseInt(arguments[i][0], 16), 
        parseInt(arguments[i][1], 16)
        );
    }
  },

  loadRange: function(from, to) {
    this.clearTable();
    this.appendRange(from, to);
  },

  clearTable: function(){
    //the html() function is how we replace the innerHTML with jQuery
    $(&amp;#39;#char_table&amp;#39;).        
      html(&amp;#39;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Character&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Code&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;#39;);
  },

  appendRange: function(from, to){
    //we can create stand alone DOM elements with $()
    var tbody = $(&amp;#39;&amp;lt;tbody/&amp;gt;&amp;#39;);
    for(var i=from; i&amp;lt;=to; i++) {
      //notice how we can convert a number to hex
      $(&amp;#39;&amp;lt;tr&amp;gt;&amp;#39;).
        append(&amp;#39;&amp;lt;td&amp;gt;&amp;amp;#x&amp;#39; + i.toString(16) + &amp;#39;;&amp;lt;/td&amp;gt;&amp;#39;).
        append(&amp;#39;&amp;lt;td&amp;gt;&amp;amp;#x&amp;#39; + i.toString(16) + &amp;#39;;&amp;lt;/td&amp;gt;&amp;#39;).
        appendTo(tbody);
    }
    //adding the tbody to the table at the end
    //  renders faster than adding each row to
    //  the table as we go
    $(&amp;#39;#char_table&amp;#39;).append(tbody);
  },

  loadKeyboardSymbols: function(){
    this.loadRanges(
      [&amp;#39;21e7&amp;#39;, &amp;#39;21e7&amp;#39;],
      [&amp;#39;21a9&amp;#39;, &amp;#39;21a9&amp;#39;],
      [&amp;#39;2303&amp;#39;, &amp;#39;2305&amp;#39;],
      [&amp;#39;2318&amp;#39;, &amp;#39;2318&amp;#39;],
      [&amp;#39;2324&amp;#39;, &amp;#39;2327&amp;#39;],
      [&amp;#39;232b&amp;#39;, &amp;#39;232b&amp;#39;],
      [&amp;#39;2190&amp;#39;, &amp;#39;2198&amp;#39;],
      [&amp;#39;21de&amp;#39;, &amp;#39;21df&amp;#39;],
      [&amp;#39;21e4&amp;#39;, &amp;#39;21e9&amp;#39;]
    );
  }
};&lt;/pre&gt;

	&lt;p&gt;
		Now enter the range from 2100 to 2400 and stare at a whole
		bunch of characters that can become useful in some situations.
	&lt;/p&gt;


	&lt;p&gt;
		&lt;b&gt;Note:&lt;/b&gt; The characters don&amp;#39;t render equally in IE and Firefox, but
		a large number of them render just fine in both browsers.
	&lt;/p&gt;
&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43555" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term="Tips &amp;amp; Tricks" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx" /><category term="JavaScript" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/JavaScript/default.aspx" /></entry><entry><title>One less diacritical mark to annoy me</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/26/one-less-diacritical-mark-to-annoy-me.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/26/one-less-diacritical-mark-to-annoy-me.aspx</id><published>2008-12-26T18:57:00Z</published><updated>2008-12-26T18:57:00Z</updated><content type="html">	&lt;p&gt;
		Being a Portuguese-speaking person living in the US, one of the things you have to get used to
		is the keyboard physical layout and key mappings. You know, Latin-originated languages tend
		to have &lt;i&gt;th&amp;ocirc;se w&amp;eacute;&amp;igrave;rd chãraçt&amp;euml;rs&lt;/i&gt;, which are really just diacritical marks applied to regular characters to differentiate words (sometimes it changes the pronunciation, sometimes i doesn&amp;#39;t.)
	&lt;/p&gt;

	&lt;p&gt;
		To accommodate the extra characters, many countries define their own standard for physical
		keyboard layout. In Brazil the standards body is called ABNT and they came up with the
		layout that you can see below. It&amp;#39;s a mild variation from the one used in the US and works well
		if you type in Portuguese most of the time.
	&lt;/p&gt;

	&lt;p&gt;&lt;a href="http://devlicio.us/blogs/sergio_pereira/2008/12/teclado-abnt.png"&gt;&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/teclado-abnt-small.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;

	&lt;p&gt;
		Even when I was living in Brazil, when I started using computers at home and at work,
		it was easier to find a keyboard with a US layout than one with the ABNT layout (this 
		situation has changed now.) I chose to stick to a keyboard with the US physical layout and,
		when in Windows &amp;mdash; which was most of the time anyway &amp;mdash; apply the &lt;b&gt;US-International&lt;/b&gt;
		key mappings.
	&lt;/p&gt;

	&lt;p&gt;
		What happens when you use the US-International it that some keys become &lt;i&gt;dead keys&lt;/i&gt;
		and when you strike them no characters are echoed. The OS waits for the next key(s) to
		decide what to print. For example, if I type &lt;b&gt;[ &amp;quot; ][ a ][ b ][ c ]&lt;/b&gt; without the
		US-International mapping, I get (unsurprisingly) &lt;b&gt;&amp;quot;abc&lt;/b&gt;. With 
		US-International on I get &lt;b&gt;&amp;auml;bc&lt;/b&gt;. I&amp;#39;d have to type  &lt;b&gt;[ &amp;quot; ][space][ a ][ b ][ c ]&lt;/b&gt;
		to get the intended text. Other dead keys are &lt;b&gt;[ &amp;#39; ],[ ` ],[ ^ ],[ ~ ]&lt;/b&gt;.
	&lt;/p&gt;

	&lt;p&gt;
		Of all these dead keys, the ones that hit me the hardest are &lt;b&gt;[ &amp;quot; ]&lt;/b&gt; and &lt;b&gt;[ &amp;#39; ]&lt;/b&gt; 
		because I use them all the time when writing source code.
	&lt;/p&gt;

	&lt;h3&gt;Where am I going with all this?&lt;/h3&gt;

	&lt;p&gt;
		As of January 1&lt;sup&gt;st&lt;/sup&gt; 2009 all Portuguese-speaking countries will start
		complying with an agreement that will cause some orthographic changes in the language.
		One of the new rules is that the &lt;a href="http://en.wikipedia.org/wiki/Umlaut_(diacritic)"&gt;umlaut&lt;/a&gt;
		(those two dots above some letters) is being dropped from the language.
	&lt;/p&gt;

	&lt;p&gt;
		I&amp;#39;m so happy with this decision that I simply could not wait until the US-International
		key mapping gets updated in some Windows update super Tuesday. I decided to take matters
		on my own hands and yank that nasty thing off my system.
	&lt;/p&gt;

	&lt;h3&gt;How to create/edit keyboard layouts (mappings)&lt;/h3&gt;

	&lt;p&gt;
		Microsoft published a cool little tool called &lt;a href="http://www.microsoft.com/globaldev/tools/msklc.mspx"&gt;
		Keyboard Layout Creator&lt;/a&gt; that allows you to create or edit the keyboard layouts.
	&lt;/p&gt;

	&lt;p&gt;
		It doesn&amp;#39;t get much simpler than that. I installed and run this program. Then I loaded 
		the existing US-International layout and saved it as US-International-No-Umlaut. Mousing
		over the &lt;b&gt;[&amp;quot;]&lt;/b&gt; key would reveal that it indeed is marked as &lt;i&gt;dead&lt;/i&gt; and
		show all the available combinations.
	&lt;/p&gt;

	&lt;p&gt;&lt;a href="http://devlicio.us/blogs/sergio_pereira/2008/12/kbd-creator.png"&gt;&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/kbd-creator-small.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;

	&lt;p&gt;
		From there I just needed to right-click that key and un-check the option that was setting
		it as a dead key. 
	&lt;/p&gt;
&lt;p&gt;&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/kbd-creator-2.png" alt="" /&gt;&lt;/p&gt;
	&lt;p&gt;
		The next step is to compile the new layout into a DLL and create the setup package for
		it. That is done by the menu option &lt;i&gt;Project &amp;gt; Build DLL and Setup Project&lt;/i&gt;.
	&lt;/p&gt;

	&lt;p&gt;
		After running the produced setup program, I could just go into the regional settings
		of my system and select the new layout (mapping) as my default setting.
	&lt;/p&gt;

	&lt;p&gt;&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/kbd-no-umlaut.png" alt="" /&gt;&lt;/p&gt;

	&lt;p&gt;
		If you are another Portuguese-speaking programmer and don&amp;#39;t feel like going through
		the same steps, you can just &lt;a href="http://devlicio.us/blogs/sergio_pereira/2008/12/usint-no-umlaut.zip"&gt;download 
		the setup files I created&lt;/a&gt;.

	&lt;/p&gt;

	&lt;p&gt;
		Now I just need to get rid of that muscle memory that I acquired after all 
		these years.
	&lt;/p&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43543" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term="Tools" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Tools/default.aspx" /><category term="Development" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Development/default.aspx" /><category term="Tips &amp;amp; Tricks" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx" /></entry><entry><title>Language Envy - episode 0</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/24/language-envy-episode-0.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/24/language-envy-episode-0.aspx</id><published>2008-12-24T22:32:00Z</published><updated>2008-12-24T22:32:00Z</updated><content type="html">&lt;p&gt;
	Although C# is the language that I can call myself proficient enough to make a living these days,
	there are other languages that I have to use for specific tasks (like JavaScript, SQL, XSLT.) 
	I also like using other general purpose languages for pure exploration or pet projects. I&amp;#39;d
	include Ruby, ObjectiveC and PHP in this group.
&lt;/p&gt;
&lt;p&gt;
	When using other languages it often happens that I encounter features that I wish C# had or
	that the C#-equivalent was as easy (it works both ways &amp;mdash; I miss some C# feature on &lt;i&gt;the 
	other side&lt;/i&gt; as well.)
&lt;/p&gt;
&lt;p&gt;
	In &lt;a href="http://devlicio.us/blogs/sergio_pereira/archive/tags/Language+Envy/default.aspx"&gt;this 
        series of undetermined length&lt;/a&gt; I will be posting some of the items from my wish list as 
	I remember them.
&lt;/p&gt;

&lt;h3&gt;The &lt;code&gt;case&lt;/code&gt; statement&lt;/h3&gt;

&lt;p&gt;
	To start things off, let&amp;#39;s check out C#&amp;#39;s case statement, straight from 
	&lt;a href="http://msdn.microsoft.com/en-us/library/aa664749(VS.71).aspx"&gt;the language specification&lt;/a&gt;.
&lt;/p&gt;

&lt;pre name="code"&gt;switch-statement:
    switch   (   expression   )   switch-block
switch-block:
    {   switch-sectionsopt   }
switch-sections:
    switch-section
    switch-sections   switch-section
switch-section:
    switch-labels   statement-list
switch-labels:
    switch-label
    switch-labels   switch-label
switch-label:
    case   &lt;b&gt;constant-expression&lt;/b&gt;   : // &amp;lt;-- line 14
    default   :&lt;/pre&gt;

&lt;p&gt;
	I know that doesn&amp;#39;t look like C# code. What I&amp;#39;d like to point is in line 14. The
	expression in each &lt;code&gt;case&lt;/code&gt; label has to be a constant. I&amp;#39;m sure that helps
	making the &lt;code&gt;switch&lt;/code&gt; statement compile to a very efficient MSIL code, but
	let&amp;#39;s consider what we are missing because of that.
&lt;/p&gt;

&lt;p&gt;
	Here&amp;#39;s a sample of what you can do in a Ruby &lt;code&gt;case&lt;/code&gt; expression. 
&lt;/p&gt;

&lt;fieldset&gt;
&lt;legend&gt;&lt;b&gt;SIDE NOTE: &lt;/b&gt;&lt;/legend&gt;
The hawk-eyed reader will catch the terminology difference here. Many language
constructs that are mere &lt;i&gt;statements&lt;/i&gt; in C# are &lt;i&gt;expressions&lt;/i&gt; in Ruby.
But that&amp;#39;s not the feature I&amp;#39;ll write about today. Maybe in a future installment.
&lt;/fieldset&gt;

&lt;pre name="code" class="ruby"&gt;Months = %w(JAN FEB MAR APR MAY\
        JUN JUL AGO SEP OCT NOV DEC)

def get_month(value)
  case value
    when Date # class name (instance of?)
      return Months[value.month - 1]

    when /\d{4}-(\d{2})-\d{2}/ # Regular expression (matches ?)
      return Months[$1.to_i  - 1]

    when 1..12  # Range of values (contained ?)
      return Months[value - 1]

  end
end

puts get_month(Date.today)
puts get_month(&amp;quot;2008-10-20&amp;quot;)
puts get_month(8)&lt;/pre&gt;


&lt;p&gt;
	As you can hopefully see in the above example, the expressions in 
	each &lt;code&gt;when&lt;/code&gt; statement do not need to be constants
	(class names like &lt;code&gt;Date&lt;/code&gt; are constants, by the way)
&lt;/p&gt;
&lt;p&gt;
	Ruby defines the &lt;code&gt;===&lt;/code&gt; (triple equal) comparison operator
	that can be overriden in each class and is used in the &lt;code&gt;case&lt;/code&gt;
	expression to test each &lt;code&gt;when&lt;/code&gt; condition. This is usually read
	as &lt;i&gt;&amp;quot;when value matches with this expression here...&amp;quot;&lt;/i&gt;.
&lt;/p&gt;
&lt;p&gt;
	Not surprisingly, the built-in classes in Ruby do override the triple
	equal operator to add a more meaningful implementation for it.
	&lt;code&gt;Range&lt;/code&gt; matches the values that are within the range. &lt;code&gt;RegExp&lt;/code&gt; matches
	values that agree with the regular expression, &lt;code&gt;Class&lt;/code&gt; objects
	match values that are instances of that class, etc.
&lt;/p&gt;
&lt;p&gt;
	I use this feature all the time and it&amp;#39;s so convenient that I&amp;#39;d be thrilled to 
	see it in C# one day.	
&lt;/p&gt;

&lt;h3&gt;So, what is my suggestion?&lt;/h3&gt;

&lt;p&gt;
	I wouldn&amp;#39;t be a real programmer if I didn&amp;#39;t try to sell my own suggestion, would I? Since
	&lt;code&gt;IComparable&lt;/code&gt; is taken and means something different, I was thinking of maybe
	something like this.
&lt;/p&gt;

&lt;pre name="code" class="csharp"&gt;public interface ICanMatch&lt;/code&gt;
{
  bool Match(object value);
}

public interface ICanMatch&amp;lt;T&amp;gt;&lt;/code&gt;
{
  bool Match(T value);
}
// I know, I know. That interface name doesn&amp;#39;t have much of a chance
// of sticking. But, hey, that&amp;#39;s _my_ wish list ;).&lt;/pre&gt;

&lt;p&gt;
	The C# compiler would check if any of the &lt;code&gt;case&lt;/code&gt; labels uses an 
	&lt;code&gt;ICanMatch&lt;/code&gt; expression and invoke its &lt;code&gt;Match&lt;/code&gt; method
	passing the &lt;code&gt;switch&lt;/code&gt; value. If it returns &lt;code&gt;true&lt;/code&gt; we
	have a match and the &lt;code&gt;case&lt;/code&gt;&amp;#39;s code block is executed.
&lt;/p&gt;
&lt;p&gt;
  Another alternative would be to add a new method to the &lt;code&gt;System.Object&lt;/code&gt;
  that defaults to simply calling &lt;code&gt;Equals&lt;/code&gt;. The thought of adding a new
  method there is a little bit too frightening for me.
&lt;/p&gt;
&lt;p&gt;
	At any rate, I can only dream of the day I&amp;#39;d be able to write:
&lt;/p&gt;

&lt;pre name="code" class="csharp"&gt;public string GetMonth(dynamic value)
{
	switch(value)
	{
		case typeof(DateTime):
			return value.ToString(&amp;quot;MMM&amp;quot;);
		case new Regex(@&amp;quot;\d{4}-\d{2}-\d{2}&amp;quot;):
			return DateTime.Parse(value).ToString(&amp;quot;MMM&amp;quot;);
		case new MyRange(1, 12):
			return new DateTime(2000, value, 1).ToString(&amp;quot;MMM&amp;quot;);
	}
	return null;
}&lt;/pre&gt;

&lt;p&gt;
  This example is too simple and obviously contrived (a few method overloads or plain polymorphism  
 would have taken care of that,) but I still hope you can see the value of this suggestion.
&lt;/p&gt;
&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43512" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term=".NET" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/.NET/default.aspx" /><category term="Ruby" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Ruby/default.aspx" /><category term="Series" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Series/default.aspx" /><category term="Language Envy" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Language+Envy/default.aspx" /></entry><entry><title>Presentation Remote</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/20/presentation-remote.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/20/presentation-remote.aspx</id><published>2008-12-20T20:03:00Z</published><updated>2008-12-20T20:03:00Z</updated><content type="html">&lt;p&gt;
	In the last few months I have been using my MacBook to give presentation,
	both at work and not. I&amp;#39;ve been meaning to buy one of those  presenter
	remotes. I even got to borrow one and tried it once and I must say it
	worked pretty well. 
	&lt;a href="http://www.amazon.com/exec/obidos/ASIN/B000FPGP4U/sergiopereira-20"&gt;&lt;img border="0" src="http://devlicio.us/blogs/sergio_pereira/2008/12/presenter.jpg" align="right" alt="" /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
	Then I remembered that the MacBook came with that useless remote that I had 
	forgotten in a junk drawer somewhere. Well, that remote happens to work
	well with more than just Front Row. I heard it works with Keynote for 
	presentations. I don&amp;#39;t use that application and I&amp;#39;m not planning to buy it since
	Powerpoint 2007 works very well for me on my PC and I&amp;#39;m too cheap to
	buy Keynote.
	&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/appl-remote.png" align="left" alt="" /&gt;
&lt;/p&gt;

&lt;p&gt;
	I typically save my PowerPoint presentations to PDF and show them on
	the mac using Preview (a simple PDF viewer). The remote does not work
	with Preview out of the box but I found this little freeware called
	&lt;a href="http://www.filewell.com/iRedLite/"&gt;iRed Lite&lt;/a&gt; that can
	make the apple remote control just about any application, as long as
	the application is controllable with AppleScript, which most apps are.
&lt;/p&gt;

&lt;p&gt;
	The only problem was that iRed Lite came with support for Preview but
	it did not work well for the full screen mode, which I needed. Time
	to get my hands dirty with AppleScript.
&lt;/p&gt;

&lt;p&gt;
	The idea here was to bind the commands associated with the left and
	right arrows of the remote to the keys PageUp and PageDown, respectively.
&lt;/p&gt;

&lt;p&gt;
	The iRed Lite utility allows you to edit each command by assigning a 
	keystroke or an AppleScript snippet. Initially I tried the keystroke
	alternative but I could not figure out how to send a PageDown or PageUp
	to the application because on the keyboard they are Fn+UP and Fn+DOWN
	and Fn was not available in the utility. The AppleScript ended up being
	rather minimal, as seen in the screenshot.
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://devlicio.us/blogs/sergio_pereira/2008/12/iredlite1.png"&gt;&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/iredlite1-smal.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the &lt;i&gt;Next Page&lt;/i&gt; command I entered:&lt;/p&gt;
&lt;pre&gt;tell application &amp;quot;System Events&amp;quot; to key code 121&lt;/pre&gt;

&lt;p&gt;For the &lt;i&gt;Previous Page&lt;/i&gt; command I entered:&lt;/p&gt;
&lt;pre&gt;tell application &amp;quot;System Events&amp;quot; to key code 116&lt;/pre&gt;

&lt;p&gt;
	You can find all these key codes in the file &lt;i&gt;/System/Library/Frameworks/Carbon.framework/Frameworks/ HIToolbox.framework/Headers/Events.h&lt;/i&gt; provided you installed the developer tools from the OS X installation DVD, i.e. you 
	have Xcode installed.
&lt;/p&gt;

&lt;p&gt;
	Wow. All this trouble to save $50? I guess I just liked the fact
	that I found a use for that remote. Now I just need to hack a
	laser diode inside the remote to use as a pointer too.
&lt;/p&gt;
 &lt;img src="http://devlicious.com/aggbug.aspx?PostID=43464" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term="Tools" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Tools/default.aspx" /><category term="Tips &amp;amp; Tricks" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx" /></entry><entry><title>Thank you LCNUG</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/19/thank-you-lcnug.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/19/thank-you-lcnug.aspx</id><published>2008-12-19T14:18:00Z</published><updated>2008-12-19T14:18:00Z</updated><content type="html">&lt;p&gt;
	Thanks to the brave souls that ignored the incredibly exaggerated Winter storm
	warnings and insane weather forecast for last night. These folks came to the
	&lt;a href="http://lcnug.org"&gt;LCNUG&lt;/a&gt; meeting and were home before the first snow flake hit the ground.
Also, thanks LCNUG for inviting me to talk, I hope you enjoyed at least a little bit.
&lt;/p&gt;

&lt;p&gt;
	The material I had to show in &lt;a href="http://devlicio.us/blogs/sergio_pereira/archive/2008/12/09/talk-javascript-beyond-the-curly-braces.aspx"&gt;my presentation&lt;/a&gt;
	would no doubt
	fill an entire day (because it came from a full-day class I previously led)
	but we are not that crazy so we decided that:
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Doesn&amp;#39;t matter how much of the material we cover, what we cover we will cover well.&lt;/li&gt;
	&lt;li&gt;It would be best to talk about less things but get more value out of that than 
		talk about a whole lot of things and feel like you just wasted two hours of your life.&lt;/li&gt;
	&lt;li&gt;Go only as far as our stamina (and storm anxiety) allowed us to.&lt;/li&gt;
 &lt;li&gt;Ask, ask, ask. Don&amp;#39;t go back home with any lingering question.&lt;/li&gt;
	&lt;li&gt;Well, keep that under the 2-hour mark, will you?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
	I never thought we would have enough time to see the entire material or even see some
	jQuery stuff. But I&amp;#39;m confident that what we have seen there will allow anyone that
	is starting to take JavaScript seriously to jump on jQuery (or YUI or Prototype.js, etc)
	and be able to effectively read the docs, the samples, and even the source code.
&lt;/p&gt;
&lt;p&gt;
	I&amp;#39;m trying to get clearance with my company to share the presentation material. Either
	by a download link here or directly emailing the attendees. Sit tight.
&lt;/p&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43454" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term=".NET" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/.NET/default.aspx" /><category term="JavaScript" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/JavaScript/default.aspx" /><category term="Community" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Community/default.aspx" /></entry><entry><title>IE8 Readiness and IETester</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/15/ie8-readiness-and-ietester.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/15/ie8-readiness-and-ietester.aspx</id><published>2008-12-15T23:18:00Z</published><updated>2008-12-15T23:18:00Z</updated><content type="html">&lt;p&gt;
	Today I started researching and preparing my application for IE-8, or at 
	least knowing what we would need to take care of before its release sometime next year.
&lt;/p&gt;


&lt;p&gt;
	I started by downloading the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&amp;amp;DisplayLang=en"&gt;VPC image with IE8 beta 2&lt;/a&gt; because it seemed much more convenient
	than setting up a new virtual machine with XP or Vista from scratch. Well, life&amp;#39;s not easy, is it?
&lt;/p&gt;

&lt;h3&gt;VPC. Hyper-V. Fight!&lt;/h3&gt;

&lt;p&gt;
	I use Hyper-V instead of VPC, so I promptly imported the .VHD file into a new, empty virtual machine and
	booted it off. It worked! Not so quick... The VM was not recognizing the Hyper-V virtual hardware
	(Ethernet included) because I needed to install the Hyper-V enhancements (Integration Services Setup). Well, 
	that would require me to first uninstall the VPC&amp;#39;s Virtual Machine Additions that came with the VM. No problem, I&amp;#39;ve
	done that a few times before. &lt;i&gt;Nope&lt;/i&gt;. Cannot uninstall because the &amp;quot;Add or Remove Programs&amp;quot; applet
	had been intentionally disabled in this VM. I searched a little bit &lt;strike&gt;and could not find the password for the admin account&lt;/strike&gt;
        so I figured at this point it would be easier to just go ahead and create the whole thing from scratch after all.
&lt;/p&gt;

&lt;fieldset&gt;
&lt;legend&gt;&lt;b&gt;UPDATE:&lt;/b&gt;&lt;/legend&gt;
The passwords for the VPC image are in the accompanying Readme.txt file, which I had not thought of reading. Blame me.
&lt;br /&gt;
To enabe the &amp;quot;Add or Remove Programs&amp;quot; again, go to the registry at &lt;i&gt;HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall&lt;/i&gt;
find the value named &lt;b&gt;NoAddRemovePrograms&lt;/b&gt; and delete it or set it to zero.
&lt;/fieldset&gt;

&lt;h3&gt;IETester&lt;/h3&gt;

&lt;p&gt;
	That&amp;#39;s when I came across the &lt;a href="http://www.my-debugbar.com/wiki/IETester/HomePage"&gt;IETester&lt;/a&gt;
	utility. This little gem allows you to open, side-by-side, IE5.5, IE6, IE7, and IE8 Beta 2.
&lt;/p&gt;

&lt;p&gt;
	When I saw this I thought: &lt;i&gt;Nah. They&amp;#39;re probably just tweaking the DOCTYPEs and tricking IE8
	into rendering under some layout mode equivalent to the other versions.&lt;/i&gt; I installed it anyway
	and it turns out that IETester only needs IE7 to run.
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://devlicio.us/blogs/sergio_pereira/2008/12/ietester-1.png"&gt;&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/ietester-1-small.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
	Feeling a little puzzled I went snooping and in its installation directory I saw this.
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://devlicio.us/blogs/sergio_pereira/2008/12/ietester-2.png"&gt;&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/ietester-2-small.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
	Holy Moly. They are indeed running the actual rendering engines side-by-side. Note the
	familiar &lt;i&gt;shdocvw.dll&lt;/i&gt; and even the Internet Options applet (&lt;i&gt;inetcpl.cpl&lt;/i&gt;) from each
	browser version. &lt;i&gt;I did not know you could redistribute IE binaries like that. Can you?&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;
	Anyway, I&amp;#39;m keeping a copy of this installer just in case Microsoft decides to make one
	of those unhelpful moves and demands that it is taken down. It will certainly help me
	in the coming months.
&lt;/p&gt;

&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43421" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term="Tools" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Tools/default.aspx" /><category term="Development" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Development/default.aspx" /></entry><entry><title>Talk: JavaScript - Beyond the Curly Braces</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/09/talk-javascript-beyond-the-curly-braces.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/09/talk-javascript-beyond-the-curly-braces.aspx</id><published>2008-12-09T18:09:00Z</published><updated>2008-12-09T18:09:00Z</updated><content type="html">	&lt;p&gt;
		Next week I&amp;#39;ll be speaking at the &lt;a href="http://lcnug.org"&gt;Lake County .NET Users&amp;#39; Group&lt;/a&gt;,
		in Grayslake, IL. The topic will be something that is near and dear to me and which I have
		talked and written about quite a number of times.
	&lt;/p&gt;

	&lt;p&gt;
		If you live in the North &amp;#39;burbs, come and support our local group.
		You can register for this event &lt;a href="http://www.eventbrite.com/event/231452280"&gt;here&lt;/a&gt;.
	&lt;/p&gt;

    &lt;h3&gt;JavaScript - Beyond the Curly Braces&lt;/h3&gt;
    &lt;p&gt;
 One of the greatest problems with JavaScript is its superficial syntax
 resemblance of C-style languages. We call it &lt;i&gt;the curse of the curly
 braces&lt;/i&gt;.
 &lt;/p&gt;

 &lt;p&gt;
 That is also a very large source of frustration for developers trying
 to learn JavaScript beyond the basics. Thinking that JavaScript is
 somehow related to Java or even &lt;i&gt;&amp;quot;It&amp;#39;s almost like C# but a little
 simpler&amp;quot;&lt;/i&gt; is an unfortunate and common occurrence that can only
 lead to trouble.
 &lt;/p&gt;

 &lt;p&gt;
 In this session we will analyze some of the fundamental differences
 between JavaScript and C#/Java. We will highlight the pitfalls that
 can trap us and the appropriate workarounds for them.
 &lt;/p&gt;

 &lt;p&gt;
 Time permitting and if there&amp;#39;s interest we will take a look at
 &lt;i&gt;Idiomatic JavaScript&lt;/i&gt;, which will help us understand how
 JavaScript is being written these days. Learning about this will also
 help you when trying to read the source code or even the documentation
 and samples for popular JavaScript libraries like &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;, &lt;a href="http://prototypejs.org"&gt;Prototype&lt;/a&gt;, &lt;a href="http://developer.yahoo.com/yui/"&gt;YUI&lt;/a&gt;, etc.
 &lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.eventbrite.com/event/231452280"&gt;&lt;img src="http://www.eventbrite.com/static/images/button_ext/attend_this_event.gif" border="0" alt="" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43357" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term=".NET" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/.NET/default.aspx" /><category term="JavaScript" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/JavaScript/default.aspx" /><category term="Announcement" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Announcement/default.aspx" /><category term="Community" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Community/default.aspx" /></entry><entry><title>Trying out a Randori </title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/08/trying-out-a-randori.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/08/trying-out-a-randori.aspx</id><published>2008-12-09T03:50:00Z</published><updated>2008-12-09T03:50:00Z</updated><content type="html">&lt;p&gt;
	Tonight&amp;#39;s meeting of the &lt;a href="http://groups.softwarecraftsmanship.org/"&gt;Software 
	Craftsmanship Group&lt;/a&gt; was led by 
	&lt;a href="http://blog.objectmentor.com/articles/category/uncle-bobs-blatherings"&gt;Uncle Bob Martin&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt; 
	This time around we tried a &lt;a href="http://submissions.agile2008.org/node/1650"&gt;Randori-style coding dojo&lt;/a&gt;. The task was to build a clock and, although we fell short of the original goal
	of having a GUI, there was plenty to be learned in this process.
&lt;/p&gt;

&lt;p&gt;
	I felt it was an interesting way to learn about your own performance under a moderate
	amount of pressure. More importantly, at least for me, was getting exposure to 
	BDD and pairing with other developers that are a few step ahead of me on that particular
	road.
&lt;/p&gt;
&lt;p&gt;
    Once again, because I&amp;#39;m not a Ruby developer by day, I felt a little bit uneasy taking my turn and
    going up there to code a little bit. But I would not pass the experience, otherwise why even bother
    showing up for the event at all.
&lt;/p&gt;

&lt;p&gt;
	The whole thing was captured on tape. &lt;strike&gt;Hopefully the video will be made available and I&amp;#39;ll
	come back and link to it here.&lt;/strike&gt;
&lt;/p&gt;

&lt;fieldset&gt;
&lt;legend&gt;&lt;b&gt;UPDATE:&lt;/b&gt;&lt;/legend&gt; &lt;a href="http://blog.8thlight.com/doug"&gt;Doug&lt;/a&gt; has put some videos up.
&lt;/fieldset&gt;

&lt;p&gt;&lt;/p&gt;

&lt;object width="400" height="225"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2499161&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=2499161&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowscriptaccess="always" width="400" height="225"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://vimeo.com/2499161"&gt;Software Craftsmanship - Coding Dojo - Kata&lt;/a&gt;

&lt;p&gt;&lt;/p&gt;

&lt;object width="400" height="225"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2499540&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=2499540&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowscriptaccess="always" width="400" height="225"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://vimeo.com/2499540"&gt;Software Craftsmanship - Coding Dojo - Randori&lt;/a&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43344" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term="Ruby" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Ruby/default.aspx" /><category term="Development" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Development/default.aspx" /><category term="Community" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Community/default.aspx" /></entry><entry><title>Reusing Views in ASP.NET MVC for Ajax Updates</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/05/reusing-views-in-asp-net-mvc-for-ajax-updates.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/05/reusing-views-in-asp-net-mvc-for-ajax-updates.aspx</id><published>2008-12-06T02:25:00Z</published><updated>2008-12-06T02:25:00Z</updated><content type="html">&lt;p&gt;
	The other day I came across 
	&lt;a href="http://blog.maartenballiauw.be/post/2008/11/25/Partial-page-updates-with-ASPNET-MVC-and-jQuery-(and-action-filters).aspx"&gt;this
		 post in Marteen Balliauw&amp;#39;s blog&lt;/a&gt; where he demonstrates and 
		interesting way to make the same ASP.NET MVC view render correctly
		from both a regular request and an Ajax request.
&lt;/p&gt;

&lt;p&gt;
	In Marteen&amp;#39;s post he uses a custom &lt;code&gt;ActionFilterAttribute&lt;/code&gt; to 
	detect the Ajax call and replace the standard master page with an 
	unadorned &lt;i&gt;Empty&lt;/i&gt; master page.
&lt;/p&gt;

&lt;p&gt;
	I liked the idea that you can add that behavior to any action simply by
	bolting that attribute to it.
&lt;/p&gt;

&lt;p&gt;
	What I&amp;#39;m going to illustrate here is a variation of that idea that can be used
	when you have your own base class to all your controllers, which is something
	I always do. 
&lt;/p&gt;

&lt;fieldset&gt;&lt;legend&gt;&lt;b&gt;SIDE NOTE:&lt;/b&gt;&lt;/legend&gt;
	I have the habit of creating base classes for all the important things in my ASP.NET
	applications right after I create the project. I carried this habit from the
	ASP.NET Webforms-style to the MVC projects. So I typically have
	&lt;code&gt;ApplicationController&lt;/code&gt;, &lt;code&gt;ApplicationView&amp;lt;T&amp;gt;&lt;/code&gt;,
	&lt;code&gt;PartialView&amp;lt;T&amp;gt;&lt;/code&gt;, &lt;code&gt;ApplicationMaster&lt;/code&gt;, etc.
	These classes start off empty but code starts finding its way to them
	rather quickly.
&lt;/fieldset&gt;

&lt;p&gt;
	What I&amp;#39;m going to do is override the &lt;code&gt;Controller.View()&lt;/code&gt;
	method to detect the Ajax calls and replace the master page right there.
&lt;/p&gt;

&lt;pre name="code" class="csharp"&gt;public abstract class ApplicationController: Controller
{
  protected override ViewResult View(
            string viewName, string masterName, object model)
  {
    if(IsAjaxRequest)
      return base.View(viewName, &amp;quot;Empty&amp;quot;, model);

    return base.View(viewName, masterName, model);
  }

  protected virtual bool IsAjaxRequest
  {
    //Both Prototype.js and jQuery send 
    // the X-Requested-With header in Ajax calls
    get
    {
      var request = ControllerContext.HttpContext.Request;
      return (request.Headers[&amp;quot;X-Requested-With&amp;quot;] == &amp;quot;XMLHttpRequest&amp;quot;);
    }
  }
}&lt;/pre&gt;

&lt;p&gt;
	With that in place I don&amp;#39;t need to change anything in my action code to
	start supporting the Ajax calls (as long as the controller inherits from
	the above base class)
&lt;/p&gt;

&lt;pre name="code" class="csharp"&gt;public class SampleController : ApplicationController
{
  public ActionResult Index()
  {
    return View();
  }

  public ActionResult Details(int id)
  {
    var user = new UserInfo {Name = &amp;quot;user&amp;quot; + id, Age = 30};
    return View(user);
  }
}&lt;/pre&gt;

&lt;p&gt;
	My &lt;code&gt;Index&lt;/code&gt; action calls the &lt;code&gt;Details&lt;/code&gt; action
	using both a regular request and an Ajax call, for the sake of the example.
&lt;/p&gt;

&lt;pre name="code" class="html"&gt;&amp;lt;%@ Page Title=&amp;quot;&amp;quot; Language=&amp;quot;C#&amp;quot; 
  MasterPageFile=&amp;quot;~/Views/Shared/Site.Master&amp;quot; 
  AutoEventWireup=&amp;quot;true&amp;quot; 
  CodeBehind=&amp;quot;Index.aspx.cs&amp;quot; 
  Inherits=&amp;quot;MvcBeta1.Views.Sample.Index&amp;quot; %&amp;gt;
&amp;lt;asp:Content ID=&amp;quot;Content1&amp;quot; 
        ContentPlaceHolderID=&amp;quot;MainContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&amp;lt;h2&amp;gt;Sample View Index&amp;lt;/h2&amp;gt;
&amp;lt;%= Html.ActionLink(&amp;quot;Go to Details&amp;quot;, &amp;quot;Details&amp;quot;, new { id = 123 })%&amp;gt;
&amp;lt;hr /&amp;gt;
&amp;lt;input type=&amp;quot;button&amp;quot;  id=&amp;quot;loadDetails&amp;quot; value=&amp;quot;Load with Ajax&amp;quot; /&amp;gt;
&amp;lt;div id=&amp;quot;detailsDiv&amp;quot; style=&amp;quot;background-color:#aaa;&amp;quot;&amp;gt;
[details should load here]
&amp;lt;/div&amp;gt;

&amp;lt;script&amp;gt;
  $(function() {
    $(&amp;#39;#loadDetails&amp;#39;).click(function() {
      $(&amp;#39;#detailsDiv&amp;#39;).
        load(&amp;#39;&amp;lt;%= Url.Action(&amp;quot;Details&amp;quot;, new {id = 123}) %&amp;gt;&amp;#39;);
    });
  });
&amp;lt;/script&amp;gt;
&amp;lt;/asp:Content&amp;gt;&lt;/pre&gt;


&lt;p&gt;
	The Details view is trivial. It&amp;#39;s just a table.
&lt;/p&gt;

&lt;pre name="code" class="html"&gt;&amp;lt;%@ Page Title=&amp;quot;&amp;quot; Language=&amp;quot;C#&amp;quot; 
  MasterPageFile=&amp;quot;~/Views/Shared/Site.Master&amp;quot;
  AutoEventWireup=&amp;quot;true&amp;quot; 
  CodeBehind=&amp;quot;Details.aspx.cs&amp;quot; 
  Inherits=&amp;quot;MvcBeta1.Views.Sample.Details&amp;quot; %&amp;gt;
&amp;lt;asp:Content ID=&amp;quot;Content1&amp;quot; 
        ContentPlaceHolderID=&amp;quot;MainContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
  &amp;lt;h2&amp;gt;Details for &amp;lt;%= ViewData.Model.Name %&amp;gt;&amp;lt;/h2&amp;gt;
  &amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;
    &amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Col 1&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Col 2&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Col 3&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;
    &amp;lt;% for(int i=1; i&amp;lt;= 5; i++) { %&amp;gt;
      &amp;lt;tr&amp;gt;
        &amp;lt;td&amp;gt;cell (&amp;lt;%= i %&amp;gt;, 1)&amp;lt;/td&amp;gt;
        &amp;lt;td&amp;gt;cell (&amp;lt;%= i %&amp;gt;, 2)&amp;lt;/td&amp;gt;
        &amp;lt;td&amp;gt;cell (&amp;lt;%= i %&amp;gt;, 3)&amp;lt;/td&amp;gt;
      &amp;lt;/tr&amp;gt;
    &amp;lt;%} %&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/asp:Content&amp;gt;&lt;/pre&gt;
	
&lt;p&gt;
	When at the Index page we can click on the &amp;quot;Go to Details&amp;quot; link and see the 
	full rendering of the Details view.
&lt;/p&gt;


&lt;p&gt;
	&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/mvc-ajax1.png" border="0" alt="" /&gt;
&lt;/p&gt;

&lt;p&gt;
	&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/mvc-ajax2.png" border="0" alt="" /&gt;
&lt;/p&gt;

&lt;p&gt;
	If we had instead clicked the &amp;quot;Load with Ajax&amp;quot; button we would 
	cause a simpler version of that page to be inserted in the 
	&lt;i&gt;detailsDiv&lt;/i&gt; element (note that the tabs and the blue 
        background that surrounds the table did not come in the
        rendered content.)
&lt;/p&gt;

&lt;p&gt;
	&lt;img src="http://devlicio.us/blogs/sergio_pereira/2008/12/mvc-ajax3.png" border="0" alt="" /&gt;
&lt;/p&gt;

&lt;p&gt;
	Of course, ASPX files are not the indicated place for placing content that can be used in
	partial updates, ASCX files would be a better choice for that. That said, sometimes it
	can be really convenient to have this ability.
&lt;/p&gt;

&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43326" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term=".NET" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/.NET/default.aspx" /><category term="Tips &amp;amp; Tricks" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx" /></entry><entry><title>Chicago ALT.NET Lightning Talks</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/12/01/chicago-alt-net-lightning-talks.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/12/01/chicago-alt-net-lightning-talks.aspx</id><published>2008-12-01T18:42:00Z</published><updated>2008-12-01T18:42:00Z</updated><content type="html">&lt;p&gt;
	For &lt;a href="http://chicagoalt.net/event/December2008Meeting-LightningTalks"&gt;this month&amp;#39;s of meeting&lt;/a&gt; we will be doing something we had been thinking about for a while.
        With so many members that always bring interesting contributions to our meetings, we will
        just have an &lt;i&gt;open projector&lt;/i&gt; night. I&amp;#39;m looking forward to this one.
&lt;/p&gt;

&lt;h3&gt;Lightning Talks&lt;/h3&gt;
&lt;p&gt;
&lt;span style="font-size:x-small;"&gt;6:00 pm&lt;/span&gt; 
&lt;br /&gt;

	Pizza and networking time

&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-size:x-small;"&gt;6:30 pm&lt;/span&gt; 
&lt;br /&gt;

	We do not have a set topic for this month. Instead we chose
	to have &lt;a href="http://en.wikipedia.org/wiki/Lightning_Talk"&gt;lightning talks&lt;/a&gt; where
	anyone can sign up on the spot for a 10 to 20-minute demonstration or presentation
	about anything he/she considers interesting.

&lt;/p&gt;
&lt;p&gt;
	This can also be a nice opportunity if you have never talked to a group and
	would like to try a short version first.
&lt;/p&gt;
&lt;p&gt;
	There&amp;#39;s no agenda set for the talks to be given but here are a few that
	were already proposed by someone.
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;LINQ to SQL&lt;/li&gt;
	&lt;li&gt;AOP in MVC&lt;/li&gt;
	&lt;li&gt;XmlBuilder&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	If you want to talk, just show up. If you want to include your talk in this page, 
	&lt;a href="mailto:contact@chicagoalt.net"&gt;let us know&lt;/a&gt;.
&lt;/p&gt;


&lt;p&gt;
&lt;span style="font-size:x-small;"&gt;7:45 pm&lt;/span&gt; 
&lt;br /&gt;
	You may want to stick around after the presentation portion of the meeting
	and take part in our monthly open discussion. The topic is never arranged in
	advance but it&amp;#39;s common that it reflects the content of the presentation.
&lt;/p&gt;

	
&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43265" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term="alt.net" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/alt.net/default.aspx" /><category term="Announcement" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Announcement/default.aspx" /><category term="Community" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Community/default.aspx" /></entry><entry><title>Please open my .aspx fast</title><link rel="alternate" type="text/html" href="http://devlicious.com/blogs/sergio_pereira/archive/2008/11/22/please-open-my-aspx-fast.aspx" /><id>http://devlicious.com/blogs/sergio_pereira/archive/2008/11/22/please-open-my-aspx-fast.aspx</id><published>2008-11-22T23:33:00Z</published><updated>2008-11-22T23:33:00Z</updated><content type="html">&lt;p&gt;
	Still in the topic of performance, I&amp;#39;ll throw a little freebie. Visual Studio
	seems to take an inordinate amount of time to open .aspx files for the first
	time. I noticed that the status bar read &amp;quot;Initializing toolbox...&amp;quot; for a
	long time. I&amp;#39;m mentioning .aspx but it really applies to any other webforms markup
       like .ascx and .master as well.
&lt;/p&gt;
&lt;p&gt;
    Heck, I don&amp;#39;t even have the toolbox loaded, docked, or hidden in
	my IDE. I don&amp;#39;t use the toolbox at all for web develoment. I&amp;#39;m more of
	a source view kind of programmer. So why should I be penalized like that?
&lt;/p&gt;
&lt;p&gt;
	I shouldn&amp;#39;t. Here&amp;#39;s what I did to speed that up:
&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Show the toolbox&lt;/li&gt;
	&lt;li&gt;Right-click and select &amp;quot;Choose Items...&amp;quot;&lt;/li&gt;
	&lt;li&gt;Uncheck every item that the namespace contains &amp;quot;Web&amp;quot; (I also 
		unchecked controls that I can&amp;#39;t stand, like the database connections
		and data sources.)&lt;/li&gt;
	&lt;li&gt;Click OK to save that, close the toolbox again and enjoy your
		precious stolen time again.&lt;/li&gt;
&lt;/ul&gt;



&lt;img src="http://devlicious.com/aggbug.aspx?PostID=43195" width="1" height="1"&gt;</content><author><name>sergiopereira</name><uri>http://devlicious.com/members/sergiopereira.aspx</uri></author><category term=".NET" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/.NET/default.aspx" /><category term="Development" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Development/default.aspx" /><category term="Tips &amp;amp; Tricks" scheme="http://devlicious.com/blogs/sergio_pereira/archive/tags/Tips+_2600_amp_3B00_+Tricks/default.aspx" /></entry></feed>