<?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>Kevin Grad</title>
	<atom:link href="http://couchware.ca/www/kev/feed/" rel="self" type="application/rss+xml" />
	<link>http://couchware.ca/www/kev</link>
	<description>Designer, Programmer and Co-Founder</description>
	<lastBuildDate>Fri, 30 Apr 2010 20:33:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unsure whether or not I am caving</title>
		<link>http://couchware.ca/www/kev/2010/04/16/i-can-no-longer-support-apple/</link>
		<comments>http://couchware.ca/www/kev/2010/04/16/i-can-no-longer-support-apple/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 17:43:53 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[macbook]]></category>

		<guid isPermaLink="false">http://couchware.ca/www/kev/?p=198</guid>
		<description><![CDATA[I have waited a long time for the new MacBook Pros to be released, and finally that wait is over. The other day Apple released their refreshed MacBook pro line with shiny new core i5 and i5 processors. However, they also released their new terms of service for iPad/iPhone development. If you are a developer [...]]]></description>
			<content:encoded><![CDATA[<p>I have waited a long time for the new MacBook Pros to be released, and finally that wait is over. The other day Apple released their refreshed MacBook pro line with shiny new core i5 and i5 processors. However, they also released their new terms of service for iPad/iPhone development. If you are a developer and have not heard about this yet, you must be living under a rock (or not care about Apple in the slightest).</p>
<p><span id="more-198"></span></p>
<p>Basically Apple has decided that you can only program for apple using Apple approved programming languages and apple approved tools. The TOS states:</p>
<blockquote><p>
Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs.</p></blockquote>
<p>This implies that applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited, such as MonoTouch or Adobe&#8217;s new CS5 flash-to-iPhone conversion tool. A Google search of &#8220;Apple TOS 3.3.1&#8243; will give more insight into the implications of this statement and what I am writing about. Apple already has the most locked down operating system and platforms (no Flash/Java) and now want to control how developers develop for those platforms (can only program for platforms in specific languages Apple approves&#8230; codswallop). </p>
<p>edit: I am going back and forth on the issue. Making no claims anymore.</p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2010/04/16/i-can-no-longer-support-apple/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Update: Wezzle, JavaEE 6 and beyond</title>
		<link>http://couchware.ca/www/kev/2010/03/01/update-wezzle-javaee6-and-beyond/</link>
		<comments>http://couchware.ca/www/kev/2010/03/01/update-wezzle-javaee6-and-beyond/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 21:13:59 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[ejb]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jpa]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[Wezzle]]></category>

		<guid isPermaLink="false">http://couchware.ca/www/kev/?p=171</guid>
		<description><![CDATA[Greetings Earthlings. 
It has come to my attention that I have not updated this blog in quite a while. This is an error that I wish to remedy immediately. Since my last post a lot of fun and exciting things have happened and I have learned a ton of new stuff that I will hopefully [...]]]></description>
			<content:encoded><![CDATA[<p>Greetings Earthlings. </p>
<p>It has come to my attention that I have not updated this blog in quite a while. This is an error that I wish to remedy immediately. Since my last post a lot of fun and exciting things have happened and I have learned a ton of new stuff that I will hopefully write about in the near future.<br />
<span id="more-171"></span><br />
I would like to announce that <a href="http://couchware.ca/www/wezzle/">Wezzle </a>has been completed and is for sale on our website! It only took two years since Couchware&#8217;s inception, but it&#8217;s finally here and it looks great. I couldn&#8217;t be happier with the way Wezzle turned out. I think it looks outstanding and has some enjoyable and addicting game play. </p>
<p>I would like to give a huge thanks to those who assisted in the creation of the Wezzle. This includes Renee and Sam and all of our testers. If you like the art and music in the game be sure to check out <a href="http://www.reneelung.ca">Renee&#8217;s </a>and <a href="http://www.soundclick.com/bands/default.cfm?bandID=146918">Sam&#8217;s</a> websites. </p>
<p>Despite having put the game up for sale, Wezzle is not yet 100% complete. We are still hard at work finishing up a Wezzle demo that will be playable within the browser. Once the demo has been completed, we will be marketing/launching the game to a larger audience (hopefully!). There will likely be a launch party at an as of yet undisclosed location in Toronto. For those interested in coming, fire me an email or check back at this blog occasionally. Cam has also been hard at work at a REALLY cool Wezzle port, the nature of which I can&#8217;t disclose at the moment. It will be hopefully laying the ground-work for some of our future projects.</p>
<p>In other news, I have been put in charge of a major project using Java EE 6 which I&#8217;m pretty excited about.  Some of the technologies I have been using lately include: <a href="http://maven.apache.org/">Maven2</a>, <a href="http://logback.qos.ch/">Logback</a>, <a href="http://java.sun.com/developer/technicalArticles/J2EE/jpa/">JPA</a>/<a href="http://www.hibernate.org">Hibernate</a>, <a href="https://javaserverfaces.dev.java.net/">JSF</a>, <a href="http://java.sun.com/products/ejb/index.jsp">EJB 3.1</a>, and more. Hopefully in the coming weeks I will have something interesting to say about some of these. </p>
<p>Finally, I have bought kevingrad.com, org and net (all currently have no content) and I will eventually be moving this blog to one of those (probably .org).</p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2010/03/01/update-wezzle-javaee6-and-beyond/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Comment from today&#8217;s code.</title>
		<link>http://couchware.ca/www/kev/2009/09/24/comment-from-todays-code/</link>
		<comments>http://couchware.ca/www/kev/2009/09/24/comment-from-todays-code/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 01:39:53 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Wezzle]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[lwjgl]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/kev/?p=165</guid>
		<description><![CDATA[

// WARNING: the ctrl mask randomly subtracts 96 from the ascii
// of any character returned from getEventCharacter(). This is because
// LWJGL is fucked. We had a 30 min convo about this and decided
// to fuck the ctrl key. Alt is better.

]]></description>
			<content:encoded><![CDATA[<pre>

// WARNING: the ctrl mask randomly subtracts 96 from the ascii
// of any character returned from getEventCharacter(). This is because
// LWJGL is fucked. We had a 30 min convo about this and decided
// to fuck the ctrl key. Alt is better.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2009/09/24/comment-from-todays-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wezzle Test 7 is out!</title>
		<link>http://couchware.ca/www/kev/2009/06/17/wezzle-test-7-is-out/</link>
		<comments>http://couchware.ca/www/kev/2009/06/17/wezzle-test-7-is-out/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 16:32:17 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Wezzle]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/kev/?p=163</guid>
		<description><![CDATA[Well, It has been a little while since we have posted anything new about Wezzle. Both Cam and myself have been pretty busy with other endeavors and progress on Wezzle slowed quite a bit. But now we are back to working on it and even though I got hit with a bout of the swine [...]]]></description>
			<content:encoded><![CDATA[<p>Well, It has been a little while since we have posted anything new about Wezzle. Both Cam and myself have been pretty busy with other endeavors and progress on Wezzle slowed quite a bit. But now we are back to working on it and even though I got hit with a bout of the swine flu, we managed to release Wezzle test 7!</p>
<p><span id="more-163"></span></p>
<p>Test 7 add a ton on top of test 6. This is copied from our official post in our forums:</p>
<ul>
<li>  An updated Play Now menu that has a look consistent across all menues.</li>
<li> Added achievements.</li>
<li> An achievements browser, that allows you to scroll through all achievements in the game and to see which ones you have done, and when.</li>
<li> An in-game achievement notification. In fact, we’ve added a general notification system that will give you tips and other information as the game progresses (these can be turned off, of course).</i>
<li> Improved line sounds. As you get more and more line chains, the line sound increases by a semi-tone. It’s quite exciting.</li>
<li> An improved tile dropping algorithm. You now get fewer random drop-in lines, so that the game no longer feels like it plays itself.</li>
<li> An improved, peripheral timer. When you get up to level 10 like the big boys, you need to have a better idea of how much time you have. Our new timer does just that.</li>
<li> An Options Menu.</li>
<li> The ability to turn off tutorials (once you&#8217;ve played them once of course!)</li>
<li> An new, more intuitive music selector.</li>
<li> A piece previewer (up in the top corner) as well as an overlayed piece previewer (check the Options Menu from the Main Menu).</li>
<li> You may now pre-rotate pieces in the queue by right-clicking during a tile drop-in.</li>
<li> A Windows installer that&#8217;ll automatically install Java if needed. Works on 32-bit and 64-bit Windows (including Vista).</li>
<li> Added new rotation tutorial to Level 2.</li>
</ul>
<p>If you would like to play Wezzle test 7 (or any of the tests) and you are not currently on the email list, just send me an email and we can get that fixed right away.	</p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2009/06/17/wezzle-test-7-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Scala</title>
		<link>http://couchware.ca/www/kev/2009/04/14/learning-scala/</link>
		<comments>http://couchware.ca/www/kev/2009/04/14/learning-scala/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 16:04:42 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[chapters]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[FP]]></category>
		<category><![CDATA[functional programming]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[lift]]></category>
		<category><![CDATA[object oriented programming]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[smalltalk]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/kev/?p=152</guid>
		<description><![CDATA[My copy of Programming in Scala finally arrived yesterday, and I have had a chance to read the first chapter. It looks to be a very interesting language. I have had a desire to learn functional programming for a long time, and I have a giant fascination with programming languages in general. Scala seems to [...]]]></description>
			<content:encoded><![CDATA[<p>My copy of <a href="http://www.amazon.com/Programming-Scala-Comprehensive-Step-step/dp/0981531601/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1239717940&amp;sr=8-1">Programming in Scala</a> finally arrived yesterday, and I have had a chance to read the first chapter. It looks to be a very interesting language. I have had a desire to learn functional programming for a long time, and I have a giant fascination with programming languages in general. Scala seems to be getting a lot of hype right now, and the ability to program both <a href="http://en.wikipedia.org/wiki/Imperative_programming">Imperatively </a>and <a href="http://en.wikipedia.org/wiki/Functional_programming">Functionally </a>is too hard to pass up.<br />
<span id="more-152"></span><br />
Getting the book turned out to be more annoying than I had anticipated. The book is fairly new and as such, not yet available on <a href="http://www.chapter.ca">Chapters.ca</a>. It is available at <a href="http://www.amazon.ca">Amazon.ca</a>, however, the copy listed has a 2-3 week waiting period before shipping. I am an impatient person and I decided to order it from <a href="http://www.amazon.com">Amazon.com</a> because it listed the book as In Stock.</p>
<p>I placed the order on April 1, paying extra for the medium-tier shipping package so that I could get the book within 3-5 days of shipping. Since the book was in stock I was hoping to have the book by the end of the week. The only reason I ordered from the U.S. site (which obviously cost more for conversion, shipping, customs etc.) was so i could get the book without waiting 2-3 weeks. This prior weekend was a long weekend and it would have been nice to have had the book to read while I had some time at home. However, by April 8, the book still had not shipped. This was inconceivable to me as it was STILL listed as In Stock on their website, why would it not have shipped? </p>
<p>I sent a strongly worded letter to Amazon customer service, and to their credit, they upgraded me to premium shipping and sent it out the next day. The said there was a problem with the order that he fixed and sent it out at the next available opportunity. I highly doubt there was actually a problem other than the fact that I complained. Long story short, I finally have the book. Even though Amazon customer service was pretty good about the matter, I should not have had to contact them in the first place and I did not get to read the book over the long weekend as I had hoped.</p>
<p>Anyway, back to Scala. Scala seems to be a pretty cool language. From what I gather so far (and I will update you as I know more about it) it combines Object Oriented Programming (OOP) principles with Functional Programming (FP). It allows for both Imperative (think Java, C++) and Functional (Erlang, Haskell) programming styles. It is not the only language to do this, many languages provide functional programming features within the language, such as closures, functions as first class objects etc. The most notable languages to do this would be Python and Ruby.</p>
<p>However, Scala is not a dynamic language. It is statically typed, with type inference, which looks like it could be very nice. Additionally, Scala&#8217;s OO model is not implemented in a half-assed fashion like Java (primitives, statics, &#8230;) but rather, everything is an object (in the vein of Smalltalk, Ruby, etc.). Finally, it is lightweight, choosing to bundle most features in external libraries (comes with a standard library) rather than in the language itself, (such as BigIntegers, Actors).</p>
<p>The really interesting thing about Scala, is that it uses a lot of the Java types but extends them using something called Traits. For example, it uses primitive Java ints, but in order to make them objects, it defines a trait that will map Scala commands to a custom implementation (kinda). An example of this is if you want to call a function on an int, Scala will first look to the Java implementation, if the function doesn&#8217;t exist (which it wont because an int is a primitive) it will look to see if there are any traits defined, (which there are because its part of the Scala language) and then look for the function there. Scala uses these traits as means of wrapping the Java libraries in a nice way for use with the Scala language. It makes external libraries seem as if they are part of the Scala language, which is pretty nice. The beauty of this is, you can define your own traits and extend classes however you see fit. As well, you can use traits as lightweight interfaces, defining partial methods and enforcing multiple traits in a pseudo multiple inheritance scheme. Pretty powerful (if you understand what I just said anyway). I&#8217;m not 100% clear on traits so don&#8217;t get mad if some of the info I just mentioned is wrong.</p>
<p>Scala is also a fully functional language, borrowing some great ideas from other functional languages such as Haskell and Erlang. Of note, Scala uses an implementation of Erlang&#8217;s Actor&#8217;s shared memory model to accomplish parallel programming. Erlang&#8217;s model has been hugely successful and I am interested to see exactly how I can utilize this feature. </p>
<p>Scala&#8217;s name comes from &#8220;Scalable Language.&#8221; I&#8217;m not sure exactly what makes Scala so scalable, some of the things I&#8217;ve seen from my brief introduction is its use of traits, its integration with the Java standard library, its ability to run on the JVM and its Erlang-eque concurrency model. </p>
<p>There was a great question <a href="http://couchware.ca/blogs/cam">Cam</a> pointed out on <a href="http://stackoverflow.com/questions/648964/why-is-the-lift-web-framework-scalable">Stack Overflow</a> which talks a bit about what makes the <a href="http://liftweb.net/">Lift</a> web framework (written in Scala) so scalable. It is really interesting, and their take on threading is a good one in my opinion. Something I hope to maybe take advantage of with my own stuff.</p>
<p>I have to say that I am pretty excited to learn Scala. It seems like it could be a great language that is still undergoing heavy development and is very extendable. Ultimately I would like to combine Scala with some of my Java programming, something that I see as Scala&#8217;s (and all JVM languages) best feature. I believe this is still something that is not entirely EASY to accomplish. Something that I would like to see, and I am sure is on the list of things to do, is the ability to mix JVM languages transparently, without the need to call the specific compilers for the specific classes. Maybe I will work on that as a side project.</p>
<p>Scala is being touted by many as the next &#8220;Big&#8221; language. I don&#8217;t know if that&#8217;s necessarily the case, but it sure does seem like a nice language. Maybe it will quench my thirst for new languages temporarily? Who knows. I also purchased <a href="http://www.amazon.com/Programming-Language-Pragmatics-Third-Michael/dp/0123745144/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1239724031&amp;sr=1-1">Programming Language Pragmatics</a> with a mild desire to create my own language at some point. Perhaps I will be able to leverage some ideas from Scala when doing so.</p>
<p>This will be my first serious venture into the FP world (I have a little experience with Scheme, however, that was a long time ago, in a galaxy far far away&#8230;). I am already familiar with a bunch of functional techniques, such as closures/lambdas, but I have never really programmed in a functional way for something serious. Hopefully Scala turns out to be as nice as it appears to be, as I am excited to try the Lift framework and to start mixing functional programming with my current code.</p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2009/04/14/learning-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Willing to sell out</title>
		<link>http://couchware.ca/www/kev/2009/04/07/willing-to-sell-out/</link>
		<comments>http://couchware.ca/www/kev/2009/04/07/willing-to-sell-out/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 17:16:21 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[Wezzle]]></category>
		<category><![CDATA[adium]]></category>
		<category><![CDATA[digsby]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[instant messaging]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/kev/?p=149</guid>
		<description><![CDATA[Cam and I were talking about our mutual love for the IM tool Digsby which we both use to track e-mails, social networks and Instant messaging. If you like the popular Mac tool Adium, you will love Digsby. Even if you have never heard of Adium, Digsby is worth checking out.

Anyway, we were talking about [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://couchware.ca/blogs/cam">Cam </a>and I were talking about our mutual love for the IM tool <a href="http://www.digsby.com/">Digsby</a> which we both use to track e-mails, social networks and Instant messaging. If you like the popular Mac tool <a href="http://www.adiumx.com/">Adium</a>, you will love Digsby. Even if you have never heard of Adium, Digsby is worth checking out.</p>
<p><span id="more-149"></span></p>
<p>Anyway, we were talking about Digsby, and I mentioned that one of the things I dislike is that if you use Digsby for <a href="http://www.twitter.com">Twitter</a>, they automatically make you follow the Digsby Twitter feed. This is something that is very irritating, I don&#8217;t want to have to follow them or figure out how to un-follow them. This should be an option or something. </p>
<p>Additionally, Cam mentioned (and i agree) that he doesn&#8217;t like how they try to get you to install around 10 different applications when you install Digsby. This is something that I find in a lot of programs. I often get asked if I want to install <a href="http://www.yahoo.com">Yahoo!</a> toolbar or some such program and this irritates me to no end. I wish they would stop doing that stuff.</p>
<p>However, Cam asked me the following: If Yahoo! approached us and said if you package Yahoo! toolbar with your application, we will pay you $100,000, what would you say? The answer, obviously, was a resounding yes. So there you have it. We are willing to sell out, and I don&#8217;t even know what the price point for our selling out would be. So Yahoo! or <a href="http://www.google.ca">Google </a>or anyone else out there. If you want to pay us money to package your application, we are willing to do so.</p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2009/04/07/willing-to-sell-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;ve joined the dark side</title>
		<link>http://couchware.ca/www/kev/2009/03/21/ive-joined-the-dark-side/</link>
		<comments>http://couchware.ca/www/kev/2009/03/21/ive-joined-the-dark-side/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 03:48:49 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[twitter]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[micro blogging]]></category>
		<category><![CDATA[myspace]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/kev/?p=129</guid>
		<description><![CDATA[I have joined Twitter. I generally hate flavour of the month technology fads and Twitter is no exception. I am already really annoyed with the media coverage of Twitter. It seems like every time I turn on the radio I hear about it. That being said, you can follow me here.

I mainly joined Twitter so [...]]]></description>
			<content:encoded><![CDATA[<p>I have joined <a href="http://www.twitter.com">Twitter</a>. I generally hate flavour of the month technology fads and Twitter is no exception. I am already really annoyed with the media coverage of Twitter. It seems like every time I turn on the radio I hear about it. That being said, you can follow me <a href="http://twitter.com/kgrad">here</a>.</p>
<p><span id="more-129"></span></p>
<p>I mainly joined Twitter so I could follow the likes of <a href="http://ejohn.org/blog/">John Resig</a> and <a href="http://gafter.blogspot.com/">Neal Gafter</a> as well as some other interesting techie people and I am already mildly annoyed with the service. </p>
<p>I expected that Twitter would offer me a client similar to Live Messenger or Google Talk. Instead, I had to find a third-party client. Furthermore the one everyone uses is only available on Mac and has ads unless you pay $15. If anyone knows of a good windows standalone client, please let me know. </p>
<p>Additionally, I have been trying Twitter for all of 2 hours now, and I&#8217;ve realized this whole micro-blogging thing really irks me. I am following people I consider to be really smart not because I care what they ate for dinner, or what videos they are currently watching. I am following them because I want to know more about what they are working on and thinking in terms of technology.</p>
<p>That being said, if and when I start following my actual real life friends, I will be interested in what they are doing currently. Maybe Twitter should take that into account? Have different classifications of tweets, ones for personal friends and ones for the public? Or maybe Twitter just isn&#8217;t for me. Perhaps I should just stick with traditional blogs and instant messenging clients. </p>
<p>Also, there are huge privacy concerns with an app like this. Although there is an option to have only certain people see your updates, the whole spirit of Twitter is to be a public micro-blogging system. I don&#8217;t even want to get into how careful you have to be with what you post there. Sometimes public messenging can get you in trouble. Something many people have found out the hard way with facebook. Also something <a href="http://sports.espn.go.com/nba/news/story?id=3990853">Charlie Villanueva</a> recently found out.</p>
<p>From a technology standpoint, Twitter is an alright service I guess, although for me it really lacks the <b>wow</b> factor. It seems to me that its a pretty direct translation of IP<a href="http://en.wikipedia.org/wiki/Multicast">multicast</a> leveraging <a href="http://en.wikipedia.org/wiki/SMS">SMS</a> and pretty much nothing else. </p>
<p>Twitter seems like a pretty linear service, unless I&#8217;m missing something. I&#8217;m guessing that it&#8217;s success is due to the fact that they really targetted mobile phones, but in reality it just seems to be a gimped version of RSS. I don&#8217;t even think they were the first to offer micro-blogging. Additionally, there are alternative open source models which have pretty much the same functionality for micro-blogging, like <a href="http://www.google.ca">Google</a> <a href="http://en.wikipedia.org/wiki/Jaiku">Jaiku</a> and facebook&#8217;s new (and annoying) what&#8217;s on your mind? feature.</p>
<p>What does Twitter really offer me? It&#8217;s not a full feature web app like facebook or <a href="http://www.myspace.com">myspace</a>, its not an internet overlord like Google&#8230; Their one advantage is SMS. They don&#8217;t even have downloadable clients from what I can tell. They rely on user made clients. </p>
<p>It&#8217;s cool that they already have a bunch of people using it (I almost added Shaq to my watch list). But will it really have the staying power once the initial novelty of the app wares off? Their functionality isn&#8217;t that hard to reproduce and improve upon&#8230;</p>
<p>Unless Twitter leverages the SMS platform in some other unique way or they expand or add some other functionality, I will be surprised if it is anything other than a flavour of the month micro-blogging tool (for me anyway).  Which is fine by me, there are enough programs I check every day anyway. But I suspect with its rush of popularity, we will hopefully be seeing something more interesting coming from the Twitter people sometime soon. Until that time comes, let me know of some interesting people you think I should be following. </p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2009/03/21/ive-joined-the-dark-side/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Wezzle Collision Generator</title>
		<link>http://couchware.ca/www/kev/2009/03/13/wezzle-collision-generator/</link>
		<comments>http://couchware.ca/www/kev/2009/03/13/wezzle-collision-generator/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 04:10:25 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Wezzle]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/kev/?p=124</guid>
		<description><![CDATA[I have a fascination with programming languages. I have been reading up on many different ones trying to get a feel for them all. I enjoy learning about the different syntaxes and what the advantages are of the different paradigms. I find most of the languages offer really interesting concepts and benefits.

Last night I was [...]]]></description>
			<content:encoded><![CDATA[<p>I have a fascination with programming languages. I have been reading up on many different ones trying to get a feel for them all. I enjoy learning about the different syntaxes and what the advantages are of the different paradigms. I find most of the languages offer really interesting concepts and benefits.<br />
<span id="more-124"></span></p>
<p>Last night I was hacking around with <a href="http://www.ruby-lang.org/en/">Ruby</a> and decided that to teach myself how to program better I would do something interesting for Wezzle. I had the idea of taking the <a href="http://couchware.ca/blogs/kev/2009/01/27/wezzle-xml/">XML markup for our achievements</a> and making some sort of generator using our achievement pseudo-language.</p>
<p>Our achievement language basically amounts to what is known in computing as a <a href="http://en.wikipedia.org/wiki/Domain-specific_language">Domain Specific Language (DSL).</a> Luckily for me Ruby is a pretty good language for writing DSL&#8217;s. </p>
<p>I decided to start with the achievements that I find to be the hardest to write, COLLISION. A COLLISION occurs between 1 or many items. There are two seperate types of collisions which can be defined as either an AND or an INTO relationship. These can be seen in the following two examples:</p>
<p>Example 1:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:Consolas, monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;achievement</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;A Tale of Two Rockets&quot;</span> <span style="color: #000066;">difficulty</span>=<span style="color: #ff0000;">&quot;SILVER&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Fire a rocket into another rocket.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;COLLISION&quot;</span> <span style="color: #000066;">operation</span>=<span style="color: #ff0000;">&quot;BETWEEN&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;item</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;ROCKET&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;item</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;ROCKET&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/achievement<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Example 2:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:Consolas, monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;achievement</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;A Tale of Two Rockets&quot;</span> <span style="color: #000066;">difficulty</span>=<span style="color: #ff0000;">&quot;SILVER&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Fire a rocket into another rocket.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;COLLISION&quot;</span> <span style="color: #000066;">operation</span>=<span style="color: #ff0000;">&quot;BETWEEN&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;item</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;ROCKET&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;item</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;ROCKET&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/achievement<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>While these two examples may look the same, they mean two different things. The first one can be written as COLLISION BETWEEN ROCKET AND ROCKET simply means that two rockets will be activated in a single turn. The second one however would be written like COLLISION BETWEEN ROCKET INTO ROCKET and means a rocket will be fired and activate another rocket by hitting it.</p>
<p>I have written a generator in ruby that takes an achievement (currently only collisions) in the following form:</p>
<p>BEGIN COLLISION<br />
achievement:Rocketeer:BRONZE<br />
description:Fire a rocket into a rocket and fire a rocket and a rocket.<br />
rule:COLLISION BETWEEN ROCKET INTO ROCKET<br />
rule:COLLISION BETWEEN ROCKET AND ROCKET<br />
END</p>
<p>This is currently defined within the program and will output the properly formatted and tabbed XML which you can then paste into your achievements.xml file. The goal is to have it work for all achievements, and I will keep you updated as to the progress should I choose to continue. As it stands, you can find the current version <a href="http://couchware.ca/blogs/WezzleCollisionGen.rb">here </a>although it&#8217;s a little bit ugly. Please note, you must have ruby 1.9+ in order to run it.</p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2009/03/13/wezzle-collision-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance still matters.</title>
		<link>http://couchware.ca/www/kev/2009/03/10/performance-still-matters/</link>
		<comments>http://couchware.ca/www/kev/2009/03/10/performance-still-matters/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 16:08:35 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Big O]]></category>
		<category><![CDATA[Java2D]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Wezzle]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/kev/?p=112</guid>
		<description><![CDATA[With the abundance of computing power in processors today it is easy to fall into the trap of implementation without thought of performance. It is something I think all programmers do, myself especially.

Computers today have tons of processing power.  Who really cares about algorithm design when the computer can perform millions of calculations per [...]]]></description>
			<content:encoded><![CDATA[<p>With the abundance of computing power in processors today it is easy to fall into the trap of implementation without thought of performance. It is something I think all programmers do, myself especially.</p>
<p><span id="more-112"></span></p>
<p>Computers today have tons of processing power.  Who really cares about algorithm design when the computer can perform millions of calculations per second? This was a common thought of mine until recently. </p>
<p>When I learned big O notation and performance estimation in university I often thought to myself that I would never need to remember it, and it was not really useful for programming today. I was way off. Big O is something I have recently started using again and encourage every programmer to use as a way of estimating algorithm performance.</p>
<p>When we started making Wezzle we initially began designing without real thought of efficiency. Our initial implementation was all about design. However, we were very inexperienced when it came to actually designing good quality code. We quickly ran into some severe performance issues, and the Wezzle design still has some major flaws that really aren&#8217;t worth fixing at this point. One thing I can say with certainty is that my understanding of good design has improved by a drastic amount from this experience.</p>
<p>Our initial game design included the use of <a href="http://www.w3.org/Graphics/SVG/">Scalable Vector Graphics (SVG)</a>. We chose to use SVG because we liked the way they looked and the fact that window resizing was a non-issue. However, we failed to take into account how performance critical games truly are, and how incredibly slow SVG graphics are. </p>
<p>Our initial game was extremely choppy and virtually unplayable on old machines. We spent a lot of time trying to figure out why that was and how to boost performance. Eventually we decided to bitmap our graphics and noticed a SUBSTANTIAL increase in playability and performance. </p>
<p>I was pretty shocked by this entire scenario. First, I had always assumed that performance today was a non-issue, and second, I never thought that the type of graphics we used would make such a huge difference in terms of performance. </p>
<p>SVG wasn&#8217;t even close to all of our performance issues with early versions of Wezzle. We had a bunch of calls that were needlessly being made every game tick (we still find this problem with some of our code) as well as various other design flaws that affected overall performance. We had an inefficient algorithm to refactor the board and just in general a lot of areas that could be streamlined. We also had a bunch of performance issues with label generation (which we fixed with a cacheing scheme) and some troubles with <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/PhantomReference.html">phantom references</a> (yuck!). We made extensive use of the built in <a href="http://en.wikipedia.org/wiki/Profiler_(computer_science)">profiler</a> in <a href="http://www.netbeans.org/">netbeans</a> during our first refactoring phase.</p>
<p>Since then Wezzle has gone through countless refactorings and countless optimizations. Another huge increase in performance came when we switched from <a href="http://java.sun.com/products/java-media/2D/index.jsp/">Java2D</a> to <a href="http://www.lwjgl.org/">OpenGL (lwjgl)</a>. Perhaps in a later post I will talk about some of the various optimizations we have employed in Wezzle, but that is beyond the scope of this article.</p>
<p>Even with all the performance issues in Wezzle, I thought to myself that games are kind of a unique situation that is very performance critical and lots of calculations are happening, maybe performance is only relevant to gaming.</p>
<p>Again I was wrong. As anyone who does any web development can attest to, large database operations can be TERRIBLY inefficient. I am currently under contract developing some code that loads a large number of records into a grid structure. I am limited by the fact that this grid is only usable to us by passing it XML on the client side, as well as various restrictions about look and feel that were dictated by my client. Perhaps in a future post I talk about the multitude problems with the grid I am using, and there are many, but that would take way too much space to type in this post. </p>
<p>Anyway, my first implementation which contained some optimizations took around 15 minutes to update 500 records from the grid. The records were huge and data validation was being done on every individual cell and since the grid had to be submit as a whole (as an XML string) I was parsing and updating the entire grid. </p>
<p>This was not acceptable and also mildly surprising. Going through my code I have optimized even more. I implemented a dirty cell scheme, marking cells which have been edited as dirty so that on the submit I can only validate cells which have been marked as dirty. This assumes that all data already in the database is valid (not always the case!). I validate pasted in values at paste-time and that&#8217;s it (once they pass validation, they are considered good from the client side). Finally, I mark records which have been modified as dirty and even though I still have to submit the entire grid, I now only parse the records that have been marked and skip the rest. This has vastly improved update performance on the average case. It has improved updates in the worst case as well, but not by quite so much, a full submit still takes some time.</p>
<p>I&#8217;m going to end this by saying that while yes, performance is an issue, it is also sometimes a non-issue. First and foremost you should code something for clarity. A clear design that is slightly less efficient is always better than a streamlined but cryptic design. It is a mistake to optimize something that doesn&#8217;t actually need optimization and a big time waster. A popular saying is &#8220;design for clarity first and foremost and use a profiler to determine which areas need to be optimized.&#8221; This idiom does make sense and makes a valid point, but I would instead say to design for clarity and performance in conjunction as performance can often be a surprising bottleneck. </p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2009/03/10/performance-still-matters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Arrayzing</title>
		<link>http://couchware.ca/www/kev/2009/02/07/introducing-arrayzing/</link>
		<comments>http://couchware.ca/www/kev/2009/02/07/introducing-arrayzing/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 22:36:47 +0000</pubDate>
		<dc:creator>kev</dc:creator>
				<category><![CDATA[API development]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[arrayzing]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web app]]></category>

		<guid isPermaLink="false">http://couchware.ca/blogs/kev/?p=96</guid>
		<description><![CDATA[I have been talking for a while now about how I would like to create an API of some sort. I want to start being a contributor to the open source community and develop some useful open source utilities. 

A natural spot for open source development is in the area of web development, an area [...]]]></description>
			<content:encoded><![CDATA[<p>I have been talking for a while now about how I would like to create an API of some sort. I want to start being a contributor to the open source community and develop some useful open source utilities. </p>
<p><span id="more-96"></span></p>
<p>A natural spot for open source development is in the area of web development, an area that I have recently taken a keen interest in. I currently work as a consultant to a company building clientside solutions for their servlet web app. I am also actively teaching myself Ruby and the Rails framework. If you would like to see an example of a site I am currently playing around with, hop on over to <a href="http://kgrad.selfip.org:3000">this site.</a></p>
<p>If you are going to write an API that helps with web development, you cannot go wrong with JavaScript. Every website uses JavaScript in some way or form. JavaScript is no longer an ugly semi-useful tool. It is a powerful and useful language that supports things like closures, named parameters and metaprogramming. </p>
<p>There are some amazing libraries being developed in the open source community for JavaScript. One that I have been using a lot lately and which I highly recommend is <a href="http://www.jquery.com">jQuery</a>. I talked a little bit about jQuery in my last post and gave a little bit of insight into it&#8217;s capabilities, but if you are a web programmer and you haven&#8217;t checked it out yet, I implore you to do so.</p>
<p>Anyway, Cam and I like to get into discussions about the things we would like to accomplish as programmers and often talk about programming language semantics, features and things we would like to add. We like to bounce ideas off of each other. One of our recent discussions had me suggesting the inclusion of some sort of container class that could be defined on the fly. This could be used as a way of returning multiple values from a function and reduce the need to wrap associations in simple classes. </p>
<p>Our most recent discussion however dealt with a problem Cam was working on in his own side-job where he had a collection of objects and wanted to filter them in some way using JavaScript. The easiest way we could think of to do this was to iterate through each object testing to see if it matched the criteria, if it did, throw it into another collection, otherwise go to the next object. This could look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Consolas, monospace;">temp <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;hello&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;heLlo&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;jim&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;jack&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;hellO&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
<span style="color: #003366; font-weight: bold;">var</span> result <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> index <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> re <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/hello/i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>temp.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>temp<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span>re<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
     result<span style="color: #009900;">&#91;</span>index<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> temp<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The above code would return the result = ["hello", "heLlo", "hellO"];<br />
That is a lot of code to filter out an array. This spawned the creative process and got Cam working on a little public API that I am assisting with called <a href="http://couchware.ca/blogs/cam/arrayzing">Arrayzing</a>. You can find the source <a href="http://code.google.com/p/arrayzing/">here</a>.</p>
<p>In order to do the equivalent operation in arrayzing, the code would be:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:Consolas, monospace;">result <span style="color: #339933;">=</span> $a<span style="color: #009900;">&#40;</span>temp<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span> <span style="color: #009966; font-style: italic;">/hello/i</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Pretty simple and beautifully powerful. Arrayzing uses jQuery like syntax to perform array manipulations and returns the wrapped set. Additionally, all Arrayzing functions can be chained together!</p>
<p>If you have a moment, please check it out and give us any ideas for features!</p>
]]></content:encoded>
			<wfw:commentRss>http://couchware.ca/www/kev/2009/02/07/introducing-arrayzing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
