Tools: Git Designing and Maintaining Software (DAMS)
 Louis Rose

Version control To more easily track changes, collaborate, and find bugs, we use version control to manage software.

Distributed version control In which there need not be a canonical version of a repository: people can work independently, offline and branches are cheap.

https://homes.cs.washington.edu/~mernst/advice/version-control.html

How much Git is needed for DAMS? Staging changes and committing with add and commit Sharing changes with push Browsing history with log and blame Combining changes with fetch, merge and rebase Rewriting unshared history with interactive rebase

http://www.git-scm.com/book
 http://gitready.com

Tip #1: Good commit messages Commit messages provide useful context for your teammates (and for your future self). So avoid this: % git commit -m "Fix login bug”

And prefer this: % git commit Redirect user to the requested page after login
 


Fixes issue #42 Users were being redirected to the home page after login, which is less useful than redirecting to the page they had originally requested before being redirected to the login form. * Store requested path in a session variable
 * Redirect to the stored location after successfully logging in the user

Tip #1: Good commit messages Commit messages provide useful context for your teammates (and for your future self). So avoid this: % git commit -m "Fix login bug”

And prefer this: % git commit Redirect user to the requested page after login
 


Fixes issue #42 Users were being redirected to the home page after login, which is less useful than redirecting to the page they had originally requested before being redirected to the login form. * Store requested path in a session variable
 * Redirect to the stored location after successfully logging in the user

Tip #1: Good commit messages Commit messages provide useful context for your teammates (and for your future self). A template: A short summary of why the change was necessary
 


Possibly a reference to an issue tracker A high-level description of how the problem has been resolved, such as “Introduce a red/black tree to increase search speed.” * First side-effect of this change
 * Second side-effect of this change

https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message

Tip #2: Consider feature branches Each feature is developed on a separate branch. Mainline changes are periodically merged into feature branches.

There are different strategies for merging feature branches into the mainline: e.g., only when the feature is finished, continuous integration or promiscuous integration. http://martinfowler.com/bliki/FeatureBranch.html

Designing and Maintaining Software (DAMS) - GitHub

Fixes issue #42. Users were being redirected to the home page after login, which is less useful than redirecting to the page they had originally requested before being redirected to the login form. * Store requested path in a session variable. * Redirect to the stored location after successfully logging in the user. Tip #1: Good ...

355KB Sizes 1 Downloads 110 Views

Recommend Documents

Designing and Maintaining Software (DAMS) - GitHub
ASTs are tree data structures that can be analysed for meaning (following JLJ in SYAC 2014/15) ... More Cohesive. Avoids Duplication. Clearer. More Extensible.

Designing and Maintaining Software (DAMS) - GitHub
%w.rack tilt date INT TERM..map{|l|trap(l){$r.stop}rescue require l};. $u=Date;$z=($u.new.year + 145).abs;puts "== Almost Sinatra/No Version has taken the stage on #$z for development with backup from Webrick". $n=Module.new{extend. Rack;a,D,S,q=Rack

Designing and Maintaining Software (DAMS) - GitHub
Clear Documentation. Designing and Maintaining Software (DAMS). Louis Rose. Page 2. Bad documentation. Misleading or contradictory find_customer(id). CustomerGateway. Used to look up a customer by their customer number. Page 3. Bad documentation. Red

Designing and Maintaining Software (DAMS) - GitHub
R&D: sketch habitable solutions on paper, using UML. 4. Evaluate solutions and implement the best, using TDD. Probably start again at 3. 5. Give to the product owner to validate. Probably start again at 1. 6. Put into production for customers to eval

Designing and Maintaining Software (DAMS) - GitHub
Observers. Designing and Maintaining Software (DAMS). Louis Rose. Page 2. Page 3. Delivery people need to know when pizzas are ready class Pizza def initialize(delivery_person). @delivery_person = delivery_person end def bake cook # blocking call. @d

Designing and Maintaining Software (DAMS) - GitHub
When we are testing the way that a unit behaves when a condition is met, use a stub to setup the condition. Solution: use stubs for queries class Subscription ... def bill(amount) unless payments.exists(subscription_id: id) payments.charge(subscripti