Highlights
- Write good quality, readable, maintainable code
- Refactor existing code
- Use effective naming standards (for variables, functions and objects)
- Create well formatted code
- Designing robust code
- Consider code testing effectiveness
Watch a short video about Clean Coding with JavaScript and Test Driven Development. ( TDD )
Course Details
1. Course introduction
2. Introduction to Professional code development standards
Why is some code bad?
Benefits of code standards
Quality code
Practical – given an existing piece of JavaScript code, work out what it does
3. Naming standards
Industry standards
Best practice naming standards
What to apply naming standards to
Practical – using the code you were given previously, create (and code) good naming standards for all applicable areas of the code. Swap your code with the next team, review and critique their work.
4. Formatting and building for readability
Prettifying code
Structure, why it matters
Repetition, the DRY principle
Function size and structure
Parameters (and arguments)
Practical – Using the last code you used (from the other team) redesign the code to use better format and function style. Swap your code with the next team, review and critique their work.
5. Comment style
Benefits of commenting
Comment style
What to comment
Practical – Using the last code you used (from the other team) add any comments you feel are necessary. Swap your code with the next team, review and critique their work.
6. Approaches to programming– Imperative, declarative
Explanation of imperative and declarative
Examples of the same code written in the two different styles
7. Programming paradigms good practice – OOP, Functional, Procedural
Explanation of different paradigms
Good style
Examination of example code written in the different styles
Practical – Using the last code you used (from the other team) design and build suitable object classes. Swap your code with the next team, review and critique their work.
8. S/W development patterns
Programming patterns introduction
JavaScript patterns
Practical – Using the last code you used (from the other team) rewrite the code so it uses the Memoisation pattern. Swap your code with the next team, review and critique their work.
9. Robust code – error handling and other techniques
Fail not fall
Write error handling first
Return values from functions
Don’t trust data
Practical – Using the last code you used (from the other team) add any error handling you feel is necessary. Swap your code with the next team, review and critique their work.
10. Code smells
General code smells
JavaScript specific code smells
Practical – Using the last code you used (from the other team) review and critique the code to see if you can identify any remaining code smells.
11. A consideration of testing effectiveness
TDD
Unit testing
What to test
When to test
CAST
Practical – Using the last code you used (from the other team) plan and develop (if you have time) suitable tests. Swap your code with the next team, review and critique their work.
Who should attend
Feedback
4.8 out of 5 average
"The trainer was clearly very knowledgeable and passionate about the subject. Presented the broad range of topics clearly, especially software development patterns." MO, Software Engineer, Clean Code with JavaScript, June 2021
“JBI did a great job of customizing their syllabus to suit our business needs and also bringing our team up to speed on the current best practices. Our teams varied widely in terms of experience and the Instructor handled this particularly well - very impressive”
Brian F, Team Lead, RBS, Data Analysis Course, 20 April 2022