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. 44.66.55.66, you will get a JSON output like the following –

[sourcecode language=”text” gutter=”false”]
{"results":{"44.66.55.66":[{"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 http://www.maxmind.com\n"}]}}
[/sourcecode]

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