📜 ⬆️ ⬇️

Best working practices versus life

I noticed that people, lately, have increasingly become very categorical: you need to create unit tests for everything (XP TDD), valid CSS above all else (W3C validity), a standup rally is needed even with a cleaner (Scrum) ...

Here I invite you to speculate on Best working practices versus life!


Unit testing for every occasion


A typical case: a mid-level project, the logic is quite simple, you have short iterations.
And you have a low cost error, that is, you do not write a banking application where there is a chance to lose millions in case of an error. It's all like this: someone found a mistake, wrote you, you said thank you and corrected.
')
I respect Extreme Programming (XP), but I am not a supporter of TDD [ Test-driven development ] where you first need to create tests that describe code requirements before writing the code itself, thus you need to create a test for each feature.

In my opinion, TDD increases costs without giving in return corresponding benefits (except for projects with high cost of errors). It seems reasonable to me to find a balance and use Unit tests for critical application logic.

CSS markup


“Friends, how is it that you do not have valid CSS on the pages: ...”
from a letter to our company from a service user.

Yes, I really love the W3C validators [ W3C validators ], but when confronted with the convenience versus W3C validity I choose convenience.

An example of a style that creates rounded edges for div elements:
.rounded-corners {
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
-khtml-border-radius: 5px;
}

Yes, I know the remaining 256 ways to do this with valid CSS ... but this one is very pleasant to look at.

I am interested in any cases where you faced a dilemma: best practice / life?

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


All Articles