Why good programmers are also good designers

In the high tech industry, I've heard a lot of great developers claim to know nothing about design. They see design as a mysterious world, a world outside the world of programming. They feel that they will never be able to "do" design work because they simply don't have the innate ability to do it.

But please forgive me. Good programming is also good design. Because, good code is well-designed code. Any programmer who writes good code is also writing well-designed code. The principles that define what constitutes good code are surprisingly similar to the principles of what constitutes good design.

If you don't believe me, check out Dieter Rams' Ten Principles of Good Design, I don't know if you found it, in almost all cases you can replace "design" with the word "code" and "product" with the word "software" ", and then you get the principles of how to write good code.

picture

good code is innovative

It's obvious that when you write code, your goal is to solve the problem in the best way possible.

Good code makes software useful

If you're writing code that doesn't work in software and doesn't benefit some other useful code, chances are it's unnecessary code, and unnecessary code is usually bad code.

Good code has aesthetic interest

Good code is easy to read, and good programmers know that it pays to spend time thinking about a clear name, breaking down functionality, and working on code readability. Good code has an aesthetic on the screen. It is always well executed, planned and organized.

Good code makes software easier to understand

Also, breaking down functionality, and choosing meaningful method and variable names are essential in good code, and being able to express the purpose of the code makes it easier to understand. Hard-to-understand code is often bad code.

Good code is unobtrusive

Good code doesn't disturb other code and maintains the SOLID principles of the code, which is very important for creating good maintainable code. When this method interferes with another method, it makes it difficult for us to manage our code. The methods themselves should be self-contained so that they are easier to manage and easier to reuse.

Good code walks the talk

It is important to break down these issues in the code to ensure that the behavior of the code is consistent with its name and purpose. If your method is a named function, then it should just be named and nothing else. It should not provide save, update, rename, delete, and any other functions that are not explicitly stated in the definition.

good code is durable

It is very important to create code that is easy to manage, easy to maintain. Maybe some of your code is still in use 10 years from now, but if you create a bunch of bad code that's mixed up with problems, they're going to get in the way and give you headaches every now and then.

Good code is thorough and detailed

Good code is a well-thought-out solution to a problem that covers everything. This includes thoroughly testing different situations to make the solution as accurate and efficient as possible.

Good code is environmentally friendly

It might sound like an exaggeration, but good code is actually environmentally friendly in a different way than the real thing. Good code is friendly to the software environment, it doesn't duplicate code, it does what it's supposed to do, and breaks down the problem. Bad code can have a bad impact on the software environment, it can cause code pollution and make the project "ugly" (like real environmental pollution).

Good code is always as lean as possible

Good code aims to create elegant solutions that do what it's supposed to do, don't duplicate code, and are well organized. The biggest project bloat is due to duplication of methods, poor organization, and a mixed focus on breaking down the essentials of things. Good code simplifies things down to core functionality, and then combines those core functionality to build software.

To sum up, programmers who can write good code are also true designers, and the principles they use to create the best solution to a problem are almost the same as the principles to be adhered to to be the best designers. Good code is simple code that is well-designed, well-crafted but unobtrusive, durable, easy to use, easy to read, manageable, and useful. Good code is produced in the same way as the best UI and the most beautiful furniture, just a lot of people don't realize it.

Translation link: http://www.codeceo.com/article/why-good-programmer-good-desinger.html
English original: Why Good Programmers are Good
Designers

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326393002&siteId=291194637