/kata-lab

91 Extreme Coding

Primary LanguageKotlin

kata-demo

Step

  • Global
    • Cmd + e -> Recent Files
    • Code Complete -> Cmd + Shift + Enter
    • Organize Imports -> Cmd + Alt + O
    • Reformat Code -> Cmd + Alt + L
  • Create Test Class
    • Cmd + 1 -> Project Window
    • Ctrl + n -> Create Java Class
    • Ctrl + n -> Create Test Method
  • Create Target Class (Arrange)
    • Potter potter = new Potter(); -> F2 -> Navigate to Next Error
    • Potter potter = new Potter(); -> Alt + Enter -> Show Context Actions
  • Create Target Method (Act)
    • potter.calPrice(Arrays.asList(potter)); -> F2 -> Navigate to Next Error
    • potter.calPrice(Arrays.asList(potter)); -> Alt + Enter -> Show Context Actions
    • Int price = potter.calPrice(Arrays.asList(potter)); -> Alt + Enter -> Show Context Actions
  • (Assert)
    • assertEquals(100, price); -> Alt + Enter -> Show Context Actions
  • Run (Red)
    • Alt + Shift + F10 -> Run
    • Alt + Shift + F10 -> Run Last Configuration

Extreme Development

  • thinking how to locate quickly
    • VIM skill
    • AceJump plugin
  • thinking how to edit effectively
    • VIM skill
      • 2 + (Ctrl A or X)
    • IDE hot key
      • V + (j or k) + Cmd D
    • Postfix Custom Template
    • Mix it !

Test 3A

  • Arrange The Resources
  • Act The Target
  • Assert Equals

TDD Cycles

  • Red
  • Green
  • Refactor

Keywords

  • Baby Step

References