Commencing the week 2 with great enthusiasm, I started working on implementing PiCl class I created last week. Implementing the picl-keyserver calls on the Firefox OS client was the first step towards building the main picl class. The picl-keyserver API was well documented and had some clients like desktop client already developed which made my job easier.
My first job was to implement systemXHR on the for the keyserver as the requests were cross-domain. Since, I had never worked with systemXHR earlier, hence, I pinged people on IRC, googled a bit and as always David Walsh saved me in the end. Initially, while working out the request logic, the code looked fine but the server was did not seem to get the requests. Jed (My mentor) quickly pointed out that I had missed a ‘this’ in the object literal I created. That was the ‘WTF’ moment for me. I wasted almost a day trying to figure out the problem and it turned out that a 4 four letter word was screwing things up! (Definitely an embarrassing moment). The requests worked now as expected except a weird bug. Since, the key-server protocol is going to change within a few weeks, hence, I’ve decided to put this bug on hold for now.
Also, I’ve set up a new branch for all the ‘dev’ work on picl-contacts which will be merged back to picl-contacts once I’m done with prototyping.