<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>programming channel</title>
    <link>http://tobyho.com/tag/programming</link>
    <description>programming channel</description>
    <language>en-us</language>
    <item>
      <title>Ruby Gotcha of the Day</title>
      <description>Okay, so in ruby:&lt;br&gt;&lt;font face="courier new,courier"&gt;&amp;gt;&amp;gt; nil or 'value'&lt;br&gt;=&amp;gt; "value"&lt;/font&gt;&lt;br&gt;because nil acts as false when used with boolean operators and any other object acts as true. Now let's assign the result to a temp variable a:&lt;br&gt;&lt;font face="courier new,courier"&gt;&amp;gt;&amp;gt; a = nil or 'value'&lt;br&gt;=&amp;gt; "value"&lt;br&gt;&amp;gt;&amp;gt; a&lt;br&gt;=&amp;gt; nil&lt;/font&gt;&lt;br&gt;Whoa?? Can you guess? In ruby the assignment operator is not special. It acts just like any other operator and does not have a lower precedence than the &lt;i&gt;or&lt;/i&gt; operator. Therefore the expression&lt;br&gt;&lt;font face="courier new,courier"&gt;a = nil&lt;/font&gt;&lt;br&gt;executes first, which evaluates to &lt;i&gt;nil&lt;/i&gt;, and assigns the value &lt;i&gt;nil&lt;/i&gt; to &lt;i&gt;a&lt;/i&gt;, and then the result &lt;i&gt;nil&lt;/i&gt; is used in the expression &lt;i&gt;nil or 'value'&lt;/i&gt;. Therefore to do what we intended we need to do:&lt;br&gt;&lt;font face="courier new,courier"&gt;&amp;gt;&amp;gt; a = (nil or 'value')&lt;br&gt;=&amp;gt; "value"&lt;/font&gt;&lt;br&gt;Wow! That is messed up. &lt;br&gt;</description>
      <pubDate>Fri, 26 Dec 2008 19:03:23 -0500</pubDate>
      <guid>http://tobyho.com/Ruby_Gotcha_of_the_Day</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/Ruby_Gotcha_of_the_Day</link>
    </item>
    <item>
      <title>Multiline Strings in Javascript</title>
      <description>I was looking through the code in facebox.js(a jQuery plugin) and I saw this:&lt;br&gt;&lt;font face="courier new,courier" size="2"&gt;'\&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="facebox" style="display:none;"&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class="popup"&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tbody&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td class="tl"/&amp;gt;&amp;lt;td class="b"/&amp;gt;&amp;lt;td class="tr"/&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td class="b"/&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td class="body"&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class="content"&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class="footer"&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href="#" class="close"&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;img src="/facebox/closelabel.gif" title="close" class="close_image" /&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/a&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td class="b"/&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td class="bl"/&amp;gt;&amp;lt;td class="b"/&amp;gt;&amp;lt;td class="br"/&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tbody&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;'&lt;/font&gt;&lt;br&gt;&lt;br&gt;Wow, I am ashamed I didn't know you could do multi-line strings like this earlier!! Although not as nice as multi-line strings in Ruby/Python/Perl, this definitely beats quotes and plus signs.&lt;br&gt;</description>
      <pubDate>Sun, 21 Dec 2008 20:32:21 -0500</pubDate>
      <guid>http://tobyho.com/Multiline_Strings_in_Javascript</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/Multiline_Strings_in_Javascript</link>
    </item>
    <item>
      <title>Compiler should have did-you-mean feature</title>
      <description>Idea: When you misspell things in your program, the compiler messages should say something like:&lt;br&gt;&lt;font face="courier new,courier"&gt;&amp;nbsp;Error: Call to a possibly undefined method listChange, did you mean listChanged?&lt;/font&gt;&lt;br&gt;</description>
      <pubDate>Thu, 18 Dec 2008 14:07:18 -0500</pubDate>
      <guid>http://tobyho.com/Compiler_should_have_did-you-mean_feature</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/Compiler_should_have_did-you-mean_feature</link>
    </item>
    <item>
      <title>Developing in AIR just got a little suckier</title>
      <description>I wanted to try putting a javascript console inside an AIR app to aid development. I tried firebug lite, which I've been using a lot to debug IE. When I started up the app and hit F12, the console came up and everything, '1+2' gave 3, so time to rejoice? Not so fast, if you try to type 'window', or 'document', you get this error:&lt;br&gt;&lt;font face="courier new,courier"&gt;Error: Adobe AIR runtime security violation for JavaScript code in the application security sandbox (eval)&lt;/font&gt;&lt;br&gt;&lt;br&gt;So they sandboxed eval and restricted access the dom and any other api that's available. And it's for... security reasons. What does Adobe have against eval? This sucks!&lt;br&gt;</description>
      <pubDate>Thu, 18 Dec 2008 01:39:29 -0500</pubDate>
      <guid>http://tobyho.com/Developing_in_AIR_just_got_a_little_suckier</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/Developing_in_AIR_just_got_a_little_suckier</link>
    </item>
    <item>
      <title>IE Woes: One</title>
      <description>Man! Have I been at war with IE lately. I have been holding back a lot of blog posts related to debug IE problems, and I going to start spewing them out now one by one. For the first installment I'll talk about one I encountered these couple of days...&lt;br&gt;&lt;br&gt;Ever get this IE error?&lt;img src="/uploads/ie_error.png?1228873829" mce_src="/uploads/ie_error.png?1228873829" name="ie_error.png" width="593"&gt;&lt;br&gt;When you click "Ok", this is what you see:&lt;br&gt;&lt;img src="/uploads/ie_error2.png?1228873932" mce_src="/uploads/ie_error2.png?1228873932" name="ie_error2.png" width="522"&gt;&lt;br&gt;Ouch! Can this &lt;i&gt;be&lt;/i&gt; any more catastrophic?(Yeah, that's my Chandler impression.)&lt;br&gt;&lt;br&gt;According to &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2247375&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2247375&amp;amp;SiteID=1"&gt;this forum post&lt;/a&gt;, this happens if you have script tags in your document that's modifying other parts of the dom before the document finishes loading. Umm, okay, but I still had a hard time finding out the exact point this caused the problem. I used the comment-out-code-and-see-if-it-still-breaks-binary-search methodology, and came up with some work arounds which involved delaying the execution of some setup code. But, this catastrophic error came back to haunt be time and time again. Clearly I didn't find the root cause of this error or I wouldn't be committing it repeatedly. &lt;br&gt;&lt;br&gt;But finally, I found it(I think, well at least one of the root causes). I am using &lt;a href="http://getfirebug.com/lite.html" mce_href="http://getfirebug.com/lite.html"&gt;firebug lite&lt;/a&gt; in development, which creates iframes and panels in the pages that pops out and in just like firebug. When you call console.log with firebug lite, guess what happens? Yeah, it modifies the console output window - a part of the dom that is outside of where the script tag is. Got rid of those console.log statements and fixed it.&lt;br&gt;&lt;br&gt;In conclusion, &lt;i&gt;do not&lt;/i&gt; do what I did!&lt;br&gt;</description>
      <pubDate>Tue, 09 Dec 2008 21:09:28 -0500</pubDate>
      <guid>http://tobyho.com/IE_Woes%3A_One</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/IE_Woes%3A_One</link>
    </item>
    <item>
      <title>IE getElementById looks up "name"</title>
      <description>IE, &lt;a href="http://www.456bereastreet.com/archive/200802/beware_of_id_and_name_attribute_mixups_when_using_getelementbyid_in_internet_explorer/"&gt;are you kidding me&lt;/a&gt;?&lt;br&gt;</description>
      <pubDate>Tue, 09 Dec 2008 16:29:00 -0500</pubDate>
      <guid>http://tobyho.com/IE_getElementById_looks_up_%22name%22</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/IE_getElementById_looks_up_%22name%22</link>
    </item>
    <item>
      <title>dissecting the prototype chaining</title>
      <description>I realized when I was trying to explain the prototype chain to my wife the other day that I didn't get it completely. So I went back to the drawing board and this is the example that I came up with:&lt;br&gt;&lt;br&gt;&lt;font face="courier new,courier"&gt;function inherit(parent){&lt;br style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var obj = function(){};&lt;br style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj.prototype = parent;&lt;br style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new obj();&lt;br style=""&gt;}&lt;br style=""&gt;&lt;br style=""&gt;toby = {};&lt;br style=""&gt;toby.name = 'Toby';&lt;br style=""&gt;toby.age = 27;&lt;br style=""&gt;toby.eyeColor = 'brown';&lt;br style=""&gt;toby.hairColor = 'dark';&lt;br style=""&gt;&lt;br style=""&gt;console.log(toby);&lt;br style=""&gt;// Object name=Toby age=27 eyeColor=brown hairColor=dark&lt;br style=""&gt;&lt;/font&gt;&lt;div class="logRow logRow-log"&gt;&lt;font face="courier new,courier"&gt;&lt;a class="" style=""&gt;&lt;br style=""&gt;&lt;/a&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face="courier new,courier"&gt;emma = inherit(toby);&lt;br style=""&gt;emma.name = 'Emma';&lt;br style=""&gt;emma.age = 1&lt;br style=""&gt;&lt;br style=""&gt;console.log(emma);&lt;br style=""&gt;// Object name=Emma age=1 eyeColor=brown hairColor=dark&lt;br style=""&gt;&lt;br style=""&gt;console.log("Toby is Emma's parent: " + (emma.__proto__ == toby));&lt;br style=""&gt;// true&lt;/font&gt;&lt;br&gt;</description>
      <pubDate>Mon, 08 Dec 2008 14:36:17 -0500</pubDate>
      <guid>http://tobyho.com/dissecting_the_prototype_chaining</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/dissecting_the_prototype_chaining</link>
    </item>
    <item>
      <title>Y Combinator</title>
      <description>This is a &lt;a href="http://matt.might.net/articles/implementation-of-recursive-fixed-point-y-combinator-in-javascript-for-memoization/"&gt;great article&lt;/a&gt; on the Y-Combinator. It talks in laymans terms. I understand now what it does and why it is useful. However, I still have no clue how the code for the Y-Combinator works.&lt;br&gt;</description>
      <pubDate>Thu, 27 Nov 2008 10:29:36 -0500</pubDate>
      <guid>http://tobyho.com/Y_Combinator</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/Y_Combinator</link>
    </item>
    <item>
      <title>Great Break Down Of th e Coolist Languages</title>
      <description>This is a &lt;a href="http://matt.might.net/articles/best-programming-languages/"&gt;great great read&lt;/a&gt;.&lt;br&gt;</description>
      <pubDate>Wed, 26 Nov 2008 23:47:33 -0500</pubDate>
      <guid>http://tobyho.com/Great_Break_Down_Of_th_e_Coolist_Languages</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/Great_Break_Down_Of_th_e_Coolist_Languages</link>
    </item>
    <item>
      <title>Making Flex Suck Less</title>
      <description>This is a follow up to &lt;a href="/FLEX:_first_impressions" mce_href="/FLEX:_first_impressions"&gt;my last Flex post&lt;/a&gt;. As I am learning more about Flex I have learned ways to address all 3 of the items in the &lt;i&gt;cons &lt;/i&gt;list.&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;i&gt;Develop feedback - not as instant.&lt;/i&gt; I mentioned that Flex has a compile step in the development process, this cannot be fixed. But the lack of an interactive console can be addressed by using the Javascript bridge, with which you can use Firebug to script your Flex app. There are inevitably some limitations, of course(like, I don't think you can pass functions to and from Flex land; and you can't modify the existing code), but by and large it is extremely useful. The scripting ability alleviates the slower feedback problem even though it does not eliminate it.&lt;/li&gt;&lt;li&gt;&lt;i&gt;Mandatory Static Typing.&lt;/i&gt; I misspoke on this one. Actually the static typing isn't mandatory at all. I mistook the warnings from the compiler to be errors. You have the option of turning off the warnings. Now I can eliminate a lot of what I dim the unnecessary type declarations from my code. However, I will not remove type declarations entirely, because I believe static type checking IS immensely useful for situations where 1) it takes some time for the program to start up, and 2) it takes some user navigation actions to get to the place you want to test. The type checker will catch a class of stupid errors, which if you encounter only after waiting and performing a series of mouse clicks and key presses, can make you irritated quickly. My rule of thumb for type declaration in ActionScript is: 1) declare function input and output types; 2) declare global variable types; 3) local variables may or may not be declared, depending on the situation(if the variable is used extensively in the function, then declare); 4) do not declare if the type is void(i.e. nothing). I've never &lt;i&gt;really &lt;/i&gt;worked with a language that has optional type checking, this is fresh! The browsers in the future will have this too in Ecmascript 4. Another language that has this is Groovy, and I heard &lt;a href="http://blogs.msdn.com/charlie/archive/2008/11/13/anders-hejlsberg-video-on-c-dynamic.aspx" mce_href="http://blogs.msdn.com/charlie/archive/2008/11/13/anders-hejlsberg-video-on-c-dynamic.aspx"&gt;C# is adding this too&lt;/a&gt;, how exciting! I SOOO admire Anders Hejlsberg. &lt;i&gt;(after seeing the video it seems it's more like a bridge to scripting languages/libraries)&lt;/i&gt; &lt;/li&gt;&lt;li&gt;As for the mx: prefix, I've &lt;a href="http://stackoverflow.com/questions/284530/is-it-a-bad-idea-to-get-rid-of-the-mx-in-your-flex-code" mce_href="http://stackoverflow.com/questions/284530/is-it-a-bad-idea-to-get-rid-of-the-mx-in-your-flex-code"&gt;already figured out how to do without it&lt;/a&gt;. So you can write &lt;font face="courier new,courier"&gt;&amp;lt;Panel ...&amp;gt;&lt;/font&gt; rather than &lt;font face="courier new,courier"&gt;&amp;lt;mx:Panel...&amp;gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;In conclusion, Flex is actually an even better development environment than I gave it credit for last time. &lt;br&gt;</description>
      <pubDate>Wed, 26 Nov 2008 20:47:25 -0500</pubDate>
      <guid>http://tobyho.com/Making_Flex_Suck_Less</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/Making_Flex_Suck_Less</link>
    </item>
    <item>
      <title>FLEX: first impressions</title>
      <description>At work I am required to write a web UI that has a rich-desktop kind of interface. Without getting into too much details, it's layout will look a bit like an older email application(e.g. outlook, the older versions). It also need to have drag-n-drop capabilities. I whipped up a prototype of the UI using prototype and scriptaculous, since that's what I've been getting fluent with. A couple of things about my prototype made me decide to give Flex a try.&lt;br&gt;&lt;ol&gt;&lt;li&gt;No draggable divider. The draggable divider - although not essential - is something that seasoned computer users have learned to expect when you give them interfaces that have multiple panels jammed onto one screen. Scriptaculous didn't have an draggable divider widget. YUI and ExtJS did, and I am not against learing a new library. But I get the vibe that their implementations might not be rock solid.&lt;br&gt;&lt;/li&gt;&lt;li&gt;Buggy drag-n-drop libary. Scriptaculous comes with a drag-n-drop library. I've used it in multiple occations. It's also been buggy for me on multiple occations. A lot of the bugs are attributed to differences in browsers.&lt;/li&gt;&lt;/ol&gt;I decided that I was tired of chasing down cross browser bugs, which will only grow exponentially the more complex my UI gets. Therefore, Flex could really be the answer to these problems.&lt;br&gt;&lt;br&gt;I am probably 60% done with my port of the UI prototype from Javascript/prototype/scriptaculous to Flex. I am happy with it for the most part. Here are my first impressions of Flex. First the pros:&lt;br&gt;&lt;ol&gt;&lt;li&gt;Programming in Flex is suprisingly similar to programming in HTML/javascript/CSS. (Well, not as suprising as it could have been since I've heard Charles Lowe say the same on DrunkAndRetired.com podcast). You write a mxml file, which is like your markup - in place of your HTML; you write ActionScript inplace of Javascript; and there's a css 3 compliant stylesheet you can use to style the UI.&lt;/li&gt;&lt;li&gt;Flex has a rich UI component model that similar to many of the desktop UI toolkits(Swing, GTK, MFC, etc), which is a departure from the HTML/Javascript model. This is a plus because you get a lot of widgets you can use out of the box with very little code. Using third party Javascript widgets is usually &lt;i&gt;more involved&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;ActionScript is not much different from Javascript, so people literate in Javascript should pick it up easily. The only significant difference I've noticed so far is the type declaration syntax - ActionScript is statically typed. I believe ActionScript is compatible with a newer version of Ecmascript which has optional type declaration for variables and parameters. Type declaration in ActionScript(as far I can tell) is required on function parameters and global variables(errors out if you leave it), and optional on local variables(warns you if you leave it).&lt;br&gt;&lt;/li&gt;&lt;li&gt;Yes, you have to write XML, but it's not &lt;i&gt;that&lt;/i&gt; bad. I have expressed my hatred for making programmers read and write XML by hand in the past. It's inhumane! Flex makes you do that. Yes. But! It's used in a way that's not as bad as some other ways in which XML have been used(build scripts, web configuration, for example). In Flex, XML is used for Markup (wow! a markup language used for markup? what a concept?). The XML declaratively defines the UI(such as in HTML), which, I my opinion, is the way UI's ought to be written, and not in a procedure way(such as in Swing).&lt;br&gt;&lt;/li&gt;&lt;li&gt;Flex components look good by default. For HTML/CSS you always have to design your own theme - even if you just want it to look half way decent. No such BS in Flex. Flex components look good out of the box(no CSS tweaks or includes required), because of this I believe you can prototype Flex UIs faster.&lt;/li&gt;&lt;li&gt;A Flex app runs exactly the same on any browser it supports. This was the main sell for me. Nothing more needs to be said.&lt;/li&gt;&lt;/ol&gt;Now the cons:&lt;br&gt;&lt;ol&gt;&lt;li&gt;Develop feedback - not as instant. Developer feedback loop is slower because of the compile step. ActionScript is a compiled language, and you need to compile your Flex programing to get a SWF file. Also, in Flex 3, they &lt;a href="http://www.colettas.org/?p=17" mce_href="http://www.colettas.org/?p=17"&gt;took away the eval() function&lt;/a&gt;(why oh why???). This means you cannot create an interactive shell in Flex like Firebug or the python shell.&lt;/li&gt;&lt;li&gt;Mandatory Static typing. Although I have nothing against static typing in general. I don't like mandatory static typing(such as exists in Java, C#, C++). Haskell is a staticly typed language, it verifies all your types for you, and yet it doesn't require you to specify the types of all you variables and parameters because it can infer them all for you. I like that. This is not a big issue for me, it's just not as kosher as Javascript in this respect.&lt;/li&gt;&lt;li&gt;&lt;strike&gt;It's annoying that you have to write mx: to begin all Flex component tags in the mxml spec. No such BS in HTML. I tried a &lt;a href="http://stackoverflow.com/questions/284530/is-it-a-bad-idea-to-get-rid-of-the-mx-in-your-flex-code" mce_href="http://stackoverflow.com/questions/284530/is-it-a-bad-idea-to-get-rid-of-the-mx-in-your-flex-code"&gt;hack to do without it&lt;/a&gt;, it didn't work so well.&lt;/strike&gt;&lt;br&gt;&lt;i&gt;Update: Looks like I have &lt;a href="http://stackoverflow.com/questions/284530/is-it-a-bad-idea-to-get-rid-of-the-mx-in-your-flex-code"&gt;gotten rid of the mx: problem&lt;/a&gt;. I guess I showed &lt;/i&gt;&lt;i&gt;them ;)&lt;/i&gt;&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;Overall, the pros are worth more than the cons. Linguistically, I prefer Javascript to ActionScript and HTML to MXML, so it's not going to &lt;a href="http://tv.winelibrary.com/" mce_href="http://tv.winelibrary.com/"&gt;Change My Life(TM)&lt;/a&gt;. But the UI component model and cross browser compatibility greatly outweigh those nags.&lt;br&gt;&lt;br&gt;</description>
      <pubDate>Thu, 20 Nov 2008 18:51:45 -0500</pubDate>
      <guid>http://tobyho.com/FLEX%3A_first_impressions</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/FLEX%3A_first_impressions</link>
    </item>
    <item>
      <title>Radio button change event firing</title>
      <description>If you register the &lt;i&gt;change &lt;/i&gt;event for a radio button, they fire at different times between IE and FF. FF fires the event immediately when you click on the radio button to change its value. IE does not, it fires &lt;i&gt;changed &lt;/i&gt;only when you &lt;i&gt;blur &lt;/i&gt;the element.&lt;br&gt;</description>
      <pubDate>Mon, 10 Nov 2008 10:54:29 -0500</pubDate>
      <guid>http://tobyho.com/Radio_button_change_event_firing</guid>
      <author>toby ho</author>
      <link>http://tobyho.com/Radio_button_change_event_firing</link>
    </item>
  </channel>
</rss>
