Answer the question
In order to leave comments, you need to log in
How often do programmers have to make truth tables?
Actually, the question is in the subject. Do you work on truth tables? If so, please provide examples of such tasks where you have to do this.
Answer the question
In order to leave comments, you need to log in
Advanced search by parameters is a classic example.
Open hh.ru and go to the page with a list of parameters: city, salary, type of employment, rights, disability, etc.
The truth table will be built there as an object and it will already be used for sampling. A variation on the theme - dependent parameters, for example, I need an employee with rights, but only category C. This means that I should look for the category of rights only when I have a check mark for rights. You can also add driving experience and things like that here.
I won’t tell you right off the bat how it works under the hood, but in general, any advanced search system will be a truth table in its essence.
No, almost never. Usually it's enough to throw a bunch of conditions, brackets and other things for understanding, and then ask the compiler / IDE to put it all into the desired form (FCS, SDF, lazy evaluation, implicit conversions to Boolean, ternary conditional operators, minimal branching with return).
Basically, this is necessary for checking access roles and debugging predefined filters.
Simplifying logic expressions in the form of a function would not hurt.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question