Sunday, March 2, 2014

Posting flickr photos

I have been trying to add more pictures to my blog. The problem is that I have so few good pictures of my own to share.

As usual, the internet has the solution. Using Flickr, I can find interesting, apt, and free pictures. For example, the image in this blog is from Flickr.

As a good netizen, I'd like to give proper credit to whoever has generously created and shared this image for anyone to use. For any image I post (if all has worked well), you should see a few things:
  • a clickable image that links back to the original.
  • a creative commons attribution.
  • a credit to the original artist linking to their flick account page.
As you might guess, getting this image with all the proper credits is a bit more difficult than just cutting and pasting, but it's not so hard either. Here are the steps I take.
  1. Do an advanced search on Flickr.
  2. Enter your search terms. 
  3. Scroll down to the bottom of the page, and make sure you turn on all these options (Only search within Create-Common-licensed content, Find content to use commercially). 
  4. Click Search.
  5. Click on one of your search result images. It should bring you to another page. Copy the web address.
  6. Go to http://www.imagecodr.org/get.php, and paste in the web address. 
  7. When you hit submit, you should get further validation that the image is free to use, and some html code that you can cut and paste into your blog. 

Saturday, March 1, 2014

Enough with the statistics

For the last couple of weeks, I have been rolling out a change where my Android app would connect to an App Engine Backend.

The reason for this change (as always) was for me to provide better functionality and for me to learn.

Unfortunately, an unintended consequence of this change is that I have become totally obsessed with tracking the statistics related to my app. (I'm hoping that if I write about it now, I can clear my head of these thoughts and move on.)

Before, I didn't really pay any attention to how many users installed my app. The numbers were always so small that there wasn't really that much to examine.

After connecting my Android app to this cloud application, I noticed that I was exceeding the free datastore limits everyday! In particular, I was trying to do more than 50,000 datastore write operations per day. This was surprising. I checked the number of people who installed my app, and it was an order of magnitude higher than when I last looked. It still is a pretty small number, but geez, I couldn't believe that I had a real life scalability issue!

I then went on a downward spiral of religiously checking stats related to my app. This can be very addicting. Also, the marginal benefit of looking at your stats every day as opposed to once a week or month was very small for me.

I eventually pulled my head out of the mud and started thinking about solutions for my resource limitations problem.

Technical fix. I've made a bunch of changes. I removed nice-to-have but not necessary attributes (like update time), removed indexes created by default that I didn't need, and modified indexes to optimize for minimal writes but slower query speeds.

Financial fix. I haven't made any changes yet. If the trend continues, I may need to start paying for some support above the free quota. Ideally, I hope that my small ad revenue could pay for this app, so that it was self sustaining.

In response to these statistics, I've spent a decent amount of time optimizing my code, way too much time day-dreaming, and not enough time working on something else. I want to move on now. Getting cool stats feels good, but it's not what motivates me to build applications.

Onto the next buggy feature!