https://flic.kr/p/Lj3bW Software Configuration Management
What knowledge/skills have you learned so far? OR Software Engineer Code Monkey https://flic.kr/p/bqHSWr https://flic.kr/p/8kzUK8 How can you tell?
Consult the SWEBOK Guide (Software Engineering Body Of Knowledge) http://www.computer.org/portal/web/swebok
So what’s in this SWEBOK anyway? One possible definition of Software Engineering: Appling SWEBOK to software creation and evolution So what’s in this SWEBOK anyway?
Has Boot Camp covered any? 15 Knowledge Areas (KAs) Software Requirements Software Design Software Construction Software Testing Software Maintenance Software Configuration Management Software Engineering Management Software Engineering Process Software Engineering Models and Methods Software Quality Software Engineering Professional Practice Software Engineering Economics Computing Foundations Mathematical Foundations Engineering Foundations Has Boot Camp covered any?
15 Knowledge Areas (KAs) 3 stand out to me Let’s pick on this one Software Requirements Software Design Software Construction Software Testing Software Maintenance Software Configuration Management Software Engineering Management Software Engineering Process Software Engineering Models and Methods Software Quality Software Engineering Professional Practice Software Engineering Economics Computing Foundations Mathematical Foundations Engineering Foundations 3 stand out to me Let’s pick on this one
Software Configuration Management (SCM) “Configuration management … is the discipline of identifying the configuration of a system at distinct points in time for the purpose of systematically controlling changes to the configuration and maintaining the integrity and traceability of the configuration throughout the system life cycle.” (SWEBOK)
Which have you learned about? SCM Subtopics Which have you learned about?
Git! SCM Subtopics Let’s see how much you’ve learned… “Version control tools” Let’s see how much you’ve learned…
Pop Quiz 5 questions Update diagram in each Commit nodes Branch nodes Based on actions of Alice and Bob Collaborating via GitHub repo
Start like this Scott Fleming SF 1 GitHub 11111 master Alice Bob
Question 1 Alice: Bob: (include the HEAD node) $ git clone https://github.com/whatever.git $ cd whatever Bob: (include the HEAD node)
Question 2 Alice: $ git branch myfix $ git checkout myfix
Question 3 Alice: Bob: $ rails generate scaffold User … $ git add . $ git commit # 22222 Bob: $ rails generate scaffold Micropost … $ git commit # 33333
Question 4 Bob: git push
Question 5 Alice: git pull
What if… Alice did this: Bob did this: app/models/micropost.rb class Micropost < ActiveRecord::Base validates :content, length: { maximum: 140 } end app/models/micropost.rb Bob did this: class Micropost < ActiveRecord::Base validates :content, length: { maximum: 120 } end app/models/micropost.rb
What if Alice did this? $ git checkout master $ git merge myfix master 11111 master 22222 33333 myfix $ git checkout master $ git merge myfix
Manually fix the file; git add and commit $ git merge myfix Auto-merging app/models/micropost.rb Automatic merge failed; fix conflict and then commit result. class Micropost < ActiveRecord::Base <<<<<<< HEAD validates :content, length: { maximum: 140 } ======= validates :content, length: { maximum: 120 } >>>>>>> myfix end app/models/micropost.rb To resolve: Manually fix the file; git add and commit
SCM is more than version control Can you think of more that you’ve learned?
SCM is more than version control Can you think of more that you’ve learned? “Build handling tools”: rvm bundler
SCM Problems: Your code AND external dependencies ruby jquery Your code sqlite …
rvm and bundler work together to control external dependencies Let’s take a quick tour
RVM: Set Rails and Gemset versions Few more handy RVM commands: $ rvm list $ rvm current $ rvm info
Problem: RVM config is not part of project How to solve?
Problem: RVM config is not part of project How to solve? Gemfile in project stores all Gems (external dependencies) and their versions Use bundle to run (exec) commands (automagically uses versions in Gemfile) RVM also can use Gemfile versions when pwd is in project (see chapters 1.2.4 and 3.6.1)
Summary Software Configuration Management (SCM) Version control tool Git Build handling tools rvm bundler What’s next?