<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>a little bitty Java</title>
	<atom:link href="http://bittyjava.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bittyjava.wordpress.com</link>
	<description>on developing Java™ Micro Edition games</description>
	<lastBuildDate>Sat, 07 Nov 2009 19:08:57 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='bittyjava.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/73e2f94911fe8ace715033d09f6ba807?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>a little bitty Java</title>
		<link>http://bittyjava.wordpress.com</link>
	</image>
			<item>
		<title>The BlackBerry Red Key!</title>
		<link>http://bittyjava.wordpress.com/2009/11/07/the-blackberry-red-key/</link>
		<comments>http://bittyjava.wordpress.com/2009/11/07/the-blackberry-red-key/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 19:08:57 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=162</guid>
		<description><![CDATA[When I&#8217;m running an application on a BlackBerry device &#8212; and I hit the red key &#8212; my app disappears, and the menu screen reappears. I&#8217;d guess that my app&#8217;s screen was popped off the BlackBerry screen stack, so onClose() was called and my app cleaned itself up neatly, right?
Wrong.  The application was merely sent [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=162&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When I&#8217;m running an application on a BlackBerry device &#8212; and I hit the red key &#8212; my app disappears, and the menu screen reappears. I&#8217;d guess that my app&#8217;s screen was popped off the BlackBerry screen stack, so onClose() was called and my app cleaned itself up neatly, right?</p>
<p>Wrong.  The application was merely sent to the background.</p>
<p>I assume this behavior is mentioned somewhere in the bowels of the RIM documentation (although I&#8217;ve read quite a lot of it, and I haven&#8217;t seen mention of this). Nor do the sample applications appear to deal with it. I just figured it out when my colleague Andrew Davison sent me a game that plays music in the background. It was a tad loud, so I instinctively tried to shut it off in one click using the red key. And the game went away, but the music kept right on playing&#8230;</p>
<p>It reminds me of a little something I read in the <a href="http://www.versatilemonkey.com/story.html">PodTrapper story</a>:</p>
<blockquote><p>My curve has 32MB of RAM and 64MB of flash. The flash can be used for paging if it&#8217;s available, but on my device only about 20MB of it is, and that fills up fast installing applications (PodTrapper alone is 350k). Realizing that the OS and other apps also have to fit in RAM, leaking a 100kb string becomes a huge problem. There are <a href="http://forums.crackberry.com/f132/do-memory-woes-ever-end-214830/">lots</a> of <a href="http://forums.crackberry.com/f134/memory-leak-application-248861/">forum</a> <a href="http://forums.crackberry.com/f83/memory-leak-96281/">posts</a> by people trying to figure out why their phone keeps running out of memory and needs to be rebooted. It&#8217;s a large enough problem that there are <a href="http://software.crackberry.com/product.asp?id=27660&amp;n=QuickPull-v2-%28BETA%29">apps for automatically restarting your phone</a>. I can definitely see why Apple has been hesitant to open up background processing on the iPhone. It&#8217;s really easy for bad developers to make the whole platform look bad.</p></blockquote>
<p>Personally, I think it&#8217;s kind of cool that you can run apps in the background on BlackBerry, and send them to the foreground and back. However, I think the simplest, <em>default behavior</em> should lean towards cleaning up the app neatly, while sitting on memory and processes when your app goes out of scope should be a special behavior that <em>advanced developers can request</em>.  Not the other way around.</p>
<p>So what about that red key?  What if you&#8217;re developing a game or animation that makes no sense in the background, and you just want it to clean up whenever the user dismisses it?</p>
<p>Andrew proposed the following solution (for use in a subclass of Screen):</p>
<p><span id="more-162"></span></p>
<p>// keycodes for the green and red keys<br />
private static final int GREEN_KEY = 1114112;<br />
private static final int RED_KEY = 1179648;</p>
<p>protected boolean keyDown(int keycode, int time)<br />
// terminate the game if the green or red keys are pressed<br />
{<br />
// System.out.println(&#8220;keyDown: &#8221; + keycode);<br />
if ((keycode == GREEN_KEY) || (keycode == RED_KEY)) {<br />
isRunning = false;<br />
return true;<br />
}<br />
return false;<br />
}  // end of keyDown()</p>
<p>***</p>
<p>That works, but on some level I couldn&#8217;t help but feel like it&#8217;s absurd of RIM to expect developers to check for the key codes of the red key and green key instead of providing some sort of help.  This has got to be a fairly common scenario, doesn&#8217;t it?</p>
<p>Poking around the API a bit, I found it:  In your Application subclass, you implement deactivate().  Here&#8217;s the JavaDoc:</p>
<blockquote><p>public void <strong>deactivate</strong>()<br />
Handles backgrounding event.<br />
The system invokes this method when sending this application to the  background. By default, this method does nothing. Override this method to  perform additional processing when being sent to the background.</p></blockquote>
<p>So, if you&#8217;re writing an application that makes no sense in the background, then you implement this method and have it perform the app&#8217;s cleanup and shutdown.</p>
<p>Like so many aspects of BlackBerry programming, it&#8217;s quite simple <em>once you notice the problem and figure out the trick.</em> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=162&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/11/07/the-blackberry-red-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>
	</item>
		<item>
		<title>Freelance BlackBerry Developer Needed</title>
		<link>http://bittyjava.wordpress.com/2009/09/29/freelance-blackberry-developer-needed/</link>
		<comments>http://bittyjava.wordpress.com/2009/09/29/freelance-blackberry-developer-needed/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 13:23:04 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[BlackBerry]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=160</guid>
		<description><![CDATA[I&#8217;m looking for one engineer (who has worked with BlackBerry) for a fun little project. It&#8217;s a paid project, not just a hobbyist idea.
If you&#8217;re interested, please leave a comment, and I&#8217;ll email you.  Thanks!
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=160&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m looking for one engineer (who has worked with BlackBerry) for a fun little project. It&#8217;s a paid project, not just a hobbyist idea.</p>
<p>If you&#8217;re interested, please leave a comment, and I&#8217;ll email you.  Thanks!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=160&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/09/29/freelance-blackberry-developer-needed/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>
	</item>
		<item>
		<title>Trying out BlackBerry App World</title>
		<link>http://bittyjava.wordpress.com/2009/09/21/trying-out-blackberry-app-world/</link>
		<comments>http://bittyjava.wordpress.com/2009/09/21/trying-out-blackberry-app-world/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:52:34 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Business strategies]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=156</guid>
		<description><![CDATA[For fun, I&#8217;ve submitted one of my sample games (Ladybug Maze) to BlackBerry App World.  This is mostly an experiment to try out how BlackBerry App World works &#8212; I doubt many people will pay $2.99 for this simple little game. But who knows?  

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=156&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For fun, I&#8217;ve submitted one of my sample games (<a href="http://appworld.blackberry.com/webstore/content/3000">Ladybug Maze</a>) to <a href="http://appworld.blackberry.com/webstore/">BlackBerry App World</a>.  This is mostly an experiment to try out how BlackBerry App World works &#8212; I doubt many people will pay $2.99 for this simple little game. But who knows? <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://appworld.blackberry.com/webstore/content/3000"><img class="alignnone size-full wp-image-157" title="ladybug_maze_480" src="http://bittyjava.files.wordpress.com/2009/09/ladybug_maze_480.png?w=480&#038;h=480" alt="ladybug_maze_480" width="480" height="480" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=156&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/09/21/trying-out-blackberry-app-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>

		<media:content url="http://bittyjava.files.wordpress.com/2009/09/ladybug_maze_480.png" medium="image">
			<media:title type="html">ladybug_maze_480</media:title>
		</media:content>
	</item>
		<item>
		<title>BlackBerry PushRegistry How-To</title>
		<link>http://bittyjava.wordpress.com/2009/09/15/blackberry-pushregistry-how-to/</link>
		<comments>http://bittyjava.wordpress.com/2009/09/15/blackberry-pushregistry-how-to/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 22:34:12 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[SMS]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=151</guid>
		<description><![CDATA[Suppose you&#8217;d like to create a BlackBerry application that will launch when you send an SMS message to the appropriate port.  It&#8217;s possible, but there are a number of non-obvious (and not-necessarily-documented) tricks.  I spent a few too many hours on experimenting to figure out precisely what works, and I&#8217;m posting my notes here to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=151&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Suppose you&#8217;d like to create a BlackBerry application that will launch when you send an SMS message to the appropriate port.  It&#8217;s possible, but there are a number of non-obvious (and not-necessarily-documented) tricks.  I spent a few too many hours on experimenting to figure out precisely what works, and I&#8217;m posting my notes here to save you some time:</p>
<ol>
<li>Apparently <strong>your application has to be a MIDlet</strong>, <em>not</em> a &#8220;CLDC application&#8221; (RIMlet).  I was a little surprised when I read this in the <a href="http://supportforums.blackberry.com/rim/board?board.id=java_dev">BlackBerry Java Dev forum</a>, since it would undoubtedly be trivial for RIM to allow either type of application to register with the PushRegistry and get launched.  So I did a few tests (with a &#8220;MIDlet-Push-1&#8243; Jad property analogous to the way the RIMlet uses the &#8220;MIDlet-1&#8243; property), and, indeed, the PushRegistry doesn&#8217;t seem to work for RIMlets, but it works fine for MIDlets. (Note: it&#8217;s still theoretically possible that there&#8217;s a way to make it work for RIMlets, but I couldn&#8217;t find the trick.)</li>
<li><strong>Adding a custom property to your Jad file</strong> is really easy <em>if you know the trick</em>. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  The trick is that (in the BlackBerry JDE) you can add the Jad file to the project (in the same way you add source files and images).  Once you&#8217;ve added the Jad file to the project, you can add properties and then they won&#8217;t get overwritten when you rebuild.  But <em>before you add it</em>, you should modify the project properties (setting the application type to MIDlet) and then build the project once, so that it will create for you a correct initial Jad file to use.</li>
<li><strong>Before your application closes, you should dynamically re-register with the PushRegistry</strong>.  This was the trickiest one to guess!  If your MIDlet is launched by the PushRegistry &#8212; and you open the corresponding connection to read the SMS message that launched your MIDlet &#8212; this automatically unregisters your MIDlet from the PushRegistry.  With other handsets, once you&#8217;re registered with the PushRegistry (either statically in the Jad or dynamically from within the application), you stay that way until you actively unregister it.  But not BlackBerry.  Or at least not with the BlackBerry simulator that comes with the BlackBerry JDE 4.2.0.  I assume the behavior is the same in other versions and on the device, but I&#8217;m not certain&#8230;</li>
<li><strong>How do you simulate the SMS</strong> to test the application launch with the PushRegistry?  I explained that <a href="http://bittyjava.wordpress.com/2009/09/10/sms-message-exchange-between-blackberry-simulator-instances-a-very-simple-demo/">here</a>.</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=151&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/09/15/blackberry-pushregistry-how-to/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>
	</item>
		<item>
		<title>SMS message exchange between BlackBerry simulator instances: a very simple demo</title>
		<link>http://bittyjava.wordpress.com/2009/09/10/sms-message-exchange-between-blackberry-simulator-instances-a-very-simple-demo/</link>
		<comments>http://bittyjava.wordpress.com/2009/09/10/sms-message-exchange-between-blackberry-simulator-instances-a-very-simple-demo/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 15:33:39 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Dev Environment]]></category>
		<category><![CDATA[SMS]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=145</guid>
		<description><![CDATA[If you&#8217;re writing a BlackBerry Java application that sends and/or receives SMS text messages, naturally you need to be able to test the application on the simulator.  And naturally the simulator doesn&#8217;t really send SMS messages, so you need to know how to get the simulator to exchange simulated SMS messages with another instance of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=145&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you&#8217;re writing a BlackBerry Java application that sends and/or receives SMS text messages, naturally you need to be able to test the application on the simulator.  And naturally the simulator doesn&#8217;t really send SMS messages, so you need to know how to get the simulator to exchange simulated SMS messages with another instance of the simulator.</p>
<p>This is very easy to do.  You can do it with the SmsDemo that comes in the BlackBerry JDE&#8217;s sample applications bundle &#8212; even though the SmsDemo&#8217;s JavaDoc seems to imply that you can&#8217;t.  If you look in the code of SmsDemo.java (usually found at C:\Program Files\Research In Motion\BlackBerry JDE &lt;version&gt;\samples\com\rim\samples\device\smsdemo), the JavaDoc says the following:</p>
<blockquote><p>This program requires the associated server component found in the com.rim.samples.server.smsdemo package under the samples directory in your JDE installation.</p></blockquote>
<p>That&#8217;s not precisely true.  It doesn&#8217;t <em>require</em> the server component &#8212; it can actually send demo messages from one instance of the simulator to another, as long as you set the sms-source-port of the one to be the sms-destination-port of the other, and vice-versa.  There are just a few quick steps and notes for launching the two instances:<span id="more-145"></span></p>
<p>The simulator executable is called &#8220;fledge.exe&#8221; and it is found in the simulator directory of the JDE installation (usually under C:\Program Files\Research In Motion).  You can run fledge from the command line or from a batch file with command line options specified with the usual Windows style (with a leading &#8220;/&#8221; instead of a &#8220;-&#8221; for you *nix developers).  Here&#8217;s an example of the command to launch the first one:</p>
<p>C:\BlackBerry\my-simu-directory-1&gt;&#8221;C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0\simulator\fledge.exe&#8221; /app=&#8221;C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0\simulator\Jvm.dll&#8221; /sms-source-port=5000 /sms-destination-port=5001</p>
<p>Then launch the second instance (from a different directory) with the source and destination port numbers inverted.</p>
<p>Since the fledge executable requires you to specify the JVM DLL in the &#8220;/app&#8221; option, you might think it would be easier to just navigate to the simulator directory and launch it from there.  The problem is that the simulator stores a set of files in the directory you launch it from, and it won&#8217;t let you run two instances simultaneously from the same directory.  The trick is to either write a batch file to launch both or &#8212; my personal favorite &#8212; an Ant target, such as the following:</p>
<p>&lt;project default=&#8221;sms-run&#8221;&gt;</p>
<p>&lt;property name=&#8221;jde.home&#8221;<br />
value=&#8221;C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0&#8243;<br />
/&gt;<br />
&lt;property name=&#8221;model&#8221; value=&#8221;8100&#8243; /&gt;<br />
&lt;property name=&#8221;build.root&#8221; value=&#8221;C:\BlackBerry\smsbuild&#8221; /&gt;</p>
<p>&lt;target name=&#8221;sms-run&#8221;&gt;<br />
&lt;!&#8211; run two simulators that can communicate with one another via sms &#8211;&gt;<br />
&lt;mkdir dir=&#8221;${build.root}\sms-simu-1&#8243;/&gt;<br />
&lt;exec executable=&#8221;${jde.home}\simulator\fledge.exe&#8221;<br />
dir=&#8221;${build.root}\sms-simu-1&#8243;<br />
spawn=&#8221;true&#8221;&gt;<br />
&lt;arg value=&#8221;/app=${jde.home}\simulator\Jvm.dll&#8221;/&gt;<br />
&lt;arg value=&#8221;/handheld=${model}&#8221;/&gt;<br />
&lt;arg value=&#8221;/app-param=DisableRegistration&#8221;/&gt;<br />
&lt;arg value=&#8221;/app-param=JvmAlxConfigFile:${model}.xml&#8221;/&gt;<br />
&lt;arg value=&#8221;/pin=0&#215;2100000A&#8221;/&gt;<br />
&lt;arg value=&#8221;/sms-source-port=5000&#8243;/&gt;<br />
&lt;arg value=&#8221;/sms-destination-port=5001&#8243;/&gt;<br />
&lt;/exec&gt;<br />
&lt;mkdir dir=&#8221;${build.root}\sms-simu-2&#8243;/&gt;<br />
&lt;exec executable=&#8221;${jde.home}\simulator\fledge.exe&#8221;<br />
dir=&#8221;${build.root}\sms-simu-2&#8243;<br />
spawn=&#8221;true&#8221;&gt;<br />
&lt;arg value=&#8221;/app=${jde.home}\simulator\Jvm.dll&#8221;/&gt;<br />
&lt;arg value=&#8221;/handheld=${model}&#8221;/&gt;<br />
&lt;arg value=&#8221;/app-param=DisableRegistration&#8221;/&gt;<br />
&lt;arg value=&#8221;/app-param=JvmAlxConfigFile:${model}.xml&#8221;/&gt;<br />
&lt;arg value=&#8221;/pin=0&#215;2100000B&#8221;/&gt;<br />
&lt;arg value=&#8221;/sms-source-port=5001&#8243;/&gt;<br />
&lt;arg value=&#8221;/sms-destination-port=5000&#8243;/&gt;<br />
&lt;/exec&gt;<br />
&lt;/target&gt;</p>
<p>&lt;/project&gt;<br />
To run this example, just create the ${build.root} directory (here it&#8217;s &#8220;C:\BlackBerry\smsbuild&#8221;), and change the JDE version number to whichever version you&#8217;re using.  If you&#8217;re not using BlackBerry JDE 4.2.0, then you&#8217;ll also have to change the model number to some model that has a corresponding xml file in your JDE&#8217;s simulator directory (or just delete the model-related arguments).</p>
<p>Also note that when you launch the second instance of the simulator, it will give you an error message because the first instance is using the port that the simulator normally uses to communicate with the debugger.  Just select &#8220;ignore&#8221;, as explained in the BlackBerry knowledge base <a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800792/801083/How_To_-_Send_SMS_text_messages_between_two_BlackBerry_Smartphone_Simulators.html?nodeid=1508042&amp;vernum=0">here</a>.  I tested a few of the other fledge options (which I found by running fledge /help from the command line), but none of them seemed to allow me to switch the port number for the debugger or to just eliminate the message from being displayed.</p>
<p>The last thing to note is that the SmsDemo application obviously has to be installed on the simulator you&#8217;re using.  If you open the &#8220;samples&#8221; project in the JDE and select &#8220;build all&#8221; or &#8220;build all and run&#8221; from the &#8220;build&#8221; menu, then the application will be installed on the simulator.  You only need to do it once, and the SmsDemo will be there (in the simulator&#8217;s Applications menu) when you run the simulator from the command line or the Ant script.</p>
<p>Both instances must be running the SmsDemo application in order for them to communicate with one another &#8212; sending a message from one won&#8217;t launch the application on the other.  The destination address you enter in the SmsDemo application doesn&#8217;t matter &#8212; it appears to be ignored.  The port information above directs the message to the other simulator, and the  SMS address string (in the SmsDemo  code) specifies an application port number so that the message is directed to the SmsDemo application on the other simulator (and not to the other simulator&#8217;s &#8220;messages&#8221; folder).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=145&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/09/10/sms-message-exchange-between-blackberry-simulator-instances-a-very-simple-demo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>
	</item>
		<item>
		<title>Reality vs. best practices (and getting from one to the other)</title>
		<link>http://bittyjava.wordpress.com/2009/08/26/reality-vs-best-practices-and-getting-from-one-to-the-other/</link>
		<comments>http://bittyjava.wordpress.com/2009/08/26/reality-vs-best-practices-and-getting-from-one-to-the-other/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 12:06:41 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[Business strategies]]></category>
		<category><![CDATA[Dev Environment]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[build process]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=127</guid>
		<description><![CDATA[If you&#8217;ve spent any time studying best practices in software engineering, it can be jarring to discover how far the reality of software production often diverges from the ideal.  It isn&#8217;t rare to see code in production &#8212; stuff that&#8217;s critical to a company&#8217;s business &#8212; that isn&#8217;t even under version control, much less documented [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=127&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you&#8217;ve spent any time studying best practices in software engineering, it can be jarring to discover how far the reality of software production often diverges from the ideal.  It isn&#8217;t rare to see code in production &#8212; stuff that&#8217;s critical to a company&#8217;s business &#8212; that <em>isn&#8217;t even under version control</em>, much less documented with bug-fixes tracked to requirements, testing infrastructure in place, etc.</p>
<p>Personally, I like doing reverse-engineering (restoration of lost knowledge) &#8212; taking a bundle of mysterious old code and figuring out exactly how it works and what it&#8217;s doing, so that it can be upgraded or replaced.  I&#8217;ve done it for more than one company.  However (at the risk of cutting down on the need for this sort of work), I&#8217;ll tell you that it&#8217;s cheaper to fix &#8220;free-fall code&#8221; while you still have the engineers who designed it on hand, before a reverse-engineering effort becomes necessary.  It&#8217;s a little like an old building with electrical wiring that&#8217;s not up to code:  replacing all the wiring seems expensive for something that yields no visible results, yet it&#8217;s cheaper than leaving the old wiring in place to catch fire and burn the building down.</p>
<p>How does free-fall code get all the way to production?  In my experience, there are a couple of main causes:  <span id="more-127"></span>First, a lot of code bases are still in use that were actually started before many best practice ideas became commonplace, and overhauling the process just never made to  the company&#8217;s priority list.  Second, small start-ups often have no choice but to produce code that way.  Typically, you have a critical deadline and just one engineer (who is required to make a superhuman coding effort to get it done).  It&#8217;s release or perish, so there&#8217;s no time for frills like documentation, precise requirements (which you don&#8217;t need anyway if you have only one engineer), or tests.</p>
<p>One company I worked for had recently grown from start-up size to &#8220;real company&#8221; size, and one of the higher-ups decided that we should try to keep acting like a start-up because &#8220;start-ups produce code so much more efficiently.&#8221;  That is wrong, wrong, wrong.  Start-up mode means sacrificing a long-term code-maintainability strategy for the sake of the shortest-possible-term results.  And for every start-up that makes it, there are plenty that don&#8217;t, so they&#8217;re not that amazingly efficient if you look at the big picture: not only do companies have to pay more later to get their missing best practices on track, but also the failed start-ups represent an inefficient waste of coding that balances out the amazing results of those few that succeed.</p>
<p>So the moral is that once your start-up has passed that first hurdle &#8212; and has a little cushion of money to spend &#8212; the critical task is to move the engineering department from start-up mode to something scalable, <em>efficiently and effectively</em>.</p>
<p>That&#8217;s the critical task for the internal operations manager, that is.  The overall #1 priority for your start-up (once you have a little cushion of money) is to make sure that your business strategy makes sense and is on track.  Ideally, your start-up started with a business visionary who knows what to sell and how to sell it, a gifted manager who can run internal operations and grow the company wisely to meet the strategy, and an excellent engineer who can make it so &#8212; covering all of the engineering bases until the company is in a position to grow.  I know this because I&#8217;ve worked for a number of start-ups, and I&#8217;ve kept my eyes open the whole time.  It&#8217;s volatile work (as employment goes) but on the plus side there&#8217;s never a dull moment. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>It&#8217;s easy to underestimate the importance of having a talented manager running internal operations &#8212; especially in a small company where others are producing visible results like writing an application or selling a contract.  But teamwork and morale are critical when growing a small company.  You can&#8217;t afford to pay people to work at less than full capacity, so everybody has to be on the same page.  As soon as you have more than one engineer, you need a skilled manager who will make sure that everyone knows (and is in agreement on) what you&#8217;re implementing and on who&#8217;s doing what, with clear requirements and objectives.</p>
<p>(To give you an idea of how important clear requirements are to the efficient production of code, note that in Switzerland there&#8217;s now <a href="http://www.reconf.ch/">a conference</a> covering nothing but requirements engineering.  At least that&#8217;s what I think it&#8217;s about, given my current level of German comprehension&#8230;)</p>
<p>In the first stage of growing your company from &#8220;start-up&#8221; mode to &#8220;real company&#8221; mode, you&#8217;ll want to hire a QA engineer (in addition to hiring more engineers for R&amp;D).  The QA engineer should be a bit of a jack-of-all-trades (kind of like your initial development engineer), who can write the requirements (based on verbal discussions with the business or sales personnel), get business/commercial and R&amp;D to agree on the requirements, write a test plan, install bug-tracking software, set up version control and a nightly build (unless someone on the development team is doing that), set up a unit testing framework, and get everyone&#8217;s agreement on a set of coding and documentation guidelines.  In the early stages, manual testing can be outsourced as long as you have a clear test plan.  The internal operations manager should work closely with the QA engineer to decide on priorities and to ensure that R&amp;D and QA cooperate with each other.  This will get your initial growth off on the right foot.</p>
<p>Now, what if you&#8217;re moved to a new project and you discover that your company is already dangerously dependent on a block of free-fall software?  Or what if your company buys a code block that has no tests or documentation, and it&#8217;s thrown in your lap?</p>
<p>It&#8217;s a little like the situation above (the company&#8217;s initial growth spurt): you catch the free-fall code by building a QA framework around it.  First, put it under version control, and second, write a clear document explaining <em>exactly</em> what you need to do in order to build and run the code, including all the tools and other software needed, specifying the hardware and software version numbers.  The document should be complete enough that an engineer who has never seen the code before can take it out of version control and build and run it on virgin hardware.  If you can&#8217;t do that, then you are missing critical (burn-down-the-building level) information.  If you still have access to the engineers that wrote the code, it&#8217;s a lot cheaper to get their input on this document than it is to hire specialists to figure it out, especially if the code is designed to use proprietary and/or now-obsolete hardware or software.</p>
<p>Once the code is under version control and you&#8217;re sure it can be rebuilt, the emergency stage is over.  The next (hopefully more relaxed) stage is to determine your objectives for the software, in terms of bug-fixes, performance, and upgradability.</p>
<p>If the code is working with no major problems, it may just need a bit of documentation to explain what it does and how it works.  If the code is not documented at all, that may be a sign that the engineer who wrote it is not particularly skilled at documentation.  (This is not a failing in engineering terms &#8212; often excellent engineers aren&#8217;t very good at explaining how code works, even to other engineers &#8212; it&#8217;s a bit of a separate skill, just as being able to manage engineers is a separate skill that is not directly related to engineering ability.)  If you have access to the original engineer, just assign another engineer to write the document (with input from the person who wrote the code) at a rate of about one or two days a week until it&#8217;s done.</p>
<p>If you need to fix or upgrade your free-fall code, then the next step is to analyze it, and get an engineering estimate on the effort/risk involved in fixing it vs. the effort/risk involved in retiring and replacing it.  The fixing estimate should include the effort to write a set of automated regression tests for the code.  Then management should use this estimate to decide which course to take.</p>
<p>If the only problems are a handful of bug-fixes and very specific performance bottlenecks, then often a surgical approach is better than refactoring, particularly when dealing complex, fragile old code.  As an engineer, when you look at old spaghetti code, you will certainly see things that are inefficient and ugly, and it is <em>soooo</em> tempting to just start ripping it out willy-nilly and rewriting it.  But the problem with that approach is that you will almost certainly lose information.  Nine times out of ten, you&#8217;re right that the ugly code is just due to inefficient design and/or hastily patching new features onto code that wasn&#8217;t designed to accommodate them.  But one time out of ten, the counter-intuitive code was written that way for a real (yet non-obvious) reason, and if you don&#8217;t have access to the original engineers, you can&#8217;t be certain exactly which parts those are.  Even if you&#8217;re an excellent engineer (which I assume you are), and even if you&#8217;ve set up a framework of automated tests before you begin (which you should!), undocumented code may potentially be doing things you&#8217;re not aware of &#8212; hence major changes bring the risk of breaking functionality that is not covered by your tests. If your objectives are punctual, then focus on fixing the parts that are broken, and for the rest, remember the old adage about what to do with stuff that ain&#8217;t broke. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Sometimes, however, you will need to refactor the old code.  Keep in mind that code can be optimized for a number of different objectives (readability, speed, memory use, extensibility in various directions, etc.) and these optimizations are not necessarily compatible with one another.  It is a direct corollary that <em>all code can be refactored</em> in a number of different possible ways.  Therefore, any refactoring you do should be done with specific objectives in mind that you&#8217;ve discussed and prioritized with your manager.  For example, you may need to re-write a section to accommodate a requested new feature, or to make the code compatible with the latest version of some third-party software that it&#8217;s dependent on, or you may need to clean up an inefficient design for clarity if the code is particularly buggy and needs a lot of maintenance.</p>
<p>Of course, that brings us to the other possibility: retire and replace the free-fall code instead of trying to fix it.  Even if you&#8217;re planning to replace an application entirely, you should still document it carefully before retiring it, in order to avoid information loss.  Don&#8217;t imagine that you can skimp on the build instructions document (mentioned above) because &#8212; when the old code itself is its own spec &#8212; the development engineers may need to be able to experiment with the old code in order to determine exactly what it does.</p>
<p>Once you&#8217;ve done these things, you&#8217;re on your way to having a QA safety net to catch your free-fall code.  It&#8217;s an up-front investment in best practices that will pay off in terms of decreased risk and increased software development efficiency.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=127&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/08/26/reality-vs-best-practices-and-getting-from-one-to-the-other/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>
	</item>
		<item>
		<title>Carol Hamer, PhD, CTFL</title>
		<link>http://bittyjava.wordpress.com/2009/07/26/carol-hamer-phd-ctfl/</link>
		<comments>http://bittyjava.wordpress.com/2009/07/26/carol-hamer-phd-ctfl/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 00:24:16 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=121</guid>
		<description><![CDATA[I just received my official certificate in the mail from the American Software Testing Qualifications Board certifying that I&#8217;m now a Certified Tester, Foundation Level. The funny part is in the letter where it says that I&#8217;m now entitled to put the letters &#8220;CTFL&#8221; after my name on my business cards and letterhead. No offense [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=121&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just received my official certificate in the mail from the <a href="http://www.astqb.org/">American Software Testing Qualifications Board</a> certifying that I&#8217;m now a Certified Tester, Foundation Level. The funny part is in the letter where it says that I&#8217;m now entitled to put the letters &#8220;CTFL&#8221; after my name on my business cards and letterhead. No offense to the ASTQB (and ISTQB) folks, but the test is really easy, so I&#8217;m not sure how impressive it will look (especially following the old &#8220;Piled Higher and Deeper&#8221;).</p>
<p>That said, I felt the ISTQB course was fun and worthwhile. I was working for a QA consulting company in Switzerland, and instead of taking a formal course, the employees organized an informal study group. One colleague divided the syllabus into lessons, and then we met once per week to discuss that week&#8217;s assignment. Most of the concepts in the Foundation Level syllabus are the type of things that are simple (once you read them) but you might not have thought of spontaneously. So it&#8217;s interesting to get together among colleagues and discuss. For someone like me (who has primarily seen QA from the outside, while working in development), it&#8217;s useful to take the time to understand QA from the high level concepts to the practical techniques.</p>
<p>I didn&#8217;t take the test with the rest of my &#8220;class&#8221; because I left Switzerland before we were done. But since the ISTQB is an international board, it was simple to just take the test after arriving in the U.S.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=121&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/07/26/carol-hamer-phd-ctfl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>
	</item>
		<item>
		<title>A range of ideas and perspectives: iPhone Games Projects</title>
		<link>http://bittyjava.wordpress.com/2009/07/08/a-range-of-ideas-and-perspectives-iphone-games-projects/</link>
		<comments>http://bittyjava.wordpress.com/2009/07/08/a-range-of-ideas-and-perspectives-iphone-games-projects/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 16:48:19 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=114</guid>
		<description><![CDATA[Even though I&#8217;m still playing with MIDP for the moment, it&#8217;s fun (and instructive!) to look over the shoulder of some of the people developing games for other device platforms.  I&#8217;ve done a little bit of work on the Android platform, and naturally I&#8217;d like to know what&#8217;s up with the iPhone as well.
So I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=114&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://apress.com/book/view/1430219688"><img class="alignleft size-full wp-image-115" title="iphone_games_projects" src="http://bittyjava.files.wordpress.com/2009/07/iphone_games_projects.gif?w=125&#038;h=161" alt="iphone_games_projects" width="125" height="161" /></a>Even though I&#8217;m still playing with MIDP for the moment, it&#8217;s fun (and instructive!) to look over the shoulder of some of the people developing games for other device platforms.  I&#8217;ve done a little bit of work on the Android platform, and naturally I&#8217;d like to know what&#8217;s up with the iPhone as well.</p>
<p>So I picked up a copy of <a href="http://apress.com/book/view/1430219688">iPhone Games</a> Projects by PJ Cabrera (and others).  This book is unusual for a computer book in that they gathered up ten highly successful iPhone game developers to give their best secrets and advice, so it gives higher-level project strategy ideas instead of spelling out all of the technical nitty-gritty.</p>
<p>Overall, the book answers the following questions:</p>
<ul>
<li>What makes an iPhone game great?</li>
<li>How do you plan and execute a successful professional iPhone project?</li>
<li>How do you optimize for the iPhone?</li>
</ul>
<p>The authors all present different perspectives on the subject, which naturally invites the reader to contrast them and think about their ideas!<span id="more-114"></span></p>
<p>My favorite was Mike Lee&#8217;s chapter on code optimization.  In addition to giving specific information about iPhone optimization, he gave something of a meta-strategy of optimization based on the fact that optimization is relative &#8212; you can optimize for a number of different things (speed, code size, readability, cross-platform portability, etc.) and savings in one place often means a cost somewhere else.  That advice doesn&#8217;t just apply to iPhones &#8212; it&#8217;s a critical point to keep in mind for mobile development in general since resources are limited.  For example, in a business application in which speed of menu navigation is critical, I might load all of the images into memory during the opening splashscreen, but that same trick wouldn&#8217;t be an optimization in a game that&#8217;s tight on memory.  Here&#8217;s a taste of what Lee recommends:</p>
<blockquote><p>An application is only as fast as its slowest part, and even trivial applications contain a mindboggling web of parts. Shaving off picoseconds at random is like spitting in the ocean.  You’re much more likely to get in trouble than you are to hit a fish.</p>
<p>Rather than worry about the efficiency of every line of code, worry about your own efficiency.  Adding code complexity to an application without making it faster is a waste of time.  It’s much more efficient to write 100 percent of your code to be readable, logical, and terse, then go back and speed up the 3 percent that’s actually slow.</p></blockquote>
<p>Then he goes on to talk about ways to identify and fix the slow spots.  Many of the other authors explained how to optimize different aspects as well, which is useful information to have in mind (even if you&#8217;re optimizing for readability) because if you know which aspects can be tweaked in one direction or another, you can write those parts of the code to be as flexible as possible.</p>
<p><a href="http://cocoastuff.com/"><img class="alignright size-full wp-image-119" title="chess_engine" src="http://bittyjava.files.wordpress.com/2009/07/chess_engine.png?w=160&#038;h=229" alt="chess_engine" width="160" height="229" /></a>The advice about making a game fun was also enlightening.  I particularly liked Joachim Bondo&#8217;s advice on making an elegantly simple user interface (especially since this is something I&#8217;m trying to improve in my own work).  Several points left me going &#8220;That&#8217;s cool, I should do something like that&#8230;&#8221; such as the charming detail of putting a beautiful &#8220;chess engine&#8221; on the back of the chess board just to make the user smile.</p>
<p>Overall, I found the book entertaining as well as useful.  I just sat down and read it straight through, which I wouldn&#8217;t normally do with a computer book.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=114&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/07/08/a-range-of-ideas-and-perspectives-iphone-games-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>

		<media:content url="http://bittyjava.files.wordpress.com/2009/07/iphone_games_projects.gif" medium="image">
			<media:title type="html">iphone_games_projects</media:title>
		</media:content>

		<media:content url="http://bittyjava.files.wordpress.com/2009/07/chess_engine.png" medium="image">
			<media:title type="html">chess_engine</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello BlackBerry!</title>
		<link>http://bittyjava.wordpress.com/2009/07/01/hello-blackberry/</link>
		<comments>http://bittyjava.wordpress.com/2009/07/01/hello-blackberry/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 22:27:31 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[build process]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=92</guid>
		<description><![CDATA[It&#8217;s been my experience that all MIDP implementations are different, but some are more different than others.  BlackBerry Java smartphones are MIDP compliant, but they have a particularly unique flavor of MIDP.  They&#8217;re also becoming increasingly popular, so I decided it was time to get one and try it out.  Here&#8217;s my new (to me, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=92&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s been my experience that all MIDP implementations are different, but some are more different than others.  BlackBerry Java smartphones are MIDP compliant, but they have a particularly unique flavor of MIDP.  They&#8217;re also becoming increasingly popular, so I decided it was time to get one and try it out.  Here&#8217;s my new (to me, actually used) BlackBerry 8700g:</p>
<p><img class="alignnone size-full wp-image-93" title="BlackBerry_8700g" src="http://bittyjava.files.wordpress.com/2009/07/blackberry_8700g.jpg?w=400&#038;h=300" alt="BlackBerry_8700g" width="400" height="300" /></p>
<p>By selecting &#8220;options &gt; about&#8221; I got the convenient info screen above, which tells me that the version is 4.1 &#8212; one of the oldest BlackBerry handsets with Java.  (That&#8217;s OK, all the better to test backwards compatibility.)</p>
<p>The first (and IMHO most annoying, but critical) step is to set up the development environment and get a complete &#8220;Hello World!&#8221; from code on the PC built and running on the device.  Here&#8217;s my &#8220;road to Hello World&#8221; &#8212; the problems I encountered and their solutions &#8212; in hopes of saving the next person some time:<span id="more-92"></span></p>
<p>My first step was to load a few of my simplest sample MIDlets onto the device to see if they work.  The <a href="http://frogparrot.net/java/KeyCode.jar">Key Codes</a> MIDlet worked fine &#8212; providing interesting information about which keystrokes the MIDlet can receive and which keystrokes are handled by the operating system while the MIDlet is running.  The <a href="http://frogparrot.net/java/JSRTest.jar">JSR Test</a> MIDlet also worked and provided interesting information (once I figured out that the MIDlet commands are mapped to the trackwheel and that you press in the trackwheel itself to select).  Installation was a breeze &#8212; just click on the Jar file&#8217;s URL in the browser, and the BlackBerry takes care of it.  My simplest game &#8212; the <a href="http://frogparrot.net/java/Maze.jar">Maze game</a> &#8212; didn&#8217;t quite work, though, so I figured the next step was to download the BlackBerry-specific development utilities.</p>
<p>On the <a href="http://na.blackberry.com/eng/developers/javaappdev/devtools.jsp">BlackBerry Java Application Development Tools &amp; Downloads</a> page, there are two choices:  an Eclipse plugin, and a &#8220;legacy&#8221; standalone IDE.  (I found this page through the <a href="http://na.blackberry.com/eng/developers/javaappdev/">Java Application Developers</a> page &#8212; you may need to create an account and log in to see the development tools pages.)  I assume the word &#8220;legacy&#8221; here means that they don&#8217;t intend to keep supporting it and they mean for you to switch to the Eclipse plugin.  I tried them both, and I liked the standalone IDE better.</p>
<p>First, the Eclipse plugin.  The spot where I wasted the most time was in trying to install the plugin into Eclipse 3.5 &#8220;Galileo&#8221;.  If you read the <a href="http://na.blackberry.com/eng/deliverables/6352/BlackBerry_JDE_plug-in_for_Eclipse_getting_started.pdf">getting started guide</a>, it <em>specifically states</em> that the plugin works in Eclipse version 3.4.  I assumed that it would also work on version 3.5 since the <a href="http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp">BlackBerry JDE Plugin for Eclipse page</a> actually links to a download of Eclipse 3.5, and I just followed that link.  But, when trying to install the plugin, I got the following error message:</p>
<blockquote><p>To: net.rim.eide.componentpack4.7.0 [4.7.0.46]</p>
<p>Cannot complete the install because one or more required items could not be found.<br />
Software being installed: BlackBerry Component Pack 4.7.0 4.7.0.46 (net.rim.eide.feature.componentpack4.7.0.feature.group 4.7.0.46)<br />
Missing requirement: BlackBerry JDE Plug-in for Eclipse 1.0.0.67 (net.rim.eide 1.0.0.67) requires &#8216;bundle org.eclipse.core.resources [3.4.0,3.5.0)&#8217; but it could not be found<br />
Cannot satisfy dependency:<br />
From: BlackBerry JDE Component Package 4.7.0 4.7.0.46 (net.rim.eide.componentpack4.7.0 4.7.0.46)<br />
To: bundle net.rim.eide 0.0.0<br />
Cannot satisfy dependency:<br />
From: BlackBerry Component Pack 4.7.0 4.7.0.46 (net.rim.eide.feature.componentpack4.7.0.feature.group 4.7.0.46)</p></blockquote>
<p>It looks like the plugin required a particular set of Eclipse core resources that it couldn&#8217;t find, which is the sort of thing that smells like a version mismatch.   A little googling found me <a href="http://www.intalio.com/products/bpm/eclipse-ganymede-download/">a site where I could download the Eclipse 3.4 &#8220;Ganymede&#8221; version</a>, and the plugin installed in that Eclipse version just fine, according to the instructions in the links above.</p>
<p>the first drawback to the Eclipse plugin, however, is that it doesn&#8217;t appear to come with any sample code (or if it did, it&#8217;s well hidden).  For that reason alone, you might as well download <a href="http://na.blackberry.com/eng/developers/javaappdev/javadevenv.jsp">the BlackBerry JDE</a> since it comes with a big pack of sample apps.</p>
<p>Installing the BlackBerry JDE, building the sample apps, and running them in the simulator was pretty straight-forward.  There was one point, however, where I found the <a href="http://na.blackberry.com/eng/support/docs/subcategories/?userType=21&amp;category=BlackBerry+Java+Application+Development&amp;subCategory=BlackBerry+Java+Development+Environment">BlackBerry development environment &#8211; development guide</a> to be a bit lacking.  I felt like it should more clearly answer the following basic questions:</p>
<ol>
<li>Does the &#8220;project &gt; build&#8221; command build the file that can be installed directly onto my device?</li>
<li>If so, where is it???</li>
</ol>
<p>I poked around a bit, and found the built .cod files in the same folder with the source code, interestingly enough.  For the &#8220;Hello World&#8221; sample, that was &#8220;C:\Program Files\Research In Motion\BlackBerry JDE 4.1.0\samples\com\rim\samples\device\helloworld\com_rim_helloworld.cod&#8221;</p>
<p>Then the last step is to install it on the BlackBerry.  Fortunately, the BlackBerry JDE came with a simple little command-line utility called &#8220;JavaLoader.exe&#8221; to install applications from the PC onto the BlackBerry device.  So I connected the device via USB cable to my PC, allowed the PC to find an appropriate driver, and tried &#8220;JavaLoader -u dir&#8221; (to get the directory listing with the &#8220;-u&#8221; option indicating that I&#8217;m connecting via USB).  Unfortunately, I got this crazy message:</p>
<blockquote><p>Error: unable to open port</p></blockquote>
<p>Sadly, no hints as to <em>why</em> it couldn&#8217;t open the port, so the next stop was to search the <a href="http://supportforums.blackberry.com/rim/?category.id=BlackBerryDevelopment">BlackBerry developer forums</a>.  This is the place to go &#8212; a quick search turned up the problem immediately:  you need to be running the &#8220;BlackBerry Desktop Manager&#8221; in order for the JavaLoader to find the device.  My used BlackBerry came with a couple of cables but no software, so again I turned to my old pal Google.  I tried downloading two versions of the &#8220;BlackBerry Desktop Manager&#8221; for BlackBerry 4.1 <a href="https://www.blackberry.com/Downloads/browseSoftware.do">from the BlackBerry site</a>, and &#8212; this is the weirdest part of the whole adventure &#8212; I received some entirely different program instead.  Not sure why.  But <a href="http://download.cnet.com/BlackBerry-Desktop-Manager/3000-10440_4-10794759.html">cnet.com provided a link</a> to a version of the Desktop Manager &#8220;tested spyware free&#8221;, and that one worked.  Yay!  With that desktop manager running, JavaLoader was able to connect to the device and load com_rim_helloworld.cod onto it.</p>
<p>That should be the last step, right?</p>
<p>Sadly, no. The HelloWorld application appeared on my main BlackBerry menu, but when I launched it, it threw an Exception!  It failed to find its resource bundle!  So I opened up the source code to see what was the problem.  It turned out that it was importing packages from another sample application: &#8220;com_rim_demores.cod&#8221;.  This is just a philosophical point, but I think the &#8220;Hello World&#8221; demo should be <em>the simplest possible application</em> &#8212; leave the best practices about internationalization for step 2 &#8212; but that&#8217;s just me.  Anyway, with the resource demo application installed, the &#8220;Hello World&#8221; finally worked on my BlackBerry!</p>
<p>Now on to some actual development&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=92&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/07/01/hello-blackberry/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>

		<media:content url="http://bittyjava.files.wordpress.com/2009/07/blackberry_8700g.jpg" medium="image">
			<media:title type="html">BlackBerry_8700g</media:title>
		</media:content>
	</item>
		<item>
		<title>Do-it-yourself custom GUI for a range of MIDP devices</title>
		<link>http://bittyjava.wordpress.com/2009/02/12/do-it-yourself-custom-gui-for-a-range-of-midp-devices/</link>
		<comments>http://bittyjava.wordpress.com/2009/02/12/do-it-yourself-custom-gui-for-a-range-of-midp-devices/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 18:38:46 +0000</pubDate>
		<dc:creator>carolhamer</dc:creator>
				<category><![CDATA[ant]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://bittyjava.wordpress.com/?p=83</guid>
		<description><![CDATA[Suppose you&#8217;re writing a game or application, and you&#8217;d like it to have an attractive, professional-looking GUI (with your theme, brand, or skin), and you&#8217;d like it to run on as many Java ME MIDP devices as possible.  There&#8217;s some work to be done, but it&#8217;s not that hard.  I wrote about how to do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=83&subd=bittyjava&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Suppose you&#8217;re writing a game or application, and you&#8217;d like it to have an attractive, professional-looking GUI (with your theme, brand, or skin), and you&#8217;d like it to run on as many Java ME MIDP devices as possible.  There&#8217;s some work to be done, but it&#8217;s not <em>that</em> hard.  I wrote about how to do it in the last chapter of <a href="http://apress.com/book/bookDisplay.html?bID=10330">my book</a>, and it was the topic of <a href="http://jazoon.com/jazoon08/en/conference/presentationdetails.html?type=sid&amp;detail=2640">my Jazoon talk</a>.  Plus I wrote a library of utilities to simplify the task (the <a href="http://frogparrot.net/java/FPUIL.zip">Frog-Parrot UI Library</a>), but &#8212; looking over my blog the other day &#8212; it hit me that I never really posted a technical explanation of how to use this library.</p>
<p>Here&#8217;s the general idea:</p>
<p>If you want a mature product for MIDP customization &#8212; one that will teach you how MIDP customization works as you&#8217;re using it &#8212; <a href="http://www.j2mepolish.org/cms/">J2ME Polish</a> is a good place to start, as I explained <a href="http://bittyjava.wordpress.com/2007/02/06/lets-try-j2me-polish/">here</a>.  But in practice, I found that I wanted 100% control over the look-and-feel of the GUI, which I couldn&#8217;t get from J2ME Polish.</p>
<p>Essentially, handsets have a list of standard screen sizes, and many of them are so small that I need to have pixel-by-pixel control over where everything is placed.  Having the device place the widgets, etc., for you &#8212; guessing where you want them based on layout algorithms &#8212; isn&#8217;t nearly as useful on a small screen as it is on, say, a big browser window on a P.C.  So I wrote a library that would allow me to bundle the screen information into resource files, selecting the right image files for each screen size and passing along the data for how big widgets and images are and where they should be placed.</p>
<p>The annoying thing about making a custom GUI for MIDP is that you have to start from scratch, drawing your GUI onto a blank canvas.  That means re-inventing the wheel on some very standard functionality: widget navigation, navigating back and forth through a stack of screens, scrolling, and even cutting up a paragraph of text in the right places so it won&#8217;t disappear off the edge of the page.  That&#8217;s the functionality I&#8217;ve written for you in the FPUIL (which you can use however you like, as long as you don&#8217;t imagine it comes with a warranty. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>
<p>In this brand-new version (which I just re-worked today on a Windows machine, <a href="http://frogparrot.net/java/FPUIL.zip">download here</a>), I&#8217;ve included some build files to build the project with <a href="http://bittyjava.wordpress.com/2007/03/06/building-a-j2me-project-with-ant/">Ant and Antenna</a>. Look at the build.xml and build_all.xml files to see some examples and explanation of how to build a MIDlet for different target devices.</p>
<p>That should be enough to get started, and if I find some time, I&#8217;ll try to write more explanation&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bittyjava.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bittyjava.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bittyjava.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bittyjava.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bittyjava.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bittyjava.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bittyjava.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bittyjava.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bittyjava.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bittyjava.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bittyjava.wordpress.com&blog=356092&post=83&subd=bittyjava&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bittyjava.wordpress.com/2009/02/12/do-it-yourself-custom-gui-for-a-range-of-midp-devices/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2ece451c84de6d06538e5a335bb31f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carolhamer</media:title>
		</media:content>
	</item>
	</channel>
</rss>