<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bluelinecity.com &#187; Articles</title>
	<atom:link href="http://bluelinecity.com/category/articles/feed/" rel="self" type="application/rss+xml" />
	<link>http://bluelinecity.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 02 Dec 2011 20:36:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>My Spayed Keyboard</title>
		<link>http://bluelinecity.com/2007/09/02/my-spayed-keyboard/</link>
		<comments>http://bluelinecity.com/2007/09/02/my-spayed-keyboard/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 20:45:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://bluelinecity.com/?p=321</guid>
		<description><![CDATA[Whenever I get a new keyboard or switch jobs, the first thing I do is tear off the &#34;Caps Lock&#34; and &#34;Insert&#34; keys, leaving two convenient &#34;Crumb Gutters.&#34; It&#8217;s a great conversation starter for my co-workers who think the tech department, out of some random act of passive aggressiveness, has given me a keyboard they [...]]]></description>
			<content:encoded><![CDATA[<p><img width="150" hspace="5" height="119" align="left" src="http://bluelinecity.com/wp-content/uploads/image/DSCN2417.JPG" style="border: 1px solid black; padding: 2px;" alt="" /> Whenever I get a new keyboard or switch jobs, the first thing I do is tear off the &quot;Caps Lock&quot; and &quot;Insert&quot; keys, leaving two convenient &quot;Crumb Gutters.&quot; It&#8217;s a great conversation starter for my co-workers who think the tech department, out of some random act of passive aggressiveness, has given me a keyboard they fished out of the dumpster.  <span id="more-321"></span></p>
<p>However that is not the case, even though I wouldn&#8217;t put it past them.</p>
<p>If I may diverge for a minute, I always thought &quot;Crumb Gutter&quot; would be a cool name for a dog. </p>
<p>Our family dog would have fit the bill. She was stone-age version of the Roomba. She would glide under our feed during dinner and clean the floor with her single-action saliva brush. Not a single dropped crumb would escape her motion sensing ability. </p>
<p>If I may diverge again to assist in my attempt at making a humorous point, pet owners are generally encouraged to spay or neuter their pet. As opposed to allowing their floozy of a pet to prowl the night looking for some action. </p>
<p>The annoying whine of a female cat can manifest one of those &quot;crazy-thoughts&quot; to punt the animal which is performing an amazing moon-walk slowly on to your foot. </p>
<p>Another term use in conversation when regarding this procedure is &quot;fix&quot;, as in &quot;I need to get my annoying moon-walking cat fixed.&quot; </p>
<p>I was thinking of the use of that work and found it odd that we regard it as fixing the animal. I mean, technically we&#8217;re breaking it. It&#8217;s as if domestic animals where created by nature broken, and only by the divine hand of man can we &quot;fix&quot; these poor animals from ever procreating again.  </p>
<p>Anyway back to my keyboard. </p>
<p>I have never used Caps Lock, since I don&#8217;t program in COBOL, and have never found a use for the Insert key. In addition to them being completely useless, they actually get in my way&#8230; </p>
<p>A lot&#8230; </p>
<p>In the middle of writing some code all of a sudden I&#8217;ll notice my awesome foreach clause becomes foreACH. I would have to guess a Cap Lock reduces my efficiency anywhere between 10% and 30%. </p>
<p>So I fix my keyboard In the same way we &quot;fix&quot; animals. </p>
<p>By breaking them.</p>
]]></content:encoded>
			<wfw:commentRss>http://bluelinecity.com/2007/09/02/my-spayed-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Transparent Hook Pattern</title>
		<link>http://bluelinecity.com/2007/02/04/the-transparent-hook-pattern/</link>
		<comments>http://bluelinecity.com/2007/02/04/the-transparent-hook-pattern/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 20:52:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://bluelinecity.com/?p=322</guid>
		<description><![CDATA[The title is a bit misleading. This isn&#8217;t really a new pattern but a specific implementation of one. I just think it&#8217;s a neat use of javascript by dynamically adding/updating object methods. For those of you who are new to the hook pattern, it&#8217;s a design where functions and code blocks can be attached during [...]]]></description>
			<content:encoded><![CDATA[<p>The title is a bit misleading. This isn&#8217;t really a new pattern but a specific implementation of one. I just think it&#8217;s a neat use of javascript by dynamically adding/updating object methods.  For those of you who are new to the hook pattern, it&#8217;s a design where functions and code blocks can be attached during run-time to other functions or code blocks and run before,at or after the original function call. For more info on a php implementation check out <a href="http://dikini.net/hooks">this site</a>.  I&#8217;ve been using a modified version of this for some of my php scripts. This implementation is a ported version of my php version.  The Transparent Hook Pattern takes the hook pattern and makes it transparent so you don&#8217;t have to rely on another function to call the hookable functions. For example..</p>
<p><span id="more-322"></span></p>
<pre>
MyHookedObject.call( &quot;func&quot;, &quot;arg1&quot;, &quot;arg2&quot; );

<span style="color: rgb(51, 153, 102);">//Can be called like this.</span>

MyHookedObject.func(&quot;arg1&quot;,&quot;arg2&quot;);</pre>
<p>The short of it, I used javascript&#8217;s prototyping ability to rewrite all the functions in the hookable object to call the appropriate hook execution function. Not anything new but I though using it in this setting was interesting.  Using my Transparent Hook Pattern installation function you can make an object hookable with one line of code in the bottom of the constructor. Another neat use of JavaScript is applying external, arbitrary functions to objects using their context.</p>
<pre>
InstallTransparentHookPattern.apply(this);</pre>
<p>This installs the basic hook functions needed to create and run hooks and also rewrites all the object methods to call hook function.  Here&#8217;s the complete code.<span style="font-family: monospace;"><br />
</span></p>
<pre>
function InstallTransparentHookPattern()
{
   this.HOOK_PARAMS = 'HOOK_PARAMS';
   this.HOOK_BREAK = 'HOOK_BREAK';

   this.createHooks = function()
   {
      this._hooks = new Array();

      //foreach function, rename to _hook_func()//
      for ( func in this )
      {
         if ( typeof(this[func]) == 'function'
            &amp;&amp; !/^(_hook_|initalize|runHook|hook|createHooks)/.test(func) )
         {
            this['_hook_' + func] = this[func];
            this[func] = new Function('return this.runHook(&quot;'+func+'&quot;,arguments);');
            this.hook(func,this['_hook_'+func]);
         }
      }
   };

   this.runHook = function()
   {
      var hook = arguments[0];
      var arguments = arguments[1];
      var seq = ['before','at','after'];
      var rtn = null;

      if ( typeof(this._hooks[hook]) == 'object'  )
      {
         for ( var s=0; s&lt;3; s++ )
         {
            var size = this._hooks[hook][seq[s]].length;
            for ( var cnt=0; cnt &lt; size; cnt++ )
            {
               var r = this._hooks[hook][seq[s]][cnt].apply(this,arguments);
               rtn = (r != undefined &amp;&amp; r != null ? r : rtn );
               if ( rtn &amp;&amp; typeof(rtn) == 'object' )
               {
                  switch ( rtn[0] )
                  {
                     case this.HOOK_BREAK:
                        return rtn[1];
                     break;
                     case this.HOOK_PARAMS:
                        arguments = rtn[1];
                     break;
                     default: break;
                  }
               }
            }
         }
      }

      return rtn;
   };

   this.hook = function()
   {
      var args = arguments;
      switch(args.length)
      {
         case 2:
            if ( !this._hooks[args[0]] )
            {
               this._hooks[args[0]] = {'before':[],'at':[],'after':[]};
            }
            this._hooks[args[0]]['at'][this._hooks[args[0]]['at'].length] = args[1];
         break;

         case 3:
            if ( !this._hooks[args[1]] )
            {
               this._hooks[args[1]] = {'before':[],'at':[],'after':[]};
            }

            if ( args[0] == 'around' )
            {
               this._hooks[args[1]]['before'][this._hooks[args[1]]['before'].length] = args[2];
               this._hooks[args[1]]['after'][this._hooks[args[1]]['after'].length] = args[2];
            }
            else
            {
               this._hooks[args[1]][args[0]][this._hooks[args[1]][args[0]].length] = args[2];
            }
         break;

         default:
            return null;
         break;
      }
   };

   this.createHooks();
}
</pre>
<p>After installing the Transparent Hook, you hook functions using the below syntax.</p>
<pre><span style="color: rgb(51, 153, 102);">//this will add 1 to myObj's value before any calls the myMethod.</span>
myObj.hook('before','myMethod',function(){ this.value++; });

<span style="color: rgb(51, 153, 102);">//this will add 1 to myObj's value after any calls the myMethod.</span>
myObj.hook('after','myMethod',function(){ this.value++; });

<span style="color: rgb(51, 153, 102);">//this will add 1 to myObj's value immediately after any calls the myMethod.</span>
myObj.hook('at','myMethod',function(){ this.value++; });</pre>
<p>I also created some special case global constants to control how a chain of hooked functions are executed. I&#8217;m sure there&#8217;s a better way of doing, such as a command pattern, this but this is my hack for now.  The two global constants are <strong>this.HOOK_PARAMS</strong> ( which takes what is returned in an array to pass to the next function in the hook chain ) and <strong>this.HOOK_BREAK</strong> ( which kills the chain of execution and returns to the caller ).  To use these in a hooked function, you have to return the constant as the first element in an array. In the case of HOOK_PARAMS, the second array element is another array which constitutes the parameters to pass to the next function in line&#8230; Hacky&#8230;i know&#8230; but it works.  And thats my amazing, super awesome transparent hook pattern thing!  -bryan bryan AT bluelinecity DOT com</p>
]]></content:encoded>
			<wfw:commentRss>http://bluelinecity.com/2007/02/04/the-transparent-hook-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Dont&#8217;s Volume 1: An easy-to-use guide to avoid making an annoying Web site.</title>
		<link>http://bluelinecity.com/2000/09/26/web-donts-volume-1-an-easy-to-use-guide-to-avoid-making-an-annoying-web-site/</link>
		<comments>http://bluelinecity.com/2000/09/26/web-donts-volume-1-an-easy-to-use-guide-to-avoid-making-an-annoying-web-site/#comments</comments>
		<pubDate>Tue, 26 Sep 2000 20:59:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://bluelinecity.com/?p=323</guid>
		<description><![CDATA[We are all guilty of it at some time in our short Web designing lives. We don&#8217;t like to think back to the time when we thought a 10 foot long, completely centered Web page was &#34;Cool&#34;. It&#8217;s not till after passing that blissful phase of misguided design, that we realize the line between an [...]]]></description>
			<content:encoded><![CDATA[<p>We are all guilty of it at some time in our short Web designing lives. We don&#8217;t like to think back to the time when we thought a 10 foot long, completely centered Web page was &quot;Cool&quot;. It&#8217;s not till after passing that blissful phase of misguided design, that we realize the line between an original Web site with easy-to-access information, and a moving, blinking, noisy, multi-colored tool of <a target="_new" href="http://www.purgatory.com">purgatory</a>.</p>
<p><span id="more-323"></span></p>
<p align="justify"><strong>The Blink Tag</strong> &#8211; Possibly the worst HTML element ever bestowed upon the Web designing community. This tag blinks like a lazy strobe light. It&#8217;s terrible. It&#8217;s annoying. Its support should be commented out of the browser&#8217;s source code everywhere.</p>
<p align="justify"><strong>Animated Backgrounds</strong> &#8211; Epilepsy here we come. Unless you enjoy giving yourself a headache and or exercising your irises, don&#8217;t to this! It makes it hard to look at the text, makes the browser choke at the amount of processing it has to do and is just plain annoying.</p>
<p align="justify"><strong>Background Sound</strong> &#8211; All is quiet, nothing stirs, not even a mouse. You sit complacently at your computer casually surfing the net and enjoying its zen-like quality. Suddenly, the silence it broken by a loud digitized noise that is torturously hypnotic. You scramble for your speakers to try and stop it. With the music now stopped, you search the page for some type of control that lets you turn off the infernal sound. But to no avail. Soon, you feel the urge to jam WinAmp, but can&#8217;t because the speakers are turned down. Finally, giving in to your MP3 deck, you leave the site, turn up your speakers, load up your play list, and hit &quot;X&quot;. You just lost a user to a simple MIDI.</p>
<p align="justify"><strong>1000 Animated GIFs</strong> &#8211; In great numbers, this has the same effect as the an &quot;Animated Background&quot;, <small>(see above)</small>. Number one, it takes your page 9 hours to load. Number two, most of the GIFs are on the, &quot;Most Used and Abused List&quot;. Number three, 98% of all the GIFs don&#8217;t match the background or each other, which makes the page look like a compulsive <a target="_new" href="http://www.avesinternational.com/crabs.html">decorator crab</a> in a junkyard.</p>
<p align="justify"><strong>100 Pictures of your Cat</strong> &#8211; I&#8217;m sure your cat is really cute and cuddly and you love it very much. But when you have one-hundred 87k JPGs of your cat sleeping, eating or just looking blankly into the camera, it gets a little mundane.</p>
<p align="justify"><strong>Pop-up Dialog Boxes</strong> &#8211; I wouldn&#8217;t call these annoying, I&#8217;d call them nerve recking. Especially when you have them pop-up before your page loads because if you&#8217;re a Windows user, the first thing that pops into your head is that your browser illegal op&#8217;ed and is fixing to close. It&#8217;s even worse if you use IE because then it also tries to take Window&#8217;s down with it. If you have a one of those dialog boxes that won&#8217;t let you by unless you enter your name, don&#8217;t feel bad if I Ctrl+ALt+Del your window and never visit again.</p>
<p align="justify"><strong>Under Construction Signs</strong> &#8211; Simply put, if your page/site is under construction, <span style="text-decoration: underline;">DON&#8217;T LINK IT</span>! Nothing is more annoying then going to a page expecting to find some information and instead seeing an overly used &quot;Under Construction&quot; animated GIF. That just wasted 3 minutes of my time and precious bandwidth.</p>
<p align="justify"><strong>Size 7 Text</strong> &#8211; When I have to scroll my browser to finish a sentence, that&#8217;s bad. It&#8217;s even worse if you use MS Comic Sans and the three primary colors to do it.</p>
<p align="justify"><strong>Broken JavaScript</strong> &#8211; You find this really cool JavaScript and decide to copy and paste into all your HTML files on your site. Except you&#8217;re a strict Netscape user and fail to realize people also use IE. An IE user then logs on to your site and gets ambushed by a mass of JavaScript Error dialog boxes. That really places a burden on your site. Users just end up trying to find a way out of your malfunctioning Web site.</p>
<p align="justify">And that ends my first collection of Web site annoyances. I hope we all learn from these and use them to help create a nicer, cleaner park to play in.</p>
<p>&lt;sincerely&gt; Your Angry HTML Writer &lt;/sincerely&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://bluelinecity.com/2000/09/26/web-donts-volume-1-an-easy-to-use-guide-to-avoid-making-an-annoying-web-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

