Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Weatherapp mini sprint
6/25/2016 1parish.saintpats.org kofc809.org
Desirables
6/25/2016 2parish.saintpats.org kofc809.org
• Have fun!
• Deliver testable functional code to our github projec...
Time management
6/25/2016 3parish.saintpats.org kofc809.org
Present
Code
Discuss
Weatherapp mini sprint
Access this slideshow at:
http://vividventures.biz/d/?q=javascript
6/25/2016 4parish.saintpats.org ...
Proposed Best Practices
6/25/2016 5parish.saintpats.org kofc809.org
• Software configuration management (SCM)
• Pair progr...
Software configuration management - SCM
6/25/2016 6parish.saintpats.org kofc809.org
• In software engineering, software
co...
6/25/2016 7parish.saintpats.org kofc809.org
An (idealized) successful git branching model
Proposed by
nvie.com
SCM with Github and git
6/25/2016 8parish.saintpats.org kofc809.org
github.com
git-scm.com/downloads
SCM with Github and git
6/25/2016 9parish.saintpats.org kofc809.org
• Sign up for github if not already registered
• See o...
Github.com – Project review
6/25/2016 10parish.saintpats.org kofc809.org
• Review the
• project graphs -> network
• code -...
Github.com – Project review
6/25/2016 11parish.saintpats.org kofc809.org
• Review the project graphs -> network
• Which br...
Github.com - Project review
6/25/2016 12parish.saintpats.org kofc809.org
• Review the code -> release(s)
Github.com - Project review
6/25/2016 13parish.saintpats.org kofc809.org
• Notice the tag label and release date
• Click o...
Github.com - Project review
6/25/2016 14parish.saintpats.org kofc809.org
• Issues
To be kind to
ourselves the issue
number...
Pair Programming
6/25/2016 15parish.saintpats.org kofc809.org
Team (or mob) Programming
6/25/2016 16parish.saintpats.org kofc809.org
< Pair Programming >
6/25/2016 17parish.saintpats.org kofc809.org
• Pair programming is an agile software development
tech...
Remote Pair Programming
6/25/2016 18parish.saintpats.org kofc809.org
• Remote pair programming, also known as virtual pair...
Cloud 9 – sign up
6/25/2016 19parish.saintpats.org kofc809.org
• Cloud development environment for pair
programming
• Sign...
Cloud 9 – sign in
6/25/2016 20parish.saintpats.org kofc809.org
• Sign in at c9.io and create a new workspace
Cloud 9 – clone the project
6/25/2016 21parish.saintpats.org kofc809.org
• Get git clone link from our weather app github ...
Cloud 9 – create a workspace
6/25/2016 22parish.saintpats.org kofc809.org
• Add workspace name
• Clone link from our
weath...
Cloud 9 - Share
6/25/2016 23parish.saintpats.org kofc809.org
Other pair programming tools
6/25/2016 24parish.saintpats.org kofc809.org
• Gitter so the whole team can share a message
o...
</ Pair Programming >
6/25/2016 25parish.saintpats.org kofc809.org
Where to start working on weather app?
6/25/2016 26parish.saintpats.org kofc809.org
• Whose data are we importing?
• What ...
6/25/2016 27parish.saintpats.org kofc809.org
Openweathermap - sign up / sign in
http://openweathermap.org/
Whose data are ...
6/25/2016 28parish.saintpats.org kofc809.org
Cloud 9 - git log in term
git log --oneline --decorate --all --graph
Take not...
6/25/2016 29parish.saintpats.org kofc809.org
Cloud 9 - git checkout in term
git checkout –track origin/’#20_mapping’
git c...
6/25/2016 30parish.saintpats.org kofc809.org
Cloud 9 – display index.html page
Click on the .html file
Click on the run bu...
6/25/2016 31parish.saintpats.org kofc809.org
Cloud 9 – display index.html page
Click on ‘Preview Running
Application
See a...
6/25/2016 32parish.saintpats.org kofc809.org
git branches
“ It’s important to note that when you switch
branches in Git, f...
6/25/2016 33parish.saintpats.org kofc809.org
Cloud 9 – display index.html page
In bash shell change branches with the comm...
git status lifecycle of a file
6/25/2016 34parish.saintpats.org kofc809.org
Reference: http://git-scm.com/book/en/v2/Git-B...
6/25/2016 35parish.saintpats.org kofc809.org
Project revisions process – clones ahead of origin
origin
Clone 1 r rr rrr
Ah...
6/25/2016 36parish.saintpats.org kofc809.org
Project revisions process
git status
6/25/2016 37parish.saintpats.org kofc809.org
Project revisions process
git add change_log.md
git commit –m ‘Update log wit...
6/25/2016 38parish.saintpats.org kofc809.org
Project revisions process
Now the origin master branch has a commit that is d...
6/25/2016 39parish.saintpats.org kofc809.org
Project revisions process – clones behind origin
origin r rr rrr
Clone 1
(no ...
6/25/2016 40parish.saintpats.org kofc809.org
Project revisions process: PULL
git pull
If your clone is behind origin then
...
6/25/2016 41parish.saintpats.org kofc809.org
Revisions process
$git
clone
git branch
#nn_branch-name
$ git checkout #nn
br...
6/25/2016 42parish.saintpats.org kofc809.org
git branches
Adding branches
$ git branch hotfixes
$ git branch release
$ git...
Weatherapp requested features
6/25/2016 43parish.saintpats.org kofc809.org
Weatherapp requested features
6/25/2016 44parish.saintpats.org kofc809.org
• To request features to the weatherapp we will...
Work on a requested feature
6/25/2016 45parish.saintpats.org kofc809.org
• Issue #21
o In wa.convert.xtox() functions incl...
Work on a requested feature
6/25/2016 46parish.saintpats.org kofc809.org
• Significant figures references for Issue #21
o ...
Work on a requested feature
6/25/2016 47parish.saintpats.org kofc809.org
• Where to start?
o With the unit tests for issue...
Work on a requested feature
6/25/2016 48parish.saintpats.org kofc809.org
It goes without saying (but we will say it) that ...
Continuous Integration w/ Codeship
6/25/2016 49parish.saintpats.org kofc809.org
https://codeship.com/
Continuous Integration w/ Codeship
6/25/2016 50parish.saintpats.org kofc809.org
https://codeship.com/
Continuous Integration w/ Codeship
6/25/2016 51parish.saintpats.org kofc809.org
https://codeship.com/
Write the rules …
Reference
6/25/2016 52parish.saintpats.org kofc809.org
• git
• Documentation: http://git-scm.com/doc
• http://www-cs-stude...
Upcoming SlideShare
Loading in …5
×

Meetup-js-062516

427 views

Published on

Weatherapp Minisprint with and introduction to Git, sig-figs.js and Jasmine

Published in: Software
  • Be the first to comment

  • Be the first to like this

Meetup-js-062516

  1. 1. Weatherapp mini sprint 6/25/2016 1parish.saintpats.org kofc809.org
  2. 2. Desirables 6/25/2016 2parish.saintpats.org kofc809.org • Have fun! • Deliver testable functional code to our github project in the time available o Since the time frame is short it is NOT necessary to complete the entire goal, however, progress should be testable and functional. o Make incremental progress via git. Do not wait to the end of time to git submit. • Collaborate as a team to get it done
  3. 3. Time management 6/25/2016 3parish.saintpats.org kofc809.org Present Code Discuss
  4. 4. Weatherapp mini sprint Access this slideshow at: http://vividventures.biz/d/?q=javascript 6/25/2016 4parish.saintpats.org kofc809.org
  5. 5. Proposed Best Practices 6/25/2016 5parish.saintpats.org kofc809.org • Software configuration management (SCM) • Pair programming environments and tools • Test Driven Development (TDD) • Continuous Integration (CI) • Upgrade javascript to latest syntax ES6
  6. 6. Software configuration management - SCM 6/25/2016 6parish.saintpats.org kofc809.org • In software engineering, software configuration management (SCM or S/W CM) is the task of tracking and controlling changes in the software, part of the larger cross- disciplinary field of configuration management.
  7. 7. 6/25/2016 7parish.saintpats.org kofc809.org An (idealized) successful git branching model Proposed by nvie.com
  8. 8. SCM with Github and git 6/25/2016 8parish.saintpats.org kofc809.org github.com git-scm.com/downloads
  9. 9. SCM with Github and git 6/25/2016 9parish.saintpats.org kofc809.org • Sign up for github if not already registered • See our project at: o https://github.com/Tacoma-JS/weatherapp o Send a request to me for write access. • Reference: o http://git-scm.com/doc o http://gitref.org/index.html o Version control with git, second edtion
  10. 10. Github.com – Project review 6/25/2016 10parish.saintpats.org kofc809.org • Review the • project graphs -> network • code -> release(s) • issues • open • closed
  11. 11. Github.com – Project review 6/25/2016 11parish.saintpats.org kofc809.org • Review the project graphs -> network • Which branch, • Who’s fork, • is ahead?
  12. 12. Github.com - Project review 6/25/2016 12parish.saintpats.org kofc809.org • Review the code -> release(s)
  13. 13. Github.com - Project review 6/25/2016 13parish.saintpats.org kofc809.org • Notice the tag label and release date • Click on the commit link to see the changes
  14. 14. Github.com - Project review 6/25/2016 14parish.saintpats.org kofc809.org • Issues To be kind to ourselves the issue numbers are also used as the first characters in the branch name.
  15. 15. Pair Programming 6/25/2016 15parish.saintpats.org kofc809.org
  16. 16. Team (or mob) Programming 6/25/2016 16parish.saintpats.org kofc809.org
  17. 17. < Pair Programming > 6/25/2016 17parish.saintpats.org kofc809.org • Pair programming is an agile software development technique in which two programmers work together at one workstation. • One, the driver, writes code while the other, the observer or navigator, reviews each line of code as it is typed in. • The two programmers switch roles frequently
  18. 18. Remote Pair Programming 6/25/2016 18parish.saintpats.org kofc809.org • Remote pair programming, also known as virtual pair programming or distributed pair programming, is pair programming in which the two programmers are in different locations, working via a collaborative real-time editor, shared desktop, or a remote pair programming IDE plugin. • Remote pairing introduces difficulties not present in face-to- face pairing, such as extra delays for coordination, depending more on "heavyweight" task-tracking tools instead of "lightweight" ones like index cards, and loss of verbal communication resulting in confusion and conflicts over such things as who "has the keyboard".
  19. 19. Cloud 9 – sign up 6/25/2016 19parish.saintpats.org kofc809.org • Cloud development environment for pair programming • Sign up at c9.io if not already registered
  20. 20. Cloud 9 – sign in 6/25/2016 20parish.saintpats.org kofc809.org • Sign in at c9.io and create a new workspace
  21. 21. Cloud 9 – clone the project 6/25/2016 21parish.saintpats.org kofc809.org • Get git clone link from our weather app github project
  22. 22. Cloud 9 – create a workspace 6/25/2016 22parish.saintpats.org kofc809.org • Add workspace name • Clone link from our weather app github project • Pick node.js template
  23. 23. Cloud 9 - Share 6/25/2016 23parish.saintpats.org kofc809.org
  24. 24. Other pair programming tools 6/25/2016 24parish.saintpats.org kofc809.org • Gitter so the whole team can share a message o with chat history. • Google hangout ( you will need a Google login to use this tool) • micro.glark.io ( by Bluefinch on github) Reference: • Github / Tacoma-JS / Best Practices / Pair Programming notes
  25. 25. </ Pair Programming > 6/25/2016 25parish.saintpats.org kofc809.org
  26. 26. Where to start working on weather app? 6/25/2016 26parish.saintpats.org kofc809.org • Whose data are we importing? • What are the weatherapp issues? [:link:] • Are there already branches assigned to those issues? • Will I need the features from the leading edge? • What branches have been pulled into my working directory? • Whose fork should I start with?
  27. 27. 6/25/2016 27parish.saintpats.org kofc809.org Openweathermap - sign up / sign in http://openweathermap.org/ Whose data are we importing? Generate your API Key and keep it handy.
  28. 28. 6/25/2016 28parish.saintpats.org kofc809.org Cloud 9 - git log in term git log --oneline --decorate --all --graph Take note that HEAD is currently on branch master which has a tag. The log command should generate a graph that looks somewhat like the projects github network graph at the time (probably not exactly as shown above) .
  29. 29. 6/25/2016 29parish.saintpats.org kofc809.org Cloud 9 - git checkout in term git checkout –track origin/’#20_mapping’ git checkout –track origin/’develop’ https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches#Tracking-Branches
  30. 30. 6/25/2016 30parish.saintpats.org kofc809.org Cloud 9 – display index.html page Click on the .html file Click on the run button Note in the terminal the Apache daemon is started
  31. 31. 6/25/2016 31parish.saintpats.org kofc809.org Cloud 9 – display index.html page Click on ‘Preview Running Application See app in lower right hand tab
  32. 32. 6/25/2016 32parish.saintpats.org kofc809.org git branches “ It’s important to note that when you switch branches in Git, files in your working directory will change. If you switch to an older branch, your working directory will be reverted to look like it did the last time you committed on that branch. If Git cannot do it cleanly, it will not let you switch at all.” 1 Switching branches changes files in your working directory. 1. https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
  33. 33. 6/25/2016 33parish.saintpats.org kofc809.org Cloud 9 – display index.html page In bash shell change branches with the command git checkout master Click the refresh button, see you app version now on master.
  34. 34. git status lifecycle of a file 6/25/2016 34parish.saintpats.org kofc809.org Reference: http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
  35. 35. 6/25/2016 35parish.saintpats.org kofc809.org Project revisions process – clones ahead of origin origin Clone 1 r rr rrr Ahead by 4 Clone 2 r rr Ahead by3 Clone 3 r Ahead by 1 The r changes in the clones may be ahead of commits to the origin.
  36. 36. 6/25/2016 36parish.saintpats.org kofc809.org Project revisions process git status
  37. 37. 6/25/2016 37parish.saintpats.org kofc809.org Project revisions process git add change_log.md git commit –m ‘Update log with my changes’ git push
  38. 38. 6/25/2016 38parish.saintpats.org kofc809.org Project revisions process Now the origin master branch has a commit that is different from the develop and the #20_mapping branch.
  39. 39. 6/25/2016 39parish.saintpats.org kofc809.org Project revisions process – clones behind origin origin r rr rrr Clone 1 (no diff) r rr rrr Clone 2 r rrbehind by 1 Clone 3 r behind by 2 The r changes in the clones may be behind commits to the origin.
  40. 40. 6/25/2016 40parish.saintpats.org kofc809.org Project revisions process: PULL git pull If your clone is behind origin then fetch from and integrate with another repository or a local branch
  41. 41. 6/25/2016 41parish.saintpats.org kofc809.org Revisions process $git clone git branch #nn_branch-name $ git checkout #nn branch-name write test write code test code$git add $git commit $git pull origin $git push origin DONE
  42. 42. 6/25/2016 42parish.saintpats.org kofc809.org git branches Adding branches $ git branch hotfixes $ git branch release $ git branch develop $ git branch #nn_featured_issue See a list of branches $ git log --oneline –decorate –graph --all Change to a different branch $ git checkout #nn_featured_issue Reference: http://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
  43. 43. Weatherapp requested features 6/25/2016 43parish.saintpats.org kofc809.org
  44. 44. Weatherapp requested features 6/25/2016 44parish.saintpats.org kofc809.org • To request features to the weatherapp we will be using the github issues tab: o https://github.com/Tacoma-JS/weatherapp/issues
  45. 45. Work on a requested feature 6/25/2016 45parish.saintpats.org kofc809.org • Issue #21 o In wa.convert.xtox() functions include sig-fig in rounding calculations o https://github.com/Tacoma-JS/weatherapp/issues/21 • Significant figure calculations are nontrivial, it would be DRY if someone like mevans86 has already provided a sig-figs.js . • Tacoma-JS fork of sig-figs.js o https://github.com/Tacoma-JS/significant-figures
  46. 46. Work on a requested feature 6/25/2016 46parish.saintpats.org kofc809.org • Significant figures references for Issue #21 o Wikipedia https://en.wikipedia.org/wiki/Significant_figures o Video https://www.khanacademy.org/math/pre-algebra/decimals-pre- alg/sig-figs-pre-alg/v/significant-figures o PDF http://www.ruf.rice.edu/~kekule/SignificantFigureRules1.pdf
  47. 47. Work on a requested feature 6/25/2016 47parish.saintpats.org kofc809.org • Where to start? o With the unit tests for issue #21 of course! o Test Driven Development  Wikipedia https://en.wikipedia.org/wiki/Test-driven_development o A test framework for javascript  Jasmine http://jasmine.github.io/  Tutorial http://evanhahn.com/how-do-i-jasmine/  Learn from the spec-sig-figs.js https://github.com/Tacoma-JS/significant- figures/blob/develop/tests/jasmine/spec/spec_sig_figs.js
  48. 48. Work on a requested feature 6/25/2016 48parish.saintpats.org kofc809.org It goes without saying (but we will say it) that before git pushing to origin; your javascript must pass validation tests such as • Jslint - http://www.jslint.com/ • Jshint - http://jshint.com/ • and html https://validator.nu/.
  49. 49. Continuous Integration w/ Codeship 6/25/2016 49parish.saintpats.org kofc809.org https://codeship.com/
  50. 50. Continuous Integration w/ Codeship 6/25/2016 50parish.saintpats.org kofc809.org https://codeship.com/
  51. 51. Continuous Integration w/ Codeship 6/25/2016 51parish.saintpats.org kofc809.org https://codeship.com/ Write the rules …
  52. 52. Reference 6/25/2016 52parish.saintpats.org kofc809.org • git • Documentation: http://git-scm.com/doc • http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html • Book http://it-ebooks.info/book/919/ • http://nvie.com/posts/a-successful-git-branching-model/ • http://git-scm.com/book/en/v2/Git-Branching-Branches-in-a- Nutshell • TDD pdf IBMdw • Qunitjs - http://qunitjs.com/ • Test spies, stubs and mocks Sinon.js - http://sinonjs.org/

×