"Technical debt is like Tetris"

According to Wikipedia, technical debt (Technical Debt) is "a concept in programming, reflecting the additional development work when using the code easier to achieve in the short term rather than the application of the best overall solution appeared." Technical debt can be compared with financial bonds. If the debt is not repaid technology, it will accumulate "interest", which later led to more difficult to implement the changes. However, the technical debt is not necessarily a bad thing, sometimes just need technical debt in order to move the project forward.

Developer  Jonathan Boccara technical debt compared to Tetris. Initial games, need to start from a blank page, just like the beginning of the coding project from nothing is the same.

Then, the box began to fall, each box is placed in the position will affect the rest of the game. If you make the box free fall without much thinking about the situation, then the next game will become more difficult. Conversely, if trying to build a clean, compact, more manageable late.

Each new development is like a fix or a new box, the need for integration with existing code. If a quick and dirty way to break them, as if leaving a loophole in Tetris structure. If you wish to leave some blank or fewer loopholes, you need to spend time designing a clean solution to integrate a hotfix or development programs. It is not easy to achieve, but in the long term will pay off.

Tetris game is not always required a flat structure, as long as there are plans to increase or decrease and elimination. Like the vertical bar to make room to slide in and clear the first four lines of the same, with a feeling of pleasant:

Even left some loopholes, you can retain a compact line above it, so you can remove the top of the fill hole. Technical debt, too, if we can control, and plans to repay in the future, it can be appropriate to increase the debt.

When poor debt management technology in the past, piled to the top of the box, you can not add new features. At this point, the only way forward is to return to the past, to simplify the code by refactoring. However, this can not be done in real Tetris game.

Another technical debt compared to the same Tetris developer  Colin O'Dell believes, you must be used to play Tetris and similar thought processes to manage technical debt:

  • 如何排列先前的块?(当前如何构建代码库? )
  • 是否有放置当前块的理想位置?(是否有执行当前任务的理想位置? )
  • 接下来会出现什么障碍,它们将如何调试?( 接下来会出现什么功能,它们又将如何适应? )

这样做将使维护现有功能以及引入新的更改和功能变得更加容易。 当你背负技术债时,不妨借鉴俄罗斯方块的思路,或是玩几局游戏,说不定能激发灵感。​​​​​​​

Guess you like

Origin www.oschina.net/news/112999/technical-debt-is-like-a-tetris-game
Recommended