dojo-mars-rover/TECHDEBT.md
Paul Hameteman 64d2b2d70d -- FINISH --
Updated TECHDEBT.md with ideas / wishes
Added NOTES.md for the pomodoro's
2025-10-15 00:40:54 +02:00

2.2 KiB

TODO

  • Command Pattern for go()
    • Move command consts
  • Parser for Rover.constructor()
    • Move parser consts
    • magic string for ' ' char still in the split
  • Update ktlint check for multiline rule :')

RPP

  • Design Patterns
  • SOLID++

DONE

  • Make ktlint pass checks
  • Readability
    • comments
    • dead code
    • magic strings/numbers
    • bad naming
    • antipattern
    • scopes
  • Complexity
    • long method
    • duplicated code
  • Reorder Responsibilities
    • long class
    • feature envy
    • inappropriate intimacy
    • data class
    • message chain
  • Refine Abstractions
    • long parameter list
    • data clump
    • primitive obsession
    • middle man

Mikado

  • Clean up constants and private fields
    • Move move() into Heading.move(Position)
    • Move turnLeft() into Heading.turnLeft()
    • Move turnRight() into Heading.turnRight()
      • Remove HEADING_* constants
        • in move() compare to heading enum
        • in turnRight() compare to heading enum
        • in turnLeft() compare to heading enum
          • state.heading in Rover.constructor to enum
            • Change heading Char in RoverState to Heading enum
              • Create Heading enum
  • Change var to val (immutable)
    • Rover.turnLeft use copy() on state
    • Rover.turnRight use copy() on state
    • Rover.move use copy() on state
    • Rover.constructor use copy() on state
      • Change RoverState to Data Class
  • Remove deltaX, deltaY in Heading
    • NORTH, etc -> Vector(0, 1)
      • move -> return Pair but using vector
        • Add Vector to enum class Heading
          • Create Vector data class
  • Remove posX, posY from RoverState
    • use position in Rover.position
      • Create toString in Position
    • use position in Rover constructor()
      • use position in move()
        • Add position to RoverState
          • Create Position data class
  • Replace x, y with Position in Heading.move()
    • RoverState.move use position
  • Return position in move() instead of Pair
  • remove move() from heading
    • use position.moveBy in RoverState.move
    • add moveBy to Position class