Does KISS influence your development, if so, are you doing well?

In my programming life, I work with the โ€œKISSโ€ principle - keeping it is just plain stupid. This is very good for me, although projects and tasks become even more complex (at least for me in my project life). Do you use this principle? What for? Why not? Do you thrive on a kiss or think itโ€™s not possible?

+4
source share
10 answers

Yes, it plays an important role. We are developing Test-Driven Development here, so we only write tests to meet the requirements. Thus, we write only the code that we need, which is executed.

In addition, we all strive to make things simple in general; complications lead to errors. We prefer to write less code to solve the problem (this does not mean using a large number of hacks to get fewer lines of code). Sometimes we have to do complex and complicated things, but we try to encapsulate the rage in our class.

And the "stupid" part should remind us all that we are not as good as we think: "

The result is that most errors are mostly easy to debug.

+9
source

Yes. The โ€œintelligenceโ€ in our team is not at all approved. We try to be smart, but no more smart.

Code that tries to be smart usually only reaches:

  • Unsupported because it is smarter than its author
  • Failure in extreme cases because it is not QUITE smart enough

For example, instead of automatically setting the network permissions of the database in the installer of the database configuration component, the execution command should be executed manually (although they are stored under source control when the script is run), since the code for execution will automatically be a little too smart. This will work fine until someone changes the IP address numbering scheme or something else.

+2
source

Keeping everything simple is actually much more complicated than an alternative to introducing complexity when required.

The opposite extremes are actually more similar than the first glance - you will learn about coders that do nothing, trying to simplify everything, and other coders that do nothing, trying to make it as complex as possible.

+1
source

The KISS is very important in my eyes. Simple and small functions are easy to read and understand and, as a rule, less prone to errors.

But I also saw code in which some used nested ternary conditional expressions instead of if-then-else statements, which in some cases can be hard to read. Before the code starts to become obscure, I prefer to spend a few "extra" lines of code. Even simple line breaks can help make code easier to understand.

+1
source

The main way I try to keep everything in order is to ensure that the functions match the same screen in the IDE. This is a new approach at my current concert, but it is bleeding the rest of my team, and I received comments from other developers, noting that they prefer to debug my code than their own.

+1
source

KISS plays a role. Sometimes it seems to me that I am struggling with a difficult battle so that everything is simple, but this is better than an alternative.

+1
source

Everyone can use the KISS methodology in the same way as in life. When explaining the code to a new developer, this helps if the design and flow are exactly the same simple. He can clarify all sorts of warnings, to remember what you did 6 months ago, in order to be able to introduce new features.

When it comes to the end of the day, you want to know that people can understand what you have done, and want the user that he likes, as well as understand him. All this is beneficial for the KISS approach.

+1
source

I constantly strive for simple solutions and often reorganize the code with the expressed intention to simplify it, as a rule, by adding new functions. A simple test is easier, and usually less. Less effort means faster turning.

/ Allan

0
source

A good KISS implementation is not to use more than 3 breeding levels.

As a rule, about where people start to get confused, and you probably should try turning on the feature.

Tasks and projects, on the other hand, will always be complicated. Just using KISS for the software side, things will make your life easier.

(You may need to write the same code 3 times to get it simple enough and good enough)

0
source

Yes, KISS is the key (not the group;)

from Zen Python: http://www.python.org/dev/peps/pep-0020/

Beautiful is better than ugly.
Simple is better than complex.

0
source

Source: https://habr.com/ru/post/1276824/


All Articles