This weekend I have something a little different for this series, and I think it is something that developers and non-developers alike will enjoy. The best I can explain it is as a self-reflection of developing for BlackBerry 10 and specifically centering my thoughts on one of my apps, Random Stories+.
First a little background, Random Stories+ (RS) is an ad lib style app/game where it asks you for various words by parts of speech (verb, noun, adjective, etc) and fills those words into a story to make a potentially silly sounding story. Version 1.x of RS was one of the first apps I ever wrote and I did the majority of the development prior to BlackBerry 10 launching. After launch it was never a particularly popular app so it kind of fell by the wayside and I moved on to other projects.
From a development standpoint this is a relatively easy scenario to code. Pretty much have the user start a story (2 length options, quickie with 5 blanks and epic with 10 blanks) and have a function randomly select one of the stories for which the user could then enter their words. After the user presses submit those words would be concatenated into the rest of the story. Hilarity ensues?
At this point, you may be wondering why I am telling this story. Well the short answer is simple, self-review and self-improvement. The long answer, however, I think is much more interesting and has screenshots!
I have seen many people write articles about if you look at your old code and you barely understand it means you have advanced as a developer. And in my case, with this code being over a year old, this couldn’t be more true. Let’s first take a look at the workflow of the 3 main releases of the app:
As I said before the idea of the app is a simple concept, so styling was the main focus of each update. From 1.0 to 1.2 I think I mostly learned to draw in Illustrator and to the naked eye from 1.2 to 2.0 it just looks like I took advantage of OS 10.2 custom font ability. But that’s not entirely true. For instance the second page where the user enters each word, to get arguably a nicer input screen took about 300 less lines of code. This is one of those instances where as a novice coder I did some really goofy stuff to get that format, and as a more experience developer I learned more efficient coding practices. Similarly with the story page, this page has roughly the same amount of code but the display of the story fits the theme of app so much better.
I am not trying to imply that less code to do the same thing automatically makes things better. An example to the contrary, the two buttons on the main page, “Quickies” and “Epics”, went from standard buttons to a custom object. Standard buttons require about 5 lines of code to define all the parameters but I wanted to apply my theme everywhere in my app rather than sticking with generic styling. As a result my custom buttons with effects are about 50 lines of code.
Next was to challenge myself as a developer. Since this app was originally coded by a very inexperienced developer there weren’t many features. Over the past year I have obviously learned a lot of different things that could be implemented into an app, but “bolting on” random features don’t do much to enhance the user experience. So with that in consideration, I added three main updates that I thought would add the most to the user experience, in no particular order: BBM integration, favorite your stories, and suggest a story form.
We all love BBM, right? Adding BBM integration is easy using OSBB’s simple BBM integration sample. Side note, you may know OSBB as the guy behind MockIt and the sub forum here on CrackBerry. As far as what it means to RS, now users could have their BBM status as their story and invite friends to download RS to share stories between each other.
Adding a favorite story was the hardest new feature I added. Again I need to give a shout out to a fellow developer, this time the guy who brought us a little app called SideSwype (that one that lets you install bar files directly from your phone). He helped me write this database system. To the end user it seems like easy/obvious workflow as seen below but the magic behind it is awesome.
The third feature is something you guys here may really get a kick out of, a form that lets you suggest a story to be included in a future update of RS. This page makes it easy to fill out a few fields and when you submit it pre fills out an email to me with your story. I think this a feature users could have a lot of fun with. Here’s a quick workflow of this process:
In conclusion, I don’t intend this editorial to be a promotion of Random Stories+ but rather a culmination of hundreds of hours of developing experience dumped in a week long update coding binge and this resulting explanation. Also I hope I have inspired any developers out there to take a look at some of their old code to improve it. And remember to challenge yourself. Finally, if you happen to be interested in Random Stories, check out the link below to download.
CrackBerry is in no way Affiliated with BlackBerry. We take pride in our unbiased content, however do occasionally receive free products from vendors that we review or discuss. For more info click here.