Pull Requests Associated with this Milestone:
Filer Issue #303 PR
Appmaker Issue #2338 PR
With the hope of not sounding overly dramatic, past week and a half has been quite overwhelming in just about every direction in my life. Pertaining to my plan for the 0.4 milestone though, my original plan for fully realizing a live iframe instance of the remixed app template was deemed both too onerous and unnecessary for its function due to factors such as the ever-changing Webmaker tools pages and assets that would make for a very volatile environment to try and parse or retrieve data objects reliably for a long period of time. My 0.3 implementation is apparently more than sufficient in its current state, and all that was requested of me (as briefly described in my earlier post) was to fix up the URL reference to an HTTP route that they will add functionality to in the near future, and merge my solution shortly thereafter.
This turn of events has left me scrambling for a suitable alternative in a very constrained and stressful period of time. I quickly perused through a handful of Mozilla project code bases I'm familiar with for anything of remote reasonableness to my sought after goals for this semester's end. I quickly recalled leaving behind a very small Appmaker bug I was assigned a month or so ago by Scott Downe involving a couple value setting additions in JSON objects in lieu of my 0.3 milestone. Most of the effort for implementing this involved asking Scott where the JSON blobs were located in the codebase so that I can simply inject the properties and call it a day. This was a start, but something more sizable and challenging needed to complement it for a respectable release.
It was at this point that I turned to an early project I contributed a little code to at the start of my work with CDOT this past summer - Filer. An issue Mozillian coding tour-de-force @Modeswitch put up dealing with rebuffing an old performance test of his for this module in order to be run both in node and in the browser, as well as cater to a provider-agnostic configuration seemed to fit the bill. This required a complete reintroduction into my knowledge of Browserify, as well as a bit of a refresher crash course into some filer methods and invocations. I needed help with this one, and thankfully, I managed to get some time and guidance from former CDOT team members Gideon Thomas and Kieran Sedgwick on my options and concerns of how to get started and solve this bug. As per the link on the top of this blog post, a pull request is already up, and I'm still not 100% sure of my solution, but after requesting review from all the major Filer contributors, so far the only corrections I've had to make were minor. I am waiting for good news either way - be it more input on how to complete this if anything was left out, or an "r+" and a merge into the master branch.
I wish I could have done something even more substantial to conclude my time in this course. It's been inspiring, and it's also been a wonderful opportunity for me to keep my open-source skills sharp from my summer position. The open source philosophy and its realization has now left me spoiled; I often seem to feel that the work I do has genuine impact, and as a person who's no stranger to needing assistance to overcome logical hurdles in the realm of programming principles, it is available and many times happy to try and turn my shortcomings into strengths. I will inevitably get back to this type of work in one of its many shapes. I'm hoping to acquire a post-graduate position at CDOT to further enrich my experience with this work, and my upcoming group implementation project is heavily influenced by open source workflows and intends on emulating those in order to achieve greater and more efficient productivity in its development lifecycle.
It has been nothing short of a pleasure to be a part of David Humphrey's world, whether as a student or a research assistant. I owe this man much gratitude for extending and bequeathing his passion unto me. I do not take that lightly. I very much hope to still remain a part of it for years to come.
Academic Open Source Development
Thursday, December 4, 2014
Monday, November 24, 2014
Appmaker Template Picker Progress Update
The second last week of this semester has already begun, and between 20 other errands to accomplish in this always merry and relaxed time frame, I have managed to get a hold of Pomax and discuss with him clarifications on how to go about moving forward and accomplishing my iterative solution for Appmaker Issue #2348. His only qualm with my initial pull request was that the current URL for arriving at the custom Appmaker template gallery list page looks very unreadable and hash-like in its address. What we have agreed to in the meantime was that Pomax will initiate a separate Webmaker issue in the meantime to accommodate this request by creating functionality for the URL address "https://webmaker.org/en-US/gallery?filter=Appmaker" and that will be the de-facto address that I will use when creating my next pull request. Since the expert on implementing these sort of HTTP Option handlers and custom route logic is away, I will obviously still be using the presently functional old URL to test my logic up until the final commit.
If all of the stars will align, and my google-fu research will prove immediately effective in helping me accomplish my initial task for this last milestone of getting an iframe preview to fetch the resource on a user's mouseclick event, I might even able to hop on this newly created issue and contribute to its completion.
In all likelihood, my last update for this semester will be the pull request announcement. Stay tuned, as the cliffhanger is quickly nearing its conclusion.
Friday, November 14, 2014
0.3 Milestone Completed for the Price of Potentially Digging My Own Grave
Link to the PR: https://github.com/mozilla-appmaker/appmaker/pull/2362
As stated earlier, landing on this issue was a bit of a fluke. Well, since most of the bugs are kind of flukey in nature, this might more of a fluke of a fluke. As mentioned previously, Mozillian Scott Downe was away this week to assist me in a bug of his that I initially wanted to work on, so within my time constraints I needed to quickly switch over to something reasonable, which ended up being this issue.
If you take a peek at the conversation about this, this is a realization of my iterative approach to providing this problem an elegant solution. Currently, I added a menu item to the top right initialization context bar that opens a new window to the user that directs them to the app template gallery to remix an app, on a click event.
Implementing logic for this was fairly simple and streamlined, since I had the original 'New App' menu item logic to follow and parrot the data flow to a great extent. The Appmaker convention herein seems to prescribe to an approach that involves an event listener attached to a JQuery connected ID field in the html, whose logic is embedded in the same file. The parent init function exposes the scope of an object in a file both called 'application', that exports a whole bunch of functionality - most importantly of which was the functionality of the menu item that I was trying to emulate:
// application.js, line 36:
newApp: function(){
var app = document.querySelector("ceci-app");
var parent = app.parentNode;
parent.removeChild(app);
parent.appendChild(document.createElement('ceci-app'));
// TODO https://github.com/mozilla-appmaker/appmaker/issues/897
// we have to decouple appidChanged and initFirebase
app.setAttribute("appid", "ceci-app-"+uuid());
history.pushState({}, "", location.origin);
}
I didn't need all this fancy functionality yet either; so far, the intent was just to give the user a link to the template gallery. So a simple window.open on an href should (and did) do the trick:
templateApp: function(){
// Open the link in a new tab so as to not interrupt the current instance's workflow
window.open(
'https://webmaker.org/en-US/gallery/list/53fe24bc21d4817b6c000aad',
'_blank'
);
}
The module.export already takes this entire function list wholesale as part of the application scope, so simply adding this function to the list was enough to be able to invoke it on my event listener back in the html file.
The first and last part was essentially to just add the element to the dom, which for the most part was just duplicating the code used for the initial menu item. Funny enough though, the most convoluted part of this was adding the text label to my new menu item. Appmaker uses what I believe to be some sort of angular.js localization directive - l10n - which I didn't know worked in a key-value pair fashion. This is where parroting code unfortunately stopped being helpful ;)
The directive is appended to your element like so: {{'your label here' | l10}}
If your 'label' pair isn't listed in the msg.json file in the language locale directory, it doesn't simply slap the string onto the element, it actually doesn't do anything with it, and therefore your label doesn't show up at all. Documentation and examples on the web were hard to come by for me, so some last minute pointing in the right direction from David Humphrey (current professor, former project lead) cleared this issue up in a hurry.
The title for this post alludes to the hope that I don't bury myself under the weight of my own ambition for this bugfix for the final course's milestone. The stage is officially set for my last hurrah and the opportunity to call it my Appmaker's "Magnum Opus" addition.
Monday, November 10, 2014
Unintentional, yet Necessary Bug-Hopping Ensues
Shortly after FSOSS and the end of reading week, I initially requested to work on an Appmaker issue created by senior Mozillian Scott Downe, AKA 'TheCount' (Link to #2338). My mistake from the get-go was not to immediately use the comment thread to clarify my lack of context for how to find the code necessary to fix the bug, instead leaving it for a while as life happened for both parties involved with the intent of asking Sir Downe at a more convenient time for me later on down the road. As fortune often shines it everloving light on me, the gentleman is now off on some sort of vacation/time away from his work for a week as my deadline for this milestone looms and is at the end of this week. Instinct dictated me to immediately find a suitable alternative, and I believe that I have found a manageable little number that might even serve as an incremental growth to a rather impressive final 0.4 effort (no promises yet, though) - Issue #2348
As usual, updates to soon follow after the initial PR at the end of this week.
Friday, October 24, 2014
SENECA FSOSS 2014 REPORT
Abstract
Comparing
and analyzing two symposium talks from industry leaders of open source
technology in the world of IT.
“How Companies Use NoSQL Open-Source Technologies like
Couchbase” – Don Pinto, Product Marketing Manager (Couchbase)
Don Pinto (M.Sc., Computer Science – University of Toronto)
has previously worked as the director of product management at GridCentric Inc.
(now owned by Google), with additional experience as a SQL Server/Azure program
manager at Microsoft.
The Problem – “There is lots and lots of data. More users
than ever before and the interactive complexity of apps.”
“Consumers & Employees Demand Highly Responsive Apps.”
Old relational stores had a lack of flexibility/rigid and an
inability to scale out data easily. Those 2 factors along with performance
costs comprised of some of the most popular client complaints when using such
tools.
This calls for a new backend technology – NoSQL.
So what could be a candidate to be the right tool?
·
The JSON Data Model Fits
today’s developer needs better
o
Aggregates &
denormalizes data into single document (Document data model).
o
Handles structured &
unstructured data equally well (Docs are distributed evenly across servers)
o
Inferred schema requires no
migration
o
JSON rapidly being adopted
o
Access both JSON and binary
data as key-value pairs
·
RDBMS needs a bigger, more
expensive server to scale up architecture.
·
Auto-sharding vs. Manual
sharding (data partitioning).
·
Open-source obviously
implies lower costs for maintenance, and usage.
·
Availability – Relational
systems use clustering as an afterthought.
o
RDBMS must take database
down for “maintenance windows”
o
They struggle to support
XDCR (Cross data center replication) across many DCs (data centers).
·
Couchbase offers a full
range of Data Management solutions
o
High Availability Cache
(Zero downtime administration and upgrades)
§
Always-on functionality for
a potentially global user base
§
Couchbase Lite – Mobile
application that includes a sync gateway for mobile work to update server.
o
Consistet High Performance
§
Built-in object level cache
§
Fine grained locking
§
Hash partitioning to
uniformly distribute data across the cluster
o
Elastic Scalability –
§
Shared-nothing architecture
with a single node type
§
True XDCR
§
Push button scale-out
Some use cases for NoSQL:
·
Heavily accessed web
landing pages
·
Application objects
·
Popular search query
results
·
Session values or cookies
(key-value pair store), eg. Shopping carts, flights selected, etc.
·
User profile with a unique
ID, user settings/preferences, user application state
·
Content metadata stores
(articles, text)
Some known users of Couchbase:
·
Orbitz – 11 clusters with a
total of 100 nodes
o
3 TB of data with over 430
million objects
·
McGaw-Hill Education Labs –
Content and metadata stores
o
“Building a self-adapting,
interactive learning portal”
o
Scale to millions of
learners
o
Self-adapt via usage data
·
AOL – Ad-targeting using a
Couchbase server
o
40 milliseconds to respond
with the decision.
o
User profiles, real time
campaign stats
o
Affiliate, event, profile,
and campaign data
Mike Hoye, Engineer Community Manager at Mozilla: “Social
Engineering – Building Communities With, And On, Purpose”
· "Process reifies and reinforces
values"
·
If you don’t measure it,
don’t pretend you care about it
·
The ROI on timely gratitude
is ridiculous.
·
Karma is a wheel (courtesy,
saying thank you for the things you are given)
“The way you conduct and execute your process is a direct
reflection of your values.”
Access, Engagement, Retention - “If you let a patch sit for
a week from a first contributor, it is very unlikely you will see them
contribute again.”
Accessibility
·
What is in front of a user,
if they want to commit a one-line change to your project?
·
The importance of
comprehensive documentation
·
The “miraculous” benefits
of an easy-to-set-up build environment
Engagement
· * “Throw the little fish back
in the water for the new entrants to the game.”
· * Label good first bugs for
beginner contributors and give a concise, yet thorough explanation of how to go
about fixing them
Retention
· * “A single toxic contributor
can harm an entire community. If people feel unequally welcome in the community, many will inevitably shy away from it. Don’t be a jerk and don’t let
others become jerks.”
* Gratitude. Saying thank
you. “This bug and your fix matters.” Telling them what to do next.
Why does open source matter? Am I the first person to have
this problem?
-
Mythology: Is what is in
the absence of real numbers and real data about what works and what doesn’t.
Stories are powerful and get into and stay in people’s heads.
-
Open source is meritocratic
(we need to stop talking about ourselves like we’re “magic”)
-
Diminishing returns: After
3 sets of eyes looking at a piece of code to figure out a bug, the rest are
wasting their time…
-
Strong FSOSS and FSOSS-like
communities grow organically
What are the most basic, fundamental things we need to embark
upon an open source project?
1)
Source Control
2)
Issue Tracking
3)
Automatic Testing
Do you care?
“There is no regression test for somebody’s mood.”
“Your community is an API to your software.”
What is the state of our community? What problems does our
community have?
Are we actively fostering community engagement?
“Have a code of conduct. Have a code of conduct. Have a code
of conduct.”
Choosing
this particular pair of talks yielded a very comprehensive picture on the
open-source process, since one focused on the community build and project goal
philosophies – the preliminary prerequisites - and the other presented the
benefits of a completed and deployed product that was a result of many of the
same ideals and principles being implemented. There was a clear testament to
not only an implied agreement of the two speakers’ points and values, but a
symbiosis as well. The focuses and comparisons were of a completely different
nature and centered on relatively unrelated processes due to the subject matter,
but were ultimately two sides of the same coin.
The open-source paradigm and its
implications have not changed for me so much as they had flourished over time. Admiring
the philosophies behind open source came naturally, but I was initially
confused and doubtful about the financial feasibility of companies and
institutions that fully embrace free software and open source processes and
values with their intellectual property. The state of this maturing industry
after nearly a quarter-century of existence is clear evidence of its resounding
and continued success, mainly by awareness of giants like Microsoft or Google
investing in more open source venture startups and releasing more open source
code and products, as well as witnessing and contributing to companies like
RedHat and Mozilla - which are almost entirely based off of open source
ideologies in every one of its aspects - rise over the years to become fortune
500 companies.
Thursday, October 16, 2014
0.2 Milestone Completed - My 1st Appmaker Pull Request is in!
First and foremost, the link to the PR - Fixed tray hover tooltip position offset #2317
As expected, this bug ended up being nothing short of an absolute blessing because the time it took to fix it was an iota of the amount of time it took to successfully set up my Appmaker development environment on my Windows 8 machine in order to be able to properly see and test my work.
In the beginning, besides the odd npm install error log emitting after attempting to download the required dependencies partially failed raising an eyebrow, it was relatively smooth sailing until needing to install and run MongoDB. The Appmaker documentation doesn't really let on much as far as the nitty gritty to my particular use case, save for showing the general link to the official website tutorial for installation and use steps. Those proved to be little more than useless in the end. I GUI-installed MongoDB just fine, but as soon as I opened up a command prompt to try and run it as per the instructions on the Appmaker README it would fail and often close the window altogether. When I managed to isolate the error it purported, it looked something like this:
********************************************************************
ERROR: dbpath (\data\db\) does not exist.
Create this directory or give existing directory in --dbpath.
See http://dochub.mongodb.org/core/startingandstoppingmongo
********************************************************************
But much like Tweety Bird constantly reaffirming that it did, it did in fact see a pootie tat... I too clearly made a \data\db folder and later even set and assigned that location to the dbpath explicitly in the config file. After trying to make the most of my google-fu skills to find a step-by-step how-to on Windows related MongoDB installation and execution, I finally found the most relevant and comprehensive one titled Running MongoDB on Windows. If you follow this with a fine-tooth comb, you will be able to both start mongo on both the command prompt, and have it perpetually keep running as a local service via the service manager.
NOTE: For the love of all that is good and righteous in this world, the Service Controller (sc.exe) command you will try to run to create a local service out of MongoDB can ONLY be executed by the administrator account -- not your own custom user account, even if it has the "administrator" label/type. If you want to be extremely thorough, follow the steps mentioned in this answer article to the same problem for a different sc command.
--------------------------------------------------------------------------------------------------------------------------
Finally, the bug itself proved to be initially daunting, but with inspiration from a casual comment given to me in-class on Wednesday from a fellow student, once I managed to get the node app/server to run, the procedure I followed ended up being close to my original strategy with a few additions:
1) Open my Appmaker localhost browser instance.
2) Find the "tray hover tooltip" element as described in the bug. It wasn't called that, so after thinking about it, I actually just used my own vision to infer where its location on the DOM was by looking at the image posted on the issue site in Github and compared it with my Appmaker site. I know, it's horribly crass, but hey, it seems to have worked out this time...
3) I used the Chrome Developer Tools to try and inspect the element by hovering over it. This was where my biggest issue was - the tray hover tooltip only appears when you hover over the tray's inquiry icon. Because life was never meant to be this easy. After a bit of thought, I figure I might be able to pinpoint it in the source code by finding where the logic for its parent element was - a div with an ID named "showInfo".
4) In Atom, I initiated a global search for that particular string. I ended up finding it in a place I would never have guessed from past experience with css properties - an .html file. What? Fine, I'll indulge in new flavors. So I started parsing the rest of the file and ended up landing on this interesting looking property nugget:
floatingMoreInfoPopup.style.top = pos + 54 - (height/2) - offset + "px";
I'll be honest. I don't have any background context on the specifics of this statement. It looks more like Javascript than CSS so my assumption is that it's some sort of new library or framework for CSS injection that I'm not yet aware of, or something much more comprehensive and cool altogether. What I did see is the name of the property itself, which by the looks of it seemed like just about exactly what I was looking for. So I did what any Curious Carl would do at this point...
5) Start playing around with values, and see what changes. Turned out to be pretty much as easy as that. I changed the pixel value after the "pos" variable by 14 pixels and voila!
The original positioning:
My fix's positioning:
And for now, that's all she wrote ladies and gentlemen. Stay tuned for next week update on FSOSS!
Wednesday, October 15, 2014
0.2 Milestone Progress Report
A few weeks into the workload at hand, and after finding a bug and initially attempting to setup the development environment a few times, a problem that seems to be repeating itself in recent times is the inherent constraint of other work from full-time courses as well as a cursed history of personal less-than-stellar time management skills when dealing with more than one substantial subject or task at a time. Unfortunately, with this particular upcoming Friday being riddled with more than just this deadline, I will be scrambling to procure a pull request for this in the next day or two.
At the very least, I'm in slight familiar ground with CSS and armed with a broad but tested strategy of element/CSS property inspection using web browser development tools to pinpoint where the snippet of code I'm looking for is located.
This epic cliffhanger will conclude with a blog post at the end of the week.
Subscribe to:
Posts (Atom)