<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>Blog</title>
    <link>/archive/</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:creator>aaron@easy-designs.net</dc:creator>
    <dc:rights>Copyright 2010</dc:rights>
    <dc:date>2010-03-17T19:16:40+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <item>
      <title>EE Tip: Counting the results of a nested query</title>
      <link>http://easy-reader.net/archives/2010/03/17/counting-the-results-of-a-nested-query-in-expressionengine</link>
      <guid>http://easy-reader.net/archives/2010/03/17/counting-the-results-of-a-nested-query-in-expressionengine</guid>
      <description>{summary}If you&#39;ve built anything remotely challenging in ExpressionEngine, you&#39;ve no doubt discovered things that are easier done in native PHP than in EE tags. A lot of it has to do with how ExpressionEngine parses templates and what gets parsed first.

One recent bugbear I ran into was trying to use the &#123;count&#125; &quot;magic&quot; variable from a call to &#123;exp:query&#125; that resided inside a &#123;exp:weblog:entries&#125; loop. I needed the &#123;entry_id&#125; from the entry in the SQL statement, but &#123;count&#125; (despite being used inside &#123;exp:query&#125;) was evaluating as the &#123;exp:weblog:entries&#125; count and not the &#123;exp:query&#125; count. To solve the issue, I came up with the following:

&#123;exp:gist id=&quot;335632&quot; file=&quot;gistfile1.phtml&quot;&#125;

You&#39;ll notice I&#39;m using &#123;exp:query&#125; twice. The first time is to establish a variable in the SQL connection. Then I am free to use the variable in the second query and the count (returned as &#123;query_count&#125;) will be a count of the inner loop instead of the outer one.

It is important to note, however, that MySQL will evaluate the variable&#39;s incrementation before paying attention to any ORDER BY clauses, so your mileage may vary. Regardless, it&#39;s a handy technique.</description>
      <dc:subject>design &amp; development, programming</dc:subject>
      <dc:date>2010-03-17T19:16:40+00:00</dc:date>
    </item>

    <item>
      <title>A new &#8220;onload&#8221; scheme</title>
      <link>http://easy-reader.net/archives/2010/01/18/a-new-onload-scheme</link>
      <guid>http://easy-reader.net/archives/2010/01/18/a-new-onload-scheme</guid>
      <description>{summary}A few projects back, I decided to rethink our JavaScript organization strategy and came up with a new technique that, I think, helps us better manage behaviors from page to page.

For years, when I needed page&#45;specific interactions, I would either embed the JS (unobtrusively, of course) at the bottom of the page or externalize it to a separate page&#45;specific file. In some sites, that became a difficult setup to manage because we were juggling so many files and we were also forcing our users to download each of those files individually.

Looking for a better way to manage all of the code, I built FunctionHandler. This script takes lets you declare blocks of JavaScript and then target them at pages based on the id attribute on the body element. When the targeted id is encountered, the code block is executed on DOM ready. Here&#39;s a quick example:

&#123;exp:gist id=&quot;313553&quot; file=&quot;gistfile1.js&quot;&#125;

As you can see, using it is pretty simple: you make a call to FunctionHandler&#39;s register method and pass it two arguments. The first is an array of the id values you want this code block to execute on and the second is an anonymous function that wraps your code block.

What we&#39;ve found really nice about this setup is that it encourages you to create discrete JavaScript components while, at the same time, easily allowing you to adjust the pages that those components run on by simply adding to or subtracting from the id stack. You can even blanket every page with a given script by supplying a string value of &quot;*&quot; as the initial argument:

&#123;exp:gist id=&quot;313553&quot; file=&quot;gistfile2.js&quot;&#125;

Anyway, I just wanted to take a brief moment to share this script because we&#39;ve found it pretty handy. Perhaps you will too.

PS &#45; FunctionHandler is available in 3 flavors: native JS, jQuery, and Prototype.</description>
      <dc:subject>design &amp; development, programming</dc:subject>
      <dc:date>2010-01-18T23:30:52+00:00</dc:date>
    </item>

    <item>
      <title>Getting TinyMCE to respect empty alt attributes</title>
      <link>http://easy-reader.net/archives/2009/09/21/getting-tinymce-to-respect-empty-alt-attributes</link>
      <guid>http://easy-reader.net/archives/2009/09/21/getting-tinymce-to-respect-empty-alt-attributes</guid>
      <description>{summary}This one took a little futzing around and digging through the TinyMCE forum&amp;nbsp;to figure out, but it&#39;s been nagging at me for a while. By default (or at least in the default configuration provided under the LG TinyMCE extension for ExpressionEngine), TinyMCE will remove the alt attribute if it is empty. Obviously, for accessibility and validation reasons, this is highly undesirable and needs correcting. Thankfully, the fix is pretty simple: add the following to your TinyMCE configuration options:

&#123;exp:gist id=&quot;313562&quot;&#125;

I choose to add these options right after declaring my cleanup/output options but before the remainder of the configuration. If you choose to tack these options on at the end, just remember to remove the trailing comma.</description>
      <dc:subject>design &amp; development, programming, web standards</dc:subject>
      <dc:date>2009-09-21T13:37:04+00:00</dc:date>
    </item>

    <item>
      <title>RIP XHTML 2</title>
      <link>http://easy-reader.net/archives/2009/07/09/rip-xhtml2</link>
      <guid>http://easy-reader.net/archives/2009/07/09/rip-xhtml2</guid>
      <description>{summary}I wasn&#39;t planning to weigh in much on this subject, but I&#39;ve been asked by several people for my thoughts, so here we go...
This decision by the W3C to not renew the charter for the XHTML 2 Working Group has, rather unfortunately, brought out the worst in the Web standards community. Sure, as a community, we&#39;re prone to holy wars over seemingly inconsequential things&amp;mdash;abbr vs. acronym, use vs. abuse of definition lists, etc.&amp;mdash;but this move has sparked a particularly ugly fight between proponents of XHTML and its detractors (primarily those folks who think it&#39;s pointless to use XHTML if you aren&#39;t serving it with an XML MIME type).Personally, I have mixed feelings about the decision. I think there were a lot of good ideas in XHTML 2 (everything can be a link, for one), but it also had a number of shortcomings. I feel much the same about HTML 5; some of the new elements make a lot of sense, but others seem to be solving a problem that really wasn&#39;t there to begin with.In the end, I think this is probably a good move for the W3C as it will, hopefully, allow them to reallocate resources to projects that need them.But does it mean I think XHTML is a failure? No.I think XHTML was a phenomenal success as it made us look at HTML in a new light. It forced us to think about how we marked up documents and applied much&#45;needed pressure on developers to make smarter decisions. Without it, I dare say the Web standards movement would never have gotten as much traction as it did and we would still be in the midst of the browser war started more than a dozen years ago.</description>
      <dc:subject>design &amp; development, coding, web standards</dc:subject>
      <dc:date>2009-07-09T13:46:51+00:00</dc:date>
    </item>

    <item>
      <title>We&#8217;re back (sort of)</title>
      <link>http://easy-reader.net/archives/2009/04/22/were-back-sort-of</link>
      <guid>http://easy-reader.net/archives/2009/04/22/were-back-sort-of</guid>
      <description>{summary}After making a ridiculously stupid mistake by axing the server that hosted this blog (without checking that I had actually moved it to the new server and without making sure I had a backup of the DB), Easy! Reader is back. Sort of. Thankfully, I had a backup from late &#39;06 and I haven&#39;t been an incredibly prolific blogger in the time since that backup. And, thanks to the Internet Archive, it looks like we should be able to recover all but one article (my last post, from about a year ago) from the ether. It may take a little time, but we should have it all up in the next few weeks.
So what&#39;s going on? Well, a lot.
For one, we&#39;ve relocated from New Haven, CT to Chattanooga, TN after being urged to visit by Mr. Shaun Inman and his lovely bride Leslie and falling in love with this awesome city. We made the move in August of last year and, after spending a few months in an apartment, have bought a house and will be moving in this weekend. Chattanooga is an amazing place. There&#39;s always something going on, it has a wonderful art scene and tech community, and is nestled in the mountains, right along the Tennessee River. It has many of the perks of Portland, OR and San Francisco, CA (other cities we considered moving to), but at 1/4&#45;1/3 the cost. I couldn&#39;t ask for a better place to live.
Since relocating, Easy! Designs has also been growing. We&#39;ve taken on two interns &#45;&#45; Matt Turnure and Sean McCarthy &#45;&#45; and have been joined full&#45;time by both Dave Stewart (who I had previously worked with in CT) and Matt Harris (an excellent developer from the UK), so expect to be hearing from them on this site soon as well. In addition to our client work, we&#39;ve been busily coding away on a few products of our own that should hopefully see the light of day in the coming year. We&#39;re also working on a relaunch of our own website and this blog.
Finally, there&#39;s eCSStender. I&#39;ve been working on this project for ages and it&#39;s currently in a closed beta. Things are progressing smoothly on its development though and I expect it will be ready for its initial public release in the coming weeks.
Anyway, that&#39;s the nickel tour of the changes. I apologize profusely for rendering this blog pretty useless with my error, but hopefully we&#39;ll have it all back up and running shortly.
PS &#45; If you happen to have an archive of my blog post on IE8 Standards Mode, please forward a copy of it to me. I can&#39;t seem to find it even though it appears to be somewhere in the Google Cache.</description>
      <dc:subject>business</dc:subject>
      <dc:date>2009-04-22T12:05:14+00:00</dc:date>
    </item>

    <item>
      <title>Automatically opting&#45;in to IE8&#8217;s Standards Mode</title>
      <link>http://easy-reader.net/archives/2008/02/25/automatically-opting-in-to-ie-standards-mode</link>
      <guid>http://easy-reader.net/archives/2008/02/25/automatically-opting-in-to-ie-standards-mode</guid>
      <description>{summary}As some of you have read (or heard), WaSP organized a Round Table discussion on IE8&#8217;s standards mode and its default behavior of opting&#45;out any sites that don&#8217;t engage in version targeting. We discussed a few different aspects of the issues this presents for standards&#45;aware developers (and progress on the web in general) and discussed a few tacks Microsoft could take to make IE8 more standardista&#45;friendly.

One proposal that, to me, appeared to hold the most promise was one that involved extending IE8&#8217;s scheme of automatically opting&#45;in unknown valid DOCTYPEs to also include Strict DOCTYPEs of HTML and XHTML currently in use. The current proposal hinges on the relative popularity (or unpopularity) of a given DOCTYPE: unrecognized DOCTYPEs are assumed to be future or custom DOCTYPEs and will automatically be opted&#45;in to the latest and greatest standards mode of any given future version of IE; that is, until that DOCTYPE becomes &#8220;popular&#8221; enough to warrant associating it with a given version of IE. This, in a nutshell, means that if a new DOCTYPE were to come along after IE8 launches&#8212;say, HTML 5&#8212;IE8 would render it in standards mode, but if that DOCTYPE became &#8220;popular&#8221; before IE9 came out, IE9 would likely act as though it was IE8 when rendering those pages.

Chris Wilson did not have numbers on the relative popularity of Strict mode DOCTYPEs vs. Transitional and Frameset on either HTML or XHTML, but given that most authoring tools do not automatically generate Strict documents, it is a strong possibility that the popularity of Strict mode DOCTYPEs may make them a candidate for being automatically opted&#45;in to standards mode, at least in IE8. That would be great news for standards&#45;aware developers who want IE8&#8217;s standards improvements, but don&#8217;t want to engage in version targeting.</description>
      <dc:subject>design &amp; development, coding, design, web standards</dc:subject>
      <dc:date>2008-02-26T01:18:58+00:00</dc:date>
    </item>

    <item>
      <title>Server&#45;side FigureHandler thoughts</title>
      <link>http://easy-reader.net/archives/2007/10/11/server-side-figurehandler-thoughts</link>
      <guid>http://easy-reader.net/archives/2007/10/11/server-side-figurehandler-thoughts</guid>
      <description>{summary}In reaction to my latest article for A List Apart, on FigureHandler, many folks have boldly claimed that this sort of thing should be done server&#45;side. Below are my thoughts on the matter as posted as a comment in the article&#8217;s discussion thread.

Many of you have brought up that this should be done server&#45;side and, while I agree that it could, it would need to be done in the most flexible way possible (which many won&#8217;t bother with). You see, what this script allows quite easily is redesign; a designer can change page layout&#8212;&quot;of an entire site or section by section&#8212;&quot;without ever having to touch the back&#45;end. It also allows for different columns to receive different figure classification schema.
If this were done on the content&#45;entry side (as some have suggested), the image classifications would be stored in the database (or XML or whatever) along with the rest of the content HTML. That means that if the design were to shift to a wider column (for example), the figures that once occupied a half&#45;column, may no longer continue to do so, making the classifications hard&#45;coded in the HTML incorrect.
The only way to truly do this flexibly on the back end (as far as I can see) is to leave the classification step to be handled by a function which pre&#45;processes the page output, dynamically assigning the classifications to each figure based on values obtained from the CSS for that page. Essentially, the script would need to go through the same steps as the JavaScript, but it would need to be able to go the extra step of determining applicable CSS rules to obtain the column width. Thankfully, most server&#45;side languages support some means of DOM walking (albeit sometimes in less&#45;than&#45;desirable ways), but, as far as I know, none have a CSS parser, so you&#8217;d likely need to write that as well. From a server overhead point&#45;of&#45;view, I imagine that preprocessing would be fairly costly (most DOM&#45;related stuff is), but the output for each page could be cached, reducing it somewhat.
If you&#8217;re interested in doing something like this, goodonya. I&#8217;ve built you a pretty decent roadmap for implementation, but I don&#8217;t imagine it will be easy to get it up and running. That said, I wish you luck&#8230;it would be yet another great tool for enabling designers to create consistent layouts with figures.</description>
      <dc:subject>design &amp; development, coding, design, programming</dc:subject>
      <dc:date>2007-10-11T13:19:53+00:00</dc:date>
    </item>

    <item>
      <title>Alex Russell is not a heretic</title>
      <link>http://easy-reader.net/archives/2007/09/10/alex-russell-is-not-a-heretic</link>
      <guid>http://easy-reader.net/archives/2007/09/10/alex-russell-is-not-a-heretic</guid>
      <description>{summary}First off, let me preface this by saying I just got back to the East Coast after catching a red&#45;eye from San Francisco on Saturday night, so if I seem a bit incoherent, that&#8217;s likely why.
In perhaps the most intellectually&#45;stimulating session at The Rich Web Experience, Alex Russell (of Dojo Toolkit fame) tackled the topic of Standards Heresy.
For those who are not aware, Alex was once a staunch standards advocate who has turned to what he considers, &#8220;the dark side.&#8221; In truth, he&#8217;s sick and tied of the dysfunctional nature of the W3C and other similar organizations and I can&#8217;t say I blame him. As his session pointed out, the W3C has 60+ paid, full&#45;time staff and yet we saw literally no movement on either (X)HTML or CSS for over five years. That is a travesty.
In my opinion, fault lies not with the individuals on the various committees and sub&#45;committees, but rather, with the process. And this isn&#8217;t just a problem in the W3C, an organization comprised almost entirely of representatives from the various software vendors (Microsoft, AOL, Opera, etc.) which pay tens of thousands a year to take part. Look at what&#8217;s happening with JavaScript 2 in ECMA. Or HTML5 for that matter&#8212;&quot;just because it is an &#8220;open&#8221; organization which &#8220;anyone can join&#8221; doesn&#8217;t make the WHAT WG any better. They are all flawed because the process is flawed, and I think that is Alex&#8217;s main point (despite his assertion that the WHAT WG is not dysfunctional).
So why is the process flawed? Well, for one, spec writing is largely an academic undertaking. In many cases there are invited experts in a Working Group (such as Andy Clarke in the CSS one), but, for the most part, specs are written by people who are not in the trenches. As Alex rightly points out, in fact, many times, the specs are nothing more than an official blessing of some proprietary technique or technology created by a member company. And good ideas that may be very useful to designers or developers are lost because of internal politics or because a browser vendor thinks it would be &#8220;too hard&#8221; to implement.
Which brings me to Alex&#8217;s &#8220;heresy.&#8221; In his session, he proudly declared himself a heretic because he sees a need for innovation in (X)HTML which is currently unavailable because the specs are not evolving quickly enough. I feel his pain, but I think he is looking at the problem the wrong way. He sees the spec (and web standards in general) as stifling innovation. I see web standards as facilitating innovation. After all, were it not for the firm foundation of well&#45;formed documents and a unified DOM (no matter how piecemeal the implementations), we&#8217;d still be writing spaghetti code whenever we tried to do anything with JavaScript. It is because of web standards that we can write clean JavaScript and that we can make truly innovative interactions that take us beyond what is allowed for in the specs themselves.
But back to Alex&#8217;s complaint&#8230;as his example of how Dojo is heretical, he showed this code example:
&#60;div dojoType=&quot;dijit.form.HorizontalSlider&quot;
     name=&quot;horizontal1&quot;
     onChange=&quot;dojo.byId(&#39;slider1input&#39;).value=arguments[0];&quot;
     value=&quot;10&quot;
     maximum=&quot;100&quot;
     minimum=&quot;0&quot;
     showButtons=&quot;false&quot;
     intermediateChanges=&quot;true&quot;
     style=&quot;width:50%; height: 20px;&quot;
     id=&quot;slider1&quot;&gt;
  ...
&#60;/div&gt;
The problem that Dojo is attempting to solve here is the inclusion of a slider form control, which does not exist under the current HTML Forms spec. In order to function, the widget requires several custom attributes to be placed on the element to provide information to assist in the creation of that slider. The fact that Alex &#8220;cannot&#8221; add these attributes to the document and maintain XHTML validity is a major source of annoyance for him and part of why he has decided that validation is no longer important.
But the truth is that Alex could make any or all of these attributes available to whatever elements he wants and still have a validating document by simply creating a DTD (based on any existing (X)HTML one) to include them. After all, the X in XHTML stands for extensible&#8230;the language is meant to be improved. Sure, there are some standardistas who think we shouldn&#8217;t muck about with the standards, but the powers that be put that extensibility in there for a reason (and I don&#8217;t think it was just as a tease). By extending the language to mix in features we desperately need, we drive innovation and, who knows, perhaps someone will take notice and add our extensions into the next version, thereby driving the evolution of the language so many of us desperately want.
The same goes for CSS. The W3C made CSS extensible by allowing for custom properties utilizing the &#45;*&#45; syntax. Chances are, you&#8217;ve come across this when implementing &#45;moz&#45;border&#45;radius or &#45;webkit&#45;border&#45;radius (which, honestly, both seem superfluous to me when the CSS3 spec includes border&#45;radius as an actual property&#8230;why not just support that?). In my mind, this is ripe for use in extension of CSS, not by individual browser vendors (as that is proprietary and closed), but by us (in an open, cross&#45;browser/cross&#45;platform way) to achieve what we want or need that CSS currently does not offer us. That was the basis for my work on gFSS (an experiment in presentational Flash generated from CSS, debuted at Web Directions North this year) and another project I will be releasing in the next few months.
So, long story, long, I don&#8217;t think that Alex is a heretic. I think he can make a solid case for extending the language (and the interface) of the web for his particular needs (or the needs of his toolkit) as long as he backs it up with documentation in the form of a custom DTD.
An aside
I do have one problem with what Alex wants, however (or at least what he chooses as a code example) and that problem is the extension of the language, but rather the way in which it was done (i.e. the DIV in his example will degrade to nothing without JavaScript enabled). Dojo supports WAI&#45;ARIA to improve the accessibility of this and many other widgets, which is commendable, but that extra markup is only generated when the Dojo methods are run. If JavaScript is turned off in his example, no form control is available whatsoever.
What I&#8217;d prefer to see is something like this:
&#60;select class=&quot;dojo&#45;form&#45;horizontalSlider&quot;
        name=&quot;horizontal1&quot;
        showButtons=&quot;false&quot;
        intermediateChanges=&quot;true&quot;
        id=&quot;slider1&quot;&gt;
  &#60;option&gt;0&#60;/option&gt;
  &#60;option&gt;5&#60;/option&gt;
  &#60;option selected=&quot;selected&quot;&gt;10&#60;/option&gt;
  ...
  &#60;option&gt;100&#60;/option&gt;
&#60;/select&gt;
There&#8217;s nothing that could keep Dojo from parsing that bit of XHTML and gleaning from it what it needs to make the slider. And now, when Dojo doesn&#8217;t run, there is a degradable interface for the user to adjust the setting. Sure, it may not be nearly as nice, but at least it works. Plus, it allows Dojo to be added as a progressive enhancement, which is what it should be.
And to make this valid syntax, the Dojo team just needs to augment the XHTML 1.0 Strict DTD like this to include the custom attributes:
&#60;!ENTITY % Boolean
  &quot;(true | false)&quot;
  &gt;
...
&#60;!&#45;&#45; attributes for Dojo Toolkit
  showButtons           display buttons (boolean)
  intermediateChanges   display intermediate steps (boolean)
&#45;&#45;&gt;
&#60;!ENTITY % dojo&#45;attrs
  &quot;showButtons          %Boolean    #IMPLIED
   intermediateChanges  %Boolean    #IMPLIED&quot;
  &gt;
...
&#60;!ATTLIST select
  %attrs;
  name        CDATA          #REQUIRED
  size        %Number;       #IMPLIED
  multiple    (multiple)     #IMPLIED
  disabled    (disabled)     #IMPLIED
  tabindex    %Number;       #IMPLIED
  onfocus     %Script;       #IMPLIED
  onblur      %Script;       #IMPLIED
  onchange    %Script;       #IMPLIED
  %dojo&#45;attrs;
  &gt;
Sure, it takes a little extra work, but at least it gives users of the Dojo Toolkit the ability to validate their documents, which will help reduce potential CSS and JavaScript conflicts and errors (just one of the many benefits of web standards). Beyond that, it takes advantage of the extensibility of the language to facilitate innovation, and isn&#8217;t innovation what we all really want to see?</description>
      <dc:subject>design &amp; development, animation, coding, design, web standards</dc:subject>
      <dc:date>2007-09-10T21:39:05+00:00</dc:date>
    </item>

    <item>
      <title>A better createElementWithName()</title>
      <link>http://easy-reader.net/archives/2007/08/27/a-better-createelementwithname</link>
      <guid>http://easy-reader.net/archives/2007/08/27/a-better-createelementwithname</guid>
      <description>{summary}Back in 2005, I wrote a piece about IE&amp;rsquo;s abysmal generation of NAMEd elements via the DOM (which, interestingly enough, has proven to be one of the most popular posts on the blog, pointing to the fact that this is an obvious pain point for many DOM scripters out there). The the time, I wrote
function createElementWithName( type, name ){
  var element;
  // First try the IE way; if this fails then use the standard way
  if( document.all ){
    element =
      document.createElement( &#39;&amp;lt; &#39;+type+&#39; name=&quot;&#39;+name+&#39;&quot; /&amp;gt;&#39; );
  }else{
    element = document.createElement( type );
    element.setAttribute( &#39;name&#39;, name );
  }
  return element;
}
It was a complete hack, but it worked. More importantly, however, it began a discussion of a better way to fix the problem in a cross&#45;browser way. The best solution offered was Anthony Lieuallen&amp;rsquo;s very efficient one&#45;time function definition:
function createElementWithName(){}
(function(){
  try {
    var el=document.createElement( &#39;&amp;lt;div name=&quot;foo&quot;&amp;gt;&#39; );
    if( &#39;DIV&#39;!=el.tagName ||
        &#39;foo&#39;!=el.name ){
      throw &#39;create element error&#39;;
    }
    createElementWithName = function( tag, name ){
      return document.createElement( &#39;&amp;lt;&#39; + tag + &#39; name=&quot;&#39; +
        name + &#39;&quot;&amp;gt;&amp;lt;/&#39; + tag + &#39;&amp;gt;&#39; );
    }
  }catch( e ){
    createElementWithName = function( tag, name ){
      var el = document.createElement( tag );
      // setAttribute might be better here ?
      el.name = name;
      return el;
    }
  }
})();
And now Brian Adkins has refactored the script to be even fewer lines of code:
var createElementWithName = ( function(){
  try {
    var el = document.createElement( &#39;&amp;lt;div name=&quot;foo&quot;&amp;gt;&#39; );
    if( el.tagName !== &#39;DIV&#39; || el.name !== &#39;foo&#39; ){
      throw &#39;create failed&#39;;
    }
    return function( tag, name ){
      return document.createElement( &#39;&amp;lt;&#39; + tag + &#39; name=&quot;&#39; +
        name + &#39;&quot;&amp;gt;&amp;lt;/&#39; + tag + &#39;&amp;gt;&#39; );
    };
  }catch( e ){
    return function( tag, name ){
      var el = document.createElement( tag );
      el.setAttribute( &#39;name&#39;, name );
      return el;
    };
  }
})();
Geat job Brian, thanks for sharing.</description>
      <dc:subject>design &amp; development, programming, web standards</dc:subject>
      <dc:date>2007-08-27T15:44:36+00:00</dc:date>
    </item>

    <item>
      <title>Tipr, now with added txt</title>
      <link>http://easy-reader.net/archives/2007/07/29/tipr-now-with-added-txt</link>
      <guid>http://easy-reader.net/archives/2007/07/29/tipr-now-with-added-txt</guid>
      <description>{summary}So, as it turns out, this little app I built for myself is actually useful to other folks.
Over the 3 weeks since it launched, I&amp;rsquo;ve been keeping an eye on the traffic patterns, reviews, and mentions of Tipr across the intarwebs, but I&amp;rsquo;ve also been busily adding some new features, which brings me to this post. I knew people with iPhones and other capable mobile browsers were quite happy with Tipr, but folks without a mobile browser or with a sucky one were not, in my opinion, getting as much out of Tipr as I&amp;rsquo;d like them to. I wanted to correct that.
My first thought was to create an SMS service for Tipr, but there&amp;rsquo;s no way I can afford to rig up a server capable of receiving and replying to SMS messages and I certainly could not afford to pay the $1000&#45;2000/month for an SMS short code (after all, I&amp;rsquo;m not making any money on this thing). Then the answer dawned on me: Twitter.

Since Twitter offers an SMS interface (40404 once you register your mobile), I could simply piggy back on their service to offer Tipr via SMS. All I had to do was build a TwitterBot capable of receiving and responding to messages. Lots of folks have built IM bots in the past, but there weren&amp;rsquo;t that many TwitterBots and there was even less information about building one. Even with the odds stacked against me, however, after about an hour of reading the Twitter API documentation and 6 hours of actual programming, I had built a working PHP&#45;based TwitterBot class.
The whole thing works using Twitter&amp;rsquo;s direct message functionality and runs several independent services to do things like reciprocate friendships, check the inbox, process responses, and send messages back. Unfortunately, the API was only able to get me so far, so I did have to resort to a little hackery to get some of it to work, but in the end, the Tipr TwitterBot, which sits on top of my generic TwitterBot class is pretty solid and quite responsive &amp;mdash; even with the 70 API calls in 60 minutes limitation, most messages receive a response in approximately 45 seconds (depending on your network and whether Twitter is releasing a new feature and takes the service offline for a few minutes).
Overall, I&amp;rsquo;m pretty happy with the results and the early beta testers seem to be liking it as well. Hopefully some of you out there will find it as useful (if not more so) than the web interface. If you&amp;rsquo;re on Twitter, give it a shot and let me know what you think.</description>
      <dc:subject>business, design &amp; development, programming</dc:subject>
      <dc:date>2007-07-29T19:50:52+00:00</dc:date>
    </item>

    
    </channel>
</rss>