How KISS and other principles can help in software development and in everyday life

KISS, DRY, YAGNI, development principles
How KISS and other principles can help in software development and in everyday life

Very soon, developers from all over the world will celebrate the 256th day of the year. On the eve of this holiday, which falls on September 12 this year, we would like to tell you a few words about our profession.

Everyone knows that every developer needs to know math and logic, have an analytical mind, and so on and so forth. But many forget that the ability to work in a team plays an important (may be even the main) role in modern software development process.

People think that computer science is the art of geniuses but the actual reality is the opposite, just many people doing things that build on each other, like a wall of mini stones.

Donald Knuth

It is easy to develop a website, mobile application or any other program single-handedly. Each line of code is clear without comments. Such names of variables as x1, x2 and x345 are easy to use, and the "spaghetti" of "if ... else" constructions is perfectly acceptable, because it works. But when you work as a part of a team, you need to use quite another principles.

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

Martin Fowler

An acronym KISS, which has been used in the English-speaking world already for half a century, means Keep It Short and Simple. Although initially this principle was created in the engineering, with the time it found a place in many other areas, including programming. An alternative interpretation of KISS principle sounds like Keep It Simple Stupid, which is especially relevant for the tangled code that will irritate other developers. In our world could not be universal advice, but more often than not, a simple solution will work (and will be supported) much better than brilliant, but incomprehensible code.

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Martin Golding

Generally speaking, developers love a good joke, especially if it contains not only humor but also some inner meaning. A perfect example is the phrase "Is your code dry enough?". DRY principle stands for Don’t Repeat Yourself. If the code has repetitive elements – it is a reason to create a new abstraction for them. It is а pity that the DRY principle poorly applied in real life, although you can advise your overly talkative friend to "DRY" his speech

On the contrary, YAGNI principle - You Ain’t Gonna Need It – is useful for everyone. It calls to implement only main tasks, not some extra features “just in case". If you want to build a two-storey house, you need to make a groundwork for the two-storey house, not a super-platform in case of building on a skyscraper.

The main purpose of these and many other funny and not abbreviations – to ensure coordinated teamwork and get at the output easily supported well working code. Without any doubt, the programming requires abstract thinking much more than many other professions. Nevertheless, some of the principles that programmers use in their work, are perfectly available and sometimes even helpful to anyone.