Sunday, December 30, 2012

2012 summary

The end of the year is the usual time for looking back and making a new years' resolutions, so I'm going to gloat a little bit and do some wishful thinking about the next year. Without further ado, let me list what I've managed to accomplish:

  1. I have published three apps on two mobile platforms.
  2. I changed my safe corporate job for a position in the startup.
  3. I gave a talk at the conference.
  4. There were over 4k unique visits of my blog and got a couple of +1s.

And what are my plans for the next year? I like to keep things simple, so let's just double the values from the list above, except maybe for the second point - I hope I won't have to change the job, I'm very happy with my current employer.

Anyways, thanks for reading my blog and stay tuned for more content next year!

Friday, December 28, 2012

UnknownHostException gotcha

Several days ago I was preparing a simple app for the programming contest organized by Future Simple during KrakDroid conference. It consisted of a public ContentProvider, SyncAdapter and an Activity. The contest participants had to write an app which retrieves the input data from ContentProvider, solve a very simple algorithmic problem and save the output back in the ContentProvider. This would trigger the sync and the SyncAdapter would upload the data to our backend. The Activity showed the contest rules and the list of submissions.

As you can see it's nothing fancy and I hacked everything together rather quickly, but when I tried to send the first submission I got the UnknownHostException from AbstractHttpClient.execute. Had I googled the issue first, I'd solve this issue in one minute. The problem is, my internet connection was flaky and the backend I tried to connect to was set up couple hours earlier, so the UnknownHostException seemed like a quite probable error.

If you haven't click the Google link above, here's the solution: this exception is a way in which Android tells you that your app is missing the INTERNET permission.

Tuesday, December 18, 2012

KrakDroid aftermath

I finally got some sleep after a really busy weekend. For the first time I had an opportunity to give a talk at the programming related conference. I was also responsible for a programming contest organized by the company I work at, I tried to push the new release of our product and, on top of that, I had to do some Christmas related stuff, so I didn't get much sleep.

Let's get back to the programming. I gave the talk about standard synchronization pattern on Android (SyncAdapter + Authenticator + ContentProvider) during this year's edition of KrakDroid conference. Here are the slides:

The link to recorded video can be found in the slideshare content description. I won't bother posting it here, because a) I gave the talk in Polish, and I try to keep the content of this blog in English b) I was really tired, at one point of the talk I had to stop and ask myself "What the hell am I trying to say".

Although my talk was average and there are many things I might have done better, I'm very happy I had an opportunity to give this talk. Public speaking is definitely outside of my comfort zone and I learned a lot. Here's the "conference speaker checklist" for my future self:
  1. Get some sleep
  2. Do the test run of the talk in front of the mirror

    I finished the slides for my presentation half an hour before giving it, so I didn't have a chance to rehearse it. There were few points during my talk when adding a slide with a summary would make things much clearer. Which brings me to the next point:
  3. Recap

    I'm not sure how much the listeners who didn't knew anything about sync will remember from my talk. The recaps could help them remember at least some keywords they would be able to google later.
  4. Do the test run of the talk in front of other people

    But not any other people - you want your audience to be critical and at least a bit familiar with the topic. You want someone who will tell you that this part of the talk is boring or that part is not clear.
  5. Get more sleep
And finally, do not freak out - the hardest part is saying "Hello, my name is...", the rest will pour out of you.