Release 6, Release 7, and Reflections

Hello everyone. This will be my last post for my Open Source electives, and I can honestly say I’ve enjoyed my time working with the assortment of projects I was able to get involved with. Without further ado, my updates:

I had a few outstanding issues to resolve with earlier PRs. For my issue 122 fix I had to resolve a nit modeswitch had with my sh.mv documentation. I had explicitly included ‘./’ in most of my examples, and he said that since that would be implicit I could just omit every reference. I also had to fix an asynchronicity issue in my Unix timestamp fix (done() was called twice in one test, and I resolved by making timestamp conversion synchronous and catching parse errors instead).

My first new issue, issue 158, involved adding a new test to fs.watch()’s spec to ensure that when a file is changed, watches on hardlinks are updated as well. I added the test, and was able to verify that it worked, but found out that fs.watch() is not working correctly. When original files are modified, watchers tracking hardlinks will not be notified, so my test currently times out. When I receive more feedback on my PR, I’ll probably be filing a new bug to report this issue.

My next issue, issue 87, required an implementation of fs.fsync(), a command which typically writes open file buffers to disk when called. Because of the way filer’s architecture is laid out at the moment, fsync() doesn’t apply (we don’t have unwritten buffers that would wait for such a command). For the time being, fsync() has been implemented as a no-op. I did include some basic tests and documentation changes, as well.

Issue 7 required project documentation to be altered so that it explicitly mentioned the accepted type for our ‘buffer’ parameters. The only valid argument is a subclass of ArrayBufferView; ArrayBuffers were invalid, but there was no mention of that in the docs, and for some it would be counter-intuitive. This was a quick and straight-forward change.

Issue 97 was a similarly simple documentation change. In an earlier issue, Dave and modeswitch had determined that we will not be implementing fs.realpath() at this point in the software stack, because there is no awareness of a current working directory. For that reason, it has been relocated to filer.io, which should provide that context. I changed the documentation entry to explain this choice in case users wanted it for node.js parity.

My last issue, issue 42 required modifications to fs.read() to accommodate node.js’ legacy argument format. I managed to get this implemented (despite some headaches with remapping arguments), and included a test.

Finally, I wanted to summarize how these courses have shaped my opinions of open source development. Above all, I have realized the value of open cooperation and collaboration. These tenets result in an unequaled environment for learning best practices and production level programming. Having a networked community (via Github and IRC) presents opportunities that wouldn’t appear in typical bedroom coding scenarios. Through these courses, I learned that JS is actually a viable language for web application development (and that the open frameworks supporting that paradigm are much more refined than I would have thought). I was introduced to a variety of technologies and patterns that I would not have been exposed to in my regular courses; marketable skills that have helped me in my co-operative education pursuits. It also gave me the ability to orient myself in new code bases, experience I had been sorely lacking until now. I’ve learned that if I want to be successful moving forward, I need to make more of an effort to assert myself, communicate with my peers, and schedule ample time for professional development.

Thanks everyone. I just wanted to say that I’ve had fun, and I certainly intend to continue with my contributions.

GLHF

Kevin Kofler

PRs:
Issue 86
Issue 122
Issue 158
Issue 87
Issue 7
Issue 97
Issue 42

A Belated Release 5

Better late than never, I suppose. For this release I have a few more Filer bugs, all of which add new functionality to the project.

First up, issue #122. David Humphrey recently got a Filer shell implemented, and a couple of shell commands were requested. Issue #122 involves the implementation of sh.mv with tests and documentation, which I’ve recently completed. The relevant pull request can be found here. sh.mv takes two arguments (source and destination) and a callback, and will attempt to “move” the node at source to the path specified in destination. The majority of my problems with implementing mv involved misunderstanding the use of callbacks; a couple of times some dependent code was accidentally left out of the callback (statting a directory before I was sure that the async creation had finished, for instance -_-). Dealing with the many callback nests in mv has given me a much better understanding of the pattern, however.

Next, we have issue #136. This one was very simple. A couple of our storage providers (IndexedDB and WebSQL) will fail when the user is trying to run an instance of Filer in a Private Browsing window. This issue involved adding a more verbose error for this particular issue to minimize the headaches involved in debugging it.
The relevant pull request is here.

Finally, we have issue #86, in which I added support for Unix-style timestamps. The relevant pull request is here.

Release 4 – Fixing patches and adding features

Hello all. Release 4 is going to be a little light (we’re in crunch mode for our capstone project at the moment) but I’m getting comfortable working with Filer. I’ve finally landed a patch for issue #112, which implemented node.js’ Stats object methods. The version from my last release misused the constants syntax, and had a test suite written for Jasmine. The revised patch rewrote these in Mocha, and was more comprehensive.

Currently, I’m working on issue #122, a request to implement a Unix-style mv command for our new shell implementation. I’m writing the relevant function (found here) and a Mocha test suite (in progress), and will be submitting a pull request shortly.

As I’ve continued working with this project, I’ve realized that extending Filer with version control system features may be an interesting proposition. My next release should include some work that I’ve started for implementing filesystem branches, though I’ll have to discuss this with my professor and the Filer project leader.

Release 3 – A New Domain

This will be short again -_- I’ve recently started working on Filer, a browser-based file system for JS applications, and I’ve only had time for one simple bug for this release: issue #112. I added a few diagnostic functions to the Stats object prototype, a structure returned by calling stat() on a node in the file system. While the necessary changes were minute, this was my first opportunity to write tests for a JS testing framework, and it was quite interesting. My next releases should have much more content!

Release 2 – Change in plans

Hello all! As I’m sure you can gather from the title, I’ve had to shift my focus in DPS911. Firefox OS, while quite interesting, has been difficult for me to work on in the release schedule we are bound to. The development community moves so quickly that I’ve had bugs invalidated or fixed while I was studying/working on them, and as a result I’ll be moving into the much less tumultuous Filer project.

As a result, my second release is short and sweet. I was still working on creating a Mercurial patch for bug 927320. This work remains incomplete as I transition to Filer, though I’ll be coming back to finish it.

(This post is for posterity, it would have been applicable a few weeks back. Release 3 post forthcoming)

Patching Gecko (Generating Mercurial Patches)

Hello everyone. My last release contained what I THOUGHT would be a successful patch for Mozilla’s Gecko build (barring one unfortunate typo -_-), but it turns out that GitHub is not used for submitting patches. I needed to install Mercurial, configure it properly, and generate a patch file. Since I’m getting tired of struggling with Windows, I got everything up and running in Linux Mint 64bit. For those interested, this guide will help you get everything installed and configured, this guide will teach you the basics of Mercurial’s queuing system (the use of which is necessary for creating patches), and finally this guide will teach you how to clone the Mozilla development repository, and how to create a patch to be submitted on Bugzilla. I’ve finally got the hang of all of this, and I’ve submitted the revised HG (Mercurial) patch for bug 927320. See you all this Friday for release 2!

DPS911 Release 1

Only two simple bugs for this release; Firefox OS has been decidedly difficult to get started with.

The first bug, bug 937443, involved changing a few strings within Gaia’s settings application. This gave me a chance to familiarize myself with the B2G project structure (so many repos!) and try out the various ways of running FFOS on an x86-64 computer.

The second bug, bug 927320, involved renaming some file/interface/class names related to the Radio Interface Layer, which gave me an excuse to fork and look into the base Gecko repository (gecko-dev). Just as a warning to anyone interested in cloning it, it’s freaking massive (around 1.3GB). I’m hoping to try a few hardware specific bugs for my next release.

Stay tuned for an update on my project page! If all goes well, I’ll be working on a resource monitoring application for FFOS that I hope will be incorporated into Gaia. I can dream at least 😛 My project page is currently empty, but you can find it here.

Bug 937443

Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=937443

Pull Request: https://github.com/mozilla-b2g/gaia/pull/15737

Bug 927320

Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=927320

Pull Request: https://bugzilla.mozilla.org/show_bug.cgi?id=927320

New year, new class, new bugs!

Hello everyone. Over a month since my last blog post… The place is looking a little empty. Just writing a quick update on what I’ve been up to.

I’m now enrolled in DPS911 – Open Source Project, a continuation of my professional option from last term. We have to choose a project from a pool curated by our professor, the eminent David Humphrey, and contribute either a significant number of bug fixes, a (completed) new feature, or a combination of the two. For our first release, Dave has recommended that we choose a “good first bug” related to our project of choice, so that we can ease ourselves into the community. I’ve decided that I want to contribute to Firefox OS, Mozilla’s mobile operating system. It’s built entirely on web standards, which should make it a fairly easy transition from working on Webmaker Suite. I’m looking forward to getting involved!

Release 0.4 (For reals this time!)

I finally got bug 947300 resolved! Took me long enough. It turned out that by addressing the parentNode of the selector I wanted to hide, I was able to apply the class change to both the label and the input without affecting anything else. After getting this default state out of the way, I determined that I could piggyback off of the existing attachInputChangeHandler function from src/editor/trackevent-editor.js to detect text entry. At first, I tried attaching an onChange event listener if the propertyName === “linkUrl”, but change didn’t have the functionality I was looking for, and keypress was in the same boat; both would lag behind by one keystroke, only triggering when the input’s value attribute was altered. Someone in the program suggested that I try keyup instead, which would trigger the event and update the field value whenever a key was released, which did the trick. After that, all I needed to do was write a small callback function in text-editor.js which would check to see if value was “” or contained characters, and then hide/reveal the selector appropriately. I’ve requested a pull for this, but I think it’s safe to say that it’s been resolved 🙂

After finishing the prior two bugs, replicating the functionality for the popup plugin was simple. The plugins were organized a little differently, but all of my changes to text could be incorporated into popup.

All I have to append to this is that I didn’t have time to do the cropping tool (BTP exam is looming 0_0), and js-lint hates me 😛 I had to clear up some Travis CI issues after posting my pull requests, unfortunately -_- Aw well. Release 0.4 is complete! I’ll see everyone next semester in DPS911!

    Final Info:


Bug 938610
Pull Request
Status: RESOLVED!
Bug 867591
Pull Request
Status: RESOLVED!
Bug 947300
Pull Request
Status: REVIEW PENDING
Bug 947303
Pull Request
Status: REVIEW PENDING