Dreamstime

Tuesday, 29 November 2016

Integrating Google's API Client Library Into The RavenPlus Source Code Repository

There is this problem with us programmers. We will not complain and will happily chug along when confronted with the toughest programming challenge ever. But when it comes to documenting our work, we will make excuses, drag our feet and create various alibi. I remember this joke that I've heard about programmers some 20 years ago:

"if it is so hard to write, it must be even harder to describe"

Yes, we programmers understand this perfectly. But still there should be no excuses for not documenting one's work; and this is something that I should bear in mind - always.

Unfortunately, I do get sloppy sometimes. Case in point:

I briefly mentioned that I might be integrating the "Google API Client Library for Python version 1.2" into RavenPlus some 11 months ago. Well in the end, I actually did.

Problem is now I can't remember why I made this decision. I can faintly recall problems I had between 'py2exe' and the newly installed libraries needed for Google OAuth2 authentication (most of them is installed, by default, in the '.egg' format).

Is this the main reason? I can't remember. If only I have written the reason down earlier - somewhere.

New Sub-Directory

Google's API Client Library Within the Raven+ Source Code Repository

Integrating the Google API Client Library for Python into RavenPlus is rather simple. All I did was to bung it under the blog publishing sub-system of RavenPlus at 'zoundry/blogpub'. Naming the new directory as 'blogger' seems appropriate and all Google Blogger's OAuth2 related modifications in RavenPlus (by me) are placed here and below its sub-directories; and this includes the picture uploading capabilities to Google's PicasaWeb ('zoundry/blogpub/blogger/gdataExtend' is where the modified gdata API resides).

The directories 'apiclient', 'oauth2client' and 'uritemplate', circled in RED in the picture above, are from the Google API Client Library itself. As mentioned previously, I only used a subset of this Client Library from Google.

Tuesday, 15 November 2016

Zebra Doves - From Hatchlings To Fledglings

A pair of Zebra Doves nested on one of my many bougainvillea plants last month October 2016. A well chosen site in my opinion with shelter from the sun and rain (courtesy of my front porch) and my dog out front keeping the stray cats at bay. The nest was well placed too at about 7 feet high off the ground. Like most bird nests it is made of twigs, with size measuring about 3" across - looks a bit undersized compared to the parent bird, in my opinion. The gaps between these twigs however made the nest look rather 'half-built'. But still, it did get the job done; it managed to raise 2 chicks.

Zebra Dove Hatchlings

Owing to its 'half-built' appearance, I didn't realised that the nest was ready until I saw a Dove sitting in it one day. Eggs had been laid a few days earlier without me knowing - I can't see because of the nest's height.

About 11 days later this is what I saw - a baby Zebra Dove:

A Once Day Old Zebra Dove Hatchling

I think another chick is partially visible, hidden by the twigs that made up the nest (under the beak of the parent Dove if you look closely).

Sunday, 30 October 2016

microSD And My Canon Powershot SX530 HS

SanDisk Ultra MicroSDHC UHS-I Package

The manual to my Canon Powershot SX530 HS only recommends SD, SDHC or SDXC memory cards. Because of this, I would have preferred either an 8GB or 16GB SDHC Class 10 memory card.

But I had a Superbuy.my RM30 e-voucher, and the only branded Class 10 memory cards that cost less than RM30 are from Kingston (Kingston microSDHC 8GB Class 10) and SanDisk (SanDisk Ultra microSDHC UHS-I 16GB Class 10). These are microSD and NOT SD sized memory cards. A rather limited choice there at Superbuy.my. I could have chosen one of those unknown but cheaper brands SD sized memory cards but I didn't want to risk it. Miser pays the most - I always remember this saying.

microSD+SD Adapter In Digital Camera

The question now is: will any of these microSD memory cards coupled with an SD adapter work in my Canon Powershot SX530 HS camera?

Thursday, 27 October 2016

Break Fluid Spilt Onto My Car Alternator

Perodua Kancil Engine Compartment

Shucks! I hope I didn't damaged anything. It wasn't may fault; I was just doing my regular monthly/bi-monthly car fluid level inspections. I couldn't see the break fluid level so I decided to take off its tank cover. To my horror, some break fluid spilt out when the cover was removed. It spilt again, because of that piece of plastic float in the tank, when I screwed the cap back on. Non got onto the paint work luckily, since I've read that break fluid is an excellent paint stripper. But I have some break fluid spilt onto the exposed wires of the alternator coil and the belt that drives the alternator.

Tuesday, 18 October 2016

Brown Shrike Whiskers

Brown Shrike Upclose Showing Rictal Bristles

Bird Whiskers

I didn't know this before; I just found out recently - some birds have 'whiskers'. I only came to know about this about a week ago while looking at some photographs of Brown Shrikes that I have taken with my new superzoom digital camera. These 'whiskers' are not visible from afar, viewed unaided with the naked eye; and neither was it visible with pictures taken with my 5x zoom low-end digital camera (what I have been using previously).

And so far, I have found out that Lineated Barbet, a rather common bird in my neighbourhood, have 'whiskers' too.

Rictal bristles, I think that's what ornithologists call them.

Wednesday, 28 September 2016

An Avian Visitor - A Male Pied Triller

Pied Triller (click to enlarge)

A male Pied Triller paid me a visit some 11 days ago. To a greenhorn birder like me, I was naturally excited as this is a once in a blue moon affair.

Wednesday, 21 September 2016

Canon Powershot SX530 HS - My New Birding Camera

It was suppose to take 3 days but it finally arrived, some 9 days later. What happened Superbuy.my? You had me worried there for a couple of days. Better late than never I suppose.

Yes, I have finally bought myself a new superzoom bridge camera - a Canon Powershot SX530 HS (SX530HS) with 50x optical zoom. Warranty periods is for 1 year from Canon Malaysia - got my email confirmation last week to prove it. I will be using this camera largely for birding and wildlife photography. Long overdue I think.

My Opinion

Having used this camera over the last couple of days, I must say that I am very pleased with my decision. Compared with my previous low-end camera, focusing and the image quality is definitely much better. I am surprised to find such fine details of a pigeon (and other birds too in fact; picture quality is subject to my shaky hands) captured with this camera. Just look at the picture below to see what I mean (do click to enlarge). Except for some cropping, there were no other editing done to this picture. It blew me away the first time I saw it. This camera is making birding and photography fun again! Previously, the only way for me to get such fine details was to hold my subject at arms length. I know because I photographed my rooster that way once. And no I was not tormenting it; I was just trying to photograph its injured eye.

Rock Pigeon Up Close (do click to enlarge)

Selection Process

The SX530HS is not my first choice actually. To be honest, it was not even my second.

Monday, 12 September 2016

Turmeric Flowers - Take Two

I always get excited when any of my turmeric plants produces flowers. I like them as I think they are dazzlingly beautiful.

I had two separate blooms last year from two separate plants in two separate pots - one in May and the other in December. Here are some pictures of my turmeric flowers taken during those two months. Armed with a better camera, and hopefully with some improvement in my photography skills, these pictures are definitely much better compared to the ones I took 2 years ago.

Close-up

But first, a close-up view on the crest of a turmeric flower that I took in May 2015. I just love those tinge of pink at the very top. Each flower is different though; sometimes there is no pink tinge.

I didn't take note but I believe this is from a 4 or 5 day old bloom.

The Crest Of A Turmeric Flower



An Almost Detailed Account

Here are some pictures that was taken on December 2015. Not shown are wilted flowers (who wants to look at them anyway?) - a process that will begin some 7 days later after blooming.

Monday, 5 September 2016

Customized gdata For PicasaWeb Uploads

Without going into details, I briefly mentioned that I added a few new functions into the class GDataService and PhotoService in order to get the interfacing between 'Google GData Photo API' and RavenPlus working with Google OAuth2 authentication.

Here are the technical details, plus the Python code.

As this is a rather long post, I have broken it down into two parts. In this post, I will only discuss the changes that I have made to the gdata library. In a future blog post, I will show how I used this customised gdata library for uploading pictures to Google's PicasaWeb from RavenPlus.

Some Background Information

Since Python is an object-oriented programming language, the most obvious way to customised gdata is via 'inheritance'. I tried and failed because of some local private variables being referenced in the base class from my derived class. Like I have said before, I am no expert in Python. In desperation, I used what seems to be the easiest way out: I made local copies of what's needed from gdata and customised them to fit my requirements. The important thing here is it works.

Customized gdata Within RavenPlus Source Tree

Saturday, 27 August 2016

Easy Come, Easy Go

I have been on a lookout for a super-zoom digital camera over the last couple of months now. Choices are rather limited in the local Malaysian online market. Nevertheless, I have narrowed my choice down to either a Nikon Coolpix or a Canon Powershot within the RM 900 to RM 1,300 range with at least 40x zoom. To be honest, I kept delaying my purchase, hoping for a big bargain to come my way one fine sunny day.

Santa Came Early

Lazada Malaysia Merdeka Discount e-voucer 2016

I was overjoyed when I saw the above in my Facebook news-feed on the evening of 24th August from Lazada Malaysia. The validity for this discount e-voucher is between the 25th and 28th August 2016 - no problem there - and I have to make the purchase via the Lazada mobile app running on a smartphone - no problem there either.

The best price that I could find for a Canon Powershot SX 540 HS was RM 1,360 on Lazada Malaysia. With a RM 200 discount, I only pay RM 1,160 - an almost 15% discount there, don't think I can find this bargain anywhere else online or offline.

Checkout Problems

Unfortunately I had problems; problems during my online payment via Maybank2U online banking during checkout - the login prompt did not appear, I got an error message instead.

And the worse part when I tried again: the Lazada's online system said that I have 'redeemed' my RM 200 discount e-voucher. Huh??! I can't even login to my Maybank2U account, damn it.