<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Liquid Language</title>
	<atom:link href="http://blog.johnpencola.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.johnpencola.com</link>
	<description>Where streams of thought converge into pools of knowledge.</description>
	<lastBuildDate>Wed, 13 Apr 2011 04:22:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>Comment on The Truth About Falsy by John Pencola</title>
		<link>http://blog.johnpencola.com/2011/03/13/the-truth-about-falsy/#comment-390</link>
		<dc:creator>John Pencola</dc:creator>
		<pubDate>Wed, 13 Apr 2011 04:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=317#comment-390</guid>
		<description>if(!String.IsNullOrEmpty(x))

Ah, OK. Good to know! I like that it&#039;s explicit.

&lt;em&gt;&quot;The interesting thing about your post is not the simple bugs that people stumble on but the greater issue of whether a language should differentiate between null and zero/empty&quot;&lt;/em&gt;

Exactly my point. In JavaScript the evaluation of a null, undefined,  zero and empty string as a &quot;falsy&quot; value does just that; it classifies those values/types in one fell swoop as false. What I wanted to illustrate is that a (common) naive approach to determining default values where &quot;0&quot; and &quot;&quot; are acceptable would trigger a false positive due to this language feature.

&lt;em&gt;&quot;Loose languages have strict equality (===) when needed...&quot;&lt;/em&gt;

This is a good highlight of the dynamic nature of weak types in JavaScript. You can perform strict comparisons on types and values without coercion, which is usually recommended, but you can drop back to equality (==) if you need it.</description>
		<content:encoded><![CDATA[<p>if(!String.IsNullOrEmpty(x))</p>
<p>Ah, OK. Good to know! I like that it&#8217;s explicit.</p>
<p><em>&#8220;The interesting thing about your post is not the simple bugs that people stumble on but the greater issue of whether a language should differentiate between null and zero/empty&#8221;</em></p>
<p>Exactly my point. In JavaScript the evaluation of a null, undefined,  zero and empty string as a &#8220;falsy&#8221; value does just that; it classifies those values/types in one fell swoop as false. What I wanted to illustrate is that a (common) naive approach to determining default values where &#8220;0&#8243; and &#8220;&#8221; are acceptable would trigger a false positive due to this language feature.</p>
<p><em>&#8220;Loose languages have strict equality (===) when needed&#8230;&#8221;</em></p>
<p>This is a good highlight of the dynamic nature of weak types in JavaScript. You can perform strict comparisons on types and values without coercion, which is usually recommended, but you can drop back to equality (==) if you need it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Truth About Falsy by Steve</title>
		<link>http://blog.johnpencola.com/2011/03/13/the-truth-about-falsy/#comment-383</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 30 Mar 2011 13:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=317#comment-383</guid>
		<description>No they would both throw exceptions that you can&#039;t convert string/int to boolean.  Zero and empty string don&#039;t convert to false without some help. You can say 

if(x != &quot;&quot;)

but since null doesn&#039;t equal an empty string, the safest method is

if(!String.IsNullOrEmpty(x))

This is the possibly most extreme case of strictness in a compiled language forcing you to explain your intent and making no assumptions.  The interesting thing about your post is not the simple bugs that people stumble on but the greater issue of whether a language should differentiate between null and zero/empty.  There are instances where zero is an answer, and null could imply that you elect not to answer the question. (ex: How many children to you have? 0, 1, 2, 3, more, I choose not to answer) Loose languages have strict equality (===)  when needed, and I do find the excessive casting required for basic variables in C# to be a pain sometimes and it makes code more verbose. But it&#039;s a small trade off.</description>
		<content:encoded><![CDATA[<p>No they would both throw exceptions that you can&#8217;t convert string/int to boolean.  Zero and empty string don&#8217;t convert to false without some help. You can say </p>
<p>if(x != &#8220;&#8221;)</p>
<p>but since null doesn&#8217;t equal an empty string, the safest method is</p>
<p>if(!String.IsNullOrEmpty(x))</p>
<p>This is the possibly most extreme case of strictness in a compiled language forcing you to explain your intent and making no assumptions.  The interesting thing about your post is not the simple bugs that people stumble on but the greater issue of whether a language should differentiate between null and zero/empty.  There are instances where zero is an answer, and null could imply that you elect not to answer the question. (ex: How many children to you have? 0, 1, 2, 3, more, I choose not to answer) Loose languages have strict equality (===)  when needed, and I do find the excessive casting required for basic variables in C# to be a pain sometimes and it makes code more verbose. But it&#8217;s a small trade off.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just Launched www.AlexDuvan.com! by John Pencola</title>
		<link>http://blog.johnpencola.com/2010/08/11/just-launched-www-alexduvan-com/#comment-382</link>
		<dc:creator>John Pencola</dc:creator>
		<pubDate>Wed, 30 Mar 2011 03:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=201#comment-382</guid>
		<description>@Vicki &amp; Alex:
I&#039;m so happy you both are pleased. Thank you for the opportunity, the pleasure was all mine!

-JP</description>
		<content:encoded><![CDATA[<p>@Vicki &#038; Alex:<br />
I&#8217;m so happy you both are pleased. Thank you for the opportunity, the pleasure was all mine!</p>
<p>-JP</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Be an Ethical Interviewer: Stop Frontin&#8217; by John Pencola</title>
		<link>http://blog.johnpencola.com/2011/03/27/be-an-ethical-interviewer-stop-frontin/#comment-381</link>
		<dc:creator>John Pencola</dc:creator>
		<pubDate>Mon, 28 Mar 2011 18:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=389#comment-381</guid>
		<description>@Steve:
&quot;...not to lead the interviewee on if you know it&#039;s not going to work out&quot;
Yes! I forgot about that one, great point! Also, that SNL skit is classic :) thanks for adding that. 

&quot;The Kool-Aid man is sort of expected... everyone wants to put their best foot forward.&quot;
Being an evangelist for your company is expected, but what I was pointing out is more than that. It&#039;s putting up a facade and ultimately lying about the points mentioned above.

-JP</description>
		<content:encoded><![CDATA[<p>@Steve:<br />
&#8220;&#8230;not to lead the interviewee on if you know it&#8217;s not going to work out&#8221;<br />
Yes! I forgot about that one, great point! Also, that SNL skit is classic <img src='http://blog.johnpencola.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  thanks for adding that. </p>
<p>&#8220;The Kool-Aid man is sort of expected&#8230; everyone wants to put their best foot forward.&#8221;<br />
Being an evangelist for your company is expected, but what I was pointing out is more than that. It&#8217;s putting up a facade and ultimately lying about the points mentioned above.</p>
<p>-JP</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HTML5 Bouncy-Bass Text Toy by John Pencola</title>
		<link>http://blog.johnpencola.com/2011/03/20/html5-bouncy-bass-text-toy/#comment-380</link>
		<dc:creator>John Pencola</dc:creator>
		<pubDate>Mon, 28 Mar 2011 17:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=351#comment-380</guid>
		<description>@Steve: 
Thanks man! It was a fun little prototype and I&#039;ll likely create a canvas version next. All the modern browsers as of this post shipped with support for audio, even IE9. To be clear, the browser specific part is simply the API into the full Audio capabilities of the browser, which Mozilla happens to have taken the lead on. The beauty of this, as we saw with video support (as you mentioned with codecs), was that it helped rapidly evolve, through competition and Open-Web minded efforts, to push it into the direction it needs to be (all indications point to the WebM format for video). So, the same positive thing will likely happen with the audio API. 

&quot;This will do for the web what spinners did for automobiles.&quot;
Do you mean the full audio support in the browser? I see lots of interesting potential and capabilities that could open up. Of course with great power comes great responsibility. In fact, last week the W3C addressed this very topic by creating the &lt;a href=&quot;http://www.w3.org/2011/audio/&quot; rel=&quot;nofollow&quot;&gt;W3C Audio Working Group&lt;/a&gt;. 

-JP</description>
		<content:encoded><![CDATA[<p>@Steve:<br />
Thanks man! It was a fun little prototype and I&#8217;ll likely create a canvas version next. All the modern browsers as of this post shipped with support for audio, even IE9. To be clear, the browser specific part is simply the API into the full Audio capabilities of the browser, which Mozilla happens to have taken the lead on. The beauty of this, as we saw with video support (as you mentioned with codecs), was that it helped rapidly evolve, through competition and Open-Web minded efforts, to push it into the direction it needs to be (all indications point to the WebM format for video). So, the same positive thing will likely happen with the audio API. </p>
<p>&#8220;This will do for the web what spinners did for automobiles.&#8221;<br />
Do you mean the full audio support in the browser? I see lots of interesting potential and capabilities that could open up. Of course with great power comes great responsibility. In fact, last week the W3C addressed this very topic by creating the <a href="http://www.w3.org/2011/audio/" rel="nofollow">W3C Audio Working Group</a>. </p>
<p>-JP</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Be an Ethical Interviewer: Stop Frontin&#8217; by steve</title>
		<link>http://blog.johnpencola.com/2011/03/27/be-an-ethical-interviewer-stop-frontin/#comment-379</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Mon, 28 Mar 2011 13:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=389#comment-379</guid>
		<description>Excellent points. The interviewing process is very tricky on both ends. I think testing problem through pseudo-code over syntax compiling is spot on. The people questions are probably more important (just no crap like what kind of an animal would you be).  Although standard questions like &quot;what was a difficult challenge you&#039;ve overcome&quot; are the easiest to bull$#@!, highly specific technical questions aren&#039;t really fair either, because there&#039;s always several ways to solve a problem and a skilled applicant might not be familiar with your methods.  The Kool-Aid man is sort of expected, since the interview works both ways and everyone wants to put their best foot forward.

One other point I would add is not to lead the interviewee on if you know it&#039;s not going to work out. You shouldn&#039;t scrutinize or embarrass them, like in this famous &lt;a href=&quot;http://www.youtube.com/watch?v=Ai9IEkYrZQk&amp;t=3m30s&quot; rel=&quot;nofollow&quot;&gt;SNL skit&lt;/a&gt;, but a graceful, half-hearted &quot;we&#039;ll let you know&quot; should get the point across.</description>
		<content:encoded><![CDATA[<p>Excellent points. The interviewing process is very tricky on both ends. I think testing problem through pseudo-code over syntax compiling is spot on. The people questions are probably more important (just no crap like what kind of an animal would you be).  Although standard questions like &#8220;what was a difficult challenge you&#8217;ve overcome&#8221; are the easiest to bull$#@!, highly specific technical questions aren&#8217;t really fair either, because there&#8217;s always several ways to solve a problem and a skilled applicant might not be familiar with your methods.  The Kool-Aid man is sort of expected, since the interview works both ways and everyone wants to put their best foot forward.</p>
<p>One other point I would add is not to lead the interviewee on if you know it&#8217;s not going to work out. You shouldn&#8217;t scrutinize or embarrass them, like in this famous <a href="http://www.youtube.com/watch?v=Ai9IEkYrZQk&amp;t=3m30s" rel="nofollow">SNL skit</a>, but a graceful, half-hearted &#8220;we&#8217;ll let you know&#8221; should get the point across.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HTML5 Bouncy-Bass Text Toy by steve</title>
		<link>http://blog.johnpencola.com/2011/03/20/html5-bouncy-bass-text-toy/#comment-378</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Mon, 28 Mar 2011 12:41:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=351#comment-378</guid>
		<description>Nice. This will do for the web what spinners did for automobiles.  I&#039;m at once impressed with the capabilities of the new technology, and somewhat disseminated that it&#039;s browser specific.  Not even before Html5 and CSS 3 can be completely adopted as the standard of the web, it looks like a fresh wave of browser wars is about to begin and the first battlefield is going to be audio and video embedding (mostly video due to the encoding legalities). Very cool project though.</description>
		<content:encoded><![CDATA[<p>Nice. This will do for the web what spinners did for automobiles.  I&#8217;m at once impressed with the capabilities of the new technology, and somewhat disseminated that it&#8217;s browser specific.  Not even before Html5 and CSS 3 can be completely adopted as the standard of the web, it looks like a fresh wave of browser wars is about to begin and the first battlefield is going to be audio and video embedding (mostly video due to the encoding legalities). Very cool project though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Truth About Falsy by John Pencola</title>
		<link>http://blog.johnpencola.com/2011/03/13/the-truth-about-falsy/#comment-374</link>
		<dc:creator>John Pencola</dc:creator>
		<pubDate>Wed, 16 Mar 2011 03:48:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=317#comment-374</guid>
		<description>@Steve:
Thanks a lot man! In this post though I really wanted to highlight how JavaScript&#039;s interpreter, when evaluating what is truthy or falsy value, can be misleading; especially as you noted, when comparing to classic strict languages. I&#039;m unfamiliar with C#, so bear with me, but how would it&#039;s runtime evaluate these 2 code samples:

string x = &quot;&quot;;
if (x) {
    // do something...
}
----
int y = 0;
if (y){
    // do something...
}

Would those &quot;if&quot; conditions pass?
-JP</description>
		<content:encoded><![CDATA[<p>@Steve:<br />
Thanks a lot man! In this post though I really wanted to highlight how JavaScript&#8217;s interpreter, when evaluating what is truthy or falsy value, can be misleading; especially as you noted, when comparing to classic strict languages. I&#8217;m unfamiliar with C#, so bear with me, but how would it&#8217;s runtime evaluate these 2 code samples:</p>
<p>string x = &#8220;&#8221;;<br />
if (x) {<br />
    // do something&#8230;<br />
}<br />
&#8212;-<br />
int y = 0;<br />
if (y){<br />
    // do something&#8230;<br />
}</p>
<p>Would those &#8220;if&#8221; conditions pass?<br />
-JP</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Truth About Falsy by steve</title>
		<link>http://blog.johnpencola.com/2011/03/13/the-truth-about-falsy/#comment-373</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Tue, 15 Mar 2011 21:53:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=317#comment-373</guid>
		<description>Great post. Definitely lots of pitfalls in every language tied to the nothingness of null. This is compounded by the fact that arrays are zero indexed. Many languages have str.IndexOf return -1 if the string doesn&#039;t appear to work around this issue, but php returns false if no match exists, so the strict equality check is a must. 

C#, possibly the strictest OOP language, disallows any implicit casting between basic value types. So you have to check if num==0 or str==&quot;&quot;. Furthermore, string variables with a null value can throw exceptions if you attempt to perform any string function, such as checking .length. So they added the static String.IsNullOrEmpty(str) function as a safety net. Keep up the good work.</description>
		<content:encoded><![CDATA[<p>Great post. Definitely lots of pitfalls in every language tied to the nothingness of null. This is compounded by the fact that arrays are zero indexed. Many languages have str.IndexOf return -1 if the string doesn&#8217;t appear to work around this issue, but php returns false if no match exists, so the strict equality check is a must. </p>
<p>C#, possibly the strictest OOP language, disallows any implicit casting between basic value types. So you have to check if num==0 or str==&#8221;". Furthermore, string variables with a null value can throw exceptions if you attempt to perform any string function, such as checking .length. So they added the static String.IsNullOrEmpty(str) function as a safety net. Keep up the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Rethinking HTML Drop-Down Menus by John Pencola</title>
		<link>http://blog.johnpencola.com/2011/03/05/rethinking-html-drop-down-menus/#comment-372</link>
		<dc:creator>John Pencola</dc:creator>
		<pubDate>Wed, 09 Mar 2011 05:06:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johnpencola.com/?p=276#comment-372</guid>
		<description>@Steve:
Oh yea! I recall the &quot;suckerfish&quot; menu and it&#039;s variants... As I said, it&#039;s not a new concept, for me it was more about re-discovery. Also, my approach differs slightly from &quot;suckerfish&quot; using overflow:hidden to hide things. Depending on what you are trying to accomplish, combining that property with defining the size of your containing element I think this gives you a little more flexibility for creating certain effects. As that ALA article points out IE-6 :hover selector support isn&#039;t complete, but beyond that I don&#039;t foresee any challenges with cross-browser support using this technique. It&#039;s also worth noting that with the adoption of CSS3 Transitions we can now accomplish all the effects you mentioned, plus more without the need for JavaScript!</description>
		<content:encoded><![CDATA[<p>@Steve:<br />
Oh yea! I recall the &#8220;suckerfish&#8221; menu and it&#8217;s variants&#8230; As I said, it&#8217;s not a new concept, for me it was more about re-discovery. Also, my approach differs slightly from &#8220;suckerfish&#8221; using overflow:hidden to hide things. Depending on what you are trying to accomplish, combining that property with defining the size of your containing element I think this gives you a little more flexibility for creating certain effects. As that ALA article points out IE-6 :hover selector support isn&#8217;t complete, but beyond that I don&#8217;t foresee any challenges with cross-browser support using this technique. It&#8217;s also worth noting that with the adoption of CSS3 Transitions we can now accomplish all the effects you mentioned, plus more without the need for JavaScript!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

