Skip to content

MCR-Digital/apprentice-boot-camp-fundamentals-2

Repository files navigation

Competencies, Behaviours and Knowledge units

These relate to the KSBs defined in the Level 4 Software Developer standard.

  • K7: Software design approaches and patterns, to identify reusable solutions to commonly occurring problems
  • S1: create logical and maintainable code
  • S4: test code and analyse results to correct errors found using unit testing
  • S6: identify and create test scenarios
  • S7: apply structured techniques to problem solving, debug code and understand the structure of programmes in order to identify and resolve issues
  • S9: create analysis artefacts, such as use cases and/or user stories

Resources

  • Slides
  • Laptops
  • Internet access
  • post-its
  • pens
  • flips, index cards

Mentors / Languages

Two–three mentors required in addition to leads. These should be able to cover support for the required languages.

Several exercises (katas and code starters) have been ported to required languages.

Prep-work for apprentices

  • Make sure you can sign in to github.com with your own account
  • Fork this repo (so you can push your changes later)
  • Clone your fork: git clone https://github.com/[your-username]/apprentice-boot-camp-fundamentals-2.git
  • Follow the instructions in the README for your language under the exercises directory, making sure you can run the tests
  • It’s normal to have problems with this, so just let us know! :)

Follow-on tasks

Organisation mentors should look to exercise the knowledge we’ve covered in the boot camp. Below are suggestions for tasks that would do this, but please use your own judgement to work out what to do. There is no need for anything to be returned to MD or the presenters—it’s just a learning exercise.

  • Take a look at one of your codebases and find examples of duplication
  • Do a kata using the red green refactor practice
    • We will be doing the Bowling Kata as part of the boot camp
  • Spend a day doing red green refactor on your codebase with a pair, and leave some time at the end of the day to reflect / retrospect
    • Did you enjoy it
    • What made it difficult
    • What made it easier
  • Pair on a refactor where you use the IDE to refactor your code rather than manually rewriting it
  • Explore ‘Refactoring Guru’ from the resources below
  • Try to get better at using the keyboard shortcuts for your IDE

Further reading / learning resources

Slides

The slides can be viewed from the link at the top of the repository.

Exercises

  • Receipt duplication (pairs)
  • TDD Bowling Kata (pairs)
  • TDDing realistic stories
  • Rename refactor
  • Extract variable refactor
  • Extract constant refactor
  • Extract method refactor
  • Adapting duplicated code
  • Removing duplication

Boot Camp Summary

TDD

  • Why do we write tests
  • Why do we write tests first
  • Why people might not write tests first
  • Arrange, Act, Assert
  • Red, Green, Refactor
  • Exercise: Bowling Kata with TDD
  • Exercise: Implementing realistic user stories using TDD

Refactoring

  • Refactoring vs rewriting
  • Exercise: Renaming things
  • Exercise: Extracting variables
  • Exercise: Extracting constants
  • Exercise: Extracting methods

DRY

  • Definition
  • Exercise: adapt poorly implemented checkout kata with lots of duplication
  • How to fix
  • Why duplication happens
  • Exercise: refactor away duplication

Briefing for organisation mentors

  • TBC

Contributing

If you’d like to contribute changes to the slides or exercises, please see our contributing guidance.