- Understanding Software
- Max Kanat Alexander
- 8字
- 2021-07-08 10:22:29
Part Three. Simplicity and Software Design
Chapter 9. Design from the Start
You really need to design from the start. You need to be working on simplicity from the very beginning of your project.
My policy on projects that I control is that we never add a feature unless the design can support it simply.
This drives some people crazy, notably people who have no concept of the future. They start to foam at the mouth and say things like, "We can't wait! This feature is so important!" or "Just put it in now and we'll just clean it up later!" They don't realize that this is their normal attitude. They're going to say the same thing about the next feature.
If you don't think about the future, then all of your code will be poorly designed and much too complex.
It'll be Frankenstein's monster, jammed together out of broken parts. And just like the friendly green giant, it'll be big, ugly, unstable, and harmful to your health.
Now just adding a tiny little piece and refactoring it afterward is fine. Landing a huge feature that the architecture can't support and then trying to clean it up afterward is a terrible task. Size matters.
Starting the Right Way
The worst situation is when you let people keep adding features with no design for months or years, and then one day you wake up and realize that something is not right. Now you have to fix your whole codebase. This is a terrible task, because just like adding a new feature, it can't be done all at once, unless you want to re-write.
If you want to start doing things the right way, you have to start doing things the right way. And that means that you have to fix the design piece by piece, in simple steps. That usually requires months or years of effort – totally wasted effort, because you should have just designed from the start. You should have thought about the future.
If your project lacks a strict design, and it continues to grow, then you will eventually end up over your head in complexity.
This doesn't mean you should be designing some huge generic beast from the start that tries to anticipate all future requirements and implement them now. It means that you need to apply the principles of software design as discussed in this book and Code Simplicity so that you get a system that is understandable, simple, and maintainable from the start.
-Max
- Getting Started with Citrix XenApp? 7.6
- Cocos2D-X權威指南(第2版)
- Learning Cython Programming
- Learning Data Mining with Python
- INSTANT MinGW Starter
- Java Web應用開發技術與案例教程(第2版)
- Getting Started with SQL Server 2012 Cube Development
- Mastering KnockoutJS
- BIM概論及Revit精講
- Getting Started with Eclipse Juno
- Raspberry Pi Robotic Blueprints
- Arduino可穿戴設備開發
- Visual FoxPro 6.0程序設計
- Practical Microservices
- 從零開始學Selenium自動化測試:基于Python:視頻教學版