Quick Calc on Mac

  1. Click on Apps icon - Select calculator Or open spotlight, type calculator and select the first option to launch calculator. Type in your numbers and operators to get the result, seems to be the most used one. 
  2. You can also use Dashboard (by pressing F4) and calculator should be there by default.
  3. BUt the easiest of them if your data isn't very complex is just open spotlight (cmd-space) and type in your data there... For e.g., 3^4*2 and the first result is your answer. :)

Android/Java Static Code Analysis Tools

Java/Android compilers in itself are very good and give very good warnings to inform about various issues/things done wrong.

Just thought about trying free Static Code Analysis Tools and found the below:

  1. FindBugs
  2. PMD
All have eclipse plugin urls, so you can add the URLs at the software site link and easily add the plugins.

Damn good tool. Install the plugin and then right click on a java/android project. You will find FindBugs Menu. Just click on FindBugs and it gives a very good overview of the review bugs in it's own perspective.

Each of the bugs is categorized by the pattern (you can change the categorization in the toolbar) and it lists all the occurrence of that type in all files in the project under that. 
Clicking on it, it gives a very very good description about what the error is and why that is considered to be an error. It indicates if its just a suggestion or performance issue or style issue.  Some of these were quite new for me and the explanation made me feel good to have learn something.
It has mechanisms for marking/filtering out the warnings/bugs we know doesn't make sense in our case -  either file by file or by the pattern type.
It gives a handy way to save the results in XML format too.

All in all, a professional tool/plugin which does it job well.  

I wasn't very impressed with this tool. Similar features of finding issues as FindBugs but gives issues in file by file manner. One useful feature is "Find Duplicate Code" which might be useful in some cases but not when you have various design levels for same data objects and it says code is repeating in the classes.

Others found on forums and google search but haven't tried yet:

Mainly enforces coding standards though the documentation says they have started adding more checks than for UI layouts only.

CodePro Analytix
From Google Web Toolkit. Has lots of good features like dependency analysis, source code repetition, metrics, code coverage etc. Need to try this.


Julin Online Analyzer
Upload online and select category like checks, nullness, termination etc.

More details at http://pag.cc.gatech.edu/chord/

Do you use any of the tools above or any other tool which you have been impressed with? Do share it in comments.

Kaiwara and Avani Trip

Date: 21st November
Places Covered: Kaiwara, Kailasagiri, Kurudumale, Mulbagal and Avani.
Vehicle: My Ritz
Distance Covered: 280 Kms
Start from Home @ 8 AM
Back Home @ 10 PM

We went to Kaiwara to see the Amaranarayanaswamy temple there. 
A passer-by suggested us to visit Kailasagiri when we asked for directions to cave temples of Kaiwara. Didn't know it was man-made caves but it was first time I saw chaturlinga (4 faced Lingas like Brahma). Nice place to visit and temple free lunch was amazing. Details about this place: http://www.deccanherald.com/content/6954/snippets.html

We came back to see Kaiwara caves with the lakshminarasimha temple in the caves and then saw the "Kaiwara" Thatha's Ashram + temple.

We then headed to Kudurumale Ganesha temple near mulbagal. There is a large stone idol of Ganesha.

After that we went to Anjenaya temple in Mulbagal town. It was supposed to be very famous but didn't find much crowd and the pujari there wasn't interested in doing a pooja too :(.

It was already getting dark but wanted to cover Avani too and lucky we did cover that place.
Had an awesome experience in Avani. On account of Last Karthika somawara, Ramalingeshwara temple was being decorated with mud deepams all over the temple. It looked like half the village was inside the temple with kids joining in pouring oil and lighting the lamps. 
More details are in the link:
Had temple prasada as dinner and headed home.

Mac - dvd drive not visible in Finder

In MAC, the dvd drive gets listed in finder only if a dvd is present. Else it's hidden.
In some rare cases, even after you inserted a drive, the disk might not be visible in finder and since there is no eject hardware button near the DVD, there doesn't seem to be a way for removing the disk.

Browsing around, found the following ways (from multiple sources) to eject the disk and re-insert it:

  1. Force restart finder.
  2. Open disk utilities (Applications/Utilities/DiskUtility) and the drive should be available there. Right click on it and select eject.
  3. Command line always rocks. Run the following in a terminal: drutil tray eject

Open Terminal window here - Mac OS X

It isn't as easy as updating registry key in windows (or atleast I don't know). Found this link to be good source for app to do that.

Chose the one with customized terminal window icon.
If the folder Finder doesn't exist in your 'Application Support' directory, then do create it.

If you have any other easy ways of doing this, let me know.

3rd Marriage Anniversary. Trip to Mysore

Last weekend Trip.. Turned out to be quite an adventurous trip especially from Talakad to Mysore.

Left Bangalore at 1 PM and reached Shivanasamudra via Kanakapura road at about 3 PM. Visted Talakkad on the same day and stayed at Hotel DasPrakash in Mysore. Next day visited Mysore Zoo and Chamundi Hills. Returned home just after 10 PM.

Trip to Shimoga

Day 1.
Covered the following places and temples: 
1. Dasarighat - Chowdeshwari Temple. 
2. Tiptur - Mallikarjuna Temple and Kempamma Temple
3. Shimoga - Kotte Anjaneya Temple and Kote Marikamba Temple

Day 2:
1. Ikkeri - Old Shiva Temple
2. Sigandur - Chowdeshwari Temple
3. Jog Falls - Majestic Water falls

Day 3:
1. Shakrebyle Elephant Camp - Similar to the more famous Dubare in Kodagu district.
2. Gajanur Dam - Nice view points but no photography allowed.
3. Tyavarekoppa Lion and Tiger Safari with zoo.



http://www.karnatakaholidays.com/shivamogga.php http://www.travelingbeats.com/blog/shimoga-district-travel-info-karnataka http://soundsofsilence-shalini.blogspot.com/2009/08/on-jumbo-trail.html
http://en.wikipedia.org/wiki/Tiptur http://www.tipturinfo.com/index.php?option=com_content&view=article&id=133:historical-places-near-tiptur&catid=12:historical-places&Itemid=3

Chitradurga Visit

Around Chitradurga:
First day of trip to Chitradurga. Covered the remote places in the district -
1. Vanivilas sagara
2. Halu rameshwara
3. Holakere

In Chitradurga:
Second (& last) day of the trip - 14th Aug 2011. Visited
1. Chitradurga Fort
2. Chandravalli Caves
3. Children's Park near some Mutt

Weave - a new iPhone app from Intuit

Intuit has just released a product called weave for ios platforms called Weave (Nothing to do with Firefox sync app - weave).


Weave will ensure that you never forget a todo. Quickly enter todos wherever you are and get alerts when you have an upcoming todo.

Good things I found:
1. Nice UI
2. Has a good first use experience. Kind of demo mode with the help links showing how to proceed to the next step. Hovers over the screen and helps in clicking around.
3. Does many things :). Has money in - money out too.
4. No Android app - opportunity for us to create a better one? :)

1. requires a login before start
2. red theme - different from Intuit blue.
3. Projects - might not be so common word for general users and doesn't gel with the Todo's being created.
4. Does too many things :). Differs from Apple mantra - Do one thing and do it well. Money in - money out could have been a separate product.
5. No Android app

Aadhaar Developer Track - My notes


Aadhaar Developer Track
Chandra Mohan’s Notes

Next Generation Service Delivery
Enabled by Aadhaar.

By Nasscom (National Association of Software and Services Companies)

-> Credentials
-> Biometric

Finance Inclusion platform - A+

Software (Client) –
Backend -
L1, Accenture and

Logistics :
India Post prints and delivers it.

Registrars :
State Govts, Banks and LIC etc
Enrolling Agents:
Testing and certification of these enrolling agents -> Sify
For Operator

Device testing and certification:
STQC - Standardization Testing and Quality Certification http://www.stqc.nic.in/

Portals driven by dynamic content.
Can be drilled down State Wise and then District wise, sub district wise and so on

Partner portal:
Login to view their own view.
Developer Portal:

Precision Infomatic (M) Pvt. Ltd.
Biometric Devices
Plug & Play UI enrollment kit
Metal box
Number lock
Finger Print (FINGERPRINT) Scanner -> 4 Left, 4 Right, 2 Thumbs
IRIS Scanner -> Both eyes, first left and then right

MindTree developed client/website.

Photograph – Logitech Webcam
IRIS Scanner
Operator FINGERPRINT before submission.

4 tries for FINGERPRINT and IRIS and then takes the best one of the 4 if none are acceptable. Avoid 10 or 15 scans per person.

Printer, scanner, UPS (atleast 30 mins) are other mandatory requirements.

On submission, we get a PDF with the temporary ID. Actual UID gets sent by post to the user.

Other devices:
RF based Finger scan - > Inner skin scan. 1 yr the labor hands fingerprint gets diluted. RF based can eliminate this problem.

Criminal detection system -> FBI
FS + IRIS -> check on internal memory and db, If not found, search using GPRS connection to other DBs configured.
Bluetooth based FINGERPRINT scanning results sending.

APIs, Standards and Biometrics

No vendor lock-in
open standards as much as possible
open source technologies
performance metrics
strong end to end security

Data Standards
- Common - FINGERPRINT, Iris, voice,
- Others like behavioral patterns - > Gait, signature

Principle of biometric:
1. Immutability
2. Uniqueness

Iris: unique pattern -> 1024 digit number

Minutiae extracted from each fingerprint.
10 Fingerprints and 2 irises.

3 diff biometric service providers
⇒ First Multi-ABIS system in world
⇒ Continuously monitor accuracy
⇒ Competition among vendors to improve accuracy and throughput.

Aadhaar Biometric Capture Device API:
If devices comply with specifics it should work with any backend software.
Benefits of Approach:
Price has come down to 1/3rd because of these standards.
Under 1 Lakh now for complete kit.

Aadhaar Auth Device Spec
Aadhaar Auth API

No Vendor Lock In:
Multilanguage support.
Lots of eGovernment sites are in local language.
Resident/People can read/understand/make sense of the local language.
Data entry in local language is challenge. Hence transliteration used.

Aadhaar Authentication:
Enrollment client automatically detects the biometric devices. Not just the drivers.
Front end client software
2 options thought:
- one client which used by all enrollment agents.
- each agent can develop their own client but sends the data to the server in the proper standard.
First option was selected –
- for quality – for e.g. finger print not proper is decided consistently.
- for analytics
- User cross verification consistent feel

UID – why 12 digit?
Central system. Portable Identification number - works across the country. Looking at the number some information about person can be found.

SSN can be predicted by good algorithms knowing person’s place of birth and DOB. Studied US, China, Denmark etc.
Hence no Number scheme

11 digits for the random number. Last digit is Checksum. Can be locally checked if the 12-digit number provided is a possible Aadhaar number.

Checksum used is Verhoeff algorithm. Available in Aadhaar site. Public algorithm.

Aadhaar is a number thru which u can contact service provider for authentication.
combination of number + demographic + biometric verification.

Name, gender, DOB, Address are part of the demographic data.
Couple of optional fields – Mobile number, email
PIN and OTP (One-time PIN): Not sure what these are for or how they are used.

Based on application needs – you can send the fields for verification.
Just the name and UID can be sent to get a yes or no.
for more secure verification, one or more fingers can be sent.. etc…
Authentication doesn’t specify which finger was sent. UID matches the finger against all 10 fingers.
2 fingers sent, 1st finger matched against 10 fingers, the other finger then matches against 9 other fingers and returns yes or no.
IT’S a SINGLE call though.

1 : billions on the db.
NOT available.
Enrollment – matches against billion of records though. That’s why you get the number after a month.

Response is always YES or NO.
Strategy – No date coming out of the system.

Device sensor and ergonomics of the device, how miniature is captured from that data etc. affect the YES or NO output. Hence ISO standards specified for the devices.

Authentication Flow:
Biometric scan, data is packaged in XML format with data encoded/encrypted.
Transaction flow allows the data to be “HOP”ed.
CIDR – UID Data centers
UIDAI will be the regulatory authority managing a Central ID Repository (CIDR)

Sample App:
Java, C

Partial matches, Partial matches with tolerance, case sensitiveness can be controlled. Fuzzy match.

Reference code for each authentication check is kept for auditing purposes.

Other countries – addresses are matched or setup?
Near or Landmarks are important in India. This information is structured properly in UID.
1. Address not matching exactly. Spellings, abbreviations, etc. Can be with name too.
a. Fuzzy Comparison is now available.
2. How do you make sure the agents do not store the information and misuse it later?
a. Yes or No only.

Complete specification in available in the CD.
XML Structure
Authentication XML (ver 1.5)
Fingerprint can be embedded as minutia ISO format.
Encrypt as per the UID Standard. (By device for biometric)
Authentication API Design
1. Stateless API
a. Xml over HTTP(S) – stateless.
2. Modalities
a. Different data can be sent and can request for partial match/fuzzy/full etc.
3. Transaction security and Audit
4. Accommodates business model.

Data is decrypt-able only by CIDR (UID Data Center Server).
AUA can see the packet headers – if biometric is present or not.

Enrollment – batch process.
Authentication – easy to do each transaction. Complexity is in building the transactions around it.

Response Security
Auditable – did it come from UID? Man in the middle attack.
Response is digitally signed.
Necessary information for AUA to verify that its come from the UID.

Biometric devices need not be calibrated.
Session key + Token – Information has to be entered again if the token expires.

public key specifications –
License key required for AUA. Developers don’t require unique key for registering.

Matching score is generated internally. If it’s above a threshold value, then the answer is generated. ???

For children of less than 5 yrs., parents info is mandatory as part of enrollment. For others it’s not mandatory. For e.g., wife of, daughter of, son of etc. can be added.

Brute force of checking the phone number – there is system in place to check abuse. But there is no limit on number of checks that can be made from an AUA.

No record is deleted ever. Updated for death possible.

Horizontal scaling
As gallery size increases, servers can be added to scale.

No authorization. Assurance level atleast? NO

Form Factor evolution
LCD, eReader screen
Intel Compute Continuum Vision
Intel App-Up center/developer program

Mobile -> Key role in Aadhaar ecosystem.
1. Service transparency and record tracking
2. Proof of service entitlement
3. Authentication for consumer services.
a. Journalism, Healthcare,

Transaction models.

Finance Inclusion Platform

NREGA – Employment
1/3 women
Atleast 100 days employment
Reduce immigration from rural places to cities.

Apps that can be built on Aadhaar:
Financial inclusion
Rural area reach
Micro finances
Micro insurance
Access to online – offline facilities.
Vocational employment portals
Referral mechanism
Loyalty program for small businesses
Informal credit – kirana shops
Travel time for rural. Loose daily wage.
Information about patient can be shared to doctors they choose. Control to the consumer.
Background check - employment
Cost of awareness of UID

Identification System
Accident – with the biometric information, would be able to get the information about the person.

Ideas -
Background Check

"Check your UID Status" Link

Giving my details keeps returning 'NOT FOUND' though :(

Applied for UID

Applied for my UID along with Colleagues - Prashant and Saneesh.

Good: The enrollers were very professional and courteous. For a one letter spelling mistake, they re-did the enrollment completely again. Know other govt agencies where even with 100s of mistakes, they say it's fine and don't bother changing anything.

Not so good Experience: The entry part of demographics was time consuming. Retyping so much data in Kannada again was not expected (mainly for word changes like 2nd Cross to 2ne adda rasthe.. etc). The client/webapp kept showing error on demographics screen though all data was filled. The advice from a senior person there : Keep pressing "Finish" and it will take it. :)

Tumkur Temples Visit


Places visited:
Devarayana Durga
Namada Chilume
Vishwa Shanthi Ashrama

Vehicle: Ritz
Distance Covered: 260 KMs
Started at: 9:45 AM
Returned at: 9:30 PM (After Dinner at Athithi Grand on Kanakapura Road)

Copy logcat output

If you want to copy the message from logcat and not the other fields like Time, pid, Tag etc, then you can use the command line option. (Eclipse doesn't allow copy of the messages column alone).

./adb -s logcat -v raw
raw removes all the information except the messages and prints it out.

Masinagudi Trip

Date: May 30 and 31st
Location: Masinagudi, Mudumalai and Bandipur Trip
People: Pallavi, Divi, Mom, Sireesha, Lathakka, Jeeju, Aditi, Bhoomika and Papa.
Transport: My Ritz and Jeeju's Wagon R
Stay: The Tamarind Tree Resort.

Pooja at Dodballapur Anjaneya temple


Innovation Educators Conference - CLIC, ISB, April 29-30, 2011


Attended Innovation educators conference at ISB, Hyderabad onApril 29th and 30th.
Stayed at Hotel Ista near Gachibowli.

Unknown error on eclipse android console

Not sure what the below means:
local emulator[343] : kCGErrorIllegalArgument: CGSGetDisplayBounds (display 2b3c4d11)

Googling doesn't return any worthwhile links too.

Eclipse: Removing Todo: Auto-Generated comments

When you use Eclipse menus to create new class, constructor, method or even add a try/catch, typically it not only generates the functionality but also adds a TODO. This is good to indicate that the comment has to be replaced with a proper functionality.

However in a team environment, it's not easy to make people delete the line and add the code. Task remains and it becomes difficult to delete it at the end.

To remove the auto addition of that comment line, you have to follow the below steps:
Goto Window -> Preferences -> Java -> Code Style -> Code Templates
Click on Method Body.
Click Edit.
Remove the commented line. (Something like: // ${todo} Auto-generated method stub)
Click Apply.
Repeat the steps for other elements.

Click save.

Eclipse: Removing Todo: Auto-Generated comments

When you use Eclipse menus to create new class, constructor, method or even add a try/catch, typically it not only generates the functionality but also adds a TODO. This is good to indicate that the comment has to be replaced with a proper functionality.

However in a team environment, it's not easy to make people delete the line and add the code. Task remains and it becomes difficult to delete it at the end.

To remove the auto addition of that comment line, you have to follow the below steps:
Goto Window -> Preferences -> Java -> Code Style -> Code Templates
Click on Method Body.
Click Edit.
Remove the commented line. (Something like: // ${todo} Auto-generated method stub)
Click Apply.
Repeat the steps for other elements.

Click save.

Google +1

About : http://www.google.com/+1/button/

Steps to enable Google +1: http://www.google.com/experimental/index.html

My review:
Sounds similar to Digg and facebook like. Hoped the +1 done by user would be restricted to his friends, but it's public to everyone out there :( 

Warning on app launch in emulator in MAC

Every time I try to launch my android app on emulator, i get the below warning:
Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.

Looks like this can be safely ignored as it's the problem with the emulator using deprecated api. Link: http://groups.google.com/group/android-developers/browse_thread/thread/f10995f2a829229d

Deleting user database

DBOpenHelper or SQLiteDatabase doesn't have functions to delete the database. Looks like there are people who are using file delete by going to the database location and deleting the file programmatically. The easier solution is : Android does provide the mechanism to delete the file. It's available in ApplicationContext though.

You would do something like this:

InstantReturn app = (InstantReturn) getApplicationContext();

// dbHelperInstance.close();
// dbInstance.close();

if (app.deleteDatabase(DatabaseOpenHelper.DB_NAME)) {
Log.d(ViewConstant.APPLICATION_NAME, "deleteDatabase(): database deleted.");
} else {
Log.d(ViewConstant.APPLICATION_NAME, "deleteDatabase(): database NOT deleted.");

Open javadoc in external browser - Eclipse


Should we do this for each workspace?

Function key on aluminium keyboards - MAC

Seen that many people do not find the Fn key in the new aluminium keyboard for mac and end up setting "use default functionality of function keys" in system preferences. However this affects the laptop keys too and might not be preferred by all.

Solution: There IS a function key in the keyboard. Not in the place we expect it though. Look for the key under F13. :-)

Opening multiple instances of Eclipse on mac.

Double clicking on eclipse icon always opens the same instance on MAC. To solve this, you can open terminal (Command-Space to launch spotlight. Type in terminal and click on the top hit/Terminal link).
Cd to the place where you unzipped eclipse.
For .e.g, Eclipse/Eclipse.app/Contents/MacOS/

Then run eclipse &. (& makes sure you run eclipse in background, so that you can kill the terminal window.).

WebView loading external browser

If your webview loads external browser and doesn't display the contents inside the webview, do check if the page is doing any redirects. Redirects are by default launched in external browser.

Keyboard shortcuts for emulator

run emulator in tools directory of android sdk with param -help-keys. This lists the keyboard shortcuts understood by the emulator in your platform. For windows, the shortcuts displayed will be different than for mac.