<?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-22462683</id><updated>2012-01-27T02:09:04.414+01:00</updated><category term='Twitter'/><category term='jQuery'/><category term='Ruby'/><category term='Web.Comic'/><category term='sports'/><category term='RoR'/><category term='Software'/><category term='desktop olympics'/><category term='events'/><category term='Ruby on Rails'/><category term='JavaScript'/><category term='magdalena'/><category term='ASP.NET'/><category term='brain working'/><title type='text'>Bunny and stream</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-22462683.post-5703081995130082894</id><published>2009-05-18T00:16:00.004+02:00</published><updated>2009-05-18T00:33:24.664+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='desktop olympics'/><category scheme='http://www.blogger.com/atom/ns#' term='sports'/><category scheme='http://www.blogger.com/atom/ns#' term='magdalena'/><category scheme='http://www.blogger.com/atom/ns#' term='events'/><category scheme='http://www.blogger.com/atom/ns#' term='brain working'/><title type='text'>Maribor 2009 Desktop Olympic Games</title><content type='html'>&lt;div style="float: right;"&gt;&lt;object height="170" width="280"&gt;&lt;param name="movie" value="http://www.youtube.com/v/nf829sn3fbA&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/nf829sn3fbA&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="170" width="280"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;p&gt;I'm currently working as a part of a committee tasked with the design, development and organization of  &lt;a href="http://www.desktopolympics.org/"&gt;Desktop Olympics&lt;/a&gt; that will be held in &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Maribor" title="Maribor" rel="wikipedia"&gt;Maribor&lt;/a&gt; on 20th May 2009.&lt;/p&gt;&lt;p&gt;The whole project is a product of Brain Working 2009 workshop which is held as an introduction to the annual &lt;a href="http://magdalena.org/"&gt;Magdalena festival&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;For more information on the Desktop Olympics be sure to check out the &lt;a href="http://desktopolympics.org/"&gt;official Desktop Olympics&lt;/a&gt; page, to follow &lt;a href="http://twitter.com/desktopolympics/"&gt;@desktopolympics&lt;/a&gt; on Twitter and &lt;a href="http://www.facebook.com/pages/Desktop-Olympics/98751483922"&gt;become a fan on Facebook&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;If this event is gonna be as fun as is its organization, you won't regret your coming.
&lt;/p&gt;  &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/f9512e67-9147-4c8f-9ab6-4e1cf167a320/" title="Reblog this post [with Zemanta]"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=f9512e67-9147-4c8f-9ab6-4e1cf167a320" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-5703081995130082894?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/5703081995130082894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=5703081995130082894' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/5703081995130082894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/5703081995130082894'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2009/05/maribor-2009-desktop-olympic-games.html' title='Maribor 2009 Desktop Olympic Games'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22462683.post-9199950979087479757</id><published>2009-05-11T23:08:00.008+02:00</published><updated>2009-05-12T00:25:03.275+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Twitter'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery worst practices... really?</title><content type='html'>&lt;p&gt;&lt;span class="zemanta-img-attribution"&gt;&lt;/span&gt;Following Elijah Manor (@&lt;a class="zem_slink" href="http://twitter.com/elijahmanor" title="Elijah Manor" rel="twitter"&gt;elijahmanor&lt;/a&gt;) on Twitter I came across a blog post suggesting &lt;a href="http://weblogs.asp.net/stevewellens/archive/2009/05/09/jquery-three-worst-practices.aspx"&gt;three worst practices in jQuery&lt;/a&gt;. So I decided to rant. I almost don't remember when I did that.
&lt;/p&gt;&lt;p&gt;If you already opened the article and are familiar with jQuery, its ideology, best practices and have been using it for at least a bit, you know that something is wrong there. Something? Oh, come on, even the advice about commenting is not completely right.&lt;/p&gt;&lt;p&gt;Well, let me begin a dissection of the article:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;jQuery and Regular Expressions have a lot in common: They are both amazingly powerful and they are both as ugly as a knife fight between two obese street-whores in a garbage-strewn alley.&lt;/blockquote&gt;&lt;p&gt;When I was reading the article for the first time I skipped this sentence and went straight to the "worst" practices. Had I read it, I would have closed the article and went on with my life and this post would never come to be. Even so, this comment is a matter of taste so there's nothing valuable I can say about it (except: use a different framework, but it sounds too fanboyish).
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote&gt;Worst Practice #1:  Hooking up &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Event_handler" title="Event handler" rel="wikipedia"&gt;event handlers&lt;/a&gt; dynamically when there is no need.&lt;/blockquote&gt;&lt;p&gt;And the author goes on to explain how hist &lt;span style="font-weight: bold;"&gt;first&lt;/span&gt; worst practice is that &lt;span style="font-style: italic;"&gt;sometimes&lt;/span&gt; there is no need to assign handlers dynamically. Well, surprise: the main reason jQuery is so popular is because it allows us, developers, to include &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/JavaScript" title="JavaScript" rel="wikipedia"&gt;JavaScript&lt;/a&gt; in an &lt;span style="font-weight: bold;"&gt;unobtrusive manner&lt;/span&gt;. That means exactly what it sounds like — his &lt;span style="font-weight: bold;"&gt;Worst Practice #1&lt;/span&gt; is almost one of the reasons why we have jQuery in the first place. And if you care about usability and accessibility at all, you know that &lt;span style="font-weight: bold;"&gt;unobtrusive&lt;/span&gt; is a way to go. If you don't, then, please, don't do web development anymore.
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Worst Practice #2:  Chaining the results.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I &lt;span style="font-weight: bold;"&gt;love&lt;/span&gt; jQuery because you can chain the results. And using the "unreadable code" argument to support this statement is all but silly. In JS, just as in C++, Java and many similar languages, whitespace is (mostly) ignored by an interpreter. Feel free to put it in any way you like it.
&lt;/p&gt;&lt;p&gt;Let's rewrite example from the blog:&lt;/p&gt;&lt;pre style="margin: 0px;"&gt;$("div.highlight").css({
  color: "yellow",
  backgroundColor: "black",
  width: 50
});
&lt;/pre&gt;&lt;p&gt;Well, I cheated a but and combined style rules into one function call so there is no chaining here. However it does demonstrate that jQuery is as readable as any other &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" title="Cascading Style Sheets" rel="wikipedia"&gt;CSS&lt;/a&gt; file. Hopefully a web developer has edited one? To demonstrate how to make chainability more readable, let's write a new example:&lt;/p&gt;&lt;pre style="margin: 0px;"&gt;$("div.highlight")
  .css({
    color: "yellow",
    backgroundColor: "black",
    width: 50
  })
  .slideDown('fast')
  .text('Hey, this is higlighted')
;
&lt;/pre&gt;&lt;p&gt;I understand that we all have different criteria, tastes and consider different styles "unreadable", but there is no sense writing a blog post in which you will say that the things a framework is best known for are the worst practices for programming &lt;span style="font-weight: bold;"&gt;with&lt;/span&gt; that framework.&lt;/p&gt;&lt;p&gt;I'm not saying that those practices jQuery promotes are the best ones in the world, but they &lt;span style="font-weight: bold;"&gt;are&lt;/span&gt; the best for jQuery. If this was just a rant against jQuery, I wouldn't be even bothered to read it, but in this case, I just can't understand why anyone would be using such an "ugly" framework when there are such beauties as &lt;a class="zem_slink" href="http://prototypejs.org/" title="Prototype JavaScript Framework" rel="homepage"&gt;Prototype&lt;/a&gt;, &lt;a class="zem_slink" href="http://mootools.net/" title="MooTools" rel="homepage"&gt;MooTools&lt;/a&gt;, &lt;a class="zem_slink" href="http://dojotoolkit.org/" title="Dojo Toolkit" rel="homepage"&gt;Dojo&lt;/a&gt;...&lt;/p&gt;&lt;p&gt;The third "worst practice" doesn't have anything to do with jQuery, but (I actually hate to say it) the author's example actually &lt;span style="font-weight: bold;"&gt;is&lt;/span&gt; a bad practice. You &lt;span style="font-weight: bold;"&gt;don't&lt;/span&gt; comment what piece of code does, you document its &lt;span style="font-style: italic;"&gt;intention&lt;/span&gt;. Hence a comment like "get all the Divs with the highlight class and format them and set their width" is totally superfluous and increases the maintenance needed. Anyone who can read is able to read jQuery documentation and CSS specification (or at least a guide on &lt;a href="http://www.w3schools.com/"&gt;w3schools.com&lt;/a&gt;) if he is about to write any code related to web development. If you want to add valuable comment, then you write "style divs that should be highlighted." Even this comment is mostly superfluous, but at least you don't need to update it any time you change the code.&lt;/p&gt;&lt;p&gt;Happy programming.&lt;/p&gt;&lt;p&gt;P.S.: the convention is to name  JS variables in camelCase, not PascalCase. Just an intersting thing to note.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;      



&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/bf9c58c3-a078-41f7-8a14-ba6b973e9d26/" title="Reblog this post [with Zemanta]"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=bf9c58c3-a078-41f7-8a14-ba6b973e9d26" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-9199950979087479757?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/9199950979087479757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=9199950979087479757' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/9199950979087479757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/9199950979087479757'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2009/05/jquery-worst-practices-really.html' title='jQuery worst practices... really?'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22462683.post-4859170083603098744</id><published>2009-01-13T10:39:00.003+01:00</published><updated>2009-01-13T11:02:47.866+01:00</updated><title type='text'>Solving LoadError problem on Mac OS X</title><content type='html'>&lt;p&gt;Ruby's LoadError exception occurs when a file specified as a parameter to the &lt;a style="font-weight: bold;" href="http://www.ruby-doc.org/core/classes/Kernel.html#M005966"&gt;load&lt;/a&gt; method cannot be loaded. This usually means that the file specified cannot be found in search path. To check if it really exists you should take a look your search path by opening the irb console and examining contents of &lt;span style="font-weight: bold;"&gt;$:&lt;/span&gt; array. Don't forget that &lt;span style="font-weight: bold;"&gt;gem&lt;/span&gt; method changes the contents of the array.
&lt;/p&gt;&lt;p&gt;But what if file exists and you still got the problem? Check the privileges! When I installed &lt;a href="http://github.com/wycats/textmate/tree/master"&gt;textmate&lt;/a&gt; gem from Github, the &lt;span style="font-weight: bold;"&gt;textmate&lt;/span&gt; file (the one in /Library/Ruby/Gems/1.8/gems/wycats-textmate-0.9.2/bin/) had very weird set of privileges: -rwx-wx-wx. When I chmod-ed the file to 0755 (-rwxr-xr-x), which seems more logical anyways, everything worked as expected.&lt;/p&gt;&lt;p&gt;So, check your load paths &lt;span style="font-weight: bold;"&gt;and&lt;/span&gt; your privileges.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-4859170083603098744?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/4859170083603098744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=4859170083603098744' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/4859170083603098744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/4859170083603098744'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2009/01/solving-loaderror-problem-on-mac-os-x.html' title='Solving LoadError problem on Mac OS X'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22462683.post-6688037217456082947</id><published>2008-01-15T01:38:00.000+01:00</published><updated>2008-01-15T03:09:42.113+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RoR'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby on Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Dynamic Calendar Helper - changing months</title><content type='html'>&lt;p&gt;Lately I&amp;#8217;ve started playing with Ruby on Rails and boy, am I excited. When I started, I&amp;#8217;ve installed rails with apt-get on Ubuntu, which installed rails 1.2.5 for me. Only later (but not before I finished few sample apps) I learned that there is something called RoR 2 :) Nevertheless, I already convereted one of my sample apps to rails 2.0.2 and I&amp;#8217;m getting hang of it.&lt;/p&gt;&lt;p&gt;In this app, I used &lt;a href="http://wiki.rubyonrails.org/rails/pages/DynamicCalendarHelper"&gt;DynamicCalendarHelper&lt;/a&gt; plugin to display data in a calendar. Although it does exactly what I needed, I found that configuration of next/previous month buttons is not a trivial task, so I decided to share my implementation (maybe someone can tell me if there is an easier approach).&lt;/p&gt;&lt;p&gt;My solution was to change routes.rb and add the following line for my &amp;#8220;entries&amp;#8221; controller: &lt;/p&gt;&lt;pre&gt;&lt;code&gt;map.connect 'entries/:year/:month',
  :controller =&amp;gt; 'entries',
  :action =&amp;gt; 'index'&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now when I enter url like &amp;#8216;entries/2008/1&amp;#8217;, I expect the calendar for January 2008 to be shown. I also expect that url &amp;#8216;entries/1&amp;#8217; still has same effect (displaying entry with id with &amp;#8216;show&amp;#8217; action). To implement this functionality, I had to add the following code to the controller (in index mehtod): &lt;/p&gt;&lt;pre&gt;&lt;code&gt;y = params.include?(:year) ? params[:year].to_i :
  Date.today.year
m = params.include?(:month) ? params[:month].to_i :
  Date.today.month
@display_date = Date.new(y, m, 1)&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It creates a Date object whose year and month are either read from the parameters or (if they are not set) initialized from current year and month. In any case we use first day in month. Finally we can add a method in entries helper class which will return options hash for the calendar we want to display. &lt;/p&gt;&lt;pre&gt;&lt;code&gt;def calendar_options                                        
  prevd = @display_date - 1
  nextd = @display_date + 31
  {       
    :year =&amp;gt; @display_date.year,
    :month =&amp;gt; @display_date.month,
    :previous_month_text =&amp;gt;
      link_to("&amp;amp;lt;&amp;amp;lt; Prev",
        :year =&amp;gt; prevd.year, :month = &amp;gt; prevd.month),                                               
    :next_month_text =&amp;gt;                                     
      link_to("Next &amp;amp;gt;&amp;amp;gt;",
        :year =&amp;gt; nextd.year, :month = &amp;gt; nextd.month),
  }                                                         
end&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now it is easy to crate a calendar in the view itself: &lt;/p&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;%=
calendar(calendar_options) do |d|
  # block
end
%&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-6688037217456082947?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/6688037217456082947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=6688037217456082947' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/6688037217456082947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/6688037217456082947'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2008/01/dynamic-calendar-helper-changing-months.html' title='Dynamic Calendar Helper - changing months'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22462683.post-134603571045521196</id><published>2007-03-05T20:01:00.000+01:00</published><updated>2008-01-07T22:59:52.053+01:00</updated><title type='text'>S5 - XHTML-based PowerPoint alternative</title><content type='html'>&lt;p&gt;I never hated PowerPoint (nor &lt;a href="http://www.openoffice.org/index.html" title="OpenOffice.org Impress"&gt;Impress&lt;/a&gt;, speaking of the matter), but today I saw &lt;a href="http://meyerweb.com/eric/tools/s5/" title="Eric Meyer’s Simple Standards-Based Slide Show System"&gt;S5&lt;/a&gt; &lt;a href="http://www.aspnetresources.com/blog/nyc_code_camp_presentation_slides.aspx"&gt;in action&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I recommend watching the slides to everyone interested in web standards, and S5 to everyone who wants to create presentation for which PowerPoint or Impress would be an overkill. Take a look - you'll like it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-134603571045521196?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/134603571045521196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=134603571045521196' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/134603571045521196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/134603571045521196'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2007/03/s5-xhtml-based-powerpoint-alternative.html' title='S5 - XHTML-based PowerPoint alternative'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22462683.post-7383050506717258228</id><published>2007-03-01T01:31:00.000+01:00</published><updated>2007-03-02T00:42:07.363+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web.Comic'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Valid disabled links in ASP.NET</title><content type='html'>&lt;p&gt;When we published &lt;a href="http://www.bc-evilplots.com/"&gt;Bunny-Chicken Evil Plots&lt;/a&gt; ten days ago I've tried to make it XHTML 1.0 compliant. However I did not succeed at that moment. Control I've created for comic navigation rendered invalid &lt;em&gt;disabled='disabled'&lt;/em&gt; attribute for an anchor tag. Not only it is not valid by standards (hence rejected by validator), but has special "dimmed" rendering in IE which cannot be overridden by CSS. At that moment I let it be, thinking it must be me who messed up something, because ASP.NET should be mostly XHTML-compliant.&lt;/p&gt;

&lt;p&gt;Last night I decided to make control render valid XHTML and went to look what's wrong. Turns out the source of the problem lies in &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.aspx"&gt;WebControl&lt;/a&gt; and its &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.enabled.aspx"&gt;Enabled&lt;/a&gt; property. WebControl is base class for many ASP.NET web controls and should be inherited by custom web controls. One of its main responsibilities is encapsulated in method &lt;code class="cs"&gt;protected virtual void AddAttributesToRender (HtmlTextWriter writer)&lt;/code&gt; which writes "standard" (X)HTML attributes basing on set control properties.&lt;/p&gt;

&lt;p&gt;One of that "standard" attributes rendered is 'disabled'. It is rendered if Enabled is set to false (makes sense :)). After some contemplation I've came with the following solution:&lt;/p&gt;

&lt;pre class="code cs"&gt;
&lt;code class="keyword"&gt;protected override void&lt;/code&gt; AddAttributesToRender(
    &lt;code class="type"&gt;HtmlTextWriter&lt;/code&gt; writer)
{
    &lt;code class="keyword"&gt;bool&lt;/code&gt; enabled = Enabled;
    Enabled = &lt;code class="keyword"&gt;true&lt;/code&gt;;

    &lt;code class="keyword"&gt;base&lt;/code&gt;.AddAttributesToRender(writer);

    Enabled = enabled;
    &lt;code class="comment"&gt;// [ some more code here... ]&lt;/code&gt;
}
&lt;/pre&gt;

&lt;p&gt;Idea is to override &lt;code&gt;AddAttributesToRender&lt;/code&gt; and before calling method from base class (which you should do if you inherit from WebControl), you enable control. This way &lt;em&gt;disabled &lt;/em&gt;attribute won't be set and you are free to customize disabled control as much as you like it. Of course we restore previous value from local variable.&lt;/p&gt;

&lt;p&gt;This code is part of &lt;a href="http://web-comic.svn.sourceforge.net/viewvc/web-comic/trunk/BAW.Web.UI.WebControls/AccessibleLinkButton.cs?view=markup"&gt;&lt;code&gt;AccessibleLinkButton&lt;/code&gt;&lt;/a&gt; initially created for &lt;a href="http://web-comic.sf.net/"&gt;Web.Comic&lt;/a&gt;. Nice thing about the control is that it can post back if JavaScript is enabled, or go to specified URL if JavaScript is disabled or link is middle-clicked (to open in a new tab). Check out how it works at &lt;a href="http://www.bc-evilplots.com/"&gt;Bunny-Chicken Evil Plots&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-7383050506717258228?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/7383050506717258228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=7383050506717258228' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/7383050506717258228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/7383050506717258228'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2007/03/valid-disabled-links-in-aspnet.html' title='Valid disabled links in ASP.NET'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22462683.post-7856159254996611120</id><published>2007-02-22T23:35:00.000+01:00</published><updated>2007-03-01T14:18:22.463+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>Feature I wish I'd known about before</title><content type='html'>&lt;p&gt;This morning I woke up (after two hours long sleep), dressed, went to work and suddenly an idea enlightened me. The idea I supposed would change the world from its roots. Well, at least my world.&lt;/p&gt;

&lt;p&gt;You see - I love keyboard. Because it's fast. Faster than mouse. Actually it's an ideal input device for me. No way I'd ever have enough time and nerves to explain to the computer what I want to do with voice commands. Mind control may be useful, but for some reason it scares me just to think about it...&lt;/p&gt;

&lt;p&gt;That's why I fell in love with &lt;a href="http://www.launchy.net/"&gt;Launchy&lt;/a&gt;. It's so simple and yet 42 times as much useful. When you press assigned shortcut (ALT+space is default, but I changed it ALT+Esc) launchy displays a simple text box. Just type part of the name of an application/document/bookmark (you choose) which you want to run/open, press enter and Launchy launches it for you. Simple, yet ingenious if you ask me.&lt;/p&gt;

&lt;p&gt;Back to the idea, now. I wanted similar feature for Firefox. I wanted an extension in which you could define shortcuts for URLs. After you type shortcut in, say, location bar, you'd be directed to the mapped URL. For example, instead of typing "https://www.google.com/analytics/home/" one could type only "gan" and get to &lt;a href="https://www.google.com/analytics/home/" title="Google Analytics"&gt;Google Analytics homepage&lt;/a&gt;. Would change world from deepest roots, don't you think? &lt;/p&gt;

&lt;p&gt;Just moments before I started preparing all the tools I need for building an extension I googled a bit and found that Firefox supports that feature. By default. It's called - keywords.&lt;/p&gt;

&lt;p&gt;Right click on any of your bookmarks and type a keyword. After that you can just focus location bar (CTRL+L, of course) and type the keyword. Works like a charm :D &lt;/p&gt;

&lt;p&gt;Moral to the story: start googling before you write the code. Speaking of morals &lt;a href="http://jokes.comedycentral.com/joke_of_day.aspx?adjustDate=&amp;amp;id=7179" title="Comedy Central: joke of the day"&gt;check today's joke of the day&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-7856159254996611120?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/7856159254996611120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=7856159254996611120' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/7856159254996611120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/7856159254996611120'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2007/02/feature-i-wish-id-known-about-before.html' title='Feature I wish I&apos;d known about before'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22462683.post-114004076562918292</id><published>2006-02-15T22:59:00.000+01:00</published><updated>2007-03-01T14:13:54.509+01:00</updated><title type='text'>New project planning</title><content type='html'>&lt;p&gt;I'm about to start developing heavy client-based web application. It is meant to be some form of &lt;abbr title="Content Management System"&gt;CMS&lt;/abbr&gt; for web-comic relying on client-side JavaScript and PHP as data connector.&lt;/p&gt;

&lt;p&gt;I didn't decide yet which technologies/protocols/software I'm going to use, but I had following structure in mind at first:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-weight: bold;"&gt;User interface&lt;/span&gt;: JavaScript using XMLHttpRequest to obtain data from server;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Data transfer protocol&lt;/span&gt;: pure XML;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Data provider&lt;/span&gt;: PHP would be used to read data and prepare results in XML for &lt;abbr title="XMLHttpRequest object"&gt;XHRO&lt;/abbr&gt;;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Data store&lt;/span&gt;: XML files sound like cheap solution. I think it should be easier to prepare XML output if I only select some elements and redirect them to XHRO.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As more time passes I find more flaws in this design. Some points I've read at "&lt;a href="http://xmlsucks.org/but_you_have_to_use_it_anyway/"&gt;Why does XML suck&lt;/a&gt;" just cannot be denied.&lt;/p&gt;

&lt;p&gt;Now I think I'd use &lt;a href="http://www.json.org/" title="JavaScript Object Notation"&gt;JSON&lt;/a&gt; to transfer data between data connector and JavaScript. I still cannot decide upon data store.&lt;/p&gt;

&lt;p&gt;MySQL does seem like logical solution. I have used it many times before, version 5 seems like serious RDBMS with features like stored procedures and data dictionary. Problem is that hosting solutions I'm interested in do not support newer versions (MySQL 4.0.x is most recent I saw) and generally, MySQL database has to be seperately paid for.&lt;/p&gt;

&lt;p&gt;Hence, I started to think about &lt;a href="http://www.sqlite.org/"&gt;SQLite&lt;/a&gt;. I've never used it before and don't have any idea about how fast/flexible it is, so I will do some testing.&lt;/p&gt;

&lt;p&gt;I tried using embedded Firebird on previous project and liked it. Especially because it has support for stored procedures and many 'advanced RDBMS features' ('advanced RDBMS features' is everything not present in MySQL &lt; 4.1 :D). Unfortunately it would require rebuild of PHP or additional dlls. I doubt I'd get that with shared hosting :(&lt;/p&gt;

&lt;p&gt;Maybe I should look for more hosting solutions :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-114004076562918292?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/114004076562918292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=114004076562918292' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/114004076562918292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/114004076562918292'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2006/02/new-project-planning.html' title='New project planning'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22462683.post-113995240141701755</id><published>2006-02-14T22:26:00.000+01:00</published><updated>2006-02-14T22:38:38.126+01:00</updated><title type='text'>Hello World!</title><content type='html'>And may the KIMV protect you!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22462683-113995240141701755?l=z3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://z3c.blogspot.com/feeds/113995240141701755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22462683&amp;postID=113995240141701755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/113995240141701755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22462683/posts/default/113995240141701755'/><link rel='alternate' type='text/html' href='http://z3c.blogspot.com/2006/02/hello-world.html' title='Hello World!'/><author><name>sidonath</name><uri>http://www.blogger.com/profile/08408431070092671884</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://photos1.blogger.com/hello/104/9834/100/BrakeBunny.jpg'/></author><thr:total>0</thr:total></entry></feed>
