10. Single responsibility principle

For me it is the one of the most important rules about developing software. It comes from SOLID principles by Robert C. Martin. In short it states that every module, class or function in a computer program should have responsibility over a single part of that program’s functionality What are important consequences of this? It helps to keep particular logic in one place.… Continue reading 10. Single responsibility principle

38. Pure functions

Pure functions are one of the main concepts in functional programming. Pure means that it does not depend on the state of the program: non-local variables, reference arguments, static variables, data in external sources like database and also does not modify neither mentioned variables nor parameters provided. Thus, it will always return the same value… Continue reading 38. Pure functions

Published
Categorized as Coding

1. Naming variables, functions etc

The rule that always applies is: reading code is way harder than writing it! The computer will instantly understand any code you write, people won’t. So make your code easy to read for you and for other programmers. Name your variables, functions, classes, and other code entities according to what they store, what they do,… Continue reading 1. Naming variables, functions etc

Published
Categorized as Coding