First Bug Release Mozilla Thimble

After diving into the inner workings of Thimble/Brackets and getting two pull requests successfully merged with the Thimble master branch I can successfully say this is my first release. If you haven’t read my previous post (link) the bug I fixed was actually created from another issue filed. My original bug was to make the no index found message appear when the user is updating an existing project without an index.html. A pull request has since been filed for that bug however it is still waiting for review. Before I could even fix that bug I noticed that I couldn’t create a new project on my localhost version of Thimble. This was odd because I saw no errors indicating that something was wrong with the Thimble server. After some questions asked on GitHub I figured out that you need to run the Brackets and Thimble server at the same time which was something I wasn’t doing initially. David Humphrey then filed a bug to add a feature that would notify the developer if the Brackets server wasn’t running which turned out to be a great starter bug.

The bug fix required a Node.js library called is-reachable which gives the ability to check if a certain server is reachable or not. This library was fairly simple to use and the developer who created it did an excellent job describing how to install and use the function. release 0.1 3 After adapting the example included on the is-reachable GitHub page I had a functioning prototype that would display if the Brackets server was running or not. release 0.1 4Once I filed a pull request I was met with three or so requests for changes in my code. Things like changing the brackets layout and fixing my node.js require routing were just some of the things that were requested. In the end the requests will probably help me for future pull requests to not make the same mistakes again so I’m glad I got some help from the community. After I fixed those changes and committed my updated code I got another request for changes but not from a person this time. GitHub has these tests called Travis CI and AppVeyor that act as automated tests to make sure your code follows the master projects coding style and syntax. release 0.1 5For example the Travis CI test wanted me to change my quotations from single quotes to double quotes when identifying Id’s with jQuery to match how they are declared in the rest of the project. I found the automated tests to be really interesting because they eliminate so much time in terms of actually having someone to go through all your code to fix linting and other code structure. For my particular case I had a bunch of linting issues pointed out by Travis CI and it was easily fixed by running a console lint fix command under the projects path. It’s truly impressive how some parts of the development process and especially when it comes to open source are automated now.

Eventually I got my fix up to standards with what Mozilla Thimble was looking for and  my code got merged with the master project. It was a great feeling being able to contribute to something big as well as knowing that my fix will help future new developers get into working on Thimble. What I didn’t know however was that my fix that was aimed to make the development process easier actually resulted in another bug that I had to fix. Since my bug fix uses a third party node.js library called is-reachable I had to download and install it with npm install to be able to use its functionality in my code. This means that users who do not have is-reachable installed will get an error saying that they are missing a module that is needed for the code to run. release 0.1 6

As a result an issue was filed by Mozilla Thimble member Gideon Thomas to add is-reachable to the devDependencies section of package.json. This makes it so is-reachable is automatically installed when the user types the command npm install. Though this bug wasn’t as big as the previous one it was still interesting how sometimes fixing something leads to other things becoming broken which makes me wonder if thats why some of the bugs filed haven’t been fixed in years. release 0.1 7.JPG

Overall I had a really good time working on these bugs and I will definitely be taking on more in the future and maybe even different open source projects to see what I can accomplish. Thanks to the Thimble team for helping me along the way!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s