Upgrade to Pro — share decks privately, control downloads, hide ads and more …

動作するきれいなコード / Clean code that works - SeleniumConf Tokyo 2019

動作するきれいなコード / Clean code that works - SeleniumConf Tokyo 2019

SeleniumConf Tokyo 2019 基調講演

Clean code that works - How can we go there? - Takuto Wada | SeleniumConf Tokyo

"Clean code that works" means the sense of value and the goal of programmers. It is not easy to implement it from the beginning. In this speech, you will get to know how obstacles appear on the way to "Clean code that works" and how to resolve them. Also, I will reconfirm role and value of automation testing and refactoring.

Takuto Wada

April 18, 2019

More Decks by Takuto Wada

Other Decks in Programming


  1. assert(typeof item.id === 'strong') | | | | | |

    | false | | "foo" | Item{id:"foo",name:"bar"} "string" --- [string] 'strong' +++ [string] typeof item.id @@ -1,6 +1,6 @@ str -o +i ng Representative work: power-assert-js IUUQTHJUIVCDPNQPXFSBTTFSUKTQPXFSBTTFSU
  2. 3FGBDUPSJOH Refactoring (noun): a change made to the internal structure

    of software to make it easier to understand and cheaper to modify without changing its observable behavior.
  3. Red. Write a little test that doesn't work, and perhaps

    doesn't even compile at first. Green. Make the test work quickly, committing whatever sins necessary in the process. Refactor. Eliminate all of the duplication created in merely getting the test to work.
  4. External Quality: Correctness, Usability, Efficiency, Reliability, Integrity, Adaptability, Accuracy, Robustness

    Internal Quality: Maintainability, Flexibility, Portability, Re-usability, Readability, Testability, Understandability
  5. The code you write for a unit test is real;

    some may argue it's even more real than the code you ship to customers. This means that it must be written and maintained to the same professional standards as your production code. Test code is real code.
  6. TDD can't guarantee that we will have flashes of insight

    at the right moment. However, confidence-giving tests and carefully factored code give us preparation for insight, and preparation for applying that insight when it comes. ─ Kent Beck