<?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>FiftyOneReasons</title>
	<atom:link href="http://www.fiftyonereasons.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fiftyonereasons.com</link>
	<description>Interactive Media Development + Exploration</description>
	<lastBuildDate>Thu, 22 Sep 2011 17:22:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>SmartFoxServer Android Samples Delivered</title>
		<link>http://www.fiftyonereasons.com/2011/09/smartfoxserver-android-samples-delivered/</link>
		<comments>http://www.fiftyonereasons.com/2011/09/smartfoxserver-android-samples-delivered/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 16:01:49 +0000</pubDate>
		<dc:creator>Wayne Helman</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SmartFoxServer]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=346</guid>
		<description><![CDATA[gotoAndPlay(), the developers behind the wildly popular SmartFoxServer multi-user server have released the Android Sample Source Code we here at A51 developed for them. SmartFoxServer 2X is the latest server offering from gotoAndPlay() and we were honoured to be asked to write the Android samples for the server. There are three samples in total starting [...]]]></description>
			<content:encoded><![CDATA[<p>gotoAndPlay(), the developers behind the wildly popular <a title="SmartFoxServer" href="http://smartfoxserver.com" target="_blank">SmartFoxServer</a> multi-user server have released the <a title="SFS2X Android Samples" href="http://docs2x.smartfoxserver.com/ExamplesAndroid/introduction" target="_blank">Android Sample Source Code</a> we here at A51 developed for them.</p>
<p>SmartFoxServer 2X is the latest server offering from gotoAndPlay() and we were honoured to be asked to write the Android samples for the server. There are three samples in total starting with the most basic C<em>onnector</em> sample, and concluding with a playable tick-tack-toe game call <em>SFS Tris.</em></p>
<p><em></em>Previously, A51 was asked to develop a complete multi-player top-down Racing Game for SFS2X to showcase some of the new functionality available in the SFS2X server release. Both projects now reside on the official SmartFoxServer website and all source code and documentation is available for download.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2011/09/smartfoxserver-android-samples-delivered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Video</title>
		<link>http://www.fiftyonereasons.com/2011/08/html5-video-2/</link>
		<comments>http://www.fiftyonereasons.com/2011/08/html5-video-2/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 21:27:42 +0000</pubDate>
		<dc:creator>rchohan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[a51]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=334</guid>
		<description><![CDATA[How easy is it to place HTML5 video on web browsers and mobile devices? Not very, as we, at A51, have lately discovered. Our client, General Purpose Pictures, wanted to completely redesign their company&#8217;s site, and recognizing the importance of being mobile-friendly, the new site had to be developed completely in HTML. To include a [...]]]></description>
			<content:encoded><![CDATA[<p>How easy is it to place <a href="http://www.html5rocks.com/en/tutorials/video/basics/" target="_blank">HTML5 video</a> on web browsers and mobile devices?</p>
<p>Not very, as we, at A51, have lately discovered. Our client, General Purpose Pictures, wanted to completely redesign their company&#8217;s site, and recognizing the importance of being mobile-friendly, the new site had to be developed completely in HTML. To include a video file on their home page, and acknowledging that Adobe Flash was not an option, we turned to HTML5.</p>
<p>The latest HTML version has been developed to be compatible with audio and video functionality, a sort of alternative to Adobe Flash, and to an extent, it has delivered. However, getting it to work across multiple browsers and across multiple devices, was definitely the biggest challenge we experienced.</p>
<p>Here&#8217;s a bit of a background on the project: We wanted to place an HTML5 video on General Purpose Picture&#8217;s home page, that would automatically play and loop continuously. A fairly new video functionality, it&#8217;s not quite compliant across all browsers, so we could easily get it working on one browser, but then it wouldn&#8217;t play on another. You see, Google Chrome uses a webkit engine that supports H.264 as a web video codec, whereas, Firefox is supported by .ogv files for HTML5 video.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">mozilla</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
          $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#video'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&amp;lt;video poster=&quot;/img/gpp_video_poster.jpg&quot; preload=&quot;none&quot; autoplay=&quot;autoplay&quot; loop=&quot;loop&quot; tabindex=&quot;0&quot;&amp;gt;&amp;lt;source id=&quot;ogv&quot; src=&quot;/video/intro.theora.ogv&quot; type=<span style="color: #000099; font-weight: bold;">\'</span>video/ogg; codecs=&quot;theora, vorbis&quot;<span style="color: #000099; font-weight: bold;">\'</span> /&amp;gt;&amp;lt;/video&amp;gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">msie</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> ieVersion <span style="color: #339933;">=</span> $.<span style="color: #660066;">browser</span>.<span style="color: #660066;">version</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>ieVersion <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #CC0000;">9</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#video'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&amp;lt;object classid=&quot;clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B&quot; standby=&quot;data is loading...&quot; codebase=&quot;http://www.apple.com/qtactivex/qtplugin.cab&quot; width=&quot;480&quot; height=&quot;376&quot;&amp;gt;&amp;lt;param name=&quot;src&quot; value=&quot;intro.mov&quot;&amp;gt;&amp;lt;param name=&quot;autoplay&quot; value=&quot;true&quot;&amp;gt;&amp;lt;param name=&quot;type&quot; value=&quot;video/quicktime&quot; width=&quot;294&quot; height=&quot;166&quot;&amp;gt;&amp;lt;param name=&quot;controller&quot; value=&quot;true&quot;&amp;gt;&amp;lt;embed src=&quot;intro.mov&quot; width=&quot;294&quot;  height=&quot;166&quot;autoplay=&quot;true&quot; controller=&quot;true&quot; type=&quot;video/quicktime&quot; pluginspage=&quot;http://www.apple.com/quicktime/download/&quot;&amp;gt;&amp;lt;/object&amp;gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">else</span>
        <span style="color: #009900;">&#123;</span>
          $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#video'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&amp;lt;video width=&quot;294&quot; height=&quot;166&quot; preload=&quot;none&quot; autoplay=&quot;autoplay&quot; controls=&quot;none&quot; loop=&quot;loop&quot; tabindex=&quot;0&quot;&amp;gt;&amp;lt;source id=&quot;mp4&quot; src=&quot;/video/intro.mp4&quot; type=&quot;video/mp4&quot; type=<span style="color: #000099; font-weight: bold;">\'</span>video/mp4; codecs=&quot;avc1.42E01E, mp4a.40.2&quot;<span style="color: #000099; font-weight: bold;">\'</span> /&amp;gt;&amp;lt;/video&amp;gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></div></div>

<p>So, we had to convert the video file to compatible formats, using this<a href="http://v2v.cc/~j/ffmpeg2theora/"> free converter</a> in order to have the video file play on various browsers and devices. The disparity across browsers means that each time a user lands on this page, it has to detect which browser is being used, and then replace the video tag accordingly, using jQuery.</p>
<p>On top of all of that, mobile devices also behave differently. For every HTML5 video tag, you can set controls that include auto-play, looping, etc., but for mobile devices, like iPads, setting controls is not an option, so the video file shows up but the user has to manually press play to watch it. And one more thing, on the server you have to make sure to add the <a href="http://lenya.apache.org/docu12x/howtos/newmimetype.html" target="_blank">MIME</a> types or configure your htaccess file, otherwise the Apache server won&#8217;t deploy the video file.</p>
<pre>AddType video/ogg .ogv
AddType audio/ogg .oga
AddType video/mp4 .mp4
AddType video/webm .webm</pre>
<p>So, was it worth it to venture into HTML5 video? Absolutely. Although it looks simple enough, it&#8217;s a process that requires a ton of workarounds and significant testing. But in the end, the video works on all web browsers and mobile devices, and it looks great. Client happy, A51 happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2011/08/html5-video-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Official SmartFoxServer 2X Tutorials Released</title>
		<link>http://www.fiftyonereasons.com/2011/03/official-smartfoxserver-2x-tutorials-released/</link>
		<comments>http://www.fiftyonereasons.com/2011/03/official-smartfoxserver-2x-tutorials-released/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 04:22:13 +0000</pubDate>
		<dc:creator>Wayne Helman</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SmartFoxServer]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=313</guid>
		<description><![CDATA[The first three five episodes of the Official SmartFoxServer 2X Tutorials have been released by gotoAndPlay() on their SmartFoxServer YouTube channel. I had a lot of fun creating them for the gotoAndPlay() guys and am working on a few more advanced tutorials to add to the series. SmartFoxServer 2X is the latest release from goToAndPlay() [...]]]></description>
			<content:encoded><![CDATA[<p>The first <del>three</del> five episodes of the <a href="http://www.youtube.com/smartfoxserver#g/c/C16B8E94B9D7C3E5">Official SmartFoxServer 2X Tutorials</a> have been released by gotoAndPlay() on their SmartFoxServer YouTube channel. I had a lot of fun creating them for the gotoAndPlay() guys and am working on a few more advanced tutorials to add to the series.</p>
<p><a href="http://www.smartfoxserver.com/2X/">SmartFoxServer 2X</a> is the latest release from goToAndPlay() and offers a substantial performance boost over it&#8217;s predecessor (SFS 1.6.9) as well as some really innovative and useful features. I highly recommend having a look at the new server if you&#8217;re interested in developing multi-player games or applications. Some of the new features include an enhanced Admin Tool, enhanced security, UDP support, binary transfer, message compression, a new game API, high resilient connection system, room categorization, match expresion engine, and an entirely new server side extension architecture.</p>
<p>We&#8217;ve been working extensively with SFS 2X already having created a sample game that will soon be released on the <a href="http://www.smartfoxserver.com">SmartFoxServer website</a>. Keep a look out for the full source code and walkthrough, but in the meantime, have a peek at the <a href="http://www.youtube.com/smartfoxserver#g/c/C16B8E94B9D7C3E5">recently released tutorials on YouTube</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2011/03/official-smartfoxserver-2x-tutorials-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Styling TextFieldType.INPUT with a CSS Stylesheet</title>
		<link>http://www.fiftyonereasons.com/2010/10/styling-textfieldtype-input-with-a-css-stylesheet/</link>
		<comments>http://www.fiftyonereasons.com/2010/10/styling-textfieldtype-input-with-a-css-stylesheet/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 13:37:08 +0000</pubDate>
		<dc:creator>Wayne Helman</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=292</guid>
		<description><![CDATA[One thing that has always bothered me about Flash technologies is the relative lack of support for text layout and HTML. I&#8217;ve always thought that if Adobe had paid more attention to laying out text, Flash could have become the de-facto method of content delivery online. Instead, we have to jump through a number of [...]]]></description>
			<content:encoded><![CDATA[<p>One thing that has always bothered me about Flash technologies is the relative lack of support for text layout and HTML. I&#8217;ve always thought that if Adobe had paid more attention to laying out text, Flash could have become the de-facto method of content delivery online. Instead, we have to jump through a number of hoops to properly present formated text the way standard HTML does. HTML combined with CSS is a flexible and compact method for a number of reasons and AS3 only supports a limited number of those features. One gapping hole in my opinion is that by default, the TextField class when set to TextFieldType.INPUT can only be styled with TextFormat. All other text can be controlled via CSS and the exception of an INPUT field is simply frustrating.<span id="more-292"></span></p>
<p>To overcome this deficiency, we can load a CSS stylesheet and transform styles into a TextFormat by using the <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">StyleSheet.transform() </span>method. We can pass in the StyleSheet and a style to apply. Using <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">StyleSheet.getStyle()</span>, we can retrieve an object that contains all of our style information for a specific CSS definition &#8211; say, <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">span.myStyle { color: #ffccff; }</span>. The <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">transform()</span> method will convert that style into a TextFormat for us and we now have dynamic CSS styling for out INPUT fields.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> createInputTextField<span style="color: #000000;">&#40;</span>$style<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">,</span> $css<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">StyleSheet</span> = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TextField</span>
<span style="color: #000000;">&#123;</span>
	 <span style="color: #3f5fbf;">/*
	Usage:
		var css:StyleSheet = new StyleSheet('span.myStyle { color: #ffccff; }');
		var tf:TextField = createInputTextField('span.myStyle', css);
		addChild(tf);
	*/</span>
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> input<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TextField</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextField</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	input<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">type</span> = <span style="color: #004993;">TextFieldType</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">INPUT</span><span style="color: #000066; font-weight: bold;">;</span>
	input<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">border</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
	input<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">borderColor</span> = 0x000000<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>$style <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span> input<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">defaultTextFormat</span> = $css<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">transform</span><span style="color: #000000;">&#40;</span>$css<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getStyle</span><span style="color: #000000;">&#40;</span>$style<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">return</span> input<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Now, with a single StyleSheet, we can style ALL TextField instances &#8211; the way it should be.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2010/10/styling-textfieldtype-input-with-a-css-stylesheet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flash Based Google Maps Application Delivered for PA Tourism</title>
		<link>http://www.fiftyonereasons.com/2010/06/flash-based-google-maps-application-delivered-for-pa-tourism/</link>
		<comments>http://www.fiftyonereasons.com/2010/06/flash-based-google-maps-application-delivered-for-pa-tourism/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 16:58:38 +0000</pubDate>
		<dc:creator>Wayne Helman</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[a51]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[Maps]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=247</guid>
		<description><![CDATA[Recently, we released a Flash based Google Maps application we built for Pennsylvania Tourism: Roadtrip-a-Matic. The application encourages users to enter a beginning and ending address and maps out the route through a scenic tour of Pennsylvania. There are a number of routes to choose from, each with a plethora of points of interest. The app [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_257" class="wp-caption alignnone" style="width: 680px"><a href="http://www.fiftyonereasons.com/2010/06/flash-based-google-maps-application-delivered-for-pa-tourism/"><img class="size-full wp-image-257 " title="roadtrip" src="http://www.fiftyonereasons.com/wp-content/uploads/2010/06/roadtrip.jpg" alt="Roadtrip-a-Matic" width="670" height="300" /></a><p class="wp-caption-text">PA Tourism&#39;s Roadtrip-a-Matic</p></div>
<p>Recently, we released a Flash based Google Maps application we built for Pennsylvania Tourism: <em><a href="http://visitpa.com/trip-ideas/roadtrip-a-matic/index.aspx" target="_blank">Roadtrip-a-Matic</a>. </em>The application encourages users to enter a beginning and ending address and maps out the route through a scenic tour of Pennsylvania. There are a number of routes to choose from, each with a plethora of points of interest.</p>
<p>The app makes use of a number of different Google Maps API methods to invoke step-by-step directions, calculate distances and project travel time.</p>
<p>Hugs and kisses go out to our good friends in Philly, <a href="http://redtettemer.com" target="_blank">Red Tettemer</a>, who drove the project and knocked it out of the park.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2010/06/flash-based-google-maps-application-delivered-for-pa-tourism/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Ever Thought About Using @Font-face for Icons?</title>
		<link>http://www.fiftyonereasons.com/2010/04/quick-tip-ever-thought-about-using-font-face-for-icons/</link>
		<comments>http://www.fiftyonereasons.com/2010/04/quick-tip-ever-thought-about-using-font-face-for-icons/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 17:22:36 +0000</pubDate>
		<dc:creator>Wayne Helman</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=243</guid>
		<description><![CDATA[Nettus+ was kind enough to publish an article I authored on using the CSS3 @font-face declaration for purposes other than fonts. There are a number of applications and it opens up a number of different doors. Have a read on Nettuts. Here&#8217;s the demo. You can also download a ZIP of the demo here.]]></description>
			<content:encoded><![CDATA[<div id="attachment_260" class="wp-caption alignnone" style="width: 680px"><a href="http://www.fiftyonereasons.com/2010/04/quick-tip-ever-thought-about-using-font-face-for-icons/"><img class="size-full wp-image-260 " title="nettuts" src="http://www.fiftyonereasons.com/wp-content/uploads/2010/04/nettuts.jpg" alt="" width="670" height="300" /></a><p class="wp-caption-text">Nettuts</p></div>
<p>Nettus+ was kind enough to publish an article I authored on using the CSS3 @font-face declaration for purposes other than fonts. There are a number of applications and it opens up a number of different doors.</p>
<p>Have a read on <a href="http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-ever-thought-about-using-font-face-for-icons/" target="_blank">Nettuts</a>.</p>
<p>Here&#8217;s <a href="/examples/iconpack/index.html" target="_blank">the demo</a>. You can also download <a href="examples/iconpack/iconpack.zip">a ZIP of the demo here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2010/04/quick-tip-ever-thought-about-using-font-face-for-icons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE7 @font-face bug and fix</title>
		<link>http://www.fiftyonereasons.com/2010/02/ie7-font_face-bug-and-fix/</link>
		<comments>http://www.fiftyonereasons.com/2010/02/ie7-font_face-bug-and-fix/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 14:35:32 +0000</pubDate>
		<dc:creator>Wayne Helman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=234</guid>
		<description><![CDATA[This week we stumbled upon a rather odd bug in IE7 (surprise, surprise) when embedding a EOT font file using the @font-face construct. To save on bandwidth, we often edit out sets of characters from a font that we know will not be used on a site. In this particular instance, we were using this [...]]]></description>
			<content:encoded><![CDATA[<p>This week we stumbled upon a rather odd bug in IE7 (surprise, surprise) when embedding a EOT font file using the <code>@font-face</code> construct. To save on bandwidth, we often edit out sets of characters from a font that we know will not be used on a site. In this particular instance, we were using this font for headers that were all composed in title case, but displayed in uppercase using the <code>text-transform</code> property. Logically, we saved all our font files with only the uppercase characters-we simply don&#8217;t use the lowercase. The site rendered perfectly in every browser (including IE6 and IE8) that supported the <code>@font-face</code> construct with the notable exception of IE7.<span id="more-234"></span></p>
<p>IE7 only displayed the first character of each word in the proper font-the rest of the characters were displaying in the browsers default font. Scratching our heads, we finally figured out that since the headers where actually written as title case-and therefore containing lowercase characters, that even though the <code>text-transform</code> property was deployed and characters where appearing in uppercase, IE7 required the lowercase letters to exist in the EOT file to display the uppercase characters (intuitive isn&#8217;t it). So the simple fix was the rebuild the EOT file with both upper and lowercase even though the lowercase characters are never used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2010/02/ie7-font_face-bug-and-fix/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Site Launch: Neilson® Dairy Oh!®</title>
		<link>http://www.fiftyonereasons.com/2009/11/site-launch-neilson-dairy-oh/</link>
		<comments>http://www.fiftyonereasons.com/2009/11/site-launch-neilson-dairy-oh/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 17:15:48 +0000</pubDate>
		<dc:creator>Wayne Helman</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[a51]]></category>
		<category><![CDATA[clients]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=226</guid>
		<description><![CDATA[A51 is pleased to announce the launch of a new updated website for Saputo&#8217;s Neilson® Milk brand Dairy Oh!®. Dairy Oh!® contains DHA, an Omega-3 fatty acid, contributes to good health and normal growth and development. The focus of the campaign was to elaborate on the benefits of milk high in DHA. The overall campaign [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_254" class="wp-caption alignnone" style="width: 680px"><a href="http://www.fiftyonereasons.com/2009/11/site-launch-neilson-dairy-oh/"><img class="size-full wp-image-254 " title="dairy-oh" src="http://www.fiftyonereasons.com/wp-content/uploads/2009/11/dairy-oh1.jpg" alt="Neilson® Dairy Oh®!" width="670" height="300" /></a><p class="wp-caption-text">Neilson® Dairy Oh®!</p></div>
<p>A51 is pleased to announce the launch of a new updated website for Saputo&#8217;s <a href="http://dairy-oh.com" target="_blank">Neilson<sup>®</sup> Milk brand Dairy Oh!<sup>®</sup></a>. Dairy Oh!<sup>®</sup> contains DHA, an Omega-3 fatty acid, contributes to good health and normal growth and development. The focus of the campaign was to elaborate on the benefits of milk high in DHA. The overall campaign creative was developed by <a href="http://www.cleansheet.ca/" target="_blank">Clean Sheet Communications</a>. A51 developed the &#8220;one page website&#8221; concept for the campaign, designed the creative and developed the website.</p>
<p>The website uses jQuery to scroll up and down a stack of books held by a young girl, displaying selected content in a callout window. Both English and French versions are available.</p>
<p>A big thanks goes out to Clean Sheet and their team for putting so much trust in us!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2009/11/site-launch-neilson-dairy-oh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A51 &amp; ActionScript 3 Development Task Contest #1</title>
		<link>http://www.fiftyonereasons.com/2009/11/a51-actionscript-3-development-task-contest-1/</link>
		<comments>http://www.fiftyonereasons.com/2009/11/a51-actionscript-3-development-task-contest-1/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 20:57:42 +0000</pubDate>
		<dc:creator>Phil Chertok</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=220</guid>
		<description><![CDATA[On Friday I participated in the first ActionScript 3 Development Task Contest, which challenged users to divide the stage into a grid and to find all the neighbors of a given display object on that grid.   The key was that the winner should implement their method in the quickest/most efficient way possible. Results would be [...]]]></description>
			<content:encoded><![CDATA[<p>On Friday I participated in the first <a href="http://www.mikechambers.com/blog/2009/11/10/actionscript-3-development-task-contest-1/" target="_blank">ActionScript 3 Development Task Contest</a>, which challenged users to divide the stage into a grid and to find all the neighbors of a given display object on that grid.   The key was that the winner should implement their method in the quickest/most efficient way possible. Results would be measured using Grant Skinner&#8217;s fantastic <a href="http://www.gskinner.com/blog/archives/2009/04/as3_performance.html">Performance Testing Harness</a>.<span id="more-220"></span></p>
<p>Well <a href="http://www.mikechambers.com/blog/2009/11/16/results-from-as3-development-task-contest-1/" target="_blank">the results are in</a> and while I did not win I am certainly please with my results.  My entry was in the top half of the results and not far behind contest organizer <a href="http://www.mikechambers.com/blog" target="_blank">Mike Chambers&#8217;</a> entry.</p>
<p>The contest taught me a lot about AS3 optimization, mainly that bit-wise operations can seriously increase your speed performance.  I definitley need to brush up on my 1&#8242;s and 0&#8242;s.</p>
<p>You can take a look at my entry <a href="http://github.com/mikechambers/ActionScript-3-Development-Task-Contests/blob/master/AS3DTC_1/entries/PhillipChertok/ProximityManager.as" target="_blank">here</a> and all the other implementations <a href="http://github.com/mikechambers/ActionScript-3-Development-Task-Contests/tree/master/AS3DTC_1/entries/">here</a>.</p>
<p>Big thanks for Ian Stewart for helping me with my class and Mike Chambers for organizing the contest.  I can&#8217;t wait until the next one comes along as I am sure I&#8217;ll be able to improve my performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2009/11/a51-actionscript-3-development-task-contest-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stress Testing CakePHP with Pylot</title>
		<link>http://www.fiftyonereasons.com/2009/11/stress-testing-cakephp-with-pylot/</link>
		<comments>http://www.fiftyonereasons.com/2009/11/stress-testing-cakephp-with-pylot/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 20:21:40 +0000</pubDate>
		<dc:creator>Matt Fisher</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Pylot]]></category>
		<category><![CDATA[Stress Testing]]></category>

		<guid isPermaLink="false">http://www.fiftyonereasons.com/?p=182</guid>
		<description><![CDATA[Since we like to use the CakePHP framework here at A51 we figured it would be great if we could find or develop a tool to load test our sites as we developed them to weed out any issues that would be caused in a high load production environment. After some research, we found a [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_265" class="wp-caption alignnone" style="width: 680px"><a href="http://www.fiftyonereasons.com/2009/11/stress-testing-cakephp-with-pylot/"><img class="size-full wp-image-265 " title="cake_pylot" src="http://www.fiftyonereasons.com/wp-content/uploads/2009/11/cake_pylot.jpg" alt="CakePHP/Pylot" width="670" height="300" /></a><p class="wp-caption-text">Using Pylot to Load Test CakePHP</p></div>
<p>Since we like to use the <a href="http://cakephp.org/" target="_blank">CakePHP</a> framework here at A51 we figured it would be great if we could find or develop a tool to <a href="http://en.wikipedia.org/wiki/Load_testing" target="_blank">load test</a> our sites as we developed them to weed out any issues that would be caused in a high load production environment. After some research, we found a small open source application called Pylot (<a href="http://www.pylot.org" target="_blank">http://www.pylot.org</a>) which is made for testing performance and scalability of web services. Pylot generates concurrent load (HTTP Requests), verifies server responses, and produces reports with metrics. Tests suites are executed and monitored from a GUI or shell/console.<span id="more-182"></span></p>
<p>I decided to use <a href="http://www.centos.org/" target="_blank">CentOS 5.4 (stable)</a> for my testing and started with a clean install of the OS with just the base packages and no window manager. Pylot requires a couple dependencies for different actions you may want it to perform. First is Python, and since Pylot requires Python 2.5+ I needed to compile Python from source as CentOS repository only had 2.4.3. The next dependencies were NumPy (<a href="http://sourceforge.net/projects/numpy">http://sourceforge.net/projects/numpy</a>)  as well as MatPlotlib (<a href="http://sourceforge.net/projects/matplotlib">http://sourceforge.net/projects/matplotlib</a>) which are both used for generating graphs.</p>
<p>Now that my system was ready to run Pylot I needed to setup a test case (ie. a list of what and how I wanted a site to be tested). Pylot sets up tests cases with simple XML files. In it&#8217;s simplest form, a test case would look like this:</p>
<pre>&lt;testcases&gt;
  &lt;case&gt;
    &lt;url&gt;http://www.foo.com/bar&lt;/url&gt;
  &lt;/case&gt;
&lt;/testcases&gt;</pre>
<p>To run the test we run the <em>run.py</em> script in the base directory of the Pylot source. Pylot will run a designated amount of clients for a designated amount of time on the URLs listed in the test case XML document and then generate a results directory with <a href="http://www.pylot.org/samples/results/results.html" target="_blank">a nice HTML file to display the findings</a>.</p>
<p>As great as the data that comes of out Pylot is, it wasn&#8217;t good enough to point out to us what exactly what slowing the site down, it would just tell you what pages where slower then others. What we needed was a way to generate MySQL performance data from Pylot and combine the two data collections together to see where the site was slow under <em>n</em> amount of users and what MySQL queries were causing that.</p>
<p>It finally dawned on me to just use the <a href="http://book.cakephp.org/view/44/CakePHP-Core-Configuration-Variables" target="_blank">debug feature in CakePHP</a>, which generates a query log  per page load. For Example,</p>
<table id="output" border="0" cellspacing="0">
<caption>(default) 12 queries took 19 ms</caption>
<thead>
<tr>
<th>Nr</th>
<th>Query</th>
<th>Affected</th>
<th>Rows</th>
<th>Took (ms)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="id">1</td>
<td class="query">DESCRIBE `contents`</td>
<td></td>
<td style="text-align: right;">10</td>
<td style="text-align: right;">2</td>
</tr>
<tr>
<td class="id">2</td>
<td class="query">DESCRIBE `layouts`</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">2</td>
</tr>
<tr>
<td class="id">3</td>
<td class="query">DESCRIBE `contents_blocks`</td>
<td style="text-align: right;">7</td>
<td style="text-align: right;">7</td>
<td style="text-align: right;">2</td>
</tr>
<tr>
<td class="id">4</td>
<td class="query">DESCRIBE `blocks`</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">2</td>
</tr>
<tr>
<td class="id">5</td>
<td class="query">DESCRIBE `media`</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">2</td>
</tr>
<tr>
<td class="id">6</td>
<td class="query">SELECT `Content`.`id`, `Content`.`title`, `Content`.`sub_head`, `Content`.`intro`, `Content`.`body`, `Content`.`published`, `Content`.`path`, `Layout`.`name`, `Layout`.`id` FROM `contents` AS `Content` LEFT JOIN `layouts` AS `Layout` ON (`Layout`.`published` = 1 AND `Content`.`layout_id` = `Layout`.`id`) WHERE `Content`.`published` = 1 AND `Content`.`path` = &#8216;/&#8217; LIMIT 1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
</tr>
<tr>
<td class="id">7</td>
<td class="query">SELECT `ContentsBlock`.`position`, `Blocks`.`method`, `ContentsBlock`.`cache_time` FROM `contents_blocks` AS `ContentsBlock` LEFT JOIN `blocks` AS `Blocks` ON (`ContentsBlock`.`blocks_id` = `Blocks`.`id`) WHERE `ContentsBlock`.`published` = 1 AND `Blocks`.`published` = 1 AND `ContentsBlock`.`content_id` = 1 ORDER BY `ContentsBlock`.`position` ASC</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">1</td>
</tr>
<tr>
<td class="id">8</td>
<td class="query">SELECT `Block`.`method` FROM `blocks` AS `Block`   WHERE 1 = 1</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">1</td>
</tr>
<tr>
<td class="id">9</td>
<td class="query">DESCRIBE `news_items`</td>
<td style="text-align: right;">9</td>
<td style="text-align: right;">9</td>
<td style="text-align: right;">2</td>
</tr>
<tr>
<td class="id">10</td>
<td class="query">SELECT `NewsItem`.`id`, `NewsItem`.`title`, `NewsItem`.`news_date` FROM `news_items` AS `NewsItem` WHERE `NewsItem`.`published` = 1 ORDER BY `NewsItem`.`news_date` DESC LIMIT 3</td>
<td style="text-align: right;">2</td>
<td style="text-align: right;">2</td>
<td style="text-align: right;">1</td>
</tr>
<tr>
<td class="id">11</td>
<td class="query">DESCRIBE `menus`</td>
<td style="text-align: right;">10</td>
<td style="text-align: right;">10</td>
<td style="text-align: right;">2</td>
</tr>
<tr>
<td class="id">12</td>
<td class="query">SELECT `Menu`.`id`, `Menu`.`parent_id`, `Menu`.`name`, `Menu`.`path` FROM `menus` AS `Menu` WHERE `Menu`.`published` = 1 ORDER BY `Menu`.`parent_id` ASC, `Menu`.`placement` ASC</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">1</td>
</tr>
</tbody>
</table>
<p>Since Pylot downloads the page render to a log file all I needed to do was write a script to parse the log files right after the testing finished and log all the query times. I decided to write my script in PHP as it would allow me to easily build a web interface for future tests by co-workers. With some string manipulation we can parse out the time per query which allows us to find the fastest and slowest query per page load as well as the overall query time per page load. This information coupled with the fact that Pylot is gathering these tests results based of a defined user base over a set period of time means we can see if certain queries perform differently when experiencing a higher load.</p>
<div id="attachment_202" class="wp-caption aligncenter" style="width: 430px"><img class="size-full wp-image-202" src="http://www.fiftyonereasons.com/wp-content/uploads/2009/11/RT1xB.png" alt="foobar" width="420" height="157" /><p class="wp-caption-text">Simple web interface for testing. Image shows a test running 100 agents concurrently over a 1 minute test.</p></div>
<div id="attachment_201" class="wp-caption aligncenter" style="width: 430px"><img class="size-full wp-image-201" src="http://www.fiftyonereasons.com/wp-content/uploads/2009/11/yNdzi.png" alt="Pylot Web Frontend Results" width="420" height="310" /><p class="wp-caption-text">Pylot Web Frontend Results. Displays the slowest and fastest results of the test. Log files are broken down into each agents tests.</p></div>
<div id="attachment_203" class="wp-caption aligncenter" style="width: 430px"><img class="size-full wp-image-203" src="http://www.fiftyonereasons.com/wp-content/uploads/2009/11/RcvF9.png" alt="foo" width="420" height="295" /><p class="wp-caption-text">Final MySQL query results showing total queries &amp; query time on the server.</p></div>
<p>Our initial find was with regard to the DESCRIBE queries that were being run on page loads. For some reason our pages were spending more then half their query time on these DESCRIBE queries. After some research on the topic we found that <a href="http://groups.google.com/group/cake-php/search?group=cake-php&amp;q=describe+debug&amp;qt_g=Search+this+group" target="_blank">we weren&#8217;t alone</a> being a little confused about these queries. Many people simply said that turning the debug off was stopping the DESCRIBE queries but we seemed to prove otherwise with the use of <a href="http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html" target="_blank">MySQL slow query logging</a>.</p>
<p>We found that the only way to actually get rid of the DESCRIBE queries was to have a cache setting.  Therefore the DESCRIBE queries are dependant on the cache setting. If the cache is disabled, we will get DESCRIBE queries which allow the CakePHP framework to understand the database layout. If cache is turned on, the DESCRIBE queries will fire once and cache the result, meaning the subsequent users will not trigger them.</p>
<p><em>NOTE: Global cache setting in app/config/core.php (Configure::write(&#8216;Cache.disable&#8217;, true);)</em></p>
<p>The more I use this system the more I seem to like it. We now have free reign to test our applications in our office with as many concurrent users as our servers can handle. We have found some interesting issues so far &#8211; relating from MySQL configuration to networking configuration to  fan speed and temperature control.</p>
<p>It goes to show that production level testing in a development environment can really pay off.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiftyonereasons.com/2009/11/stress-testing-cakephp-with-pylot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

