Code is read more often than it is written, that’s why keeping the code clean is very important part of creating maintainable and long living system. Consistency, naming rules, commenting habits, function organization, exception handling – all contribute to code readability and quality.
Developers face code design and micro-architecture challenges during every coding day. Designing your code properly from the start is very important. Moreover, every programmer is a designer. Design patterns, code organization principles, dos and don’ts are covered in this intensive 2-day course.
Junior or senior developers who would like to improve their code organization skills.
Students must have at least few years of software development experience.
Contents of Software Craftsmanship
Topics covered in this package include:
Understanding the impact of bad code
- What does quality mean?
- Read your code: names are everywhere
- How to name variables, functions, classes
- Be consistent
- Formatting for readability
- Break code into “paragraph”
- Code organization
- What NOT to comment
- Show your intent
- Put yourself in the reader’s shoes
- One word: short!
- Arguments and parameters
- One level of abstraction
- Don’t repeat yourself (DRY principle)
- Dealing with exceptions
- Checked vs. Unchecked
- Why exception hierarchies matters
- Add content to your exceptions
- Centralize catching and logging
- Execution flow (switch, conditions, nesting, variable scope)
- Code design
- Understand the problem first
- Number one rule: simplicity
- Data vs. Object
- Law of Demeter
- Design patterns: use and misuse
- Best practices for class design
- Be SOLID! The SOLID principles matters
- Cohesion and changeability
- Design anti-patterns: stuff you’ll regret later
- Use the right tool for the job: Functional vs. Procedural
Testing your code
- Unreadable tests stink
- Choosing good test input
- Making error message readable
- TDD actually works
- Using mocks
- Introducing BDD
- Unit test automation and test coverage
Developer team communication & productivity