Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 681 Bytes

File metadata and controls

10 lines (7 loc) · 681 Bytes

Robert C. Martin Clean Code - A Handbook of Agile Software Craftsmanship Chapter 14 : Successive Refinement

This repo is a practice of step-by-step refinement of an argument parser. The first version is a monolithic but messy file, though it works. The refactoring steps are

  1. rollback to the version where the parser only parses boolean inputs.
  2. Move the function of parsing inputs to an abstract class ArgumentMarshaler, extended by Boolean, String, Integer, Double
  3. Move exception handling to a separate class ArgsException
  4. Move ArgumentMarshaler to a separate file.

All the refactoring is guided by Test Drive Development. Each modification is paired with a test.