<?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>Flex and Flash Developer - Jesse Warden dot Kizz-ohm &#187; Programming</title>
	<atom:link href="http://jessewarden.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://jessewarden.com</link>
	<description>A blog on software development, technology, games &#038; movies.</description>
	<lastBuildDate>Thu, 18 Mar 2010 14:04:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What I Learned From Microsoft MIX 2010</title>
		<link>http://jessewarden.com/2010/03/what-i-learned-from-microsoft-mix-2010.html</link>
		<comments>http://jessewarden.com/2010/03/what-i-learned-from-microsoft-mix-2010.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 00:33:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://jessewarden.com/?p=2106</guid>
		<description><![CDATA[*** I apologize for the &#8220;&#8230;&#8221;; this is a stream of conscious post about my experiences.  Some of it is cohesive, some not. ***
I attended Microsoft&#8217;s MIX 2010 conference in Las Vegas the week after 360Flex.  I had previously attended I think the 2007 or 2008 one.  I had actually recorded a lot of video [...]]]></description>
			<content:encoded><![CDATA[<p>*** I apologize for the &#8220;&#8230;&#8221;; this is a stream of conscious post about my experiences.  Some of it is cohesive, some not. ***</p>
<p>I attended Microsoft&#8217;s MIX 2010 conference in Las Vegas the week after 360Flex.  I had previously attended I think the 2007 or 2008 one.  I had actually recorded a lot of video from the first one and trashed all of it.  The 200x one was an EXTREMELY weird conference.  It occured in the Venetian, the same hotel that Adobe&#8217;s MAX was at.  So, I had the opportunity to see the vibe differences between the 2 communities, and whoa man&#8230; what a difference.</p>
<p><span id="more-2106"></span>Adobe has more chicks, more of a party vibe, and &#8220;appears&#8221; more diverse in terms of backgrounds.  In talking to some of the individuals at after parties, the majority at MIX were involved in the Microsoft technology stack in some shape or fashion whereas at Adobe, you had no clue what those people did.  There were patterns, yes, but design, back-end, Flash, Flex, Python&#8230;. all over the map.</p>
<p>At the 200x one, when they showed Silverlight 3 new features, I nearly lost my shit.  The audience was really excited about features that I perceived as things the Flash community had done 5 years ago.  Yet, if you looked at the audience, they were eating it up, excited, and you could tell they couldn&#8217;t wait to start coding.  After taking some time to reflect, I realized that Microsoft developers use Microsoft technologies.  They don&#8217;t &#8220;branch out&#8221; like Adobe ones do.  That&#8217;s why it&#8217;s rare as heck to see a .NET dev who uses Flash/Flex for their front-end.  Most use AJAX&#8230; generated from Microsoft tools.</p>
<p>This year was different.  I was armed with the understanding that Silverlight really isn&#8217;t just about competing with Flash/Flex/AIR in the video arena, but rather providing a missing piece that .NET devs didn&#8217;t have in the past.  The features added into Silverlight 1 through 4 match a lot of what us Flash/Flex Developers have.  They also validate our work.  It&#8217;s also about building on Microsoft&#8217;s platform, which is great.  You need a great web runtime + a phat browser + device to kick some tail.  Apple does it, Google&#8217;s doing it&#8230; Adobe?  Well, no device or browser, but Flash Player rocks, so&#8230;.</p>
<p>However, no matter how on parity those features get, or even surpass, the Microsoft community clearly is missing the design aspect in terms of designers working with .NET devs.  There are some, yes, but it&#8217;s a night and day difference compared to your average Flex consulting firm, or Flash agency, or small software shop that uses Flex.  I even talked to one small .NET shop manager who hired a Flash Designer specifically to get his UX/Design help with their Silverlight/WPF endeavors.</p>
<p>What many predicted finally came true: Microsoft forewent fighting Adobe on the design front, and embraced it.  It&#8217;s actually scary vs. cool.  I mean, it&#8217;s cool, but damn they did it well.  I haven&#8217;t used the tools in production, thus this entire paragraph is suspect, but wow.  They are now supporting PSD (Photoshop) and AI (Illustrator) native import as well as FXG.  Holy.  Shit.  I was on my 2nd cup of coffee, and I still did a triple take when <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> mentioned &#8220;So, we&#8217;re going to import some FXG&#8230;&#8221;.  Say what?  Where&#8217;s Design!?</p>
<blockquote><p>&#8220;Designers don&#8217;t use Design, they use Photoshop &amp; Illustrator.&#8221;</p></blockquote>
<p> said Mike Downey when I confronted him about it.  His tone was very matter of fact, confident&#8230; almost like, &#8220;Yeah man&#8230; exactly&#8221;.  What that means, though, is that they are on the RIGHT path.  Very cool stuff to embrace the design tools we all use.  Also lowers the barrier of entry for the design agencies to work with these Microsoft shops as partners.  Wow.</p>
<p>Yet again, it was great to see Sketchflow in action.  Rapid prototyping is HUGE in helping sales snag gigs, and now that the .NET world has a way to do this WITH valid design tools, man.</p>
<p>The common theme of the conference was &#8220;mobile, mobile, mobile&#8221;.  They were pushing their Windows Mobile 7, or whatever the heck it&#8217;s called, HARD.  I body checked &#8216;em on the 3 buttons, and they had some valid use cases.  Everyone codes a back button in iPhone apps&#8230; why not remove that step and put it natively on the phone?  Also, making search a first class citizen.  Well&#8230; can&#8217;t argue with that.</p>
<p>Like I drunkenly yelled at <a href="http://www.flashstreamworks.com/">Jens</a>, this was the most amazing keynote I&#8217;ve seen in terms of flow and momentum.  Microsoft this year clearly had it down pat.  They had a consistent message, it was effectively communicated, and it inspired the audience into action.  Well&#8230; mostly.  While the developer story was picturesque with all the tools working together with a device &amp; marketplace just waiting on you to start coding, the phone doesn&#8217;t exist yet.  iPhone does.  When it arrives, though, holy fish.  I believe Adobe can definately have just as a compelling story&#8230; but there was just something really professional, confident, and effective at this MIX keynote.  Maybe it was the speakers&#8217; experience level.  Maybe it was good rehearsal.  Maybe it was good content.  Every speaker was certainly very positive and didn&#8217;t come across as better-than-thou like in times past.  Maybe it was all it.  Bottom line, it was great, and set a high bar.</p>
<p>&#8230;.but like I said, the audience is just not a Adobe audience.  If it was, it would of been a lot louder, with random screams and yells, perhaps some heckling.  .NET devs need more Redbull&#8230; that&#8217;s all I can say.  Maybe some Picasso too.  I don&#8217;t know.  Maybe that&#8217;s why all the Flex &amp; Flash devs were there. *ahem*</p>
<p>I hopped around sessions to &#8220;see what people were working on&#8221;.  They were doing the same things we&#8217;re doing. CMS systems that have rich front-ends to manage &amp; deploy media.  Video players.  Mobile development for phones that don&#8217;t exist (see what I did thar?).  Dealing with scaleable client-side software via modules.  Bottom line, they are a lot like us, doing very similar work.  Sadly, most of the Silverlight specific stuff is still funded-by-Microsoft vs. a client hiring someone/some firm/company.  While the technology seems to be ready, the market isn&#8217;t.</p>
<p>And that leads me to my conclusion.  Once they get to 60%, we&#8217;re in trouble.  Not big trouble, but we WILL start losing work.  At that point, you have 2 choices.  You can take the Cynergy approach of a few years ago, and go, &#8220;Dude, we do both &#8217;cause they both rock!&#8221;, or you can just deal with the reduced amount of gigs.  I don&#8217;t know to what degree this will affect the Flash/Flex world, but I know a lot of the big clients I&#8217;ve had in the past 2 years will no longer exist&#8230; unless I code Silverlight.  I, like others, still get a lot of work, so it&#8217;s not like we&#8217;ll just become unemployed, not in the least.  It&#8217;s just that the &#8220;MLB&#8217;s&#8221; and the &#8220;Olympics&#8221; style gigs will start to flow towards the Microsoft realm vs. the Flash realm.  And no, just because Flash has a higher install base won&#8217;t matter.  I can&#8217;t compete with free, regardless if my plugin of choice is at 99% and theirs is at 60%.  That said, Java/Python/Ruby etc. still exist in large quantities.  They target specific markets &amp; verticals.  A lot of those is where Flash &amp; Flex still shine, and will continue to do so.  Not everyone on the planet uses Microsoft technology stacks.</p>
<p>ESPECIALLY in the consumer sphere.</p>
<p>That&#8217;s what was interesting about the way Microsoft pitched their phone.  To consumers.  They hired all the right people, said all the right things, integrated all the right tools.  While I&#8217;m sure the manufacturers will make pimp devices, it&#8217;s challenging not to be cynical about Operators.  I guess if Apple can do it with glib, perhaps Microsoft can do it with dough?</p>
<p>Finally, Microsoft is definitely hiring the right people.  They are positioning key individuals in certain parts of the company, removing the old guard who just don&#8217;t get the web, nor younger consumers.</p>
<p>Will I be doing anything different after my 2nd MIX?  No.  Yes, I&#8217;ll be keeping in touch with my new found Microsoft friends&#8230; but until the Silverlight work flows to me vs. me having to form Microsoft consulting/partner relationships, nothing changes in my world.  It&#8217;s all about the money.  If people pay, I&#8217;ll do it.  Right now, Microsoft pays.  I don&#8217;t mind working as a partner for Microsoft, but right now the world knows me as a Flash &amp; Flex Dev who likes to kick ass with Flash Player, not Silverlight.  It&#8217;s up to the greenbacks flow to change that.  I know it comes off as reactive, but the Microsoft market is large enough that if I did dive in, I&#8217;d have zero problem finding clients even if am &#8220;late to the game&#8221;.</p>
<p>Oh yeah, and lastly, all the &#8220;free&#8221; software Microsoft is releasing to get you on board is a smart f&#8217;ing move.  And Visual Studio still looks awesome&#8230; so does C#.  Maybe I&#8217;ll go learn <a href="http://unity3d.com/">Unity</a> this weekend to get taste without having to dust off my PC or install VMWare or whatever it&#8217;s called.  Anything I can do to avoid Objective C&#8230;.</p>
<p>Anyway, thanks a ton to Microsoft for inviting me, I really appreciate it and all the events, they were fun, and I love meeting new people.  It was the best MIX yet, I learned a lot, and I look forward to speaking at the next one!</p>
]]></content:encoded>
			<wfw:commentRss>http://jessewarden.com/2010/03/what-i-learned-from-microsoft-mix-2010.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>What I Learned From 360Flex 2010</title>
		<link>http://jessewarden.com/2010/03/what-i-learned-from-360flex-2010.html</link>
		<comments>http://jessewarden.com/2010/03/what-i-learned-from-360flex-2010.html#comments</comments>
		<pubDate>Wed, 17 Mar 2010 23:43:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://jessewarden.com/?p=2102</guid>
		<description><![CDATA[Preface
I attended and spoke at the 360 Flex conference in San Jose this year.  Before the high fades away, I wanted to post what I learned last week for a few reasons.  First, to share with others.  Second, to share for those who didn&#8217;t attend, but might if they feel they&#8217;d gain [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Preface</strong></p>
<p>I attended and spoke at the 360 Flex conference in San Jose this year.  Before the high fades away, I wanted to post what I learned last week for a few reasons.  First, to share with others.  Second, to share for those who didn&#8217;t attend, but might if they feel they&#8217;d gain something from it.  Third, a growing number of Flex devs, albeit really small, feel they don&#8217;t gain much from conferences.  I wanted to show a potential counterpoint to this in hopes it&#8217;ll convert them back.</p>
<p><span id="more-2102"></span>360 Flex was in San Jose, California this year, so it&#8217;s a long hike.  That said, people from all over the USA and world converged to meet &amp; greet.  360 Flex is THE premiere Flex conference.  As a speaker, it&#8217;s always been the place, next to Boston, where I KNOW people in the audience will get what I&#8217;m talking about.  As I&#8217;ve progressed in my career, I&#8217;ve struggled to present topics that weren&#8217;t too advanced for the general Flex community, yet would interest those who are advanced as well.  Her majesty constantly reminds me that the things I&#8217;ve spoke about 2 years are still very relevant to Flex &amp; Flash devs today, and I should find some way to get passionate enough about those topics so I can speak on them.  Regardless, I don&#8217;t have that problem in San Jose and Boston, so it was a nice reprieve.</p>
<p>This attitude is based on my perceptions of the body language of the audience as well as twitter &amp; in person responses afterwards (or lack thereof).  It&#8217;s not 100% accurate, but I can usually read an audience, knowing if they are getting it, and recognizing what things in my talks need to change material wise.  I also find that I speak better when I&#8217;m jet lagged and/or hung over.  This mellows my normal spazz-tastic nature, and helps me find a really good pace, especially if her majesty reminds me to have fun before hand.  Timing these sorts of things is hard, hehe.</p>
<p>I&#8217;m usually just so excited to speak about something I love that I forget the basic tenets of giving speeches, and that is &#8220;effective pausing&#8221;, pace, and stopping to re-assess the audience&#8217; engagement.  That&#8217;s one of the reasons I continue to speak.  I feel like I rock at Flex, but still have a long way to go at speaking.  Regardless, what &#8220;job&#8221; allows you to spread knowledge, gives you the opportunity to have dialogues with geniuses, and act like a crackhead in front of an audience causing them to <a href="http://andrewteman.org/blog/wp-content/uploads/lolcano.gif">lolcano</a>?</p>
<p>I may not come away from conferences &amp; user groups with gallons of insight like I did in the past, but I&#8217;ve found other angles of knowledge, and EVERYTHING is right with making new friends, and re-connecting in person with existing ones.  I love this shit.</p>
<p><strong>Goal: Flex 4 and Catalyst Workflows, &amp; Meeting Different, New People</strong></p>
<p>My goals for Flex/Flash specific conferences nowadays are to hit the sessions that are gaping holes in my knowledge.  I&#8217;m probably the last Flex dev on the planet who doesn&#8217;t use Flex 4.  This is a combination of my consulting work on existing Flex 3 projects, tight deadlines, and the need for dependability.  Thus, anything Flex 4 specific I&#8217;m interested in, not really from the technical side (Adobe&#8217;s got great docs), but more from piercing the marketing bs.  Asking top tier to regular devs &#8220;how do you REALLY work with the tools?&#8221; and striking up a dialogue.</p>
<p>Another passion of mine is people.  I love people.  I love working at Starbucks, and even more so, Manhattan, because I&#8217;m surrounded by people. By energy.  By life.  It&#8217;s an exciting feeling, and helps motivate to create cool shiz.  I&#8217;m fascinated by what makes people tick.  I like to see how some people have certain causes that lead them to certain effects.  If you challenge some commonly held beliefs, you can really get a good dialogue going with developers.  If you make vaporous statements about commonly held agreements, you&#8217;ll nodding confirmations, but not much more.  From groups to individuals, you can cause a lot of interesting things to happen.  IF you know what buttons to push.</p>
<p>I&#8217;m not just fascinated by crowds and groups, but by individuals.  If you&#8217;ve ever been to a Microsoft conference, one thing that differentiates the Flash/Flex world from them is our diversity.  We don&#8217;t have every application angle handled by Adobe, thus we must reach out to others for help in certain areas.  While we do technically have a client side and middle tier, we don&#8217;t have a database solution.  We must use MySQL, SQL Server, Oracle, etc.  This requires us to integrate with other communities.  In turn, they are exposed to us.  We&#8217;re different, from different backgrounds.  Some of the culture these clashes are bad, most are good.</p>
<p>Because our tech works with a common goal, we have a &#8220;managed diversity&#8221;.   Studies have proven that companies who have diversity that&#8217;s managed are more successful than those who don&#8217;t have diversity.  In turn, those who are so diverse, but aren&#8217;t managed are worse.  Flash hitting Rails, Flex hitting Django, AIR conjoining with C++.  Design agency punks mingling with executive, khaki wearing Enterprise Java J2EE devs.  It&#8217;s wonderful, crazy.</p>
<p>In short, the opportunity at these conferences, both large and small, to meet someone totally not like me is high.  Yes, we have a common thread; we love t3h SWF.  Yet we all have different backgrounds, different goals, desires&#8230; and once you dig into someone&#8217;s background, and get them talkin, I eat that shit up.  I love hearing about where people come from, how they arrived where they are, and why they decided to come this way, if at all.</p>
<p>It&#8217;s said that the best things about tech conferences are the discussions between/after sessions. For me, it IS the conference.  I&#8217;ve always tried to surround myself with people that are better than me.  They rise you up.  Debating with computer scientists, and genius artists&#8230; how can you NOT walk away a better person?</p>
<p><strong>What Did I Learn?</strong></p>
<p>A ton.</p>
<ol>
<li>A lot of developers don&#8217;t mind the lack of career path.  You rise to architect/consultant level, and instead of hitting the glass ceiling and breaking into management, many just saturate Flex/Flash avenues as far as they can, or go learn another technology and do the whole thing over&#8230; only a lot quicker than it took them the first time.</li>
<li>A lot of developers read technical manuals &amp; programming books vs. marketing &amp; sales ones.  There are exceptions, but most drink from the tech knowledge fountain and can&#8217;t get enough.  I feel like I have a responsibility to help fill the gaps to help them so they either (A) don&#8217;t have to worry about this gap or (B) have a desire to get out of their comfort zone.</li>
<li>Adobe doesn&#8217;t like me much anymore.  There are some great people there whom I still interact with, but it&#8217;s been pretty clear over the past 3 years that as I&#8217;ve moved into a more architect/sales role with my professional consulting, I&#8217;ve had zero time to evangelize software I don&#8217;t even fully believe in.  You can get away with not filing bugs for Adobe as long as you evangelize and help the community, but even that value perception has fallen out of favor apparently.  Given the fact that I&#8217;m focused on higher level problems like software workflows, marketing, sales, and products, this is time NOT spent talking about how dope Flex 4 states are, or how wonderful Flash Builder 4 handles certain coding challenges.  I&#8217;m not alone in this career transition, it just sucks that I can&#8217;t really devote the time I need to get respected again.  Additionally, Adobe&#8217;s focus, at least in the Flash Player sphere, has been exposing boilerplate API&#8217;s and functionality to allow them + 3rd parties to build powerful extensions on top fo the Flash Player.  I totally agree with the approach, but I&#8217;m not technically saavy enough to really help them in this area.  I know what my clients need and want, but translating that to a use case &#8220;please expose sound data via sound sample data so I can build <a href="http://www.hobnox.com/sidbr662tm3hnppndd05hjj9tgdo5/index.en.html">Hobnox</a>&#8221; is just not a jump I can technically make. To be fair, only 10% of it is CS3/CS4 related.  I screamed and bitched at Macromedia and Adobe for years, and saw the fruits of my suggestions along with the communities become a reality.  While some of their software is old, and it&#8217;s challenging for them to add pimp, new revenue generating features without alienating old markets or breaking old workflows, they still have people with mad skillz working for them, with a long successful track record (except for Flash CS3 and CS4; even though Fireworks CS3/4 crashes, we ALL love that prog).  I&#8217;m still in good with the Flash Media team, though, and that&#8217;s been helpful since I&#8217;ve been 100% focused on video for the past 3 years.  They are a pretty thick skinned bunch, so maybe that&#8217;s why&#8230; Anyway, given the amount of responsibility I have with running my own consulting firm + having 2 kids, I just don&#8217;t see how I can return to the days of old where I&#8217;d take 4 hours one night, create some kick ass shit, blog it, and thank Macromedia/Adobe for the cool toys&#8230;. and then suggest new things.  Maybe someday.</li>
<li>The latest fad with our industry is Dependency Injection, and <a href="http://flexblog.faratasystems.com/">Yakov Fain</a> won&#8217;t tell me what the next fad will be&#8230; if you figure that out, you&#8217;ll be the shiz.  Historically this has been what another programming community has had for years, and the Flash/Flex devs just suddenly get and freak out.  While cool, it was apparently obvious to others.</li>
<li>If a mentoring program existed for the Flex community whose sole goal was to make 1 product/project complete and &#8220;live&#8221; from 1 of the 30 &#8220;side projects&#8221; each Flash/Flex dev has on their computer, the world would be an AMAZINGLY better place.  All these 20% to 80% done apps/libraries/products that these developers have, some are really damn cool and NEED TO BE RELEASED.  Those like me who know this have a moral responsibility to help/empower these individuals to &#8220;do the last 10%&#8221;.  I don&#8217;t know how to do that, but it needs to be done somehow.</li>
<li>People who create kick ass open source projects don&#8217;t get enough feedback.  The only solution I can think of is people need more evangelists to not only promote their projects if they aren&#8217;t capable of being evangelists themselves, but also utilizing those envangelists to forcibly extract/publicly recognize via Twitter &amp; Blog streams successful projects that have utilized their software.  Meaning, like Joel Hooks will re-tweet Robotlegs endeavors done by the community to help give it a wider recognition.  Additionally, he&#8217;ll interact with those who&#8217;ve done projects, and take &#8220;back to the Robotlegs community&#8221; the problems/concerns/commendations those who use the software.  Steven Sacks getting public, community member quotes on the Gaia site is another example.  Projects like PyAMF and Hamcrest need this role, and I&#8217;m not really sure how to help them recruit for it beyond citing simple tasks they can do to help themselves.</li>
<li><a href="http://polygeek.com/">Dan Florio</a> was right in ignoring my advice.  I told him not to do <a href="http://runpee.com">RunPee.com</a>.  I didn&#8217;t think it&#8217;d be profitable.  I was wrong.</li>
<li>A lot of people in our industry are happy to make bling working on consistent Flex work with a consulting firm.  I am not like this.</li>
<li>There&#8217;s a growing desire for many developers to learn &amp; teach UX concepts.  This is a direct result from the lack of qualified UX talent.  Since this discipline most affects our client&#8217;s bottom line as well as project costs &amp; risk&#8230; we don&#8217;t have time to wait for UX people to just magically popup out of colleges.</li>
<li>I&#8217;ve gone 10 years without having a contract of my own, and signing any contract a client/company/consulting firm throws at me.  As long as the correct rate/price is on there, I didn&#8217;t care what the rest said.  After seeing Ellie Khabazian&#8217;s presentation, while I won&#8217;t create a contract of my own (since the clients work with would never sign it) I will most definitely ALWAYS be reading contracts I sign, and adjusting wording as necessary.  I&#8217;m one lucky mofo.</li>
<li>There seems to be more animosity towards Silverlight, and more fear towards HTML5.  Those in the know don&#8217;t care about HTML5, and don&#8217;t seem to fear Silverlight.</li>
<li>A lot of the old Flash devs don&#8217;t seem to see a lot of rapid innovation in produced content, whereas the new devs seem to have that feeling of daily finding wonder that the old ones had back in 2002.</li>
<li>Twitter makes blogging hard.  We all already knew this, I just got more corroboration.</li>
<li>Writing large scale examples for frameworks is a constant problem in &#8220;finding the time&#8221;.</li>
<li>I have a lot to learn about sales.</li>
<li>Getting developers on camera is freaking hard.  For a podcast?  Simple.</li>
<li>Getting <a href="http://kevinsuttle.com/">Kevin Suttle</a> to break character is freaking hard.</li>
</ol>
<p>Hope to see y&#8217;all another conference soon!  Thanks <a href="http://twitter.com/jwilker">John</a> &amp; <a href="http://twitter.com/lordbron">Tom</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jessewarden.com/2010/03/what-i-learned-from-360flex-2010.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Good Memory Management When Using PureMVC</title>
		<link>http://jessewarden.com/2009/11/good-memory-management-when-using-puremvc.html</link>
		<comments>http://jessewarden.com/2009/11/good-memory-management-when-using-puremvc.html#comments</comments>
		<pubDate>Tue, 03 Nov 2009 16:35:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://jessewarden.com/?p=1845</guid>
		<description><![CDATA[Preface
There are a lot of good articles already written &#38; screen casts about memory management in Flash Player.  I encourage you to read them first before reading the below.  I cover memory management in a large application using a PureMVC architecture, typically on top of Flex.


Unloading Flex Modules
Resource Management in AS3 Session Notes Available
AS3 Resource [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Preface</strong></p>
<p>There are a lot of good articles already written &amp; screen casts about memory management in Flash Player.  I encourage you to read them first before reading the below.  I cover memory management in a large application using a PureMVC architecture, typically on top of Flex.<br />
<span id="more-1845"></span></p>
<ul>
<li><a href="http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html">Unloading Flex Modules</a></li>
<li><a href="http://www.gskinner.com/blog/archives/2006/09/resource_manage.html">Resource Management in AS3 Session Notes Available</a></li>
<li><a href="http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html">AS3 Resource Management: Part 1</a></li>
<li><a href="http://www.gskinner.com/blog/archives/2006/09/garbage_collect.html">Garbage Collector Interactive Simulator</a></li>
<li><a href="http://blogs.adobe.com/aharui/2007/03/garbage_collection_and_memory.html">Garbage Collection and Memory Leaks</a></li>
<li><a href="http://onflash.org/ted/2009/07/memory-performance-in-land-of.php">Memory Performance in the Land of References</a></li>
<li><a href="http://www.quasimondo.com/archives/000691.php">Flash Player Memory Management</a></li>
<li><a href="http://lab.polygonal.de/2008/06/18/using-object-pools/">Using Object Pools</a></li>
<li><a href="http://www.bigroom.co.uk/blog/object-pool-class">Object Pool Class</a></li>
<li><a href="http://blog.joa-ebert.com/2008/05/07/tweening-and-object-pools/">Tweening and Object Pools</a></li>
<li><a href="http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/">Garbage Collection with Flex and Adobe AIR</a></li>
<li><a href="http://www.iheartair.com/?cat=133">Screencast: Performance and Memory Management</a></li>
</ul>
<p><strong>Introduction</strong></p>
<p>Memory Management, referring to making sure your application doesn&#8217;t leak memory through the use of responsible coding practices, is hard.  It&#8217;s even harder if you don&#8217;t have a history of having to deal with such things (*cough* Flash Developers *cough*).  It was challenging for me to learn&#8230; and I&#8217;m still learning.  As the Flex community has grown, we&#8217;ve seen the influx of more traditional programmers to help write blog entries and white papers, especially for AIR apps, on better memory management, how to prevent memory leaks, and how memory in the Flash Player works (and doesn&#8217;t work).</p>
<p>What I haven&#8217;t seen is this applied to Enterprise programming and frameworks.  Most articles are either from a Flash game developer, or a Flex dev referring to AIR applications.  From my consulting, the people who need the biggest help are doing the web applications that need to run as long as a normal desktop application.  Below, I&#8217;ve documented how you do this using PureMVC.</p>
<p><strong>Why Memory Management?</strong></p>
<p>Many Flex &amp; Flash projects don&#8217;t need to use good memory techniques.  Memory leaks on a small scale are ok.  If the application is responsive to the user, you have no problem.  The purists will argue that creating a bunch of things and not removing them from RAM is bad.  However, if your application works, is responsive to the user, and doesn&#8217;t adversely affect other applications, then the purist is wrong.</p>
<p>For things like games that use a lot of system resources, or applications that need to run on your computer longer than 10 minutes, memory leaks will eventually use all available memory that a SWF is allowed, and cause it to stop working, or the browser to crash.  The application will be slow to respond, Garbage Collection may freeze Flash Player while it attempts to clean up, and/or your memory will become fragmented over time.  Fragmented memory makes things slower to access it, and thus can slow down your application.</p>
<p>Another side effect of not cleaning up the memory you&#8217;ve used yet no longer need is weird bugs.  You&#8217;ll sometimes have objects around that are doing things, yet you have no strong-references to.  Examples include timers still running, service classes that were &#8220;removed&#8221; yet receive a response from the server and no one is still listening for the response, or duplicate PureMVC classes.  Weird bugs can arise from these situations, causing your debugging time for problems to take longer.</p>
<p>Bottom line: If you want  your application to run for hours at a time, not to adversely affect other applications, and remain responsive, you need to employ good memory management.</p>
<p>Smaller projects that have memory leaks can often be re-factored.  Enterprise ones, however, will often take months to fix.  Worse, those months will have a major lack of visible project progress as things are broken on purpose to get things back into shape.  This is sometimes a contributor to the reason larger projects have the infamous &#8220;last 10% is 90% of the work&#8221;.  If you don&#8217;t start early with easy to follow conventions, it&#8217;ll be really hard to add them in later in; &#8220;add&#8221; is too nice a word since those projects don&#8217;t just stop to wait for you to clean up some memory; the logistics are a lot more complex than that.</p>
<p>This is even worse in <a href="http://jessewarden.com/2008/11/agile-chronicles-1-stressful.html">Agile</a>.  Where 80% of your time is re-factoring and you&#8217;re constantly creating new code, it&#8217;s quite challenging to keep up.  The best you can do is have a good understanding of the life cycle of your app.  The better understanding you have, the better you&#8217;ll be able to know what you don&#8217;t have to clean up, and what you do; i.e. when you have to write code and when you don&#8217;t.  Remember, designers / UX people can help here.  They&#8217;ll be able to give you a better understand of user paths into your app, and you can focus on what truly matters and knowingly let the rest remain in memory.</p>
<p>Example: If the user is constantly creating 3 types of forms, you can focus your efforts on ensuring they are cleaned up.  If the user hardly ever goes to a FAQ page, you can spend little to no time ensuring it&#8217;s cleaned up.  The reverse can be true as well.  If the 3 forms are accessed often, you can ensure that only the data they create is unique, but the forms themselves remain in RAM.  You can instead focus your efforts on those items that are rarely accessed.  If you user does go to the FAQ page, they shouldn&#8217;t be punished when they leave; it should remove from memory.</p>
<p><strong>Why NOT memory management?</strong></p>
<p>Memory management, sadly, requires you to often write more code.  More code is a negative contributor to projects.  For Enterprise code bases, they are often quite large.  Even when all features are completed, you are often adding more code for modifying features, or fixing bugs.  The last thing you want to do is knowingly add more code if you can help it.</p>
<p>A common practice for classes is to add destructor methods.  These are basically methods that are called &#8220;public function destroy():void&#8221; and clean up the class.  It&#8217;ll remove strong event listeners, remove child display objects, and stop asynchronous classes such as Timers, Sockets, and service classes.  Another common practice is to create &#8220;addListeners&#8221; and &#8220;removeListeners&#8221; functions that will do just that; add event listeners to an object/objects, and remove them.</p>
<p>Often, though, both classes fall into the trap of those methods never staying in sync with the rest of the class.  If you create a new object, you forget to clean it up in destroy.  That, or you add a new event listener amongst the other 4, but forget to add it to the removeListeners function.  Worse, and most often the case, these methods aren&#8217;t ever called.</p>
<p>The developer meant well, but ended up creating more code, code that isn&#8217;t used, and code that isn&#8217;t even finished with no obvious indications thereof.  The road to hell is paved with good intentions.</p>
<p><strong>When View&#8217;s Go Away</strong></p>
<p>When creating applications, whether Flash or Flex, you&#8217;ll have View&#8217;s that are shown and hidden.  You&#8217;ll have to make the decision how they are hidden.  If you need the View quickly, you&#8217;ll set visible to false and true.  If you don&#8217;t need to View quickly, you&#8217;ll simply addChild/removeChild.  If you only need the View rarely, you can destroy it entirely and rebuild it when you need it.</p>
<p>When you know you need to destroy a View, then you can write code to remove it from memory.  This is the only <a href="http://en.wikipedia.org/wiki/You_ain't_gonna_need_it">YAGNI</a> approach I&#8217;ve found that works.  Meaning, as soon as you recognize you&#8217;ll need to remove a View, only then do you write code to clean up the mess.  If you do it prematurely, you just wrote a bunch of code you may never need, and now have to maintain.  Adding it later actually isn&#8217;t so bad, but that assumed you designed for it.  Meaning, if you don&#8217;t make it easy to remove a View, it&#8217;ll be hard because you first have to re-factor the code that uses it.</p>
<p>From a GUI perspective, this is sometimes ok.  Take the case of a View used in a Flex ViewStack.  All a ViewStack does when you leave a View is remove the View from the DisplayList.  If she&#8217;s a big View, that&#8217;s nice&#8230; but not enough.  You&#8217;ll need to refactor this code to support the child in the ViewStack from being destroyed.  You can either wrap the View you want destroyed in say, a Canvas that has code to destroy/create the single child View based on Event.ADDED/Event.REMOVED.  That, or you could make the child a ModuleLoader, and based on Event.ADDED/Event.REMOVED, load/unload the module.  Or, you could just write a function that creates/destroys views based on where it&#8217;s supposed to go.  You lose the flexibility &amp; ease of using a ViewStack, but you get more control with more efficient code.</p>
<p><strong>Registering &amp; Unregistering View&#8217;s in PureMVC</strong></p>
<p>&#8230;but this assumes you can, in fact, get the View out of memory.  In the case of frameworks, larger Views will often use the <a href="http://martinfowler.com/eaaDev/PresentationModel.html">Presentation</a> pattern, a Mediator, or something like it.  Sometimes it&#8217;s directly in the View itself.  How ever it&#8217;s done, the &#8220;Master View&#8221; will integrate with a framework.  In PureMVC, this is usually via registering itself with PureMVC.  There are varying ways to do this.  The way I do it is via ApplicationFacade.getInstance().registerMyView(this), where &#8220;this&#8221; is the instance reference passed in.  The ApplicationFacade will take the instance, create &amp; register a Mediator passing the instance into the constructor of the Mediator.</p>
<pre><span class="keyword">public</span> <span class="keyword">function</span> registerMyView(view:MyView):<span class="keyword">void</span>
{
        facade.registerMediator(<span class="keyword">new</span> MyViewMediator(view));
}</pre>
<p>Others will dispatch an event, and have a Command class handle those details to prevent their ApplicationFacade from growing large.  Either way, time and time again, I see View&#8217;s that should be removed, but have no &#8220;unregister&#8221; function, nor a Command to remove the Mediator.  Basically, there is a lot of code to register the View the the framework and create associated Application domain classes, but nothing to clean up everything when you&#8217;re done with it.</p>
<p>The way I do it is via ApplicationFacade.getInstance().unregisterMyView(this).  This is the opposite of the last method; it&#8217;ll unregister the Mediator.  The Mediator&#8217;s onRemove function will fire, which gives the Mediator an opportunity to clean itself up.</p>
<pre><span class="keyword">public</span> <span class="keyword">function</span> unregisterMyView():<span class="keyword">void</span>
{
        facade.removeMediator(MyViewMediator.NAME);
}</pre>
<p><strong>Weak vs. Strong Listeners</strong></p>
<p>Let me take this opportunity to protest against using weak listeners.  They are for pussies.  Seriously, the only time they are valid is when you are creating code modules that other developers could use, and there is no conventional destruction point.  Since you have no control over when your code will have the opportunity to clean itself up, nor do you know if the developer using your code is smart enough to call your destroy method, you try to code as defensively as possible.  If you must snag a reference to a global object such as &#8220;stage&#8221; for example, which&#8217;ll surely lock your code into memory, you at least make it a weak listener AS WELL AS listening for Event.REMOVED_FROM_STAGE.</p>
<p>It&#8217;s been suggested to always use weak listeners when using Timers for example.  Since these are some the major culprits of memory leaks in applications, if you use a weak listener, you&#8217;re set right?  Same with Dictionaries with weak keys, right?  *face palm*  Sure man&#8230; with that attitude, I&#8217;m sure you&#8217;re code REALLY makes an effort to help clean itself up.  Besides, Flash Player 9 has some issues garbage collecting weak listeners, so you can&#8217;t even depend on it working as advertised.  They&#8217;ve fixed a lot of this in 10, but you need to make an effort to de-allocate as much memory as you can.  Just because a large object has no references to itself doesn&#8217;t mean the Garbage Collector will immediately free up everything.  While it is a black box, you do have ways of helping it out.  In my experience, it&#8217;s more likely to free up smaller objects more often than large objects since running Garbage Collection itself is a processor intensive operation.</p>
<p>If your code is explicit, it&#8217;s clear where you&#8217;re freeing memory.  If you&#8217;re not, it&#8217;s challenging to figure out where leaks occur, nor is it easy to write proactive code to free up memory.  Granted, deadlines may dictate otherwise, and I concede the point on those instances.  Regardless, a lot of people who use <a href="http://onflash.org/ted/2008/09/useweakreferencesboolean-false.php">weak references for listeners</a> forget that unless they keep a reference to the object itself, it&#8217;ll randomly get garbage collected, which leads to strange bugs for asynchronous classes that are hard to reproduce reliably.  If you don&#8217;t know what you&#8217;re doing or have doubt, just use a strong reference and provide a clear way of removing it later.</p>
<p><strong>Any help you can provide&#8230; would be&#8230; well&#8230; helpful!</strong></p>
<p>Make no mistake: Helping the Flash Player garbage collect your objects has major, positive impacts.  Even a half-assed approach is better than none.</p>
<p>Let&#8217;s take an Array or ArrayCollection full of Strings for example.  He&#8217;s within a View, and you removeChild the View, and null the reference in his parent.  The GC will eat it eventually right?  Wrong&#8230; you accidentally have a stage listener buried deep within the bowels of a base class of a Button you&#8217;ve written.  If that&#8217;s all you&#8217;ve done, simply removing the child from the DisplayList and nulling the reference, you&#8217;ve at least giving back memory the View was using to display itself to the screen.  Glass half full baby!</p>
<p>Taking it a step farther, what if you&#8217;re View implemented a destroy method, and cleaned up its internals to help the GC out, and free up some memory of things it&#8217;s no longer using?  Remember, the View itself is still locked in RAM because you don&#8217;t yet know about the rogue stage listener.  BUT, you at least remove all Strings in the ArrayCollection and null its reference in your destroy method.  Running the <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=profiler_3.html">Flex profiler</a>, you&#8217;ll see some [reap] and [sweep] using more CPU time + memory go down slightly + less String instances.  Yum yum&#8230; while your View couldn&#8217;t get it&#8217;s fat arse outta RAM, you at least managed to free up all of those Strings it had a reference too.  They no longer have any references to them, and therefore they are cleaned up, and the memory THEY use is freed up.  Rad!  GLASS HALF FULL BABY!  Even with a memory leak, we&#8217;re lessening the damage by freeing as much memory as we can.</p>
<p>I know this doesn&#8217;t fix the problem, but if you&#8217;re under a deadline you gotta do what you can to survive.  The only reason I don&#8217;t think weak listeners are justified in the deadline scenario is because it&#8217;s like you&#8217;re not even trying to do the above: thinking about what View&#8217;s &amp; classes need to be removed, writing destructor methods, and validating they worked.  Sometimes you just don&#8217;t have time to do those things, though&#8230;</p>
<p><strong>What do you do in a Mediator::onRemove method?</strong></p>
<p>Assuming you&#8217;re PureMVC is setup correctly, then the onRemove function of your Mediator&#8217;s will fire when it&#8217;s removed from the PureMVC ApplicationFacade.  Here, you can remove strong event listeners you&#8217;ve made on the View, remove the Mediator&#8217;s view reference by setting it to null, and clearing any other data.  This is where things get hard.</p>
<p>Removing the View&#8217;s listeners and it&#8217;s reference is easy; there is a 1 to 1 relationship with with Mediator&#8217;s and a View.  But what about Commands and Proxies?  If the Mediator registered one or more Commands, it&#8217;s pretty clear he should unregister them.  Often I&#8217;ve seen Commands that are relevant to a particular View being registered in the ApplicationFacade by overriding the initializeController method.  For smaller applications this is ok.  For larger ones, it&#8217;s still ok in that they don&#8217;t necessarily take a lot of RAM.  The problem is this doesn&#8217;t scale.  Your Facade will get really really large.  Some people compensate for this by creating multiple Facades for the relevant Application Domain (called Contexts in early <a href="http://www.robotlegs.org/">RobotLegs</a> builds).  While this spreads the damage, it removes relevance from the code; it isn&#8217;t immediately obvious what problem domain these Commands are associated with.  When the Mediator registers them, it&#8217;s usually pretty obvious.  That, and it makes it easier to remove them with confidence without worrying about breaking things.</p>
<p>&#8230;Proxies, however, are another story.  Proxies are the #1 cause of race conditions in PureMVC.  Regardless of how they are written (holders of data as your Model or Services or both), they are often encapsulated enough that they could be relevant to many different Views, and thus many different Mediators.  This causes a problem in knowing when they should die&#8230; if ever.  The benefits of using a stateful client like Flash Player RIA&#8217;s, as opposed to a paged based, non-AJAX HTML application, is that you get the benefits of keeping data in RAM.  This in-RAM data allows the application to be quick and responsive.  As long as your data is ActionScript objects (excluding XML, Strings, Bitmaps, and large ByteArrays) your memory usage is often very low.</p>
<p>Therefore, there isn&#8217;t a lot of harm leaving Proxies around.  The one side effect is when your profiling your application via <a href="http://livedocs.adobe.com/flex/3/langref/flash/system/System.html#totalMemory">System.totalMemory</a>, you&#8217;ll notice it doesn&#8217;t go down as much when you&#8217;re View is destroyed.  Using the Flex profiler, when taking memory snapshots, you&#8217;ll notice you&#8217;ll have a lot of potential loitering objects (things that are still around in memory even after your View is destroyed and Garbage Collection has run).  If you&#8217;re trying to track down a leak, some of those loitering objects, your Proxy and his data, are valid&#8230; you want them to loiter in the first place so you can immediately access them again later.  Additionally, you&#8217;ll need to write more defensive &amp; proactive code in your PureMVC code that accesses the Proxy.  For example, instead of registering the Proxy every time, you need to ensure it&#8217;s not already registered.</p>
<pre><span class="keyword">private</span> <span class="keyword">function</span> getSearchProxy():SearchProxy
{
        <span class="keyword">var</span> searchProxy:SearchProxy;
        <span class="keyword">if</span>(facade.hasProxy(SearchProxy.NAME))
        {
                searchProxy = facade.retrieveProxy(SearchProxy.NAME) as SearchProxy;
        }
        <span class="keyword">else</span>
        {
                searchProxy = <span class="keyword">new</span> SearchProxy();
                facade.<span class="identifier2">registerProxy</span>(searchProxy);
        }
        <span class="keyword">return</span> searchProxy;
}</pre>
<p>Another tactic if the amount of data a Proxy has uses a lot of memory, or you just need every byte you can, is to cache on the local machine.  If you&#8217;re running in a web browser, you can use a local SharedObject and save your serialized data.  If you&#8217;re using AIR, you can read from the local disk via <a href="http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html">File</a>, or use the <a href="http://livedocs.adobe.com/flex/3/langref/localDatabaseSQLSupport.html">local SQL database support</a>. When the Proxy is re-created, he can check the local cache first, validate the data is good, and use it instead of fetching it again from the back-end.</p>
<p>Bottom line, if you DO remove a Proxy, that&#8217;s your cue to go implement his onRemove method as well.  Here&#8217;s an example of a Mediator cleaning up its View reference &amp; listeners as well as proxies.</p>
<pre>protected override <span class="keyword">function</span> onRemove():<span class="keyword">void</span>
{
        <span class="keyword">if</span>(community)
        {
                community.<span class="identifier2">removeEventListener</span>(LoginEvent.LOGIN, onLogin);
                community.<span class="identifier2">removeEventListener</span>(LoginEvent.LOGOUT, onLogout);
                community.<span class="identifier2">removeEventListener</span>(LoginEvent.CHANGE_PASSWORD, onChangePassword);
                community.<span class="identifier2">removeEventListener</span>(SearchEvent.SEARCH, onSearch);
                community.<span class="identifier2">removeEventListener</span>(PowerEvent.OPEN_POWER, onOpenPower);
                community.<span class="identifier2">removeEventListener</span>(PowerEvent.DELETE_SEARCH_POWER, onDeletePower);
                community = <span class="identifier">null</span>;
        }

        facade.removeProxy(AuthenticationProxy.NAME);
        facade.removeProxy(SearchProxy.NAME);
        facade.removeProxy(GetPowerProxy.NAME);

        sendNotification(ApplicationFacade.COMMUNITY_SHUTDOWN);
}</pre>
<p>And here&#8217;s an example of a SearchProxy nulling out internal data, an ArrayCollection and a String, as well as cleaning up an internal web service.</p>
<pre>protected override <span class="keyword">function</span> onRemove():<span class="keyword">void</span>
{
        powers 		= <span class="identifier">null</span>;
        _searchText = <span class="identifier">null</span>;

        <span class="keyword">if</span>(searchPowersByNameService)
        {
                searchPowersByNameService.<span class="identifier2">removeEventListener</span>(CommunityServiceEvent.SEARCH_POWERS_BY_NAME_ERROR, onSearchPowersByNameError);
                searchPowersByNameService.<span class="identifier2">removeEventListener</span>(CommunityServiceEvent.SEARCH_POWERS_BY_NAME_SUCCESS, onSearchPowersByNameSuccess);
                searchPowersByNameService = <span class="identifier">null</span>;
        }
}</pre>
<p>Remember, once you start implementing clean up methods, you&#8217;ll need to keep them in sync with any changes in the class.  Tread with confidence.</p>
<p><strong>Conclusions</strong></p>
<p>Managing memory in Flash &amp; Flex applications is hard.  Validating your hard work actually is paying off is time consuming.  Most programmers who are used to managing memory keep it in the forefront of their minds while their coding, so they often don&#8217;t perceive it as an issue/challenge.  A lot of times the frameworks we use handle a lot of the mundane details of these operations for us (like Tweening engines).</p>
<p>If you&#8217;re application does need to run for any long length of time and you&#8217;re using PureMVC, having a good, up front understanding of what Views need to stick around and which ones don&#8217;t will help you better plan for which Views, Mediators, and Proxies you&#8217;ll need to write code for to free up memory.  If you do your best to make each View follow it&#8217;s own Application Domain problem it&#8217;s solving for, then it&#8217;s easier to have that entire silo follow the standard removal scenarios, and thus code to it.</p>
<p>For example, if you are creating a FAQ View, and it has a FAQ Mediator with a FAQ Proxy, then it&#8217;s pretty simple to clean up thing when you&#8217;re done: implement a destroy method in your View, then implement onRemove methods in your Mediator and Proxy.  When in doubt about the Proxies, just keep &#8216;em around since they usually aren&#8217;t the biggest memory offenders&#8230; but be sure to validate this using the Flex Profiler and/or System.totalMemory as even rogue XML can take 200 megs or more.  It&#8217;s easier to make View&#8217;s more efficient than it is to solve for race conditions in PureMVC.</p>
<p>A good tool to help visualize your memory usage in real-time is <a href="http://code.google.com/p/mrdoob/wiki/stats">Mr. Doob&#8217;s &#8220;Stats&#8221;</a>.  Just be sure your system is only running 1 SWF at a time as System.totalMemory, what Stats uses, applies to all SWFs running on your box.  I usually wrap him with a UIComponent, add a right click menu to my app to open him via <a href="http://livedocs.adobe.com/flex/3/langref/flash/ui/ContextMenu.html">ContextMenu</a>, and launch him via PopUpManager.  Another tool you can use is <a href="http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD">Flex PMD</a>.  It&#8217;ll help identify which code isn&#8217;t used&#8230; and perhaps should, like destroy methods that aren&#8217;t ever called.  Finally, if you&#8217;re desperate on Flash Player 9, you can also force Garbage Collection via the <a href="http://www.gskinner.com/blog/archives/2006/08/as3_resource_ma_2.html">LocalConnection hack</a>.  This saved us on a project where we were loading SWF&#8217;s.</p>
<p>Remember, if you destroy &amp; recreate a View and his PureMVC equivalent classes a lot, you may fragment the memory over time, so don&#8217;t get overzealous.  Use your best judgement, and don&#8217;t be afraid to get the designers help on which sections of the app need to be the most responsive, and which ones it&#8217;s ok to lazy load.</p>
]]></content:encoded>
			<wfw:commentRss>http://jessewarden.com/2009/11/good-memory-management-when-using-puremvc.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>AIR App: Powerz &#8211; Play Dungeons &amp; Dragons 4th Edition Faster</title>
		<link>http://jessewarden.com/2009/09/air-app-powerz-play-dnd-faster.html</link>
		<comments>http://jessewarden.com/2009/09/air-app-powerz-play-dnd-faster.html#comments</comments>
		<pubDate>Tue, 08 Sep 2009 19:19:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Appz]]></category>
		<category><![CDATA[Awesome]]></category>
		<category><![CDATA[Branding]]></category>
		<category><![CDATA[Business Process]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://jessewarden.com/?p=1758</guid>
		<description><![CDATA[This is a long post, so I&#8217;ve provided a short version, and content links to relevant sections if you want to skip around.
Short Version

I&#8217;ve built an AIR application in my spare time using Flex that helps you play Dungeons &#38; Dragons 4th edition faster.  It took 6 months in my spare time and cost [...]]]></description>
			<content:encoded><![CDATA[<p>This is a long post, so I&#8217;ve provided a short version, and content links to relevant sections if you want to skip around.</p>
<p><strong>Short Version<br />
</strong></p>
<p><a href="http://jessewarden.com/archives/powerz/start-page-preview.jpg"><img style="width: 160px; padding-right: 4px;" title="Powerz Start Page" src="http://jessewarden.com/archives/powerz/start-page-preview.jpg" alt="Powerz Start Page" align="left" /></a>I&#8217;ve built an <a href="http://adobe.com/products/air/">AIR</a> application in my spare time using <a href="http://adobe.com/products/flex/">Flex</a> that helps you play <a href="http://www.wizards.com/default.asp?x=dnd/4dnd/dndtestdrive">Dungeons &amp; Dragons 4th edition</a> faster.  It took 6 months in my spare time and cost around $50k to build, and $40 a month to maintain.</p>
<p><a href="http://powerzapp.com/screenshots.html">See</a> and <a href="http://powerzapp.com/download.html">download it here</a>.</p>
<p>It was created in response to my new players, who are tech saavy, having a slow time getting a game going.  I copied the design metaphor used in MMORPG games, as well as creating an online database via <a href="http://www.djangoproject.com/">Django</a> of user submitted content to help the process go faster, as well as supporting house rules.  In doing market research, I found my product is for a younger generation, and this makes it challenging to market.  I used an Iterative/Agile development process to ensure it got completed.</p>
<p>The app had 3 goals: make money, make our games quicker &amp; easier, and prove to myself I could execute.  I succeeded in the latter 2, and failed in the making money&#8230; so far.</p>
<p><span id="more-1758"></span></p>
<hr /><strong>Contents</strong></p>
<ul>
<li><a href="#preface">Preface</a></li>
<li><a href="#introduction">Introduction: Why the need for Powerz?</a></li>
<li><a href="#thepowerofpowerbars">The Power of Power Bars</a></li>
<li><a href="#whyair">Why AIR?</a></li>
<li><a href="#whydjango">Why Django?</a></li>
<li><a href="#selfinflictediterations">Self-Inflicted Iterations</a></li>
<li><a href="#quicknoteonscrum">Quick Note on Scrum</a></li>
<li><a href="#schedule">Schedule</a></li>
<li><a href="#technicaldetails">Technical Details</a></li>
<li><a href="#flex3vs4">Flex 3 vs 4</a></li>
<li><a href="#libraries">Libraries</a></li>
<li><a href="#monkeypatches">Monkey Patches</a></li>
<li><a href="#developmentchallenges">Development Challenges</a></li>
<li><a href="#featurecasulaties">Feature Casualties</a></li>
<li><a href="#marketingandresearch">Marketing &amp; Research</a></li>
<li><a href="#targetaudience">Target Audience</a></li>
<li><a href="#triptodragoncon">Trip to Dragon*Con</a></li>
<li><a href="#failures">Failures</a></li>
<li><a href="#successes">Successes</a></li>
<li><a href="#conclusions">Conclusions</a></li>
</ul>
<p><a name="preface"></a><strong>Preface</strong></p>
<p><a href="http://powerzapp.com/screenshots/Power-Melee_Basic_Attack.jpg"><img style="width: 160px; padding-right: 4px;" title="Melee Attack Power" src="http://powerzapp.com/screenshots/Power-Melee_Basic_Attack.jpg" alt="Melee Attack Power" align="left" /></a>I&#8217;ve spent my spare time the last 6 months building an AIR application called &#8220;<a href="http://powerzapp.com">Powerz</a>&#8220;.  Simply, it is an application that allows you to play <a href="http://www.wizards.com/default.asp?x=dnd/4dnd/dndtestdrive">Dungeons &amp; Dragons 4th edition</a> a lot quicker.  It was built in response to newer players hastily flipping back and forth through rule book pages, all the while lamenting how much easier it is to do this in <a href="http://worldofwarcraft.com">World of Warcraft</a>.</p>
<p>It also became a test for myself.  I wanted to see if I could release a product on my own, perhaps even turn a profit.  I&#8217;ve been attempting for 5 years to create an online version of D&amp;D, fueled by the wishful emails of those around the world who both managed to get their hands on alpha builds and validated my target market.  That, and I had recently become an advisor for a startup, so needed creditability that I had produced results in the product sphere as opposed to the service industry which I&#8217;m currently in (<a href="http://adobe.com/products/flex/">Flex</a> &amp; <a href="http://adobe.com/products/flash/">Flash</a> consulting/contracting).  I had just recently completed my first official Agile/<a href="http://aboutscrum.com/">Scrum</a> project getting a startup client to (*ahem* near) Alpha, and upon reflecting, knew I was now capable of releasing a real product on my own.</p>
<p><a name="introduction"></a><strong>Introduction: Why the need for Powerz?</strong></p>
<p>D&amp;D 4th edition was created, in my opinion, to cater to, what I call, the &#8220;WoW Generation&#8221;.  <a href="http://www.wizards.com/">Wizards of the Coast</a>, the company also responsible for <a href="http://www.wizards.com/magic/multiverse/default.aspx">Magic the Gathering</a>, owns the D&amp;D game.  They recognized that to gain broader appeal of a game traditionally challenging to learn and losing market share to video games, they needed to not only make it easier to learn and play, but also target this gaming demographic.  The new rules do just that.  They are easier to learn for those not inclined to &#8220;read a bunch of rules&#8221;, and the new power concept allows a gaming group to quickly ascertain how they can contribute to the group.</p>
<p><a href="http://powerzapp.com/screenshots/Power-Last_Ditch_Evasion.jpg"><img style="width: 160px; padding-right: 4px;" title="Power - Last Ditch Evasion" src="http://powerzapp.com/screenshots/Power-Last_Ditch_Evasion.jpg" alt="Power - Last Ditch Evasion" align="right" /></a>The problem with the WoW gen&#8217;s, though, is that they grew up texting, and not only want, but EXPECT digital tools to be there, as well as cross device.  D&amp;D, at least currently, doesn&#8217;t totally work like that.  They have made great strides in years to provide online digital content, such as Character Builders, rules compendiums, and online magazines with exclusive content.  What&#8217;s funny to me is that the main goal for most of this content is to be printed to paper and used during gameplay.  If you want to use these tools strictly digitally, you can, but that wasn&#8217;t why they were made.  Ultimately, your still going to be using &#8220;real&#8221; books during gameplay.</p>
<p>When you have a background in <a href="http://en.wikipedia.org/wiki/Massively_multiplayer_online_role-playing_game">MMORPG&#8217;s</a>, or even just gaming on consoles, you look at rule books as primitive, and cumbersome, and ultimately, not as fun.  They, like me, know this problem has already been solved digitally.</p>
<p>What kept coming up as a hassle during gameplay with this new generation of gamers was referencing their character&#8217;s powers, the main crux of 4th edition rules.  I figured if I could solve this problem digitally, I&#8217;d be onto something special.  I knew I couldn&#8217;t solve everything; I&#8217;d tried multiple times in the past to digitize the entire D&amp;D experience, and I simply didn&#8217;t have enough resources to pull that off.  For a digital power bar, however, I didn&#8217;t need a lot of resources&#8230;</p>
<p><a name="thepowerofpowerbars"></a><strong>The Power of Power Bars</strong></p>
<p><a href="http://jessewarden.com/archives/powerz/powerz-bar-preview.jpg"><img style="width: 160px; padding-right: 4px;" title="Powerz Bar Preview" src="http://jessewarden.com/archives/powerz/powerz-bar-preview.jpg" alt="Powerz Bar Preview" align="left" /></a>If you&#8217;ve ever played <a href="http://worldofwarcraft.com">World of Warcraft</a>, <a href="http://starwarsgalaxies.com">Star Wars Galaxies</a>, <a href="http://ddo.com">DDO</a>, or any other Massively Multiplayer Online Role Playing Game, they have the concept of a power bar.  There are a series of slots on the bottom, like a horizontal list in Flex, and in each you can drop a power into.  It&#8217;ll be represented as a little image icon that infers what the power does.  Upon rolling over them, they provide details of what they do.  Upon clicking them, you use them.  While veteran players use keyboard shortcuts and macros, this GUI concept is the core to most MMORPG&#8217;s today.  Players familiar with such games &#8220;get it&#8221;, just like you and I understand to click &amp; drag on a scroll bar to scroll text.</p>
<div class="wp-caption aligncenter" style="width: 397px"><a href="http://jessewarden.com/archives/powerz/powerbar-wow.jpg"><img src="http://jessewarden.com/archives/powerz/powerbar-wow.jpg" alt="World of Warcraft Power Bar" width="387" height="32" /></a><p class="wp-caption-text">World of Warcraft Power Bar</p></div>
<p>This interface element is important because in MMO&#8217;s, those powers, while forming the crux of the 2 most important aspects in those games, chatting &amp; fighting, they also serve another subtle purpose.  RPG games in general are technical.  They basically take a lot of math, specifically ratio&#8217;s &amp; percentages, and personify the results through the use of chance.  While neat from a geek perspective, newbie players, especially those not tech saavy, can get overwhelmed by information overload.</p>
<p><a href="http://jessewarden.com/archives/powerz/powerbar-ddo.jpg"><img class="aligncenter" title="Dungeons &amp; Dragons Online Power Bar" src="http://jessewarden.com/archives/powerz/powerbar-ddo.jpg" alt="" width="393" height="42" /></a></p>
<p>Just like how Word hides non-frequently accessed information in menu&#8217;s that reveal, so to do MMORPG&#8217;s &#8220;reveal&#8221; information when the user requests it.  Additionally, since these interface elements are actually over top of a 3D virtual world, they need to be as non-intrusive as possible.</p>
<p><a href="http://jessewarden.com/archives/powerz/powerbar-swg.jpg"><img class="aligncenter" title="Star Wars Galaxies Power Bar" src="http://jessewarden.com/archives/powerz/powerbar-swg.jpg" alt="" width="348" height="36" /></a></p>
<p>In short, they provide the user with the ability to learn what their character can do, when she/he can do it, all using a mnemonic device of visual icons that relate to the action in a non-intrusive interface.</p>
<p><a name="whyair"></a><strong>Why AIR?</strong></p>
<p><a href="http://adobe.com/products/air/"><img style="padding-right: 4px;" title="Adobe AIR" src="http://jessewarden.com/archives/powerz/adobe_air.jpg" alt="Adobe AIR" align="left" /></a><a href="http://jessewarden.com/2007/06/what-rhymes-with-air-i-dont-care.html">I&#8217;ve bashed her in the past</a> and got shot down by desktop developers who came out of the wood work.  To this day I still don&#8217;t get clients asking me to build AIR apps.  Regardless, it was a pretty clear choice as to why I needed AIR: offline capability to run Flex apps.</p>
<p>You can play D&amp;D ANYWHERE.  I&#8217;ve played at friends houses, at a <a href="http://www.turkey-creek.com/">camp site</a> deep in the woods, on a plane, a bus, etc.  All of these places don&#8217;t always have internet.  Nowadays with wireless and cell phones that have decent coverage, you can <a href="http://9to5mac.com/iPhone-3G-tethering">tether</a> on your device to ensure you have an internet connection just about everywhere.  &#8220;Just about&#8221; isn&#8217;t good enough; if you can&#8217;t use it, or it&#8217;s a spotty connection, you view the &#8220;<a href="http://en.wikipedia.org/wiki/Cloud_computing">cloud</a>&#8221; as holding your data hostage vs. some benevolent caretaker.</p>
<p>So, I didn&#8217;t want an internet connection to be a requirement, and thus, targeted AIR vs. a web browser.  If you know me, using the Flex SDK was a no-brainer.  If you don&#8217;t, here&#8217;s the run down:</p>
<ol>
<li>Needs to work on as many platforms as possible.  AIR works on most PC, Mac, and enough Linux distros.  I use a Mac mostly, my gaming group uses Linux and Windows.  The Character Builder for DDi works on a PC with .NET.  Using <a href="http://www.codeweavers.com/products/">CrossOver</a> or <a href="http://www.parallels.com/">Parallels</a> isn&#8217;t cheap.  Buying an OS + emulation software when you already have a working computer is lamesauce.</li>
<li>Writing my own component framework is time consuming.  It took me 6 months to build <a href="http://code.google.com/p/shurikencomponents/">Shuriken</a> for Flash Lite 2, I&#8217;m still working on <a href="http://code.google.com/p/coreplay/">CorePlay</a> for pure AS3&#8230; so if I ended up doing that, I&#8217;d spend all my time on developing code to develop code vs. finishing my product.  Flex has all the components &amp; styling features I need, Flex 4 more so.</li>
<li>I make my living developing in Flex Builder.  This is what I&#8217;m most comfortable, and thus productive in.</li>
</ol>
<p><a name="whydjango"></a><strong>Why Django?</strong></p>
<p><a href="http://djangoproject.com"><img style="padding-right: 4px;" title="Django Project" src="http://jessewarden.com/archives/powerz/django_logo.gif" alt="Django Project" align="left" /></a>Once I personally started using Powerz in my game sessions, taking her for a test run with my gaming group, a new problem arose: setup time.  While battles finally went a lot faster, and focused more on strategy and chaos vs. wtf can I do, actually STARTING to play took awhile.  Players had to manually input the powers from the Players Handbook into Powerz.  Without <a href="http://en.wikipedia.org/wiki/Optical_character_recognition">OCR</a>, this is a lot of meticulous hand typing.  This included those who played with made up house rules.</p>
<p><a href="http://jessewarden.com/archives/powerz/Community-login.jpg"><img style="width: 160px; padding-right: 4px;" title="Community Login" src="http://jessewarden.com/archives/powerz/Community-login.jpg" alt="Community Login" align="right" /></a>I thought, why couldn&#8217;t we do something like the CDDB days of old?  <a href="http://en.wikipedia.org/wiki/CDDB">CDDB</a> was an online database where people would submit CD track lists.  That way, when you turned a CD into MP3&#8217;s, it automatically filled out the song names and album name for you.  By the time it got popular, most CD&#8217;s were in the database so you didn&#8217;t need to submit them yourself.  This was the first Web 2.0 (aka the read-write web) phenomenon that I remember.  Basically you are leveraging the community, much like <a href="http://wikipedia.com">Wikipedia</a> leverages the knowledge from every contributor in the world.  This is a double-edged sword, as sometimes CDDB would have incorrect data without an easy way to change it.  Wikipedia has had its fair share of drama about article authenticity, and who defines the truth when multiple authors disagree about the same topic.</p>
<p>Regardless, both are using the forces of good, and showcase how leveraging community input can greatly benefit the masses.  Two heads are better than one, and thousands are just f&#8217;ing awesome.</p>
<p>I set out to build an online database of powers so when one person submitted it, everyone else could use it.  The most common ones, say all 1st level ones for all classes, would be ready to go.  That way, even new players could quickly get up to speed.  Powerz is supposed to speed up gameplay, and this would be the final lynchpin.</p>
<p><a href="http://jessewarden.com/archives/powerz/Community-main.jpg"><img style="width: 160px; padding-right: 4px;" title="Community Main" src="http://jessewarden.com/archives/powerz/Community-main.jpg" alt="Community Main" align="left" /></a>I hate, and suck, and server-side anything.  I&#8217;d argue the majority of arguments, philosophical debates, and technical podcasts about software are regarding server-side development (iPhone apps aside).  When people talk about <a href="http://martinfowler.com/articles/injection.html">Inversion of Control</a>, server clustering, or <a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming">Aspect Orientated Programming</a>, my eyes glaze over, I <a href="http://jessewarden.com/archives/facepalm.jpg">face palm</a>, and am like, &#8220;Wow&#8230; that&#8217;ll solve like 10% of my problems.  That 10% is on the server&#8230; WHERE MY CODE ISN&#8217;T RUNNING!&#8221;  To be fair, the majority of all cool software is running on the server.  Most Flex apps I&#8217;ve written are merely pretty faces for pimp server-side action.  The problem with server-side stuff is that you can&#8217;t see it.  I&#8217;m a visual person, I went to art school, and if I can&#8217;t see it, to me it&#8217;s boring.  I like seeing visual results from my coding efforts, and no, logging statements don&#8217;t count.</p>
<p>So&#8230; I knew I was in trouble with my idea.  Every time in the past I had such an idea, I merely turned to <a href="http://php.net">PHP</a>, since finding good server devs looking to work for free is really hard.  PHP is available on just about every web host, for free, and there are a lot of resources out on the internet for it.  It&#8217;s also very similar in syntax to ActionScript, so learning it was easy.  The problem is, I&#8217;m not &#8220;in&#8221; the PHP community.  Creating a user account system may seem like a reasonable programming task to me, but an ignorant waste of time to a veteran PHP programmer who has used <a href="http://framework.zend.com/?fle=Adobe">Zend</a> or <a href="http://drupal.org/">Drupal</a> on many projects.  Most of my endeavors into larger PHP systems have failed because the workload was just to large for me to tackle both the front and back-end.  I knew this time I HAD to find whatever framework others were using for a user account system.  I&#8217;ve failed to find like-minded server-side developers in the past for such ideas.  I actually had a friend offer his services for this very project, but I was concerned I might actually make money, and I make a rule of not mixing friends and business.</p>
<p><a href="http://jessewarden.com/archives/powerz/Community-01.jpg"><img style="width: 160px; padding-right: 4px;" title="Community Powers Search Results" src="http://jessewarden.com/archives/powerz/Community-01.jpg" alt="Community Powers Search Results" align="right" /></a>However, I had just got off a <a href="http://www.djangoproject.com/">Django</a> project.  Having spent 5 years or so evangelizing <a href="http://amfphp.org/">AMFPHP</a>, yet never actually successfully getting native object passing working, I decided I&#8217;d see how easy it was in Python.  Additionally, my experiences using Django&#8217;s user administration interface along with <a href="http://pyamf.org/">PyAMF</a> Flex integration was a very pleasant experience.  Since I&#8217;d already taking a look at Ruby on Rails awhile ago, I figured I&#8217;d give Python a chance.</p>
<p>Best decision ever.</p>
<p>I don&#8217;t know Terminal, my SQL knowledge equates to SELECT * FROM *, and I&#8217;ve never coded Python before.  Django is the shit.  It&#8217;s so easy, I learned my way around Terminal enough to not only &#8220;run a local server&#8221; (I know, right?), sync my database, and even play with <a href="http://www.python.org/">Python</a> code, just like <a href="http://adobe.com/products/director/">Director&#8217;s</a> message window.  I even learned how to remote ssh into my production server, install PyAMF remotely, and deploy my code.  Django is merely a framework atop of Python, but you have to know all that insane crud just to do it.  Oh yeah, and I ended up buying <a href="http://macromates.com/">TextMate</a> (in part to <a href="http://twitter.com/kristoferjoseph">Kristofer&#8217;s</a> recommendation) to use for coding Python.</p>
<p><a href="http://jessewarden.com/archives/powerz/Community-02.jpg"><img style="width: 160px; padding-right: 4px;" title="Community Characters Search Results" src="http://jessewarden.com/archives/powerz/Community-02.jpg" alt="Community Characters Search Results" align="left" /></a>Speaking of Python, it&#8217;s a LOT like ActionScript 1.  Really strange going back to loose typing.  Unfortunately, the only real benefit I found was more succinct code.  The Aspect Orienated/<a href="http://en.wikipedia.org/wiki/Functional_programming">Functional</a> stuff that uses the <a href="http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Decorators">Decorator pattern</a> with metadata tags for designating what methods require the user to be logged in only works for more recent builds of Python.  Still&#8230; I got it and think its hawt.  Additionally, the fact that you can import just a method of a class and use it is neat.  There&#8217;s been a request on an unnamed list requesting ActionScript 3 get this ability so when you import 1 method of a library, you don&#8217;t end up importing the whole library, and thus incur the file size penalty.  Since SWF is for web, this makes a lot of sense in investing in such a feature.  Python&#8217;s for loops?  Holy fish, advanced, and really cool stuff, way easier than doing similiar things in ActionScript 3 (faster? doubt it).  I still don&#8217;t get their slicing syntax, but I&#8217;m sure if I did it every day I would.</p>
<p>So why Django?  Within 3 days I had learned Python, Django, and PyAMF integration to have a working user authentication system working in my Flex app.  Blah blah blah&#8230; open source has no value&#8230; blah blah blah.</p>
<p>&#8230;I suck at debugging it, though, a friend told me to look into Python logging, but I just ran out of time&#8230; print print print OT OT OT.  That, and my admin only works on my local box, not the remote server&#8230; *ahem*.</p>
<p><a name="selfinflictediterations"></a><strong>Self-Inflicted Iterations</strong></p>
<p>All my personal projects suffered from the most common symptom that affects a lot of us software developers: starting new projects is ALWAYS more fun than finishing them.  You accrue a long list of awesome ideas that never make it to fruition.  Of those, a few you blog about.  Knowing this industry, a bunch are probably worthy of actually finishing and marketing because they&#8217;ll make bling&#8230; but&#8230; we&#8217;re a busy bunch.  That, or you see no point because you have no clue how to monetize them.</p>
<p>I&#8217;ve had this happen 3 times with my major D&amp;D online project in 5 years, 3 times with some games, and once with every other project that wasn&#8217;t specifically created FOR a blog entry since my career started.  I almost swore a blood oath before starting Powerz.  I didn&#8217;t really have too, though, because of circumstances.</p>
<p>First, I had just got off the best gig I&#8217;ve had in my entire career.  It was working for a startup as a service consultant through <a href="http://enablus.com/">Enablus</a>.  So, I make bling, but see $0 bling when they insanely succeed.  Quite the soul reflection project.  Second, I read a book called &#8220;<a href="http://www.amazon.com/Rich-Dad-Poor-Money-That-Middle/dp/0446677450/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1252451054&amp;sr=1-1">Rich Dad, Poor Dad</a>&#8221; upon a recommendation form <a href="http://www.dropthezero.com/">a friend</a>, and was then pissed for 3 weeks straight.  Third, I now knew how to do Agile development which was better than my made up iterative process of the past.  Fourth, D&amp;D 4th edition really is slow if you don&#8217;t know your powers by heart; it&#8217;s even worse for DM&#8217;s who have 50 billion other things to keep track of.  I needed this tool!</p>
<p>I made a simple rule.  If I was going to work on Powers, I needed to release SOMETHING a week from when I started.  If I grabbed a beer and started coding on a Friday night, there better be a new build, with associated forum post, WORKING up online the following Friday.  If I had something come up, like say real, paying work, or my kid(s) got sick, or whatever&#8230;. then 2 weeks. If that didn&#8217;t work because, say I only had 4 hours in a 2 week period, then I&#8217;d lock myself into finishing just one feature before I was allowed to work on anything else.</p>
<p>Failure was not an option.  To fail is to fail myself, and everything I stood for, and for those who listened to my blog entries full of &#8220;advice&#8221;.  If I did fail, it meant Agile didn&#8217;t work, and all <a href="http://jessewarden.com/2008/11/agile-chronicles-1-stressful.html">10 of those blog entries</a> I wrote espousing it were utter bullshit, and I needed to die in a fire.  Seriously.  After being so frustrated for so long about &#8220;figuring out&#8221; software development for the past 9 years, this was the line in the sand.  Pick your platform, pick your tool, pick your framework, and either put up, or shut up.  Get something done vs. proselytizing about &#8220;how to program&#8221; with nothing to show for it.</p>
<p>In short, finish something I started.</p>
<p>6 months later, I&#8217;ve released version 1.0.  That feels f&#8217;ing good.  Really good.  That, and D&amp;D is easier to play now for me, and a lot of others.</p>
<p><a name="quicknoteonscrum"></a><strong>Quick Note on Scrum</strong></p>
<p>Remember, if you ever hear about this Agile or Scrum stuff, and are like, &#8220;Wtf?&#8221;, don&#8217;t stress.  All you need to know about using Scrum correctly is release working software with a new feature every week (or every 2 weeks).  That&#8217;s it, that&#8217;s all you need to do to be JXL Scrum compliant.  If you don&#8217;t do that, you should really take a look at what you are really trying to accomplish.</p>
<p>If you&#8217;re a manager who&#8217;s trying to implement it, and your developers keep going off on paths they weren&#8217;t assigned, play to their ego&#8217;s.  For example, if someone says, &#8220;I could write a login form in less than a day!&#8221;.  If it then takes them 8 days for the form to actually work, call them on it.  I guarantee you they&#8217;ll spout off about &#8220;OOP/Framework setup&#8221;, or some other lack-of-<a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">DRY</a>-adherence excuse.  That&#8217;s ok; the point here is to show them that what they thought they could do, they didn&#8217;t actually execute on.  They&#8217;ll either re-assess what it really takes to develop even simple things, or you&#8217;ll come to a mutual understanding of what &#8220;working&#8221; really means.</p>
<p>I had to do that.  In 2001, I created a stock charting application in Flash 5, AS1 pre-#initclip days, knowing very little OOP, zero best practices, and no frameworks, in 1 month.  Today, that same application would take me 4 to 6 months, and cost 177% more per hour.  Granted, the devil is in the details (quality of user experience, less bugs, more features, I actually know what I&#8217;m doing now + have experience, etc), but that, to me, says something about my ability to execute.  Those in software know faster doesn&#8217;t mean better&#8230; but when you start splitting hairs about even simple features, you find some surprising things about yourself.  I call this, programmer self-awareness through Scrum.</p>
<p><a name="schedule"></a><strong>Schedule</strong></p>
<p>For those who are interested, here is how my schedule worked out.  When I mention a week, I&#8217;m speaking about a week of development time.  So, if I started coding on Friday night, but only put in 4 hours for an entire week&#8230; I certainly had very little to offer in a true build.  So, my first rule was, if I could do a week, do a week, and release.  If I couldn&#8217;t because I had real work to do, then I&#8217;d instead get 1 feature DONE and release.  This was still hard, because even if I could only devote like 2 hours a week to my personal project, it HAD to be on that one feature, and I had to force myself to finish it so I could get a build up, and move onto another.  It was far from perfect, but it&#8217;s as Scrum as I could get with my free time&#8230; and it guaranteed I&#8217;d release multiple builds with enough room for user feedback.</p>
<ul>
<li>First 3 weeks, spent designing &amp; doing initial prototyping (aka design phase in Waterfall).  I had no gig lined up, so worked 3 weeks straight on my own stuff.  I worked for about 7 days straight in Photoshop CS3.</li>
<li>Work 1 hour one night, 4 hours another, 8 maybe on a weekend, or perhaps none for 4 days in a row.  Bottom line, I still followed my weekly/bi-weekly/single feature release schedule.</li>
<li>One build took 6 weeks (Alpha 9 to Beta 1) because I had to learn Django and do real work at the same time.  Some weeks during that time, I only worked 1 to 2 hours per week, others, I&#8217;d work 3 days straight.</li>
<li>Some weeks were coding.  Some weeks were pure Photoshop.  Three weeks was learning/implementing Django.  Four weeks was setting up the website, porting all code &amp; assets to work on it, and installing all forum and blog software.  All was mixed amongst each other.  Since I was doing everything myself.</li>
<li>I did Analytics once in the beginning, and then changed it 2 weeks later when I couldn&#8217;t understand my own metrics.</li>
<li>Start Date: Around April 5th, 2009.</li>
<li>End Date: Hopefully September 26th, 2009.</li>
<li>Total Time: 6 months</li>
</ul>
<p>It&#8217;s hard for me to predict how long Powerz would of taken had I been able to spend 100% of my time on it.  A lot of things came up, positively &amp; negatively, during development that adversely affected the timeline.  Users asked for features, work flows I originally tried didn&#8217;t pan out, Photoshop designs took a few tries, and learning Django staggered overall development on the Community portion.  All I know is, Flex Builder 3 and Flex SDK 3.3 is foogin&#8217; solid for what I needed.</p>
<p><a name="technicaldetails"></a><strong>Technical Details</strong></p>
<p>The <a href="http://powerzapp.com">web site</a> is pretty standard stuff.  <a href="http://powerzapp.com/forum/">Forum</a> is <a href="http://www.phpbb.com/">PHPBB</a>, and blog is vanilla install of <a href="http://wordpress.org/">Wordpress</a>.  Hopefully post 1.0 launch, I can modify the blog to match the rest of the site look and feel (excluding forum) via <a href="http://www.themedreamer.com/">the Dreamer</a>, an easier way to design Wordpress sites via <a href="http://adobe.com/products/dreamweaver/">Dreamweaver</a>.  Her majesty used it for her site and it&#8217;s pretty cool.  I also need to redo my <a href="http://jessewarden.com/projects/gamingtools/powerz/screencast/">dated screen cast</a>, and tons of other things.</p>
<p>While I did the original web site designs in <a href="http://adobe.com/products/photoshop/">Photoshop</a>, the site itself was done by her majesty and I in <a href="http://adobe.com/products/fireworks/">Fireworks</a>.  Fireworks&#8217; text handling is superior to Photoshop&#8217;s, and now that CS4 shares the same font engine, you can get good looking interfaces.  If Photoshop were to improve their text handling capabilities, I&#8217;d probably still use Fireworks for it&#8217;s easier object editing + grouping + moving functionality.  For the web with lots of content, it was just quicker for me and her majesty.</p>
<p>For the video, shot using a <a href="http://www.amazon.com/Sony-DCR-SR200-Handycam-Camcorder-Optical/dp/B000M3GJKU/ref=sr_1_1?ie=UTF8&amp;s=electronics&amp;qid=1253188966&amp;sr=8-1">Sony DCR-SR200</a>, and edited in <a href="http://www.adobe.com/products/premiere/">Premiere</a> CS3 &amp; <a href="http://adobe.com/products/aftereffects/">After Effects</a> CS3.  <a href="http://www.telestream.net/screen-flow/overview.htm">ScreenFlow</a> was used for demoing the software.</p>
<p><a name="flex3vs4"></a><strong>Flex 3 vs 4</strong></p>
<p>Yes, I very much wanted to use <a href="http://labs.adobe.com/technologies/flashbuilder4/">Flex 4</a>.  Unlike Flex 2 Alpha, however, she&#8217;s unstable and changes all the time.  You could build some pretty Enterprise stuff on Flex 2, Beta 1.  I would never do such a thing with Flex 4 just because she&#8217;s in such flux, and the IDE (+ <a href="http://labs.adobe.com/technologies/flashcatalyst/">Catalyst</a> builds) is somewhat flaky.  Obviously 6 months later things are more stable&#8230; but they still changed a lot (fx prefix, Halo interop, etc.).</p>
<p>I used Flex Builder 3 &amp; Flex SDK 3.2&#8230; then 3.3&#8230; then 3.4.  I use AIR 1.5.2.  AIR still has a bug where you can&#8217;t seem to use compc (aka Library Projects) because of some weird Vector bug in playerglobals.swc or something.  So I just gave up on using a library project.</p>
<p><a name="libraries"></a><strong>Libraries</strong></p>
<p>I have 1 Flex project, and a ton of libraries.  Ones of note are:</p>
<ul>
<li>Cliff Hall&#8217;s <a href="http://puremvc.org/">PureMVC</a></li>
<li>Ely&#8217;s <a href="http://www.quietlyscheming.com/blog/2007/01/23/some-thoughts-on-doubt-on-flex-as-the-best-option-orhow-i-made-my-flex-images-stop-dancing/">SuperImage</a> (that I <a href="http://jessewarden.com/2009/08/fix-for-elys-superimage.html">patched</a>)</li>
<li>Claus Wahlers&#8217; and Max Herkender&#8217;s <a href="http://codeazur.com.br/lab/fzip/">FZip</a> for reading &amp; writing my custom file formats</li>
<li>Christian Cantrell&#8217;s <a href="http://code.google.com/p/as3nativealertlib/">NativeAlert</a> ported to Flex</li>
<li><a href="http://code.google.com/p/gaforflash/">Google Analytics</a></li>
<li><a href="http://google.com/adsense">Google AdSense</a></li>
<li><a href="http://code.google.com/p/as3corelib/">as3corelib</a> for <a href="http://json.org">JSON</a>, used in reading &amp; writing custom file format</li>
<li>Adobe AIR Update framework (which refuses to GTFO of RAM) with custom badges written in Flash (zomg!)</li>
<li>my DebugMax window which is a lame attempt to copy that older Flash debug window (the Portuguese one)</li>
<li>&#8230;and Grden&#8217;s <a href="http://rockonflash.wordpress.com/2007/05/16/as3-localtolocal-and-coordinatetools/">localToLocal function</a></li>
<li>Server is running Django on Python, using PyAMF to send AMF objects back and forth. I&#8217;m only using one class; getting nested ValueObjects to work with inherited and one to many relationships in Django&#8217;s Models was nigh impossible to debug.  For now, I just pass simple Objects which are uber-easy to parse.</li>
</ul>
<p>Blah blah blah&#8230; open source provides no value&#8230; blah blah blah.</p>
<p><a name="monkeypatches"></a><strong>Monkey Patches</strong></p>
<ol>
<li>Commented out a bunch of <a href="http://bugs.adobe.com/jira/browse/SDK-20784">InterManagerRequest</a> code in AIR&#8217;s NativeDragManagerImpl class. Doing drag operations would cause the app to lock up for 7 to 11 seconds. Not sure if this was fixed in 3.4, but I don&#8217;t load multiple Flex apps with different SDK versions, so don&#8217;t need this code.</li>
<li>Added bitmap smoothing in SWFLoader, which Flex SDK 3.4 (or 3.3 I forget which, added officially)</li>
<li>Added a numLines getter to Label for more accurate text height measurement&#8230; which I then later didn&#8217;t use.  Proper invalidation fixed my measurement bug; text can be finicky, but if you wait a frame&#8230;&#8230;</li>
</ol>
<p><a name="developmentchallenges"></a><strong>Development Challenges</strong></p>
<p>There were 3 development challenges I faced.</p>
<p><a href="http://jessewarden.com/archives/powerz/Character-v2-preview.jpg"><img style="width: 160px; padding-right: 4px;" title="Character" src="http://jessewarden.com/archives/powerz/Character-v2-preview.jpg" alt="Character" align="right" /></a>The first was developing in AIR.  If you are using Flex in AIR, it&#8217;s nearly the same thing.  The hard parts were learning how Windows work, and their quirks (such as when does Window REALLY get its reference to nativeWindow?).  How do you design for this as a designer, and what is an appropriate design metaphor?  Multiple windows, or 1 window with many states?  Also, event bubbling doesn&#8217;t work with windows, since each has it&#8217;s own stage, so there was a learning curve of when to manually re-dispatch, and when to just hand off to PureMVC Mediators.</p>
<p>The second was learning to work with reading and writing files.  The FileReference class is EASY, but there are actually 3 classes (really you just work with 2) for AIR.  They too have intricacies to learn, and how you can abstract them, and what the costs are in doing so.  What was fun to figure out was how to associate a file with a document window in the PureMVC framework.  I really had a tough time trying to tightly couple something when you&#8217;re technically not supposed to tightly couple anything in programming.</p>
<p>The third was creating a file format.  I believe most traditional developers would of used some sort of serialization via ByteArray and the <a href="http://livedocs.adobe.com/flex/3/langref/flash/utils/IExternalizable.html">IExternalizable</a> interface for your objects.  To me, that stuff takes a lot of work, and isn&#8217;t easy for me to debug, nor verify if it worked.  Maybe to those who think in 0&#8217;s and 1&#8217;s, but not me.  It took some tinkering; I copied how SWC works.  SWC is a ZIP file with some XML and binary assets all inside.  My file formats are basically the same thing; a ZIP file with a JSON text file holding the serialized object, images for any icons, and a text file determining what type the file format is (since you can&#8217;t rely on file extension).  This allowed me to open up the file to see it&#8217;s contents and confirm my code worked as well as perusing the JSON to see if my objects serialized correctly.</p>
<p>What was great about being the only developer was that I was also the designer and back-end developer.  I knew how to design assets for Flex and could predict what I&#8217;d need designed.  As the back-end developer, I could create data that the client would need, thus making my job easier in both places.</p>
<p><a name="featurecasulaties"></a><strong>Feature Casualties</strong></p>
<p>I had 2 features that caused major scope creep, and thus extended how long it took.  They weren&#8217;t a waste of time, but as with every project, I learned something.</p>
<p>The first was the whole &#8220;document editing process&#8221; that people are used to.  You open a file, edit it, save it if it&#8217;s dirty, and close the &#8220;document&#8221;.  If you &#8220;Save As&#8230;&#8221;, you create a new file, yet use same window.  I didn&#8217;t use this model at first.  Instead, I just opened files, kept a reference to the file handle for each AIR window, and removed it when the window closed.  However, this is not how every other desktop application works.  Additionally, for those on network drives, you couldn&#8217;t really work with the files easily when moving things since it always had an opened file handle.  So, it was a pretty big re-write/re-factoring effort to put this functionality &amp; work flow in.  I know how to do it now, but I&#8217;m just glad no one asked for undo yet. *whew*</p>
<p>The second was pimping out Christian&#8217;s NativeAlert window.  I spent 3 days in <a href="http://adobe.com/products/aftereffects/">AfterEffects</a> when I was between gigs creating a transition in and transition out for the window.  Instead of just popping in, it&#8217;d &#8220;materialize&#8221; in, all magical like.  To me, and one of my users, it looked awesome.  It got old after 2 uses because you had to wait for it and there are a few alerts when saving files.  If I speed it up any, it loses fidelity&#8230; so I just removed it.  It required a lot of custom code to make the alert do it&#8217;s modality magic in time with the transition.  I didn&#8217;t get to use any of it.</p>
<div>
<p><object id="player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="450" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="player" /><param name="allowfullscreen" value="true" /><param name="src" value="http://jessewarden.com/projects/gamingtools/powerz/oldalerts/preview/alert_skin.swf" /><param name="align" value="middle" /><param name="quality" value="high" /><embed id="player" type="application/x-shockwave-flash" width="450" height="400" src="http://jessewarden.com/projects/gamingtools/powerz/oldalerts/preview/alert_skin.swf" quality="high" align="middle" allowfullscreen="true" name="player"></embed></object></div>
<p><a name="marketingandresearch"></a><strong>Marketing &amp; Research</strong></p>
<p>This was the most interesting for me.  While I&#8217;m not a good salesman, I feel that I get online marketing and branding.  I also feel like I understand my target audience, since I&#8217;m part of that audience.  I actually did market research (aka learning my target audience and their needs) both at the start and during development.</p>
<p>I looked online and read about what WotC was offering, and then I looked at all the 3rd party offerings.  I took a few for a spin.  I read user reviews on forums and blogs, especially the passionate ones.  I wanted to gain a better understanding of what they liked about the software, and how they expected software to work.  There wasn&#8217;t really a pattern.  The bitching about lack of Linux/Mac support was low, and a lot of the 3rd parties utilized Java.  For those that didn&#8217;t, there we already well documented ways of installing a Windows emulator.</p>
<p>One thing that reading the forums did for me was really educate me on the current flux of the industry.  Technology really has changed, and continues to change, table top gaming.  WotC is in an interesting time of the market, and frankly I&#8217;ve think they&#8217;ve done a good job on positioning their D&amp;D brand &amp; rules for 4th edition to perform well with these changes.  Where they haven&#8217;t done entirely well is executing both their community aspects online, as well as delivering their associated digital tools.</p>
<p>The short version of WotC&#8217;s transition to the digital age is, as magazine sales declined, WotC first sold their magazines to <a href="http://paizo.com/">Piazo</a>, and later brought them back and incorporated them into their new online subscription service; they no longer print magazines.  You get the monthly magazines digitally, exclusive content, as well as access to their desktop and web tools.  There are good and bad things about this.  Some of their software isn&#8217;t released years later, but the ones that are are definitely nice.</p>
<p><a name="targetaudience"></a><strong>Target Audience</strong></p>
<p>I wrote something similar to this over a the <a href="powerzapp.com/blog/2009/09/ddis-character-builder-powerz.html">Powerz blog</a>.  Bottom line, there is a lot of confusion, at least for me, on who really is the target demographic.  The high level view is that the older players prefer tangible rule books, whereas the younger ones are more apt to digital content.  That&#8217;s where the black and white views end.  Some from both groups are fine with digital content, but intend to transfer that content to paper in use in their games.  Others would prefer to wholly digital, yet still play in person with their friends; like a LAN party.</p>
<p>I intended to confirm this suspicion beyond just talking online&#8230;</p>
<p><a name="triptodragoncon"></a><strong>Trip to Dragon*Con</strong></p>
<p>&#8230;so I took a trip to <a href="http://dragoncon.org">Dragon*Con</a> 2009 this year.  I go every so often to stock up on new dice as well as to see the <a href="http://www.501st.com/">501st</a>.  My goal this year was to promote Powerz, and meet potential customers.  I knew it would be challenging for a few reasons.  First off, finding D&amp;D players is actually hard.  It&#8217;s a huge Sci-fi &amp; fantasy conference; it&#8217;s not solely for D&amp;D&#8217;ers.  Additionally, most D&amp;D&#8217;ers who do go play with their friends at predefined tables in a reserved hotel ballroom.  These are usually niche groups, and while friendly, you can&#8217;t just barge in on them in a middle of game.  If someone did that to me during mine, I&#8217;d be really ticked off.  Additionally, the conference itself is confusing because it&#8217;s spaced around 4 semi-adjoining hotels (Hilton, Marriott, Sheraton, etc.), and signage isn&#8217;t large/verbose enough for you to get a clear picture of where you are, nor what events are happening where.  I knew it&#8217;d be hard.  Her majesty helped set my expectations to a reasonable level.</p>
<p>My first attempt was while waiting in dice line (like a food large buffet, except there are different colored dice you can choose from).  One particular customer was taking awhile to get his transaction finished, and was in a TF2 spy costume (I think), so I figured he was a good target.</p>
<p>&#8220;Hey chief, you play D&amp;D?&#8221;</p>
<p>&#8220;Yeah!&#8221;</p>
<p>&#8220;Cool, you play 4th edition?&#8221;</p>
<p>&#8220;Naw, 3.5.&#8221;</p>
<p>*sigh*</p>
<p>I then asked the attendant who was waiting on customers, but he didn&#8217;t play, just pointed to one of his co-workers; but they were UBER busy.  Even <a href="http://vimeo.com/6553056">Solid Snake briefly came out of his box</a> to browse their wares.  I didn&#8217;t want to annoy every customer, so moved to another vendor booth, full of D&amp;D books.</p>
<p>A girl was just sitting down in a chair, and lamenting about how good it was to sit down.  Prime target.</p>
<p>&#8220;Hey, you play D&amp;D?&#8221;</p>
<p>&#8220;Yeah&#8230;&#8221;</p>
<p>&#8220;4th edition?&#8221;</p>
<p>Irritatedly, &#8220;Only because my group made me&#8230;&#8221;</p>
<p>&#8220;Rad, do you mind if you ask you a few questions about some software I&#8217;m building?&#8221;</p>
<p>Cautious, and body language suggesting she was about run at the slightest sign I was a vampire, &#8220;Ooookkkayy&#8230;.&#8221;</p>
<p>I sat down next to her on the floor to make her feel more comfortable with my laptop, and briefly walked her through why I created Powerz, and what it does.</p>
<p>She immediately got excited, &#8220;Oh we already use that through our DM.  He uses WotC&#8217;s subscription service&#8230; DD something&#8230;&#8221;</p>
<p>&#8220;DDO or DDi?&#8221;</p>
<p>&#8220;Yeah.&#8221;</p>
<p>&#8220;Which one?&#8221;</p>
<p>She shrugged but excitedly explained, &#8220;I don&#8217;t know, but it&#8217;s great.  You can input all of your character data, and it prints out all your powers.  Our whole group does it.&#8221;</p>
<p>I then proceeded to ask her questions about how her group plays, and take notes.  Another gent from her gaming group joined in on the conversation, and motioned to a 3rd member who was also browsing books nearby.  After I had asked my questions, I thanked them for their time&#8230; and went looking for a bar.  I suddenly felt insecure, &#8216;How could DDi do all that?  There is no way, I&#8217;ve seen the screen shots, read the reviews&#8230;.&#8217;</p>
<p>While waiting for the bar tender who was overworked, and was already getting heckled by some disgruntled women next to me, I reflected on those I had talked to.  I knew a lot of the older generation was very pro-3.5, me included.  I really like, still, the 3.5 rules and felt they were akin to Macromedia&#8217;s Flash 8; the pinnacle of the company.  I started getting really depressed, and quickly started going over all of my past research in my head.</p>
<p>&#8230;then I remembered something the girl had said.  &#8220;Print them out.&#8221;  Print?  To paper?  wtf?  A smile came to my face, I gave up waiting on the bartender, and quickly headed to where I remembered the D&amp;D gaming tables being the previous year.  I stopped by the bellman&#8217;s desk to obtain some change so I could buy a few people beers in exchange for me pestering them with questions.</p>
<p>Paper.  That was really what I kept seeing.  The generation gap in that one prefers tangible assets to play with and the younger ones do not.  Again, it&#8217;s not that black and white sometimes, but it&#8217;s still true.  While waiting 1 hour and 40 minutes in line, I met a father who had brought his 11 year old daughter to &#8220;meet&#8221; the creators of the online game she played.  It was some alternative to <a href="http://www.clubpenguin.com/">Club Penguin</a>, which was apparently ruined under new management.  She was really excited, and wanted to be a programmer when she grew up.  The father, clearly out of his element, saw me in my business professional getup, clearly over dressed for such a casual, and often costumed event, and seemed happy to have some one to talk to.  He found it strange that his daughter would spend his money on these online games for things that didn&#8217;t exist.  Instead of a new barbie doll, she&#8217;d get a some new, exclusive outfit for her online character.  We discussed her online habits, and those of her friends.  I explained what I did, and he was intrigued.</p>
<p>His daughter is my target audience.  The girls and boy in front of her, definitely early teens, one dressed up as <a href="http://en.wikipedia.org/wiki/Naruto">Naruto</a>, and others as <a href="http://en.wikipedia.org/wiki/List_of_InuYasha_characters#Sango">Sango</a> from InuYasha&#8230; those are my target audience.  They grew up texting, the internet always existed.  Those who were my age, dressed up as star trek characters&#8230; those probably aren&#8217;t my target audience.  These kids revel in online content, but still have social interactions with each other in person.</p>
<p>People like me, and the kids who are used to digital tools don&#8217;t mind <strong>keeping</strong> things digital.  Others see digital tools as a means to a paper end.</p>
<p>Upon leaving, I was convinced my target audience was mostly online and not at Dragon*Con&#8230; or at Dragon*Con WITH their PARENTS.  It was a great learning experience, even talking to the few people I did was helpful.</p>
<p><a name="failures"></a><strong>Failures</strong></p>
<p>The project as a whole, while successful, failed to meet one of its primary goals: make money.  It does have some successes, which I document below.  I had two main goals: releasing a product to prove I could execute, and to make money, enough to cover costs.  Currently, there is not enough community features to justify a subscription pricing model.  Additionally, I highly doubt I&#8217;ll get enough users to cover the costs via the ad supported model I use currently.</p>
<p>If you add up all the costs:</p>
<ul>
<li>Around 6 to 10 weeks of man hours (design, development, marketing + expenses)</li>
<li>hosting costs ($20 hosting + $20 Django container @ Mediatemple)</li>
</ul>
<p>The total comes to around $50,000.  Each month I go $40 more into the hole as the ads currently aren&#8217;t providing enough revenue to cover costs, and I haven&#8217;t figured out how to monetize the anonymous usage data.</p>
<p>I have a new idea that will actually generate revenue, and Powerz could actually be a companion application, so that&#8217;s a positive.</p>
<p>I&#8217;m not sure about this statement, but&#8230; here goes: I&#8217;m glad I know I&#8217;m capable of executing vs. knowing how to make money and not execute.  This, as opposed to someone who knows how to make money, but can&#8217;t execute.  The sad fact is, most rich people I read about know how to make money, and get other more qualified individuals to execute for them.  Doh!</p>
<p>As a developer, however, I view this as yet another thing to learn, so that&#8217;s a good thing!  If I start learning how to monetize things better, I can focus my development efforts on what matter monetarily, and eventually find easier ways to leverage help vs. doing everything myself.  If at first you don&#8217;t succeed, try, try again.</p>
<p><a name="successes"></a><strong>Successes</strong></p>
<p>My favorite part, the wins.</p>
<ol>
<li>I now have a tool to make my D&amp;D gaming easier, and more fun.</li>
<li>Others now have access to the same tool, with the ability to help guide it&#8217;s direction.</li>
<li>I&#8217;ve proved to myself for the 2nd time that <a href="http://en.wikipedia.org/wiki/Iterative_and_incremental_development">Iterative development</a> works.</li>
<li>I&#8217;ve proved to myself that I can execute on my ideas.</li>
<li>I learned Django &amp; Python, and also learned not to hate the server-side.</li>
<li>I&#8217;ve learned, again, how much work it really takes beyond just coding to release a product.</li>
<li>I learned a little bit about engaging potential customers.</li>
<li>I learned a little bit about market research.</li>
<li>I learned how NOT to migrate data.</li>
<li>I now have something new to learn: How to make money with software.</li>
</ol>
<p><a name="conclusions"></a><strong>Conclusions</strong></p>
<p>While I&#8217;m disappointed I failed to monetize my work, it&#8217;s still early in the game, so maybe I&#8217;ll think of something.  Overall, I&#8217;m really happy to have finally finished one of personal projects into an actual product.  That, and I learned a ton. Soon, onto idea #2!</p>
<p>If you play D&amp;D 4th edition, check it out and let me know what you think.  If you don&#8217;t, but know people who do, let &#8216;em know; I&#8217;d be most appreciative!</p>
]]></content:encoded>
			<wfw:commentRss>http://jessewarden.com/2009/09/air-app-powerz-play-dnd-faster.html/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Agile Chronicles #3: Branch Workflow</title>
		<link>http://jessewarden.com/2008/11/agile-chronicles-3-branch-workflow.html</link>
		<comments>http://jessewarden.com/2008/11/agile-chronicles-3-branch-workflow.html#comments</comments>
		<pubDate>Sat, 08 Nov 2008 03:01:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Business Process]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://jessewarden.com/?p=1298</guid>
		<description><![CDATA[The Agile Chronicles is a set of articles documenting my experiences using an Agile process (Scrum) in software development on my current Flex project.

Part 1 &#8211; Stressful
Part 2 &#8211; Code Refactoring
Part 3 &#8211; Branch Workflow
Part 4 &#8211; POC, Strategy, and Design Challenges
Part 5 &#8211; Acceptance Criteria &#38; Punting
Part 6 &#8211; Tools, Extra Merge Day, and [...]]]></description>
			<content:encoded><![CDATA[<p>The Agile Chronicles is a set of articles documenting my experiences using an <a href="http://en.wikipedia.org/wiki/Agile_software_development">Agile</a> process (<a href="http://en.wikipedia.org/wiki/Scrum_(development)">Scrum</a>) in software development on my current Flex project.</p>
<ol>
<li><a href="http://jessewarden.com/2008/11/agile-chronicles-1-stressful.html">Part 1 &#8211; Stressful</a></li>
<li><a href="http://jessewarden.com/2008/11/agile-chronicles-2-code-refactoring.html">Part 2 &#8211; Code Refactoring</a></li>
<li>Part 3 &#8211; Branch Workflow</li>
<li><a href="http://jessewarden.com/2008/11/agile-chronicles-4-p-to-the-oh-to-the-sea-strategy-and-design-challenges.html">Part 4 &#8211; POC, Strategy, and Design Challenges</a></li>
<li><a href="http://jessewarden.com/2008/11/agile-chronicles-5-acceptance-criteria-punting.html">Part 5 &#8211; Acceptance Criteria &amp; Punting</a></li>
<li><a href="http://jessewarden.com/2008/12/agile-chronicles-6-tools-extra-merge-day-and-postponed-transitions.html">Part 6 &#8211; Tools, Extra Merge Day, and Postponed Transitions</a></li>
<li><a href="http://jessewarden.com/2008/12/agile-bugs-unit-testing-throughput.html">Part 7 &#8211; Bugs, Unit Testing, and Throughput</a></li>
<li><a href="http://jessewarden.com/2009/01/agile-chronicles-8-demo-burnout-and-feature-juggling.html">Part 8 &#8211; Demo, Burnout, and Feature Juggling</a></li>
<li><a href="http://jessewarden.com/2009/01/agile-chronicles-9-scope-creep.html">Part 9 &#8211; Scope Creep</a></li>
<li><a href="http://jessewarden.com/2009/04/agile-chronicles-10-conclusions.html">Part 10 &#8211; Conclusions</a></li>
</ol>
<p>This entry is about utilizing branches for each developer in Subversion, Merge Day, and how while cool, it&#8217;s an ivory tower process.</p>
<p>Note: This isn&#8217;t a tenet of the Agile methodology itself, it&#8217;s just something that works well when you have a bunch of developers collaborating together rapidly, and a specific workflow our client requested we follow.</p>
<p><span id="more-1298"></span><strong>Branch Workflow</strong></p>
<p>We&#8217;re utilizing a Branch Workflow on my current project.  What this means is that each developer creates their own branch in Subversion.  If you&#8217;re utilizing <a href="http://tortoisesvn.tigris.org/">Tortoise SVN</a> on PC or <a href="http://www.versionsapp.com/">Versions</a> on Mac, this is effectively a folder.  As you may know, <a href="http://subversion.tigris.org/">Subversion</a> has 3 default folders that you typically utilize in a repository, and hopefully each project gets its own repository.  These are branches, tags, and trunk.</p>
<p>Some people choose to ignore these.  Some put multiple projects into the same repo.  Both are fine because the mere fact people are utilizing source control in the first place, even if its just for disaster recovery, is great.</p>
<p>These folders, however, really do have a few reasons for their existence that have been well thought out.  Each source control system tries to out-do the next.  In Subversions case, the simple definitions are trunk is for the current version of your project, tags are for multiple older versions of your project, and branches are for experimental features or code that will possibly be merged back into trunk later.</p>
<p>Those are EXTREMELY simple definitions.  If you read the <a href="http://svnbook.red-bean.com">SVN book</a> as well as other people who incorporate SVN into their workflow, the definitions and purposes can get quite complex.  For the project I&#8217;m currently on, branches take on a new meaning.  Not only are they where experimental code goes, but they each represent a user story.  Meaning, if I&#8217;m working on completing the user story where the user can modify their hardware device settings via a Flex form, that&#8217;ll go in it&#8217;s own branch.  Using source control to do this is pretty straight forward.  Instead of checking in here:</p>
<p>https://svn.server.com/repos/project/trunk/</p>
<p>You instead check-in here:</p>
<p>https://svn.server.com/repos/project/branches/sprint2/deviceform/</p>
<p>And the other developer with me would be working from:</p>
<p>https://svn.server.com/repos/project/branches/sprint2/registration/</p>
<p>Pretty easy right?  It gets even easier to check in.  No more, &#8220;Dude, have you checked your shiz in?&#8221; to another developer, or the cardinal rule of doing an update before checking in.  Now you can check in to your hearts content knowing it&#8217;s your own repo to abuse how you wish.</p>
<p>This has the side benefit of NOT breaking trunk&#8230; usually.  Again, the point of having frozen code you KNOW for a fact works is to use a tag, or a series of tagged builds.  A lot of developers get seriously bent out of shape if you break the trunk.  At one job, whoever broke the trunk had to use this monkey icon for their IM icon for one week.  It was funny until the 50th person asked why I had a silly monkey icon, and by that point, I was swearing I&#8217;d never break ANY trunk ever again.  This can possibly have the effect of keeping &#8216;em happy.  At the very least, this reduces the possibility of it happening because no one is working from trunk.</p>
<p>Instead, you check into trunk at the end of every sprint, or for my team, from Merge Day onwards.</p>
<p><strong>Merge Day</strong></p>
<p>Part of Agile is to have a day a few days before your <a href="http://en.wikipedia.org/wiki/Acceptance_testing">UAT</a> where everyone merges their working user stories into the same code base and &#8220;works out the kinks&#8221;.  Since everyone was coding in a different direction, this can be good and bad.  Good because they are working on completely unrelated things, but in GUI coding, we all know some things are extremely related.  Specifically, these are your data model in the form of ValueObjects, calls to a framework such as the use of Event classes in <a href="http://opensource.adobe.com/wiki/display/cairngorm">Cairngorm</a> and <a href="http://puremvc.org">PureMVC</a> Mediators, and modifying settings in higher level view&#8217;s or CSS.</p>
<p>Since this can potentially have major consequences for some portions of a user story, or set of stories, it&#8217;s important to devote a pre-scheduled time where the team knows their code will be merged with everyone else&#8217;s code.  This is called Merge Day on my project and it happens every other Wednesday.  I take my branch and my co-workers, and merge his code into mine.  Then, I fix things that explode.  This could be as simple as just merging code over, or a complex verbal discussion to work towards resolving 2 different implementations.  No code is trivial.  If another developer added a style to MXML for example, setting the background color may seem small to you, but could be the difference between working or non-working code for the other developer&#8217;s code, so its important you do these merges together.</p>
<p>Once that is done, I merge into trunk, test again, fix explosions, and finally check in the working build.  I then upload a new build, or in the case of my current project, deploy a new build in a new sandbox utilizing <a href="http://www.djangoproject.com/">Django&#8217;s</a> web interface.  It can deploy to the web the latest bin-release that&#8217;s checked into SVN by merely clicking a button.  I&#8217;ll send an email to all members of the team identifying what&#8217;s new in the build.  This includes user stories, fixed bugs, and other things of note that are different from previous builds.</p>
<p>For fellow developers, this is a courtesy.  For Project Managers, it&#8217;s a necessity for them to set client expectations for Friday&#8217;s UAT.  For everyone it&#8217;s a Sprint milestone as well as reality check.  You can identify what user stories are done, which ones aren&#8217;t, what older ones you may have broken, and which current ones have issues.  You can then plan with your team what to spend the next day and a half on.  This is also where the rules can potentially break down.  What I&#8217;ll usually do is check my local copy into a new branch, and either fix partially completed or broken user stories, or just finish what I can.  The temptation here is to abandon branches since you only have a day and a half and it isn&#8217;t worth the trouble; just don&#8217;t break trunk in the meantime.</p>
<p>&#8230;riiiight.  The last thing you want to have happen the day before UAT is get all stressed out because trunk is broken.  To me, it&#8217;s worth the extra time in using the process to ensure your UAT prep goes smoothly.  I&#8217;m conservative.</p>
<p>I say that all high and mighty like, but on Sprint #2, I did just that.  Did I get lucky or was it just mad skillz?  Luck.</p>
<p><strong>Conclusions</strong></p>
<p>Now, all of the above processes could have been done with just utilizing trunk.  As you can hopefully see utilizing a branch for each developer, or multiple since creating a new folder is really easy, helps things go a lot smoother without surprises.  You can also plan for the chaos on Merge Day, which while extremely stressful for whoever is doing the merging, is at least expected and a concerted team effort.  I really have enjoyed the Branch Workflow so far.</p>
<p>&#8230;however, I don&#8217;t see it catching on.  Every Flash &amp; Flex developer I&#8217;ve ever talked to doesn&#8217;t use branches.  <a href="http://blog.pixelconsumption.com/">Sam Robbins</a> mentioned over <a href="http://twitter.com">Twitter</a> they might start adopting this workflow at their place of work, and that&#8217;s great, but again, it seems to me most developers feel trunk is good enough and branches are just an unnecessary complication.</p>
<p>Stay tuned for #4 in the Agile Chronicles series where I talk about the POC (Proof of Concept), business strategy, and design challenges.</p>
]]></content:encoded>
			<wfw:commentRss>http://jessewarden.com/2008/11/agile-chronicles-3-branch-workflow.html/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
