tag:blogger.com,1999:blog-166898532024-03-14T01:50:29.873-04:00Grumpy Tech GuySoftware engineer's thoughts on technology - sometimes grumpy, sometimes depressive, sometimes happy (though not often).Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.comBlogger84125tag:blogger.com,1999:blog-16689853.post-26922674994946115282011-01-19T12:57:00.004-05:002011-01-19T13:14:45.215-05:00AS3 class name collision - a story of one bugRecently I spent almost a day fighting with a mysterious Flash error.<br /><br />Here is the situation. The system is structured in the following way: One SWF (a wrapper) loads other SWFs (let's call them “modules”). One of the modules, in turn, loads another SWF, which we will call “content”. The wrapper is being developed by one programmer, the content – by another and I am working on the module (a typical setup for a virtual world project).<br /><br />The wrapper is tied to the server in many ways, so I prefer to test locally only the module and the content (besides, the interaction between the wrapper and the module is minimal, and was already tested). <p>So, I launched the module locally, and the system run fine. The content is loaded, the module cast it to the required interface and called certain methods on the content – everything is perfect. Then I uploaded the module and the game to the server, launched the entire system , and the flash player reported an exception. I checked the source and quickly realized that the exception happened because the module could not cast the loaded object to the required interface.</p><p>My first thought was that the SWF for some reason cannot be loaded from the server. I've added all possible error handlers, and found nothing. The content was loaded in the following way:</p><blockquote>_loader = new Loader();<br />_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete, false, 0, true);<br />_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onErrorLoading, false, 0, true);<br />_loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR, onErrorLoading, false, 0, true);<br />_loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR, onErrorLoading, false, 0, true);<br />_loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityErrorLoading, false, 0, true);<br />_loader.load(new URLRequest(fileLocation));<br /></blockquote><br />Here is what happened in the onLoadComplete method:<br /><blockquote>log.debug("loader info content type:"+_loader.contentLoaderInfo.contentType);<br />log.debug("loader info URL:"+_loader.contentLoaderInfo.url);<br />log.debug("loader content:"+_loader.content);<br />myContent = _loader.content as MyContentInterface;<br /></blockquote>The onErrorLoading method was never called; the only method executed was onLoadComplete. When running module locally, I was getting the following output in the log:<br /><blockquote>10:33:00:453 [DEBUG] loader info content type:application/x-shockwave-flash<br />10:33:00:453 [DEBUG] loader info URL:<a class="linkification-ext" href="file:///C" title="Linkification: file:///C">file:///C</a>|/Projects/[... some correct path here ...]/Main.swf<br />10:33:00:453 [DEBUG] loader content:[object Main]<br /></blockquote>And here is what I was getting on the server:<br /><blockquote>12:01:03:375 [DEBUG] loader info content type:application/x-shockwave-flash<br />12:01:03:375 [DEBUG] loader info URL:[... correct URL...]<br />12:01:03:375 [DEBUG] loader content:instance43942.instance43943<br /></blockquote>It is obvious that the difference is in the loader content: in one case it is an object, and in the other case it contains some strange instances.<p>At this point I got stuck. I tortured the developer of the content SWF, asked him to try different compile modes (with/without network support etc...), checked file versions and paths on the server, checked security settings – all without any success or any clue.</p><p>After many painful hours, all of a sudden I got an insight. I run and checked the source code for the wrapper and for the content SWFs. Turned out that the developers of both wrapper and content SWFs called their main classes Main, and put them in the default package. Of course, the content SWF was loading fine, but its Main class could not be loaded because of the name collision. When the content developer moved his Main class into the proper package the problem was solved and the whole system worked like a charm.</p><p>The most curious thing here is that the Flash player did not complain about the name collision in any way – it just silently ignored the problem. </p><p>Hopefully my story will help someone and save their time.</p>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com9tag:blogger.com,1999:blog-16689853.post-18771792252759944012010-02-25T11:29:00.002-05:002010-02-25T11:34:21.852-05:00How to prepare a code sampleIn some companies asking the job candidates to provide code samples before the interview became a standard part of the hiring process. Here are some guidelines which will help you to avoid common mistakes, make a good impression with your code, and, as a result, get the interview.<br /><br /><span style="font-weight: bold;">1.Pick the right code.</span><br /><br />Select the code which is as relevant as possible both to the technology and to the industry. Of course, exact match is not always possible, but try to avoid obvious mismatches. For example, for a position of a Java developer, Java code will be, naturally, the best. C++ or AS3 might do; Perl or Haskell will be poor choices – quite possible that the engineer who will review your code will not know these languages and will be unable to adequately evaluate it.<br /><br />Do not send too much. For me, 1-2 files is generally enough to get the idea.<br /><br />Be careful about sending entire projects. First, usually projects are much bigger than what I really have time to evaluate. Second, I might be tempted to build the project and run it – therefore, you have to make sure that the code not only looks good, but also runs good.<br /><br />Send only the code that was written by yourself. Even if the other person's code is a part of the project, don't send it (here is another good reason not to send a full project).<br /><br />Do not send trivial or auto-generated code. A class which consists only of data members and getters/setters is not very interesting to review.<br /><br /><span style="font-weight: bold;">2.Prepare the code</span><br /><br />If there is a well-known style guide for your language, make sure your code follows it. It always makes a good impression and shows you as a professional, who knows and respects the standards and conventions of the industry.<br /><br />Also make sure that:<br /><ul><li>Your code has enough comments, and that the comments follow the format recommended for your language (for example, in Java the comments should follow the JavaDoc rules). The comments should include one comment per code unit (module, class etc), and one comment per function (method etc.). Reviewer should be able to easily understand the purpose of the code and get some idea how the code is supposed to work.</li><li>There is no obvious debugging and development leftovers. Remove all commented out lines, TODO markers, unused variables, debug printing etc.</li><li>The variables and functions have meaningful names.</li><li>The code is formatted so it is easy to read.</li></ul><br />If your code has a comment with a copyright statement of one of your previous companies, think again, whether you can send it. If you still want to send it, remove the copyright statement.<br /><br />Remove all references to a sensitive information. Don't worry if it will make the code unusable, or even prevent it from compiling – just make sure you explained it in the code and in the comments.<br /><br /><span style="font-weight: bold;">3.Prepare yourself.</span><br /><br />If your code will be good enough to get you an interview, remember, that your code most definitely will be a part of the conversation, so:<br /><ul><li>Make sure you understand and can explain each and every word of the code.</li><li>If your code uses some design patterns, be ready to discuss them.</li><li>Be ready to explain how the code works.</li></ul>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com1tag:blogger.com,1999:blog-16689853.post-11613943695321261882009-04-06T22:11:00.002-04:002009-04-06T23:10:48.211-04:00Unusual games at GDC 2009Two very interesting events at GDC were <a href="http://www.igf.com/">IGF (Independent Games Festival)</a> and <a href="http://www.experimental-gameplay.org/">experimental gameplay workshop</a>. I immensely enjoyed people presenting new creative ideas, prototypes and finished games, and I wrote down the names of the games that caught my eye into my little black notebook. So today I want to share the list with you, my dear readers. But I have to start with three disclaimers.<br /><br />1. This by no means is a comprehensive list of all interesting or unusual games presented at GDC. It is not even a complete list of the games I liked! And I want to say, that I admire everybody who had imagination to invent new games, willpower to make them, and guts to present them at GDC. <br />2. Some of the games are not completed yet, and exist only as prototypes. <br />3. Some of the things I am going to mention are not games. They are "game-like creations". Be prepared – here be some weird stuff.<br /><br /><span style="font-weight:bold;">Complete Games.</span><br /><ul><br /><li><a href="http://www.dyson-game.com/">"Dyson"</a>. According to the game’s site the game is "an ambient real-time strategy with abstract visuals". The game is about controlling self-replicationg machines to take over asteroids. The game looks strange and interesting!</li><br /><br /><li><a href="http://www.bigfishgames.com/download-games/4166/musaic-box/index.html">"Musaic Box"</a>. Created by a Russian team, this game won an "Excellence in design" award at IGF! Congratulations, guys! It was cool to hear "Spasibo" from the stage! The game is being sold now by Big Fish Games.</li><br /><br /><li><a href="http://www.kongregate.com/games/GlaielGamer/closure">"Closure"</a>. This is an in-browser flash game, built around an idea, that if you can’t see something (because it’s too dark), then it doesn’t exist. Try it! </li><br /><br /><li><a href="http://www.farbs.org/games.html">"Rom Check Fail"</a>. I’ve seen this hilarious game some time ago, but I will happily share it again. If you’ve ever played some old arcade classics, such as "Pac-Man" or "Frogger", then you must play this delightful parody! </li><br /><br /><li><a href="http://www.ludomancy.com/blog/2008/09/15/storyteller/">"Storyteller"</a> and <a href="http://www.ludomancy.com/blog/2008/11/11/i-wish-i-were-the-moon-redux/">"I wish I were the Moon"</a>. These are not games – more like a study in alternative storytelling. They are short and very unusual. Give them a try – they are in-browser.</li><br /></ul><br /><br /><span style="font-weight:bold;">Ideas, prototypes etc.</span><br /><ul><br /><br /><li><a href="http://eriksvedang.wordpress.com/blueberrygarden/">"Blueberry Garden"</a>. Beautiful and strange graphics make this game a piece of art. I didn’t get an opportunity to play it myself, but I watched other people playing, and they seem to like it. </li><br /><br /><li><a href="http://www.playfeist.net/">"Feist"</a> seems to be some sort of platformer – but I just love the art! </li><br /><br /><li><a href="http://www.machinarium.com/">"Machinarium"</a>. From the creators of "Samorost" and "Samorost 2". Again, look at the art! </li><br /><br /><li><a href="http://www.giantsparrow.com/games/swan/">"The Unfinished Swan"</a>. This is a first – person exploration game, which takes place in a totally white world. The player runs with a (probably) paintball gun, which shoots balls of black paint, so the player can see some parts of the world. It’s hard to explain – check out the trailer.</li> <br /><br /><li><a href="http://marctenbosch.com/">"Miegakure"</a>. Unfortunately, the game’s site has only one paragraph about it, but I just had to mention it – a game which happens in a 4D world, which can be somehow manipulated in 3D… </li><br /><br /><li><a href="http://achrongame.com/">"Achron"</a>. The site defines it as "meta-time strategy game", which means RTS with time travel enabled. By “enabled” I mean all interesting possibilities which arise from a capability to change future by changing the past. Weird – but I do want to play it! </li><br /></ul>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com3tag:blogger.com,1999:blog-16689853.post-49574354383342887102009-04-02T13:22:00.002-04:002009-04-02T13:26:00.699-04:00OnLiveAs I said in my previous post, <a href="http://www.onlive.com/">OnLive</a> attracted quite some attention at GDC 2009. Here are some more details about this new service. The details come from my conversation with one of OnLive representatives – unfortunately, I don't remember his name.<br /><br />The general idea of the service can be stated as "Games on demand" (similar to movies on demand). The user gets a client for the OnLive service, which can be either software client in form of a computer program, or hardware client in form of a “microconsole” - a small box which is connected to broadband Internet and to TV via HDMI connection. Then the user is connected to OnLive server and can play any game he or she wants. The came runs on the OnLive servers, and the image, sound and control commands are transmitted between the client and the service over the Internet. So, essentially, your TV (or computer) becomes just a remote terminal for OnLive servers.<br /><br />I've heard already some talks about OnLive being the tomorrow of the gaming and about the imminent death of consoles as we know them now (and of PC gaming as well). From my point of view, these claims are a quite exaggerated (to say the least). First, the service currently works with maximal resolution of 1280 x 720, that is in 720p mode. From what I understand, this is a limit imposed by the bandwidth (actually, I think it is a miracle they provide stable image at this resolution!). As you can see, the resolution is even worse than 1080p, provided by Xbox and PS3 , to say nothing about decent gaming PCs. Another fact is lag. At the expo the demo run from the server located approximately 50 miles away from the convention center, and the feeling of the games was OK – though even with server that close I felt some “softness” of the control – not a lag, just some unusual feeling. In real life the distance to server will be significantly larger, and this effect will, probably become more noticeable.<br /><br />So, I think hardcore gamers will not switch completely to this service. As for more casual gamers – this, of course, will depend heavily on OnLive pricing system. From what the OnLive representative told me, they are still unsure about the model, but, most probably, they will charge the users some subscription fee, and then charge some amount per game. Until we know more about the prices, it will be hard to tell whether it will be less expensive to use the service, or, maybe, in the long run the purchase of a console will be more financially reasonable.<br /><br />Another interesting thing about OnLive is that it makes easy to continue playing your game when you are traveling – as soon as there is a good broadband connection, the player can access the games from anywhere (if there is a server not too far, of course).<br /><br />For developers OnLive might be interesting because of several features:<br /><ul><br /><li>Stable target platform – knowing target hardware will make development much easier;</li><br /><li>Direct distribution channel, with possibility to dynamically adjust pricing and get real-time business data;</li><br /><li>Reduced piracy and cheats.</li><br /></ul><br />Porting the games to OnLive platform is not transparent – developers will have to use special SDK (available for free) to implement, for example, save/load and multiplayer features in the new environment. As of now, there are no plans to support any sort of community or indie game development for OnLive.<br /><br />By the way, as for now the multiplayer happens only within OnLive network – though in future it might change.<br /><br />To sum it up: I don't think that OnLive will "kill gaming as we know it", but I do think that the service is extremely interesting and promising.Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com2tag:blogger.com,1999:blog-16689853.post-7361388103109863092009-03-31T22:04:00.003-04:002009-03-31T22:08:43.016-04:00GDC 2009 SummaryYes, I know, this short summary of GDC 2009 got a bit delayed. But, I think, better late than never (it seems more and more to become my permanent motto). <br /><br />In short – it was cool. But for me it was slightly less cool than the previous one, maybe because I’ve started seeing some repetitions in GDC patterns. But still, it was worth going - tons of inspiration and some pretty interesting talks and new connections. <br /><br />These are some most important (from my point of view, of course) points from GDC 2009:<br /><ul><br /><li><span style="font-weight:bold;">iPhone.</span> The same way last year everybody was infatuated with Facebook, this year game developers got a new darling: iPhone. Tens of sessions were dedicated to iPhone development, and iPhone marketing, and iPhone business (One session was titled “Why did iPhone Changed Everything”). There are two reasons people are so excited about it: first, selling apps on iPhone is easy, manageable and understandable process; second, iPhone is, no doubt, an incredibly sexy device. By the way, it seemed like every second GDC attendee was a proud iPhone owner. </li><br /><li><span style="font-weight:bold;">Social games.</span> Not Facebook-specific anymore, the topic of combining social networks with games is still incredibly hot. The variety of games is wider – from virtual worlds to massively single-player games to advergames that created their own social network… And, of course, everyone is dreaming about marrying social games to iPhone.</li><br /><li><a href="http://www.onlive.com/">Onlive.</a> This new service offers to use your TV as a dumb terminal for playing top-of-the-line games on a remote server. It attracted much attention on GDC; I talked with some guys from this company and will post more details tomorrow. </li><br /><li><span style="font-weight:bold;">Recession.</span> Many production-related sessions were discussing how to survive it, and there was some feeling of uncertainty in the air. </li><br /></ul><br /> These are the highlights. In the next couple of days I will post more details about Onlive, as well as name some of the games that caught my eye.Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com1tag:blogger.com,1999:blog-16689853.post-71081632150281724722009-02-27T17:39:00.001-05:002009-02-27T17:40:51.951-05:00Mail.com Redirection and SpamIt happened so that I use mail.com premium redirection service for my emails. (When I started using it it wasn't premium, and it wasn't mail.com either. It was Altavista – does anyone remember this word? - giving out “permanent personal email addresses for life”.) The service works slowly, but it used to work more or less stable – and I am too lazy to change my primary email address in gazillion places.<br /><br />Recently, however, I started getting complaints from my correspondents. They told me that my mailbox bounces their emails. I also started to notice that I am missing some emails. I tried reaching customer service – they told me that everything is all right, yes, everything's fine, and I couldn't reproduce the effect.<br /><br />Yesterday, when my wife told me that she got her mails bounced, I got really angry. I asked her for the error, she showed me the bounced letter, and then I understood what happened. I logged on to my mail.com account – which I usually never do, because, as I said, I am using them only as redirector – and discovered that they turned on spam protection.<br /><br />I definitely didn't ask for it, and I don't remember them telling me about it (though I could have overlooked the notice). Which is worse, the setting were totally absurd – caught spam was stored in a “Junk e-mail” folder on the server, so I had no clue that some messages were sorted out. (They could have tag them as spam, or, at least, send me once a day a reminder that such and such messages were put into Junk folder – their system knows that I use it only as redirector!).<br /><br />I turned their spam protection off, and I hope it will fix my problems. So, just a word of advice – if you are using mail.com premium redirector, go to the server and check the settings – it might save you from some unpleasant surprises later.Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com5tag:blogger.com,1999:blog-16689853.post-12192198006376345042009-02-25T14:30:00.002-05:002009-02-25T14:39:02.661-05:00In search of a ticketing systemUsing ticketing systems to organize project workflow became almost my second nature, and now I am looking for a good system to use with my personal projects. Here is what I need:<br /><ul><br /><li>The system should be simple enough to be usable in a small-scale environment. </li><br /><li>It should provide all core ticketing features. Tickets should have reasonable set of data fields: type (defect/feature/enhancement etc), status, due date, etc. The system should provide me with capability to assign tickets, to append notes and comments to tickets, to attach files to tickets. It should also provide reasonable number of canned reports (my tickets/all open/ due today etc). </li><br /><li>The system should also have some basic notion of projects, and should be multi-user (I mean that personal to-do lists will not do). </li><br /><li>The system should be able to notify me with email about all relevant events (ticket assigned to me, edited, closed etc.)</li><br /><li>The system should be easy to use; preferably with an option to turn off unneeded features.</li><br /><li>It should be installable on a server with no command line access.</li><br /><li>... And, yes, it should be free.</li><br /></ul><br /><br />So far I played with two systems that my hosting provider could install automatically: <a href="http://www.phprojekt.com/">phprojekt</a> and <a href="http://www.dotproject.net/">dotproject</a>. I didn't like both of them. PHProjekt was just too huge for me, with no way to turn unneeded modules off (I do not need timecards, chat or helpdesk features, thank you). Dotproject was somewhat better – at least it allowed me to hide all unused modules, and provided more help on its configuration screens. But then I discovered that creating new tickets (“tasks”) was possible only from the project screen, and I decided that this is too inconvenient to be useful.<br /><br />From my other projects I have experience with <a href="http://www.atlassian.com/software/jira/">Jira</a> (love it, but it's not free), <a href="http://bestpractical.com/rt/">RT</a> (not again, thank you!), <a href="http://trac.edgewall.org/">Trac</a> (pretty cool, and free – but, alas, requires command line access to install), and <a href="http://www.fogcreek.com/FogBUGZ/">FogBugz</a> (also not free). So, now I am at loss – is there any software at all which fits my needs?Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com50tag:blogger.com,1999:blog-16689853.post-68274547814489959012009-02-17T14:02:00.001-05:002009-02-17T14:09:12.303-05:00Sad story of ma.gnoliaWell, well, well... Seems like it takes a really sad story to bring me out of my hibernation. <br /><br />The story in short: very popular bookmarks-management service ma.gnolia recently suffered a major data loss – I mean, really, REALLY major. So major that it lost ALL data for ALL users. Now the users are crying over the loss of all their precious bookmarks, and the service owners (or owner?) are inventing some desperate ways of recovering at least parts of users' data (like combing through Google cache) and saying “We are sorry!”.<br /><br />This story not only brings the feeling of compassion to poor ma.gnolia users – it also raises some interesting questions.<br /><br />For example, the question about the service itself. I absolutely cannot understand, how it could happen that there were no good backups – even a month old backup would be a real salvation here. Even more, it seems that ma.gnolia was a one-man-shop (or, to be more precise, two men shop – this is how many official representatives of ma.gnolia are talking to the frustrated users on some getsatisfaction.com page. Which means one simple fact: hundreds of thousands of people trusted their data to two incompetent and irresponsible guys. The outcome is no wonder. <br /><br />But here is the next question: what do we really know about the services we are using on a daily basis? We are storing picture on Flickr, build communities on Facebook and LiveJournal, write our wise thoughts on Blogger – but do we know much about these tools? Who runs them? How well do they protect our data? What will happen if they, like ma.gnolia, screw up big time – can we, the users, get some compensation for the data lost? And what happens if they will just decide to pull the plug – will there be a way for us to reclaim what's ours?<br /><br />What I would like to have is the ability to get some sort of verified answers to these questions. I no longer want to hear “we are top of the line technology company staffed with brightest people and using the best hardware and software”. I want somebody to actually go and tell me: “ This Web2.0 service is run by Sam and Bob from their father's garage; they backup data once in a blue moon and store the only backup on an old DVD-RW disk”. <br /><br />In other words, I want to have a centralized online service certification authority. This authority will inspect the company, and, if the company follows certain reasonable rules (have a process for daily data backup in place; use services of professional sysadmins; have hot-swappable backup servers etc.) the authority will issue a certificate, which the company can proudly display on their site. And I, the customer, will definitely prefer the certified services, just because I do not want to lose any more of my data.Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com2tag:blogger.com,1999:blog-16689853.post-33287995175632601932008-05-19T12:46:00.002-04:002008-05-19T12:49:31.217-04:00MySpace doesn’t like me…Now this is getting ridiculous. After spending some time working on <a href="http://www.facebook.com/home.php">Facebook</a> applications, I decided to have a look at <a href="http://www.myspace.com">MySpace</a>, which recently has opened its <a href="http://code.google.com/apis/opensocial/">OpenSocial</a> - based developer platform. Since I didn't have a MySpace account, I've created one - did all the steps: filled in my profile, verified e-mail etc. Two days later I tried to log-in, but with no success: MySpace didn't even want to help me recover my password, telling me that my e-mail address is not in the system. Okay, I thought, probably just a glitch. I created my account again - and again everything worked smoothly, and I applied for an access to MySpace developer platform. My application was approved, and today I decided to give it a try. And guess what - the same story happens again! My account is not there, and MySpace doesn't even recognize my e-mail. <br /></p><p>Probably MySpace just doesn't' like me… Oh well, now I have no warm feelings towards it either. But since I might have to do some work with its API, I guess I have no other choice but to learn how to love it…<br /></p></span>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com0tag:blogger.com,1999:blog-16689853.post-22548258474207006552008-03-03T18:55:00.002-05:002008-03-03T19:03:23.233-05:00GDC 2008 recap.A week has passed since I returned from GDC 2008. Here I just want to jot down a brief summary of some things that got my attention. Of course, most of them are related to casual games – since I’m mostly interested in casual games development, I tried to concentrate in this area; it’s simply impossible to get to each interesting event and presentation at GDC!<br /><br />1. At one of the panel sessions, several participating casual game developers unanimously agreed that the “try before you buy” business model for downloadable games is totally broken and should die. Since it used to be one of the most popular models, if this is true, then, probably, some radical shift in casual games distribution is coming. Also, on the same note, many people from the casual games industry expressed an opinion that now it is extremely difficult for new developers to successfully bring their titles on the market. <br /><br />2. “Casual MMOs” became a hot topic. I suppose that partially the interest is ignited by the different business model, which might turn out to be more stable and reliable than “try before you buy”.<br /><br />3. Facebook as a platform for game building and distribution was also mentioned in many discussions. The idea of “marriage” between casual games and social networks seems to be very innovative and promising – the only problem is, as for now, there are no good way to monetize this sort of games. I personally think that the Facebook gaming, at least in its present form, will be a short-lived phenomenon – people will simply get tired of the “viral distribution”, which, essentially, leads to increase of spam.<br /><br />4. There is an observable trend to move away from the traditional match-3 style of casual games into a not-yet-explored territory between casual and hardcore. Designers, definitely, desire it – I am not so sure about the players.<br /><br />5. Community game design. Microsoft and EA presented somewhat similar ideas – make creation of casual games easy and open publishing for everybody. Microsoft in the keynote announced <a href="http://blogs.msdn.com/xna/archive/2008/02/20/announcing-xbox-live-community-games.aspx">“Xbox live community games”</a> , and EA presented <a href="https://www.simscarnival.com/portal/signin">“Sims Carnival”</a>. Microsoft called their service “A Youtube for the games”. It sounds appropriate, and, I think, the landscape of casual (and not only casual) gaming will be significantly changed by this sort of services.<br /><br />6. <a href="http://emotiv.com/corporate/2_0/2_2.htm">Emotiv Epoc Neuroheadset </a> – control games with your mind! This sounds like some cyberpunk idea, but the device presented by Emotiv worked (though a little bit uncertain), and they’re promising to bring it to the consumer market in less than a year! (Several other companies presented similar devices – I don’t remember their names.)<br /><br />7. Now, one thing that really disappointed me was the Developer Choice Awards. Not the awards themselves - rather, the selection of the games that were nominated. Of 24 games, nominated for different awards (technology, sound, graphics etc.), 9 (more than a third part!) were shooters, 5 – arcades. Other genres were either not present at all, or represented by 1-2 titles. No simulations, no strategy – neither turn-base, nor RTS, no quests, no sports (!). Either the selection was somehow skewed, or something very wrong is going on with the game industry as a whole. <br /><br />Technorati tags: <a href="http://technorati.com/tag/GDC" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=GDC" alt=" " />GDC</a>, <a href="http://technorati.com/tag/gaming" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=gaming" alt=" " />gaming</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com1tag:blogger.com,1999:blog-16689853.post-87458055005202360102007-12-11T17:17:00.000-05:002007-12-11T17:31:39.720-05:008 rules for documenting your productThis year I’ve had some really frustrating experience working with several new libraries and tools. In most cases, the reason for the frustration was related to the abysmal quality of the documentation for the products I've used. I do not want to point fingers and name the companies – from what I’ve seen, the problems I’ve encountered are not specific to these particular vendors, but, rather, plague the whole industry. Instead, I’ve tried to summarize my experience into some do’s and don’ts. So, if you want the user to have a good time working with your product…<br /><br /><ol><li>Provide documentation in a well-known format. Make sure users can easily print all documentation, or selected parts. Avoid custom help browsers, exotic file formats and all this kind of garbage.</li><li>Provide all types of documents. Generally, a good set of documents should include Setup Guide, Manual, Reference and Examples. Each document here has its own purpose, and cannot be replaced with another. For some reason in many cases I’ve seen API reference provided as both Reference and Manual documents. Don’t do it. In the best case, user spends extra time trying to understand from the reference the right way to do something. In the worst, user has no other choice but to use Google.</li><li>Do not “crowdsource” your documentation. Forums, wikis, mailing lists, FAQs are wonderful, very useful tools – but they can’t replace a normal, “static” documentation.</li><li>Document all the relevant concepts. If the product introduces a new concept (algorithm, data structure etc.), it definitely should be described and explained as thorough as possible. If the concept is not new and is already used at least in some part of an industry, a reference should be placed to the available description and explanation. (Of course, a good judgment should be applied here. Definitely, there is no need to explain the idea of, say, mouse cursor. ) Specify all differences of your product with the existing standards.</li><li>Provide a 100% complete API reference. Even the trivial calls, like getters and setters should have descriptions. There reason for this rule is quite simple: it’s much easier to just document everything, than to try and correctly divide methods into trivial and non-trivial. Besides, pretty often a seemingly trivial method turns out to be much more complex than you initially thought.</li><li>Give each user access to all documentation. I’ve seen some companies allowing users to access only documentation for the products they purchased, and in my point of view it is absolutely ridiculous.</li><li>With each new release provide a “What’s new in this release” document, or at least a changelog. The document should not only highlight new features, but also specify most prominent bug fixes, and tell user about all cases when the new release is not backwards-compatible with the previous one.</li><li>Constantly maintain all dynamic online resources. Forum should be moderated and questions posed there should be answered, some popular questions should be added to FAQ, wiki should be cleaned etc.</li></ol><br />Technorati tags: <a href="http://technorati.com/tag/software" rel="tag"><img style="border: 0pt none ; vertical-align: middle; margin-left: 0.4em;" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=software" alt=" " />software</a>, <a href="http://technorati.com/tag/programming" rel="tag"><img style="border: 0pt none ; vertical-align: middle; margin-left: 0.4em;" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=programming" alt=" " />programming</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com2tag:blogger.com,1999:blog-16689853.post-31683148639317835252007-12-03T12:10:00.000-05:002007-12-03T12:19:07.212-05:00R4DS and homebrewRecently I’ve got my hands on a cool little add-on for <a href="http://en.wikipedia.org/wiki/Nintendo_DS">Nintendo DS</a>. It is called <a href="http://www.r4ds.com/r4ds.htm">R4DS (Revolution for DS)</a>, and, basically, is a device which allows you to run DS <a href="http://en.wikipedia.org/wiki/Homebrew_%28video_games%29">homebrew applications</a> from a standard <a href="http://en.wikipedia.org/wiki/MicroSD">MicroSD</a> card. The device has a form factor of a standard DS game card, and acts as an adapter for MicroSD card. It has some sort of a shell software onboard, which allows you to easily access data on the flash card, to start programs etc. It is really an extremely cool gadget.<br /><br />Well, it seems that Nintendo is not happy about the device at all. Nintendo spokesman is being quoted to say <a href="http://technology.timesonline.co.uk/tol/news/tech_and_web/gadgets_and_gaming/article2933237.ece">“We are keeping a close eye on the products and studying them. But we cannot smash all of them”</a>. This, I think, in general summarizes the feelings of all closed-platform device producers towards homebrew. <br /><br />On one hand, I can understand the reasons behind their position. R4DS and similar devices are being considered to be used mostly for game pirating – and, I have to admit, running “backup ROMs” is extremely easy with R4DS. So, the device seems to pose a threat to Nintendo and to all companies who officially develop games for DS.<br /><br />But let’s look at this issue from a little bit different angle. DS is an amazing device, which is capable of many things (it has touchscreen, stereo sound, built-in WiFi), but currently locked almost exclusively to games. If you look at a homebrew directory, you will see a multitude of useful applications there – IM messengers, mediaplayers, email readers, communication tools - all written by enthusiasts. Just think – how all these applications would increase the appeal of DS to the customers, would they be officially accepted by Nintendo! Instead of alienating the enthusiast programmers crowd, Nintendo could help them, and, by doing this, simultaneously improve its public image and significantly increase their customer base. They could manufacture and sell devices like R4DS by themselves - another stream of revenue for them! Yes, the number of pirated game users will, probably, go up. But I strongly doubt that the change would be a significant one. After all, as all experience shows us, people who would run pirated games will do it this way or that, regardless of the existence of the official tools.<br /><br />Situation with Nintendo is not unique. Generally speaking, homebrew scene for all platforms is always being frowned upon by the official platform producer. But I think that it’s time to change this attitude. Instead of fighting the enthusiasts, the manufacturers should join forces with them. This will lead to more and better software on better devices, which, in the end, is beneficial for all. <br /><br />Technorati tags: <a href="http://technorati.com/tag/nintendo" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=nintendo" alt=" " />nintendo</a>, <a href="http://technorati.com/tag/ds" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=ds" alt=" " />ds</a>, <a href="http://technorati.com/tag/r4ds" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=r4ds" alt=" " />r4ds</a>, <a href="http://technorati.com/tag/homebrew" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=homebrew" alt=" " />homebrew</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com3tag:blogger.com,1999:blog-16689853.post-38862900668927492692007-05-15T15:52:00.000-04:002007-05-15T16:02:53.829-04:00Intellectual Property Protection Act of 2007A new legislative proposal was introduced yesterday to U.S. Congress by Attorney General Alberto Gonzales. The new law, called “Intellectual Property Protection Act of 2007” not only increases penalties for copyright violations and makes it easier for the government to perform searches and seizures, but also includes something new: criminalizing “attempts” to violate copyright laws.<br /><br />From the document:<br /><blockquote><br />“… an attempt to violate the criminal copyright statute should be counted an offence whether it is successful or not.”<br /></blockquote><br /><br />I am not a lawyer, but this sounds scary. The document does not specify anywhere what constitutes an “attempt”. For example, imagine that I mistakenly configured my home web server so that my music collection became accessible from outside. No one ever downloaded anything – but it was an attempt, wasn’t it?<br /><br />There is more interesting stuff in this proposal. For example, how do you like this one:<br /><br /><blockquote>“…Because prosecutors work for public good, they should be able to institute an infringement prosecution even if the copyright has not yet been registered.”</blockquote><br /><br />Or this:<br /><blockquote>“…penalties that apply when the offense "consists of' reproduction or distribution, also apply when reproduction or distribution is intended but not completed.”</blockquote><br /><br />Or:<br /><br /><blockquote>“Currently, a Federal court may issue an order authorizing the use of a voice intercept (otherwise known as a "wiretap") in the investigations of a host of Federal crimes; copyright and trademark counterfeiting crimes are not among them. This is unacceptable.”</blockquote><br /><br />You can read the whole text of the bill <a href="http://politechbot.com/docs/doj.intellectual.property.protection.act.2007.051407.pdf">here</a> (PDF), and some analysis <a href="http://news.com.com/8301-10784_3-9719339-7.html">here</a>.<br /><br />I do hope that this bill will never become a law. DMCA is bad enough without this sort of enhancements. Giving the government ability to sue people for attempts and intents to share a file is stupid and dangerous.<br /><br />Technorati tags: <a href="http://technorati.com/tag/copyright" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=copyright" alt=" " />copyright</a>, <a href="http://technorati.com/tag/law" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=law" alt=" " />law</a>, <a href="http://technorati.com/tag/DMCA" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=DMCA" alt=" " />DMCA</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com1tag:blogger.com,1999:blog-16689853.post-31310808290720626682007-05-07T12:15:00.001-04:002007-05-07T14:11:50.240-04:00S.T.A.L.K.E.R - localization disaster.Yesterday I’ve managed at last to get my hands on <a href="http:/www.stalker-game.com">S.T.A.L.K.E.R.</a> I was extremely interested in this game since the day it was announced (November 2001) for several reasons. <br />First, the game is loosely based on a sci-fi novel <a href="http://en.wikipedia.org/wiki/Roadside_Picnic">“The Roadside Picnic”</a>, which is one of my favorite sci-fi novels of all the time. In Russia it was (and, probably, is) a cult novel, read by almost everyone. A <a href="http://en.wikipedia.org/wiki/Stalker_%28film%29">masterpiece movie</a> by Andrei Tarkovsky, also loosely based on this book, added to its popularity. (By the way, do yourself a favor and <a href="http://www.russiansifiction.com/translated/strugazckie/picnic/index.php">read</a> it – not only will you treat yourself to one of the finest works of science fiction, but also, if you are playing S.T.A.L.K.E.R, you will get some insights on nature of the game world). The setting of the novel seemed to be amazingly well-suited for a computer game, and I dare say that it was a dream of many Russian programmers to create such a game. (I did one, very primitive, for a programmable calculator when I was in school). So, the news about a full-scale game based on the “Roadside Picnic” immediately caught my attention.<br /><br />Second, I am very interested in the state of the game development market in Russia – partially because of my general interest in game design/development, partially because of myself being of Russian origin, and partially, because I am somewhat puzzled with the fact that Russian programmers, artists and game designers, having tremendous potential, still didn’t realize it in any significant number of world-class games.<br /><br />And third… Well, as I said, the project was announced in November 2001. The original release date was sometime in 2003, but the game was delayed so many times that I thought the project eventually will be sacked to cut losses. So, when I’ve heard that the game is being released at last, I was all curios as to what is the result of the over-ambitious and over-delayed project.<br /><br />Well, I am not going to write a game review here. It will be enough to say that the game is a resource hog, but is definitely worth playing. It looks beautiful, and it sounds… <br /><br />Here we came right to the point I was going to talk about. It’s not the quality of the sound – it’s the fact that the sounds in the game were not localized at all. The game features a lot of speech – and in the version I’ve bought 3 days ago from a US retail store, all the speech is still Russian. (Well, to be more precise, all but the speech of some main characters.) It’s not only bad that the amazing ambiance effect is totally lost for non-Russian speaking players (I’ve spent 10 minutes just listening to a random conversations of non-player characters sitting around a campfire: they were discussing their lives, telling jokes and even playing a guitar! This is so cool – but 100% in Russian, without even subtitles). Some quite important phrases are left in Russian too. For example, if you approach certain characters with a gun in your hands, they will react by saying: “Uberi pushku!” which is Russian for “Put away your gun”. If you don’t understand this, too bad for you. Or, early in the game a helicopter appears above your head, and you can hear a radio conversation of military men in the ship, which goes something like the following:<br />-What’s this jerk doing down there? Let’s kill him.<br />-Let him be, he’s not that important to waste ammo on him…<br /><br />And, as you could guess, the conversation is also in pure Russian, without any subtitles. So without knowing the language the player misses an important bit of information – the attitude of military towards him. <br /><br />I feel really sorry for the developers and designers of S.T.A.L.K.E.R. It seems like someone was trying to cut some corners in localization. But as a result, not only the corners were cut – foreign players were also cut off the game. Such a stupidity!<br /><br />Technorati tags: <a href="http://technorati.com/tag/S.T.A.L.K.E.R." rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=S.T.A.L.K.E.R." alt=" " />S.T.A.L.K.E.R.</a>, <a href="http://technorati.com/tag/localization" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=localization" alt=" " />localization</a>, <a href="http://technorati.com/tag/gaming" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=gaming" alt=" " />gaming</a>, <a href="http://technorati.com/tag/games" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=games" alt=" " />games</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com0tag:blogger.com,1999:blog-16689853.post-24228122404812280852007-05-03T16:41:00.000-04:002007-05-03T16:55:59.422-04:00Digg and the magic numberThe story of the <a href="http://tinyurl.com/2c7gnw">magic number</a> which is claimed to be the HD-DVD production key is quite amusing. In short: the key somehow leaked, someone put it onto their blog and then published the story on <a href="http://digg.com/">Digg</a>. <a href="http://www.aacsla.com/home">The company which produced the key</a> started sending cease and desist letters to all blogs that published this number. Digg got one of those letters, and the owners of Digg decided to comply and removed the article. This action infuriated Digg users - they started writing incredible number of comments containing the number, and the bloggers all around the world started writing posts about it. And, as a result, Digg owners gave in. Kevin Rose, the founder of Digg, put a <a href="http://blog.digg.com/?p=74">post</a> on his blog with the key number in the title, admitting that he heard the voice of the crowd, and that Digg will no longer remove the articles with the key. He said:<br /><blockquote><br />But now, after seeing hundreds of stories and reading thousands of comments, you’ve made it clear. You’d rather see Digg go down fighting than bow down to a bigger company. We hear you, and effective immediately we won’t delete stories or comments containing the code and will deal with whatever the consequences might be.<br />If we lose, then what the hell, at least we died trying.<br /></blockquote><br />The whole story in more detail is described, for example, <a href="http://searchengineland.com/070502-071132.php">here</a>.<br /><br />Just some of my thoughts on the topic:<br /><ul><br /><li>This is probably the first case which shows the real power of the sites with user-generated content; or, to be more precise, of the users of such sites. This case might become an important turning point in the relations between users and site owners.</li><br /><li>If the protection of HD-DVDs relies on a single number, then it’s in a sorry state indeed. I can’t believe that the developers of the protection thought the number will remain a mystery for any significant time.</li><br /><li>The behavior of the AACS (the company developing the protection and requesting the removal of the key from blogs) is an example of total stupidity. Frankly, they couldn’t do more to promote publishing of the key in thousands of blogs. This is similar to the story of <a href="http://en.wikipedia.org/wiki/Herostratus">Herostratus</a>. One can think that by now people should learn: issuing a decree to forget Herostratus isn’t the best way to make people forget him. </li><br /><li>If someone needs another proof that DMCA went a little bit too far - here it is.</li><br /></ul><br />Technorati tags: <a href="http://technorati.com/tag/HD-DVD" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=HD-DVD" alt=" " />HD-DVD</a>, <a href="http://technorati.com/tag/Digg" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=Digg" alt=" " />Digg</a>, <a href="http://technorati.com/tag/DMCA" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=DMCA" alt=" " />DMCA</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com1tag:blogger.com,1999:blog-16689853.post-46497028376958634612007-04-13T15:28:00.000-04:002007-04-13T15:41:59.452-04:00Business rules: hard-coding or soft-codingCouple of days ago <a href="http://worsethanfailure.com/">“Worse Than Failure”</a> published (instead of a usual daily IT horror story) a very interesting <a href="http://worsethanfailure.com/Articles/Soft_Coding.aspx">article dedicated to “Soft Coding”</a>. The article discussed a problem known to anyone who ever did some business-related software design: dealing with business rules. <br /><br />The problem with business rules is that they are almost impossible to generalize, often follow some odd logic and are subject to frequent and unpredictable changes. Usually business rules involve some arbitrary values, which programmers are reluctant to hard-code. The article gives quite a good example of the situation, but let me give here one of my own.<br /><br />Let’s suppose that one of the business rules is:<br /><br /><span style="font-style:italic;">“If a user account is inactive for more than 180 days it should be deleted, except for the cases when the user is located in New York or New Jersey, or when the user is an employee of XYZ Corp.”</span><br /><br />The most straightforward way to implement the rule is just to write a couple lines of a code:<br /><br /><pre><br />if (account.getInactiveTime() > 180 ) {<br /> if ( account.getUser().getState()!=”NY” <br /> && account.getUser().getState()!=”NJ” <br /> && account.getUser().getCompany()!=”XYZ”) {<br /><br /> account.delete();<br /> }<br />}<br /></pre><br />The classic approach tells us that this code is bad: it has hard-coded values, which means that changing one of those values will require code change. The obvious solution is to move the values somewhere outside the source code, for example to a configuration file. But the logic of the rule itself is also subject to unexpected changes; so it will seem natural that the logic should be somehow generalized and the concrete details should also be moved out. Unfortunately, this almost always leads to creation of some monstrous home-brew scripting languages, which turn the maintenance of such projects into a nightmare.<br /><br />The article suggests that it’s much better to just leave the logic in the code: this way it’s easy to read and it’s implemented in a well-known programming language. <br /><br />In my opinion, both approaches are equally good – or equally bad, depending upon the circumstances. <br /><br />Having business logic in the code has some very serious disadvantages. Yes, the build process is no longer as expensive as it used to be some time ago; however, the necessity to change code when a business rule changes is still unpleasant:<br /><ul><br /><li>Builds themselves are cheap now; however, the deployment might be quite expensive. If you need to re-deploy application to one or two servers – it’s easy; however, if the application runs in a complex environment with multiple server groups and clusters, that might be quite a different story. And if the application is actually deployed on the users’ desktops…</li><br /><li>Changing code might cause ripple effects, and requires regression testing – which also might be expensive.</li><br /><li>Frequent minor code changes under time pressure usually cause a code quality to deteriorate. </li><br /><li>The last, but not least: with this approach, the developers become forever responsible for implementing rule changes. </li><br /></ul><br /><br />In my experience, the right solution for the problem lies (as usual) somewhere between those two approaches. There is no silver bullet, and each group of business rules (and, sometimes, even each rule) has to be addressed separately. Here are the principles I try to follow when dealing with applications with business rules.<br /><br /><ol><br /><li>Try to identify as many business rules as possible in the project you are working on. The purpose is to understand, which part of the requirements (or implementation) deals with core business logic, and which with some arbitrary business rules. </li><br /><li>Estimate which elements of business rules are going to change and how often? It’s never possible to get an absolutely precise answer to this question; however, surprisingly often one can get a good estimate just by asking for it: “The states in this rule change constantly – last year we had 4 states, then two months ago we added two more, and a week ago a new regulation came out…” or “XYZ was always a special case – it’s our largest partner”.</li><br /><li>Frequently changing values should go into an external location (file, database…) </li><br /><li>Rarely changing values might also go there, or can be implemented as constants, whichever will make the code easier to maintain. Just do not leave them as “magic numbers”!</li><br /><li>The business rules logic should be moved to separate classes, and, possibly, to separate modules. There are quite many ways to achieve it. <a href="http://en.wikipedia.org/wiki/Observer_pattern">Observer</a> pattern can be used when the rules are to be triggered by some events. <a href="http://en.wikipedia.org/wiki/Decorator_pattern">Decorator</a> and <a href="http://en.wikipedia.org/wiki/Strategy_pattern">Strategy</a> patterns are also helpful here. Another possible approach would be using aspect-oriented programming and moving some business rules to aspects. It might also be a good idea to implement certain groups of business rules as plugins, and to make the core system automatically discover them. (I did something similar to this in one of my projects, and it worked pretty well). The basic idea behind all of this is to minimize ripple effect and make required change as small as possible.</li><br /><li>If the business rules logic is subject to frequent changes, the situation becomes more serious. The design approaches suggested above will, definitely, somewhat alleviate the pain, but in general this type of situation calls for more drastic measures. Usually this involves adding some sort of scripting support and giving the users ability to write some simple scripts and script snippets. One advice for those who will go down this path: do not invent new scripting languages – first try to use an existing one. It’s also a good idea to provide some UI which will help with writing snippets and putting them in a right place. Adding scripting support and providing is, definitely, quite an effort. So, before doing this, it always makes sense to look outside of the project: sometimes frequent business rules logic changes might be prevented by fixing some business processes, or by working with users and stakeholders. It may sound unrealistic, but there are occasions when just explaining the fact that the requested changes are not as minor as the requestor thinks and do not come free of charge helps significantly reduce the frequency of change requests.</li><br /><li>While following those principles, try to keep the system from turning into chaos of different techniques applied. Group similar or related business rules together, and use for each group the technique needed for the rules with maximal volatility. For example, if you have 10 similar rules, and two of them are changing frequently enough to validate usage of external configuration file for them – use it for all 10 rules. Just make sure your grouping is fine-grained enough.</li><br /></ol><br /><br />Technorati tags: <a href="http://technorati.com/tag/programming" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=programming" alt=" " />programming</a>, <a href="http://technorati.com/tag/software+design" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=software+design" alt=" " />software design</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com12tag:blogger.com,1999:blog-16689853.post-78270182687932296172007-03-23T16:13:00.000-04:002007-03-23T16:38:18.996-04:00Use one editor? I prefer three...Recently I finished reading "The Pragmatic Programmer". The book is amazing, and, probably, is worth a separate article. In short, it contains wisdom and experience of veteran programmers in condensed and purified form. I wholeheartedly agree with most of suggestions and advices the book gives; however, there are several topics on which I disagree with the authors. One such topic is the use of text editors.<br /><br />The authors give the following advice: <br /><blockquote>"We think it is better to know one editor very well, and use it for all editing tasks: code, documentation, memos, system administration and so on." </blockquote><br />In my daily work, however, I discovered that I get maximal productivity when I use not one, but three editors. Here is my setup.<br /><br />1. <span style="font-weight:bold;">IDE.</span> I know some people who claim that they don’t need an IDE, and that they can achieve the same result using their favorite editor (EMACS, vi or some other). I think that those developers either never got their hands on a really good IDE, or have never done any more or less complex project. Besides simple – though also convenient – features like syntax highlighting, integrated build support, project support etc, a good IDE can provide much more complex language –oriented features. For example, my IDE of choice currently is <a href="http://www.eclipse.org/">Eclipse</a> (I’m doing mostly Java now), and it provides me with such incredibly useful features as automated refactoring, language-oriented search, class hierarchy navigation, code generation helpers and many others. And for aspect-oriented programming having IDE with support for aspects (I use <a href="http://www.eclipse.org/ajdt/">AJDT</a> plugin for Eclipse) is vital. In my opinion, trying to program using AOP without an IDE support is a pure suicide: how would you find out that the line of the code you are about to change is, in fact, augmented by three aspects, and your change will have unnecessary side effects?<br /><br />2. <span style="font-weight:bold;">Programmer’s editor.</span> Besides writing Java code, I often need to work with some other files, which do not belong to my current project. I have to analyze logs, edit data files, write some short scripts in other languages… For this tasks I use one of so-called "programmer’s editors". These are complex and powerful text editors. They usually offer syntax support of multiple languages (usually meaning "syntax highlighting", integrated FTP and, sometimes, version control support, file comparison, hex editing, built-in powerful macro languages and many other useful features. The reason why I use separate editor for those tasks instead of IDE is that (a) I don’t want to pollute my IDE workspace with unrelated files – I want to have only program-related stuff there, and (b) I don’t want to start IDE every time I need to edit a file. For some time I was a big fan of <a href="http://www.multiedit.com/">Multi-Edit</a>; then I switched to <a href="http://www.ultraedit.com/">UltraEdit</a> and <a href="http://www.crimsoneditor.com/">Crimson Editor</a>. (The latter is less feature-rich than UltraEdit, but is free).<br />3. <span style="font-weight:bold;">Notepad replacement. </span>The third editor in my setup would be Notepad, if it wouldn’t be that crippled. The idea behind having this third editor type is that I want to have something extremely lightweight and fast, so I can instantly do some simple editing on any file. I don’t have any favorite here. Any replacement will do, as long as it supports arbitrarily large files, has support for both Windows and Unix line styles and has decent search/replace capabilities.<br /><br />This is my setup. All comments and suggestions are more than welcome.<br /><br />Technorati tags:<a href="http://technorati.com/tag/programming" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=programming" alt=" " />programming</a>, <a href="http://technorati.com/tag/text+editor" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=text+editor" alt=" " />text editor</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com7tag:blogger.com,1999:blog-16689853.post-70956978573783774882007-02-01T17:44:00.000-05:002007-02-01T18:13:36.248-05:00Joke becomes true...Quite some time ago I’ve heard a computer joke:<br /><br /><blockquote>Bill Gates was demonstrating his latest speech-recognition software. He was just about ready to start the demonstration and asked everyone in the room to quiet down.<br /><br />Just then someone in the back of the room yelled, "Format C: Return."<br /><br />Someone else chimed in: "Yes, Return!"<br /><br />Unfortunately, the software worked.<br /></blockquote><br /><br />I thought it to be hilarious, though highly improbable. Certainly anyone designing this kind of system would introduce some sort of protection against this kind of “accidents”, right?...<br /><br />Well, today I’ve read the following:<br /><br /><blockquote>Vista can respond to vocal commands and concern has been raised about malicious audio on websites or sent via e-mail. <br />In one scenario outlined by users an MP3 file of voice instructions was used to tell the PC to delete documents. <br />Microsoft said the exploit was "technically possible" but there was no need to worry.</blockquote><br /><br />The full text of the article is <a href="http://news.bbc.co.uk/1/hi/technology/6320865.stm">here</a>, and <a href="http://blogs.technet.com/msrc/archive/2007/01/31/issue-regarding-windows-vista-speech-recognition.aspx">here</a> is a response posted on The Microsoft Security Response Center Blog.<br /><br />Now I am trying to recall other computer jokes – I have to know what to be prepared for, after all…<br /><br />Technorati tags: <a href="http://technorati.com/tag/microsoft" rel="tag">microsoft</a>, <a href="http://technorati.com/tag/vista" rel="tag">vista</a>, <a href="http://technorati.com/tag/humor" rel="tag">humor</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com10tag:blogger.com,1999:blog-16689853.post-57054183175684801582007-01-12T15:02:00.000-05:002007-01-12T15:08:21.061-05:00Vista and downloadable gamesCouple of days ago <a href="http://">Gamasutra</a> published quite <a href="http://www.gamasutra.com/php-bin/news_index.php?story=12314">an interesting article</a> by Alex St. John, founder and CEO of <a href="http://www.wildtangent.com/">WildTangent</a>. In the article (called “Vista Casts a Pall on PC Gaming”), he describes serious problems which <a href="http://www.microsoft.com/windowsvista/">Vista</a> will present to independent game developers (and casual game developers in general).<br /><br />Two main problem areas outlined by Alex are program installation and parental control. <br /><br />Installation. According to Alex, the enhanced security system of Vista might require users to enter administrative login and password every time they try to download and install game. This might sharply reduce the number of installs (and, therefore, purchases), since people might just get tired and frustrated by all the hoops they have to jump through in order to just try out a game, and, therefore, try less games. <br /><br />Parental Control. It turns out that Vista has something called Game Explorer – some place where the games are being registered, which allows parents to define the allowed <a href="http://www.esrb.org/index-js.jsp">ESRB</a> rating level for the games the kids are allowed to play, and which blocks the attempts to start the registered games from outside of Game Explorer. The problem here – again, according to Alex – is that since ESRB grading process is expensive, most small and indie developers cannot afford it, therefore making their games “Not Rated”. Since from the protection standpoint all “Not Rated” material is not safe, most parents will probably block it, thus locking out all small developers.<br /><br />I didn’t install Vista yet (and not going to, until the time when I would have no other choice!), so I cannot validate Alex’s statements. But, assuming he is right, this might indeed have very unpleasant consequences for game developers. I have no doubt that it will be possible to turn off all these extra-protecting features, or to circumvent them. The problem, however, is that target audience for most casual games are not technical-savvy people, who will, most probably, have Vista running with default settings.<br /><br />Interesting fact is that the parental control system does not apply to web games. So, if the downloadable games might lose in popularity – the web games might gain, and that, in turn, might lead to some quite interesting market shifts.<br /><br />Technorati tags: <a href="http://technorati.com/tag/vista" rel="tag">Vista</a>, <a href="http://technorati.com/tag/games" rel="tag">games</a>, <a href="http://technorati.com/tag/casual+games" rel="tag">casual games</a>, <a href="http://technorati.com/tag/game+development" rel="tag">game development</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com1tag:blogger.com,1999:blog-16689853.post-90261585449674910632007-01-10T14:40:00.000-05:002007-01-10T14:48:28.311-05:00iPhone crazeIt seems like everyone suddenly went crazy over <a href="http://www.apple.com/iphone/">iPhone</a>. The new gadget is being discussed in multitude of blogs, newspapers publish articles on it, and the <a href="http://finance.google.com/finance?q=AAPL">stock prices for Apple</a> skyrocketed over the past two days. My coworkers show each other web pages with photos of the new device…<br /><br />Well, I knew for quite some time that, when it comes to marketing, no one can beat the Apple guys. They are geniuses. And I am sure that the craze over this new gizmo will just increase over time, and, most probably, it will become one of the most wanted and hyped devices of this year.<br /><br />But, frankly, I don’t understand what’s so great or special about this new thingy. Let’s cool down a little bit, and look at the device more attentively. Yes, there are many nice touches about it: stylish design, more or less decent on-board storage size (up to 8 Gigs), camera, Wi-Fi, Bluetooth, GPS – everything is included. You can take pictures, surf the web, play music and movies, may be even play games. There are interesting new features, such as:<br /><ul><br /><li>multi-touch UI;</li><br /><li>different built-in sensors which, for example, detect when the phone is rotated and switch automatically between portrait and landscape mode (though I assume sometimes that might be annoying);</li><br /><li>visual voicemail – a list of voice messages (I applaud Apple for this one!)<br />integration with Google maps.</li><br /></ul><br />But there are also quite many drawbacks:<br /><ul><br /><li>operating touchscreen with fingers means having grease, scratches and fingerprints all over it. A reporter from NY Times <a href="http://bits.blogs.nytimes.com/2007/01/09/some-hands-on-time-with-the-iphone/">states</a> that “You still get finger streaks, but they’re relatively subtle and a quick wipe on your sleeve takes care of them”. The reporter was playing with the phone in an office, with clean hands. I hate to thing what will happen to the screen on a hot and humid day.</li><br /><li>The same reporter admits that “Typing is difficult. The letter keys are just pictures on the glass screen, so of course there’s no tactile feedback.”. The difficulty is somewhat relieved by some ultra-smart installed software – but, still, it’s not the same as having a real keyboard.</li><br /><li>Speaking of the software – according to <a href="http://www.engadget.com/2007/01/09/the-iphone-is-not-a-smartphone/">Engadget</a>, the phone is first-party software only. In my view, that diminishes the appeal of the phone tenfold.</li><br /><li>No removable battery</li><br /><li>No expandable memory</li><br /><li>No Exchange support</li><br /><li>And a hefty price tag! 600 dollars for a phone (as far as I understand, with a 2-year contract) – isn’t it too much?</li><br /></ul><br />And, except the visual voicemail, there are no real phone innovations in this product! (though this seems to be a problem of the mobile phone industry in general – all new features have nothing to do with telephony.) Blacklisting and whitelisting of the callers, scheduling of the notification sound types (automatically switch to vibration only at night) – those and similar features existed in crude russian Caller ID phones in mid-1990s, but none of the features is present in the ultra-modern devices.<br /><br />I will not rush for the iPhone. No doubt it will have an owerwhelming success – but not with me.<br /><br />Technorati tags: <a href="http://technorati.com/tag/iPhone" rel="tag">iPhone</a>, <a href="http://technorati.com/tag/apple" rel="tag">apple</a>, <a href="http://technorati.com/tag/cellphones" rel="tag">cellphones</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com6tag:blogger.com,1999:blog-16689853.post-18586834104836872382007-01-02T10:22:00.000-05:002007-01-02T10:29:00.873-05:00Happy New Year!<span style="font-style:italic;">(Yes, I know it's a little bit late - but better late than never, right?)</span><br /><br />Happy New Year to all who read my blog! All the best wishes to you and your families. <br /><br />One of my New Years resolutions is to blog more often - and I do hope I will be able to carry out this one.<br /><br />Enjoy the life - and stay tuned!Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com0tag:blogger.com,1999:blog-16689853.post-83496017059127507392006-12-11T13:14:00.000-05:002006-12-11T14:14:48.134-05:00Yet another idiot - and some other stuff...First - after almost three weeks of silence I'm back. I was pretty busy, and not only had no time to post something interesting - I've also had no time even to read comments. When yesterday I've got at last a couple of minutes to check what's going on, I discovered that my blog was infested with spam comments. Speaking frankly, I don't understand the purpose of spamming blogs with totally unrelated comments - most probably they will be deleted almost immediately, and would only annoy people. (One of the comments I deleted was from "a 15 y.o. Sandra from Arabia" who learns English and wants to talk to boys - I have no clue what was the idea of this, since the comment had no other information). Anyway, I tried to delete as much of this garbage as possible, and I've turned CAPTCHA on - sorry for the inconvenience, but I need no more spam, thank you very much.<br /><br />Now, about an idiot. Here's a funny story: a blogger received an e-mail from somebody with quite a request:<br /><blockquote><br /><p>I have been running the site for over two years and we have been ranked very highly for the search term [edited].</p> <p>On Thursday morning I checked our google positions and your site is now above us for this term. I haev checked your blog and it has nothing to do with [edited], so I think it would be best all round if you remove your blog from google for this search term.</p><br /></blockquote><br /><br />You can read the rest of the e-mail <a href="http://deanhunt.com/bizzare-google-request/">here</a>, and a follow-up <a href="http://deanhunt.com/bizarre-google-request-update">here</a>.<br /><br />Well, of course we have an exemplary case of an idiot here. Funny, amusing - but not too interesting. What is interesting, though, is the entire situation with businesses (both large and small) striving for the first place in Google searches. It's obvious that the first place is extremely valuable in terms of business. However, this precious commodity is not for sale (which is good!), and is being granted by Google's system based on some mysterious factors. For example, as for today, if you try to search Google for "buy computers", the first place will be occupied by BestBuy. It is followed by buy.com - and CompUSA is on the tenth place, last on the first page. Google in this case becomes something like a blind force of nature - powerful and unpredictable. I am not saying that this is bad - or good - I just find it to be curious and thought-provoking...<br /><br />Technorati tag: <a href="http://technorati.com/tag/google" rel="tag">google</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com0tag:blogger.com,1999:blog-16689853.post-1164148642186746842006-11-21T17:26:00.000-05:002006-11-21T17:44:09.016-05:00PS3 and Wii - first impressions not that euphoric...So, at last, it has happened! Both PS3 and Wii were released in US. It was fun to read about <a href="http://www.tgdaily.com/2006/11/10/ps3_bestbuy_burbank_line/">extremes</a> <a href="http://www.engadget.com/2006/11/16/easiest-job-ever-dentist-hires-60-temps-to-wait-in-ps3-lines/">some people</a> <a href="http://www.engadget.com/2006/11/16/ps3-hopefuls-shot-with-bbs-at-kentucky-best-buy/">would go to</a> just to get the box on the first day of the sales. However, according to the multitude of articles and blog posts published in the last couple of days, the first impressions about those two next-gen consoles are not all euphoric. There are <a href="http://www.engadget.com/2006/11/20/wii-being-hit-by-fatal-error-110213-could-be-funky-firmware/">bugs</a>, problems with the new Wii controllers (<a href="http://slate.com/id/2154157">some people find them poorly suited for games</a>, while some other claim that the <a href="http://www.engadget.com/2006/11/21/errant-wiimote-claims-second-tvs-life/">motion-sensitive Wii controller broke off during play and cracked their TV screen</a> (!)), and some <a href="http://www.engadgethd.com/2006/11/16/ps3-doesnt-do-1080i/">incompatibility issues</a>. <br /><br />However, for me the most interesting was the <a href="http://www.nytimes.com/2006/11/20/arts/20game.html?_r=1&oref=slogin">article in NY Times called “A Weekend Full of Quality Time With PlayStation 3”</a>. The author is disappointed in PS3 usability, and summarizes his feelings:<br /><br /><blockquote>And so it is a bit of a shock to realize that on the video game front Microsoft and Sony are moving in exactly the opposite directions one might expect given their roots. Microsoft, the prototypical PC company, has made the Xbox 360 into a powerful but intuitive, welcoming, people-friendly system. Sony’s PlayStation 3, on the other hand, often feels like a brawny but somewhat recalcitrant specialized computer. (Sony is even telling users to wait for future software patches to fix some of the PS3’s deficiencies.) The thing is, if people want to use a computer, they’ll use a computer.</blockquote><br /><br />Goes surprisingly well with <a href="http://grumpytech.blogspot.com/2006/07/consoles-vs-pc-article-about-ps3.html">my thoughts</a>… <br /><br />Technorati tags:<a href="http://technorati.com/tag/ps3" rel="tag">ps3</a>, <a href="http://technorati.com/tag/wii" rel="tag">wii</a>, <a href="http://technorati.com/tag/Video+Games" rel="tag">Video Games</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com0tag:blogger.com,1999:blog-16689853.post-1163795350446470562006-11-17T15:21:00.000-05:002006-11-17T15:29:10.456-05:00Web 3.0Here is a new buzzword: Web 3.0! <br /><br />Well, the word itself is, probably, not that new – it seems it was used for quite some time; but almost always it was used to describe just “something beyond web 2.0”. However, <a href="http://www.nytimes.com/2006/11/12/business/12web.html">an article was published recently in NY Times</a> which caught some attention. The article is written by John Markov, and it, basically, puts an equality sign between this new buzzword and something called <a href="http://en.wikipedia.org/wiki/Semantic_Web">“semantic Web”</a>. The idea of the semantic web is simple, but powerful: to make data stored on WWW not only human-readable, but also machine-readable; to enhance the markup so that automated processors would be able to “understand” the meaning of each piece of data and its relation to other pieces. It will be possible, thus, to do many exciting things with the data found on the web: to analyze and aggregate data from multiple unrelated sources and to do extensive data mining.<br /><br />Here are several more links to some quite interesting texts about semantic web:<br /><br /><a href="http://novaspivack.typepad.com/nova_spivacks_weblog/2006/11/minding_the_pla.html">“Minding The Planet -- The Meaning and Future of the Semantic Web” </a>and a follow-up to Markov’s article <a href="http://novaspivack.typepad.com/nova_spivacks_weblog/2006/11/what_is_the_sem.html">“What is the Semantic Web, Actually?”</a> written by Nova Spivack, a founder of <a href="http://www.radarnetworks.com/">Radar Networks</a>, one of a few companies that are working on semantic web technologies. <br /><br />So, should we say goodbye to Web 2.0 and switch to Web 3.0? Obviously, not! The two concepts are quite orthogonal, so the name “Web 3.0” is, probably, as misleading as it gets. (It’s funny to try and <a href="http://en.wikipedia.org/wiki/Web_3.0">search WikiPedia for “Web 3.0”</a> – the article is removed, <a href="http://en.wikipedia.org/wiki/Talk:Web_3.0">because there is still no consensus about what “Web 3.0” is</a>.) <br /><br />Personally, I am quite happy about the development of the semantic web. New tools will mean more capabilities for Internet users; and new paradigm will mean more work for programmers – clearly, a win-win situation for me!<br /><br />Technorati tags: <a href="http://technorati.com/tag/web+2.0" rel="tag">web 2.0</a>, <a href="http://technorati.com/tag/web+3.0" rel="tag">web 3.0</a>, <a href="http://technorati.com/tag/semantic+web" rel="tag">semantic web</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com0tag:blogger.com,1999:blog-16689853.post-1162588556517157062006-11-03T16:10:00.000-05:002006-11-03T16:15:56.556-05:00More on interactive storytelling: Ernest AdamsWhile writing my <a href="http://grumpytech.blogspot.com/2006/11/chris-crawford-on-interactive.html">previous post</a> I totally forgot to mention an extremely interesting talk on interactive storytelling presented at GDC 2006 by Ernest Adams. Unfortunately, my notes on the lecture – which, by the way, was called “A New Vision for Interactive Stories” - are very brief, and I couldn’t find a full text of his speech on the web. (On <a href="http://www.designersnotebook.com/">his own site</a> Ernest has a full text of his <a href="http://www.designersnotebook.com/Lectures/Interactive_Narratives_Revisit/interactive_narratives_revisit.htm">previous presentation on the same topic</a> – but just a short paragraph about his last one). However, <a href="http://onlyagame.typepad.com/only_a_game/2006/03/gdc_a_new_visio.html">here</a> you can read a pretty good summary of Ernest’s speech. It’s interesting to compare his ideas with the ones of Chris Crawford – similar and yet different at the same time (at least, according to what I’ve read at the <a href="http://www.storytron.com/">Storytron site</a>). <br /><br />Technorati tags: <a href="http://technorati.com/tag/game+design" rel="tag">game design</a>, <a href="http://technorati.com/tag/interactive+storytelling" rel="tag">interactive storytelling</a>, <a href="http://technorati.com/tag/ernest+adams" rel="tag">ernest adams</a>Aleksey Linetskiyhttp://www.blogger.com/profile/05988449371728586396noreply@blogger.com2