Filer Project, Release 0.1

The main purpose of Release 0.1 was to get familiar working with GitHub and using Git commands. We were contributing to the Filer web filesystem project refactoring the code to use "let" or "const" instead of "var" for creating variables and constants. 
Both "let" and "const" are block-scoped and preferred over "var". The only difference between them is that "const" values can't be reassigned. So unless your variable is going to change you should always use const. 

Strict Mode in JavaScript

In order to activate strict mode you should add "use strict" directive on top of your code. The benefits of this mode are the following:
  • eliminates some silent errors (throws errors instead)
  • helps to write a secure JS code
  • disables confusing features 
Not Allowed in Strict Mode
  • Use undeclared variables/objects
  • Delete a variable/function
  • Duplicate a parameter name
  • Octal numeric literals
  • Read-only/get-only properties

Adding Git Bash editor to VS code: 
I'm using Visual Studio Code as a tool for a source code editing. Find it really helpful to add Git Bash to the VS code integrated terminal, so here are steps to do that:
  1. To open the terminal in VS code: press and hold Ctrl + ` 
  2. Ctrl + Shift + P-  to open the command palette
  3. Type - Select Default Shell
  4. Select Git Bash
  5. Git Bash should be added to your VS internal terminal

Process

  1. Fork a project on GitHub 
  2. Create a new issue 
  3. Clone forked repo to create a local copy
  4. Add a remote named "upstream"
  5. Create a branch for your issue using "git checkout -b" command
  6. npm install 
  7. npm test 
  8. Make changes in your branch 
  9. nmp test 
  10. Use "git add" to stage changes
  11. Use "git commit -m" to commit changes with a short description
  12. Use "git push origin " to push your changes to a remote branch 
  13. Create a pull request 

Code Reviews

In order to review someone else's pull request, I picked one that was open, reading its description, checking for any other comments and making sure that the changes had passed all automated tests. Next, I clicked "Commits" to review all changes made by the author and created a comment spotting that some parts of the code might require small fixes 

Links

Comments

Popular posts from this blog

fs.rmdir() vs fs.rmdirSync() in Node.js

Release 0.4, Second Blog

Discovering Open Source Projects