Monday, March 18, 2013

2013-03-18

Over the weekend, I've taken a little time to put up an application on Google App Engine (sorry, it's not public). Working with App Engine has been a very interesting experience so far. It's definitely not been business as usual, and I've a couple of bumps to prove it.

Here are some of the things I've experienced:
  • Trying to use the deferred library (a way to use push task queues without setting up URL handlers for them) without adding deferred: on in the builtins section of your app.yaml is a source of pain. Your tasks won't execute, and you'll keep wondering why.
  • If you have multiple versions of your app, you need to specify which one gets served as the default. I updated my app from version 1 to version 2, and was surprised that version 1 was still being served.
  • Sometimes, being able to download your application source is a boon.
  • Don't try to run searches on documents which don't have fields you're specifying. In my case, I changed generation of the documents for full text search to add one field, then updated the app. I began getting cryptic errors and was chasing red herrings until I logged in to the console and found the already indexed documents were missing the fields I was searching on.
  • It was a novel experience not being able to run an aggregation query like SELECT COUNT, because App Engine doesn't support such queries. If you want to count it, build your own counters for it.
  • Instead of using per-user namespaces for memcache, it might be a good idea to affix keys with the user ID of the currently logged-in user (for example, for storing query cursors when paging through results).
I'm sure there were other things, but it's almost 5am and I've been up for a couple of hours. Sleepy time.

Tuesday, March 05, 2013

2013-03-05

in my current project, I'm using RapidSMS, and since it's based on Django, it comes with all of Django's testing capabilities, and adds a few. The TestScript class, in particular, is really nice. I've worked with .NET, Java, C, C++, JavaScript and even kicked around Objective-C a little, but this project is the first time I'm really doing serious unit testing (well, there was that one time I did behaviour-based testing for some JavaScript code for another project), and it's showing its value, even though:
  • It's boring. Seriously. I do not look forward to writing tests, but I'm doing it wrong, since I'm writing the tests after I've written the code. Maybe it's because of the way assertInteraction() works in RapidSMS that I think it makes sense to write the tests after.
  • It's eating time. Still, I'm beginning to feel the bite of victory when I see all those dots line up in a row after I do: manage.py test.
Last night, I did a little doodle in Sculptris while watching the Digital Tutors tutorial on Sculptris. It won't win any awards, but I'm beginning to see the attraction in digital sculpting. Since both Hexagon and Blender support sculpting, I think I can easily get my hands full. Speaking of 3D software, I can't remember what got me excited about the upcoming Wings3D 1.5 (no beta/RC for OS X yet — boo!), but I know good things are in store.

Oh, yeah. Take a look at power blade spam in Hexage's Radiant Defense:


Was wondering why GTBank has a lovely mobile site, but to use online banking, you still get to the desktop version of the site:


Plus, the site is Javascript-driven, which negates the use of what is arguably Nigeria's most popular mobile browser — Opera Mini. Take that keypad for entering your internet banking PIN, for instance. Good luck getting that to run with Opera Mini.
I'm not an Interswitch fan, but the company does some things right. QuickTeller now has a lovely mobile site (I haven't tested with Opera Mini, though), and have got over their paranoia by allowing you enter card PINs with an apparently regular text field on mobile.





I don't know how other people cope with using MTP devices, but I think the protocol sucks. For instance, the screenshots folder on my phone shows files with zero bytes. And when I tried copying the folder using Android File Transfer to my computer for this post, all the files had a size of zero bytes. And I cannot count how many times I've changed the filesystem on the phone, but AFT or Windows still shows the unmodified filesystem when browsing the device.


This is why I'm sincerely grateful for AirDroid. Here's the same folder as above in AirDroid:


Nonzero file sizes. AirDroid is a lovely piece of engineering. Well, that's all, folks!