Gnome internship – my experience so far

I am 22 days old as a Gnome OPW intern and it has been a very nice experience so far. I was supposed to write at least one blog post in every two weeks. But, sometimes I get this writer’s block when words simply fail me. Besides,in the last few weeks, I really enjoyed writing code and I rarely wanted to write anything other than that! 🙂

So, what am I working on?
I am writing server and client libraries for GeoIP and WiFi geolocation service.

What have I done so far?
I have written the server side code. You can find it here
It looks up the GeoLiteCity database which provides free geolocation data for an IP address and returns the geolocation data in JSON format. So if you query with an IP eg., you will get a JSON output like the following –

[sourcecode language=”text” gutter=”false”]
{"results":{"":[{"location":{"latitude":32.807201385498047,"longitude":-117.16490173339844},"address":[{"name":"San Diego","type":"city"},{"name":"California","code":"CA","type":"region"},{"code":"92111","type":"postalcode"},{"name":"United States","code":"US","type":"country"}],"timezone":"America/Los_Angeles","accuracy":"city","attribution":"This product includes GeoLite data created by MaxMind, available from\n"}]}}

What new stuff did I learn?
Oh! A lot of things! Setting up the Apache web server, using Git and the Glib libraries were new to me. But What wasn’t new yet I had to relearn and give importance to was coding style. Initially I was not paying much attention to the existing conventions. I made my mistakes and shamefully I confess, more than once (which is REALLY very embarrassing!). But on the brighter side, now I have become more cautious about it.

What next?
I have started working on the client side. I have already written a synchronous function to fetch data from the server. But I need to make it an object. So at present I am trying to learn Gobject. I am planning to write the asynchronous version of the function in this week as well.

Gnome internship – my experience so far

Contributing to Geocode-glib in Gnome

I recently to contributed a small patch to Geocode-glib library. It was my first patch and it was definitely thrilling to see my name as the author in the repository. So, let me give you a walk through on what is Geocode-glib and what I did in it.

What is Geocode-glib?

It’s a convenience library for the Yahoo! Place Finder and GeoPlanet APIs. The Place Finder Web service allows to do geo-coding and reverse geo-coding. It’s used by Empathy and Evolution.

What did I do in Geocode-glib?

I hacked on the library’s test program. The test-program earlier did not have any feature to differentiate search results with same name. e.g. if you search with a “Delhi” it would show you results with only latitudes and longitudes. And from that result, you could not differentiate the search results with name “Delhi”.

I came up with a way which would show relevant information along with the place name and its latitude and longitude so that the place can be differentiated. So now if you search with Delhi, it would show –


Thus you can differentiate between the places now. Here’s the link to my commit

It was really great to code after such a long time! And now I am wondering, why the hell didn’t I contribute to such projects earlier! But, you know what they say –  better late than never! 😀

Contributing to Geocode-glib in Gnome