RTFM - software engineering 101

Jan 2017 - code

I thought I had found a flaw in the great google machine - instead I learned that “libraries are innocent until proven guilty”.

I am currently working on an app for Kenyan users, with validation for local phone numbers. We use google’s libphonenumber library. While testing, I realized that my Kenyan number was considered invalid.

I check the source code and searched for “kenya”: “Prefix 25476 added for Airtel Kenya based on open-source bug report […] other prefixes from Wikipedia.” I take a look and Wikipedia does not contain a prefix for my number. Everything made sense - my number was recently issued. There’s no way google has the resources to keep up with all the technical changes in the world - and certainly not in Kenya where documentation is poor and growth is fast.

I regretfully hammer out a horrific switch case method to validate phone numbers instead of using the library - we did not have time to wait for a fix. But as I go to file a bug report, I read the guidelines: “Is the issue reproducible using the demo? […] Your issue may be resolved by upgrading to the latest version of the library.”

Oh.

I try my Kenyan number in the online demo. It’s valid. Searching the issues gives this. I rollback and update the library.

So even if you’re in a volatile domain - give the library the benefit of the doubt and first RTFM. I guess I could at least submit a change to Wikipedia.

An argument can also be made that in a domain this volatile, it could be wise to use a less strict form of validation in the first place, depending the importance of the features vs. handling illegal values.

Bonus: A telecommunication giant using facebook and twitter as technical communication channels

At least they’re responsive!

top