Thursday 29 August 2013

Pedometer UI Testing

The last week of August did indeed turn out to be the most productive for me throughout my time working on this project at CDOT. So far, I have managed to sit down with fellow team member Carl Desautels and revise and elaborate on the comments that pertain to the logic behind medicaldeviceplugin.js and have those changes pushed up to my branch on BitBucket. With the exception of a relatively simple quirk that I am awaiting an answer on, the changes are ready to be merged into the main repository. I'm hoping that this is but one of many steps that will be taken in the future that will provide new team members that will need to familiarize themselves with the API will have a less daunting experience when initially tackling the code.

The most important (and also the most fun) task that was being worked on this week was testing Edward Hanna's Pedometer UI which involved a few hours of walking, jumping, and shaking my phone randomly at times in order to quantify the battery performance of the build in its current state. Unfortunately, I was only able to test it on one device (my HTC smartphone) and due to a lack of android-capable devices around the workplace, it will have to remain as such until further notice. I found a wonderful open-license template online that I have used to document the test cases and it can be found and immediately downloaded here.

My biggest challenges so far when attending to this project have been the steep learning curve of facing the API, most obviously due to it being written in two languages that I have yet to familiarize and master, as well the ability to wrap my head around the design philosophies that were implemented into the logic itself, including the handful of object oriented design patterns and their integral role in the process of piecing together the software architecture.

All in all, it's been a wonderful and thought provoking journey thus far. Here's to everyone's success on this project and every other wonderful project being worked on at CDOT!


en → fr
heure
noun: temps, moment, fois, heure, époque, saison, rendez-vous
verb: chronométrer, calculer, prévoir
en → fr
dernier
verb: durer, persister, fixer, supporter
adjective: dernier
noun: dernier, forme

Tuesday 20 August 2013

The Last Ditch Effort

Monday morning, my fellow team members and I have all convened for a group meeting to update ourselves on the status of the project from each individual contributors perspective and pace of progression through their respective issues and goals. With little to no time to contribute in the past two weeks due to the end of semester assignments and exams due and taking place, I found myself bereft of useful and tangible output to discuss in the meeting. Keeping this in mind, I have to set aside my initial undertaking of updating the wiki and the comments in the API and refocus all of my effort on the more pertinent task of testing fellow group member Edward Hanna's pedometer API with my android device and churn out some preliminary reports on the battery performance and any potential concerns that are associated with it.

So far this week I have managed to finally set up and build the working API with the pedometer plugin on eclipse. My particular HTC android model is relatively outdated at this point, and has been slightly irritating when it came to USB device discovery, since the drivers provided by the manufacturer are both cumbersome and half-working at any given time. Nevertheless, after a bit of toiling around with the android plugin downloads for eclipse, currently all is well and ready for testing in the coming days.

I also happened to experience a random hiccup in my hg environment when I tried to pull any updates or changes from Hanna's branch of the repository. After leaving it be for a few hours and asking a fellow CDOTter to come take a look at it, thinking my private key somehow got lost or corrupted in the system, after a few tests of what happens on pull and update commands, everything was working flawlessly without a shred of alteration or intervention on our end. This could very well be my first documented encounter with a ghost in the machine...


en → fr
convoquée
verb: convoquer, tenir, se réunir

Friday 2 August 2013

Hordes of Inquiries, Pt. 2

I am pleased to report that I have made my - albeit small - first commit to the project repository. It encompasses a few updates to the comments in the medicalDevicePlugin.js file that follow the inheritance paths of a few objects and properties. Due to the unfortunate constraints of it being a Friday, most of my questions were meant to be directed to team lead Carl Desautels and will trherefore have to wait until early next week along with a corresponding pull request. The use of Cordova's methods in the javascript code remains relatively elusive and is thereby currently keeping me from being able to piece together the communications between the native code and the front end.

Migrating from git to hg commands was slightly funky, but not headache-inducing in terms of difficulty. Many of the verbs remain unchanged but some colloquialisms for how the API labels the branches and history is something to get used to, and worst comes to worst www.stackoverflow.com is always there to remedy most of the problems that anyone would face. At least I still get to use the git bash interface for command input, which is desirable.

Updating comments and documentation will continue for the next two weeks, and will be followed by executing and testing the environment on my phone to report and analyse any and all battery performance issues.

The biggest challenge being posed so far is having to deal with the lack of time I could spend with the team and API itself due to both the nature of set part-time hours and having to finish studies alongside this endeavour.

Here's to hoping for an even more productive output for the coming weeks, most likely in the cost of sleep -







Monday 29 July 2013

Hordes of Inquiries, Pt. 1

Today I've made friends with MDN (the Mozilla Developer Network) and their JavaScript resources - https://developer.mozilla.org/en-US/docs/Web/JavaScript

It's a wonderful place for looking up both syntax and concepts since it gives easily understandable examples and is written concisely and effectively for the most part.

As recommended by CDOT contributors Kieran Sedgwick and fellow team member Carl Desautels, the 5 central concepts that I will be wrapping my head around in the coming weeks will include:

- Objects and Prototypes
- Callbacks
- Closures
- Scope
- Initialization

Node.js also needs to be added to this list in and the resources I found for so far are http://net.tutsplus.com/tutorials/javascript-ajax/this-time-youll-learn-node-js/ and Node.js's API documentation at http://nodejs.org/api

The role of these central aspects of the language play an integral part in the implementation (and in turn, my comprehension) of the logic behind the project, at the very least on the front end of things. As stated earlier, Java will soon have to come into play. Any other relevant libraries and extensions to either of these languages that might be discovered will be noted and appended to this blog as soon as I find out what they are.  

I've also learned that the class design diagram was done using UML conventions and the verb 'realizes' in this context means 'implements'.

I intend on adding to my repository branch a few initial commits of comment injections into the medicalDevicePlugin.js by the end of the week to be reviewed and green lit by the rest of the team. 

'Til then, here's a picture that abstractly represents the way the API looks like right now:


Friday 26 July 2013

Beginning to Dissect the Project

After figuring out and creating the issue of needing to document (or update the existing documentation) and more descriptively comment the most pertinent scripts for the project, more questions arise on an hourly basis -

* According to the class diagram (https://farm9.staticflickr.com/8075/8361841953_4d4a8a58e2_b.jpg),
the logical starting point would be medicalDevicePlugin.js, but how does the variable flow in the initial function (function(window, cordova, undefined)interact with Cordova? What would be the concept behind its nature? Is this a variant of the cordova.exec function cordova.exec(function(winParam) {}, function(error) {}, "service",
             "action", ["firstArgument", "secondArgument", 42,
             false]);? I am currently referring to the Cordova documentation at http://cordova.apache.org/docs/en/2.5.0/guide_plugin-development_index.md.html#Plugin%20Development%20GuideThis partially applies to the next caveat.

** In order to see and interact any of the iOS integration code including elements of phonegap, I would have to at the very least download and install a Linux distribution on VirtualBox due to the constraints of working in Windows. So far there is no loophole around this, since the one project that was meant to add Objective-C capabilities to Eclipse has filter incompatibilities with version Kepler (https://github.com/hemantasapkota/j2objc-eclipse-plugin/commit/7bd9608020044bcea3b5ce73577bea9a0eedb17f). Is there a workaround or alternative for this that I haven't been made aware of yet?

In congruence with the above tasks, I am slowly but surely getting through the reference material, primarily focusing on O'Reilly's "Javascript: The Good Parts" in the meantime. So far, it's quite thorough on the inner workings of JS but the convoluted wording and explanations of certain features such as the apply method and prototypical inheritance are worded in such a way that I require clarification from peers around the office. Nevertheless, I soon plan on including Java reference material so that I can start understanding the native code integration.

Other goals for next couple of weeks are to get the eclipse/ADT environment to successfully compile and execute the default branch (working version) of the app. I appreciate everyone's past and future input and help in pointing me in the right direction throughout this journey.


Monday 22 July 2013

Setting Up at CDOT

Chaos is bound to ensue for any first time user of ADT and the eclipse environment, especially with the joys and wonders of Windows.

Notes and Issues:

- Touchscreen desktops are near useless for a programmer on Win7, save for the novelty aspect.
- Tortoisehg is convoluted and demands use of terminal commands, thus negating the entire point of its gui. Sourcetree was a much better choice
- Headphones will inevitably stop working for no other reason besides the fact that you are using Windows 7.
- There will be at least 3 instances of Eclipse that you will have to rename accordingly on your taskbar or desktop in order to not confuse and frustrate yourself into oblivion. 

Some references currently being used:

http://www.oodesign.com/ - Great for summations of object-oriented design concepts usually covered in books along with implementation examples that are relatively easy to follow.

http://zenit.senecac.on.ca/wiki/index.php/Mobile_Medical_Device_Integration - The go to website for getting started on the project, including links to its contributors and their blogs, logic diagrams and of course links to the repositories.