Skip to Content
Clean Code: A Handbook of Agile Software Craftsmanship
book

Clean Code: A Handbook of Agile Software Craftsmanship

by Robert C. Martin
August 2008
Intermediate to advanced
464 pages
13h 48m
English
Pearson
Content preview from Clean Code: A Handbook of Agile Software Craftsmanship

14Successive Refinement

Case Study of a Command-Line Argument Parser

Image

This chapter is a case study in successive refinement. You will see a module that started well but did not scale. Then you will see how the module was refactored and cleaned.

Most of us have had to parse command-line arguments from time to time. If we don’t have a convenient utility, then we simply walk the array of strings that is passed into the main function. There are several good utilities available from various sources, but none of them do exactly what I want. So, of course, I decided to write my own. I call it: Args.

Args is very simple to use. You simply construct the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Designing Data-Intensive Applications

Designing Data-Intensive Applications

Martin Kleppmann

Publisher Resources

ISBN: 9780136083238Purchase Link