<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1513921683783507600</id><updated>2011-07-07T17:52:30.935-07:00</updated><category term='email'/><category term='thunderbird'/><category term='client'/><category term='apple mail'/><title type='text'>Dev Platter</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://devplatter.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://devplatter.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Moxley Stratton</name><uri>http://www.blogger.com/profile/16889407747756927514</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1513921683783507600.post-3702221724708023103</id><published>2008-08-17T16:43:00.000-07:00</published><updated>2008-08-17T17:09:11.581-07:00</updated><title type='text'>A Clojure Tutorial</title><content type='html'>The more I learn about Clojure, the more excited I am about it.&lt;br /&gt;&lt;br /&gt;Now that I've reached a less-steep part of the Clojure learning curve, it's time to go back and expand upon the &lt;a href="http://www.moxleystratton.com/article/clojure/for-non-lisp-programmers"&gt;Clojure tutorial&lt;/a&gt; I started a few months ago.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513921683783507600-3702221724708023103?l=devplatter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devplatter.blogspot.com/feeds/3702221724708023103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513921683783507600&amp;postID=3702221724708023103' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/3702221724708023103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/3702221724708023103'/><link rel='alternate' type='text/html' href='http://devplatter.blogspot.com/2008/08/clojure-tutorial.html' title='A Clojure Tutorial'/><author><name>Moxley Stratton</name><uri>http://www.blogger.com/profile/16889407747756927514</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513921683783507600.post-88063348876616490</id><published>2007-11-02T09:25:00.001-07:00</published><updated>2007-11-02T10:03:17.854-07:00</updated><title type='text'>PHP Tags are Ugly</title><content type='html'>(Or, &amp;quot;Why Are There So Many PHP Templating Engines?&amp;quot;)&lt;br /&gt;&lt;br /&gt;Remember when most PHP scripts used short tags?&lt;pre&gt;&lt;code&gt;&amp;lt;? $users = get_users(); ?&amp;gt;&lt;/code&gt;&lt;/pre&gt;Along with the short syntax came the quick and easy output syntax:&lt;pre&gt;&lt;code&gt;&amp;lt;?= $user['name'] ?&amp;gt;&lt;/code&gt;&lt;/pre&gt;Then, after XHTML hit the scene, the short tag syntax conflicted with the XML processing directive syntax. So the PHP coding standards changed to long tag syntax. This adds 3 characters to every tag:&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo $user['name'] ?&amp;gt;&lt;/code&gt;&lt;/pre&gt;The tag syntax is not only longer, it forces the developer to use an 'echo' call when before, an equals sign was sufficient. This adds another 5 characters to tags that output something.&lt;br /&gt;&lt;br /&gt;The long-tag syntax helped spawn a myriad of templating languages, which many developers consider silly, since PHP already is a templating language.&lt;br /&gt;&lt;br /&gt;If you want your templates to be secure and logically correct, you have to escape those characters that HTML considers 'special':&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo htmlspecialchars($user['name']) ?&amp;gt;&lt;/code&gt;&lt;/pre&gt;Consider the same statement in RHTML (a popular templating system for Ruby):&lt;pre&gt;&lt;code&gt;&amp;lt;%=h user['name'] %&amp;gt;&lt;/code&gt;&lt;/pre&gt;The RHTML version is vastly simpler.&lt;br /&gt;&lt;br /&gt;With that kind of syntax, there's little incentive to use or create a separate templating language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513921683783507600-88063348876616490?l=devplatter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devplatter.blogspot.com/feeds/88063348876616490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513921683783507600&amp;postID=88063348876616490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/88063348876616490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/88063348876616490'/><link rel='alternate' type='text/html' href='http://devplatter.blogspot.com/2007/11/php-tags-are-ugly.html' title='PHP Tags are Ugly'/><author><name>Moxley Stratton</name><uri>http://www.blogger.com/profile/16889407747756927514</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513921683783507600.post-5986921547405455595</id><published>2007-07-02T11:09:00.000-07:00</published><updated>2007-07-03T15:31:56.936-07:00</updated><title type='text'>Firefox with Firebug</title><content type='html'>No web developer should be using Internet Explorer as their primary testing browser. As a development and testing environment, Firefox with Firebug is miles ahead of anything based on Internet Explorer. It is beyond me why web developers who know about Firefox with Firebug still choose to use Internet Explorer as their primary testing platform. Somebody, please illuminate.&lt;br /&gt;&lt;br /&gt;Note that when I say 'primary' testing browser, I'm not saying 'exclusive' testing browser. Of course web pages need to be tested in all browsers that the shareholders care to support. I'm talking about the first browser you reach for when you want to see what the page you are developing looks and acts like. When the developer is happy how the page looks and acts in one browser, then she tests it on the others.&lt;br /&gt;&lt;br /&gt;For those who use Internet Explorer as their primary testing browser, and want to make an argument, have you tried Firefox with Firebug?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513921683783507600-5986921547405455595?l=devplatter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devplatter.blogspot.com/feeds/5986921547405455595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513921683783507600&amp;postID=5986921547405455595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/5986921547405455595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/5986921547405455595'/><link rel='alternate' type='text/html' href='http://devplatter.blogspot.com/2007/07/firefox-with-firebug.html' title='Firefox with Firebug'/><author><name>Moxley Stratton</name><uri>http://www.blogger.com/profile/16889407747756927514</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513921683783507600.post-6561217845267844115</id><published>2007-06-19T11:11:00.000-07:00</published><updated>2007-06-19T12:22:30.122-07:00</updated><title type='text'>Rails Javascript integration</title><content type='html'>I just started using the JavaScript integration features of Ruby on Rails.&lt;br /&gt;&lt;br /&gt;This is my sixth month using Rails. It was difficult letting go of the tendency to hand-code the JavaScript. I had used Prototype and Scriptaculous at OCP, so hand-coding was a no-brainer. At first glance the Rails/Javascript integration didn't look like it would do much for what I needed. Looks were deceptive, though.&lt;br /&gt;&lt;br /&gt;The integration features has its strengths and weaknesses. It's good at sprinkling dynamic behavior on HTML elements. Here's an example (formatted for readability):&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;%= link_to 'Hide Comments', '#',&lt;br /&gt;:id =&amp;gt; 'hide_comments_link',&lt;br /&gt;:style =&amp;gt; 'display:none',&lt;br /&gt;:onclick =&amp;gt; visual_effect(&lt;br /&gt;    :blind_up,&lt;br /&gt;    'comments',&lt;br /&gt;    :after_finish =&amp;gt; "function() { $('comments').update(); }"&lt;br /&gt;    ) +&lt;br /&gt;    "$('hide_comments_link').hide();" +&lt;br /&gt;    "$('show_comments_link').show();" +&lt;br /&gt;    " return false;"&lt;br /&gt;%&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Here's how it renders (again, highly formatted for readability):&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;a href="#"&lt;br /&gt;  id="hide_comments_link"&lt;br /&gt;  onclick="&lt;br /&gt;      new Effect.BlindUp(&amp;amp;quot;comments&amp;amp;quot;,{&lt;br /&gt;          after_finish: function() {&lt;br /&gt;              $('comments').update();&lt;br /&gt;          }&lt;br /&gt;      });&lt;br /&gt;      $('hide_comments_link').hide();&lt;br /&gt;      $('show_comments_link').show();&lt;br /&gt;      return false;&lt;br /&gt;  "&lt;br /&gt;  style="display:none"&lt;br /&gt;&amp;gt;Hide Comments&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The big advantage here is that the underlying JavaScript libraries, Prototype and Scriptaculous, can change their API over time, and Rails will adjust, saving the programmer from having to update code to the new APIs.&lt;br /&gt;&lt;br /&gt;There are more advantages:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The developer can stick with the Ruby and ROR coding conventions and syntax. No need to switch from underscore naming to camel case. No need to switch to the quirky JavaScript syntax (e.g., &lt;code&gt;new Effect.BlindUp('comments')&lt;/code&gt; becomes &lt;code&gt;visual_effect(:blind_up, 'comments')&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The syntax for adding the JavaScript code is the same syntax already used for creating HTML elements with Rails' helper methods.&lt;/li&gt;&lt;li&gt;No need to worry about escaping characters that could be mis-interpreted as HTML syntax characters (&lt;, &gt;, "). This is doubly helpful when an attribute such as &lt;code&gt;onclick-""&lt;/code&gt; contains JavaScript with double-quoted strings (see generated HTML above).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;As you can see in the example, I had to hand-code some JavaScript, but it was kept down to simple little pieces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513921683783507600-6561217845267844115?l=devplatter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devplatter.blogspot.com/feeds/6561217845267844115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513921683783507600&amp;postID=6561217845267844115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/6561217845267844115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/6561217845267844115'/><link rel='alternate' type='text/html' href='http://devplatter.blogspot.com/2007/06/rails-javascript-integration.html' title='Rails Javascript integration'/><author><name>Moxley Stratton</name><uri>http://www.blogger.com/profile/16889407747756927514</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513921683783507600.post-6182686210241655909</id><published>2007-06-13T09:26:00.000-07:00</published><updated>2007-06-13T09:35:17.160-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apple mail'/><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='thunderbird'/><category scheme='http://www.blogger.com/atom/ns#' term='client'/><title type='text'>Thunderbird 2.0</title><content type='html'>I got sick of Apple Mail, and decided to give the new Thunderbird a trial run.&lt;br /&gt;&lt;br /&gt;I had been pretty happy with Thunderbird as a Windows and Linux user, but the smooth experience Apple Mail provided made me switch about a year ago. The never-ending desire to make email management easier made me reconsider Thunderbird.&lt;br /&gt;&lt;br /&gt;The reason I switched back is that Thunderbird supports tagging. Email messages can be tagged with keywords, and each tag can have a color associated with it. Combine tags with Search Folders, and the QuickFolders extension, and I'm a happy camper.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513921683783507600-6182686210241655909?l=devplatter.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devplatter.blogspot.com/feeds/6182686210241655909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513921683783507600&amp;postID=6182686210241655909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/6182686210241655909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513921683783507600/posts/default/6182686210241655909'/><link rel='alternate' type='text/html' href='http://devplatter.blogspot.com/2007/06/thunderbird-20.html' title='Thunderbird 2.0'/><author><name>Moxley Stratton</name><uri>http://www.blogger.com/profile/16889407747756927514</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
