Last weekend I was in Toronto to attend a Conference called gamercamp as well as check out some pretty awesome chiptune artists Starscream and Anamanguchi.

While on my way home, I happened to be on the Tram with some fellow patrons sitting a few seats away from me talking typical geek stuff. Gaming, development, HTML5, etc. Unfortunately someone decided to shoot down HTML5 because “anyone” can look at the code and take it.

Firstly, it shouldn’t matter because there is a good chance not a lot of people are ever going to see or play your games. And even if they do, who gives a shit if they look at it. Most people who would look at it are probably going to be developers curious how you did something and want to learn, which is awesome. We need to share our tricks and ideas in order for all of us to get better.

Now if you want to ensure that people cannot just walk away with your code leaving you crying because they “stole from you”, then apply the GPL to it. It’s pretty much a middle finger to any douchebag who would even consider stealing your stuff, and now you’ve laid down the rules they probably won’t because they don’t want to risk having your license spread into their own code.

Also, when you have gotten to the point where you have gotten big enough for people to steal you stuff it probably won’t matter anymore anyway. So share as much of your shit as possible, at least then you’ll have a better looking portfolio, and hey you may even become famous in the community or something.

 

It’s been a while since I last posted which really doesn’t count much since it was really just a link to another site.

Ever since the STO site change, I’ve been looking for something else to replace the project. I’ve kinda set my sights on the Rokon game engine for Android  the Rokon game engine for Android because I’ve found that there could be more documentation/demos to help get people started with it. I’m also hoping this will help become an opportunity for me to get more into game development in general. So look forward to crappy games being produced by me in the future!

I’m also working on a template upgrade on the site simply because the default one is kinda boring. It’s still a boxxy looking design (I’m horrible at design) but should be something a little bit nicer. It will should also have a mobile template coming out soon too so that it won’t look disastrous on an iOS or Android device.

That’s pretty much it, for recent things that are development related I guess.

 

So, the 26th of October has come and gone, and I’d just like to talk about my experience at AndroidTO. Before I start though, I’d just like to say I had a great time meeting with everyone and there is a very good chance I don’t remember your name. I’m not really a name person but if I see you again in public will probably recognize you, if not don’t be afraid to stop me and say hi.

The event itself was really well organized, and Puleen did a great job on keeping me on my toes (which I assume he did with the rest of the presenters as well). He’s a pretty persistent guy, but it always kept my presentation at the front of my mind.

The event ran very smoothly, besides a few technical hiccups such as the wireless; which honestly always happens at conferences. The choice of venue was really interesting; when I first heard that it was at the Polish Combattants Hall was thrown off a tad. This really wasn’t that big of a deal though, because it was right along a bunch of major TTC lines so getting there wasn’t a problem at all.

I was also really impressed with the androidTO app that was done by the great guys at http://mobicartel.com/. I was quite surprised at all the stuff they had done with making it a very polished Android application. From what I saw with Matt and Greg they are a great team, and I look forward to seeing what else they come up with in the future.

From what I’ve read around Twitter and from a few blogs, some of the presentations were a bit over peoples heads. They were pretty technical, especially the one by Manfred about the crazy stuff you can do with maven. Though, as a developer who’s been working with Android for several months now, I found the things he was talking about very intriguing. The tools he mentioned like Robotium and Roboguice look like amazing technologies that people should start looking into. If it were not for presentations such as Manfred’s I would’ve never heard about these tools, and that’s exactly what conferences like these are there for. Hopefully the things that were discussed will save everyone time from looking for these tools, especially when they don’t know what exactly to look for.

It was also nice to have seen Carmen going around taking photos of the event. I am not too sure if she was the official photographer, but it was awesome to see what she was doing. I brought my girlfriends point and shoot with me, but didn’t really want to disrupt some awesome conversations I was having with a lot of the people there. In case the organizers didn’t know, I’m also an amateur (read: wannabe) photographer and would totally be willing to go around an event in the future to take a bunch of shots at the next big Android thing going on. I also feel have some official photographers would help because then we would know in advance where to go to see all the pictures that were taken from the event.

The post event meetup was probably my favourite part of the event. This is always where everyone gets to actually learn more about people since there is actually time. There was of course even more great conversations that were going on, we got to talk about the technology even more as well as just getting to know each other more. I also found it great because I still find it difficult to tell how to know how someone is as a person, especially when most of the conversation I’ve gotten from them was on Twitter, where 2’s u’s and other various tragedies of the new millenium are required to actually say something.

I hope that everyone enjoyed my presentation, and I’ve encouraged you to begin using SQLite in your own Android projects as well. I was a bit nervous while I was up there, especially when my “Oh Shit” moment happened because I had forgotten to turn the wireless on my Macbook back on. Let me know what you liked, and how I could make the presentation better. I really love teaching people, and the only way I will know if what I’m teaching was good or not is if you let me know. Either send me an email, tweet or simply add a comment to this post. Also feel free to grab the code for use in your own projects. I warn you, the code does have it’s issues, and if you add some patches or clean some stuff up, feel free to send me the patch or or a pull request and I’ll be sure to bring it in.

I would like also like to thank my buddy Chris Millward for letting me crash at his place for my time down in Toronto for this conference. It was great to meet up with you again and talk about work, tech and everything else!

 

So the majority of the code for my presentation at AndroidTO is up and hosted on Github.

If you are looking for a tutorial on how to interact with SQLite on Android, check out my code. It’s fairly straightforward though almost completely undocumented. I’ll go through in the next few weeks while working on the presentation and add comments to the code both for JavaDocs as well as explaining the nuances of what I was thinking while writing the stuff.

This is probably my fourth or fifth time writing code to interact with databases on Android and I must say that it is a huge pain in the ass. Having to write much of the SQL by hand is error prone, tedious, and downright annoying. It would be nice if the Android SDK came with a built in persistence layer like how iOS comes with CoreData baked into it. It would allow you to focus on the problem at hand instead of wasting that time on the boilerplate copypasta.

I have looked into some ORMs for Android and so far it appears fairly sparse. There are Java libraries you can bring over, though I’m not entire sure how compatible or efficient they are. Hibernate is clearly out of the picture. I have found one project Active Android that seems to be kinda neat, which I am working on using for an app I’m working on. Unfortunately it’s commercially licensed, though it’s rather inexpensive.

If you are looking for an open source tool there is one project called sqlitegen that uses Java annotations and code generation to build to data access classes for you. I haven’t used it personally since I’d prefer to use a solution that doesn’t rely on Eclipse.

 

For some work I need to do, I’m displaying some remote images from a web server as icons. Initially this really slowed down my UI as I needed to pull the images down each time when I scrolled to a new icon*. To help deal with the issue where I was constantly pulling down icons, I have created an in memory cache which solves the problem as long as the application is running. Unfortunately this solution will only work, as long as the user is connected to the Internet.

This is where I’ve decided that I need to have a 3-tiered system that will deal with the caching for me. It is going to work in the following manner:

  1. Check the in memory cache, if the item is there use that.
  2. If the item is not in the cache, check on disk to see if we can get it from there.
  3. Finally, if we have not found the item from disk, try to grab it from the server add it to disk then return the item and add it to the in memory cache in case we need to use it again.

This will hopefully speed up the application, reduce the amount of data the application will use and will have uses in other applications as well. I’ve only started working on it, but should have it done in the next few days. Once I have it all tested out and I’ll probably push it up onto bitbucket as an open source project.

*Note — Yes, yes, I know that pulling down the images should be done in a separate thread, which I will do once I get everything else working properly.

 

I’ve decided to dust off the Runr code and have started working on it again. Let me say, that the current implementation is pretty bad and has some fairly nasty edge cases that sorely need to be taken care of.

One bug I didn’t notice was that when you set your running time to 10 minutes the application won’t actually ring when it hits the 10 minute mark. A tad annoying when you are out for a run and are really looking forward to that 1 minute walking break.

Because of these problems, I’ve decided to do a complete overhaul of the Runr state machine that manages when you should be walking and running. I’m also going to be adding in some new features that I’ve thought would be nice to have.

My first step in updating the state machine was to remove it from the timers themselves since this did make testing very complicated, error prone and susceptible to timing issues during debugging. So, now that it’s out of that code I can actually test the damn thing. This is being done using JUnit of course and the Android testing instrumentation.

The instrumentation is pretty nice; when it works. There are times (at least on my machine) where it works and others when I need to press Run several times. It’s hit or miss on what to do to actually get the testing suite to start on the first shot, but if you have suggestions on what I may be doing wrong that would be great. If I could simply run the tests through a terminal, that would be even more preferable though I’d rather get the next version of the application out.

I’m also going to be experimenting in the world of Ad-driven revenue to see how well it works. I wouldn’t be surprised if users complain about the advertising, but unless Google Checkout vendor accounts come to Canada this will have to do. I may look into some kind of in house licensing system in the future, but for the time being this will have to do.

 

Figured I would check out a presentation at The Code Factory about HTML5 and CSS3 today. Quite a few people came out to the event, which is pretty interesting. Nice to know that several people are interested in the subject and will be integrating several of these features into their future sites once the technology becomes more prevalent.

As was stated by @snookca the technology required for HTML5 and CSS3 to work is still in limbo. Several browsers still do not support everything, even browsers based on the same rendering engines. For example, most things render perfectly fine in Safari, but don’t work at all on Chrome. It will still take some time before we see parity across all platforms, but once it does developing web applications will be very fun.

Below are some sites that were mentioned in the presentation that show off some demos of HTML5/CSS3 technologies.

Sites of Interest

© 2011 Christopher Saunders Suffusion theme by Sayontan Sinha