General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Vitaly L
Continuous Delivery
comments
Comments by "Vitaly L" (@vitalyl1327) on "" video.
This pathetic idea is the most destructive cobtrubution of Uncle Bob. His other suggestions are awful and destructive too, but this one caused more damage to this industry than all the other combined.
5
I've been coding for well over 30 years. I never seen a single example of a self-documenting code that does not need comnents.
3
@StephenButler-sg5hm right, turn a 3-page maths-dense paper into a single method name. Good luck.
2
@edgeeffect no they cannot. "Why" can be a mathematical reasoning on three pages. Good luck turning it into a method name.
2
@philipoakley5498 it is only possible in the most trivial cases.
1
@juleslondon3088 No AI, even superhuman AI, will be able to extract an information that *is not there*.
1
@juleslondon3088 you cannot infer the information that is not there. You can guess, and all your guesses will be, likely, very wrong. Code only tells the half of the story and there is no way you can correctly infer the intention, the constraints, the larger context from a piece of code. Like in my timing example in the other thread here - no amount of guessing will give you the actual physical timing. You'd have to buy or rent a 10gs scope and do the experiments in the physical world.
1
@ in my experience, the vast majority of relevant information is outside of the code, and cannot be inferred. But this can be a difference between problem domains, of course. If yours is some standard CRUD, some typical web stuff, then yes, code will be pretty descriptive of the intention. In my case it is not - a lot of information is about the hardware and the physics of the real world, and often a result of some pretty complex mathematics, and if it's missing from the code, it cannot be guessed.
1
@psychic8872 writing about your code (or anything else) is a way to discipline yourself. A centuries-old discipline trick.
1
@7th_CAV_Trooper AI won't have a context, it can only explain what code is doing (which should be obvious from the code itself), not why it's written this way and why it's written at all in the first place.
1
@ that's the most important part of any software project. And it's almost always not in the code.
1
@7th_CAV_Trooper wrong. "Why?" may include cases like "this is a workaround for a bug in a third-party component that will become obsolete or misbehave once the bug is fixed", or "this is written like this because the assumption on the input data is this and this". These things must be documented. If not, the remaining code is garbage.
1
@7th_CAV_Trooper commit comments are code documentation. Too bad they're usually "fixing a bug" and that's all.
1
@7th_CAV_Trooper commit messages get lost too - large refactorings wipe the history out...
1
@7th_CAV_Trooper commit messages are far from the ideal place for important contextual documentation. Also, a lot of constraints and assumptions stem from physical world, performance experiments, etc., and if not documented will render resulting code meaningless. I just finished debugging an obscure protocol implementation, and I would have done it weeks faster if the original author cared to actually document the timing constraints and the reason behind them. I had to repeat all the original author experiments (some of which were quite expensive) to find out what could have been just documented in the first place.
1
@jeffthejava1 something documented elsewhere will never be read. Comments are close to the code and it is hard to ignore them. Code without comments is a very poorly written code indeed.
1
also, this is where Literate Programming shines. When "ehy?" is a result of a few papers-worth reasoning, write this reasoning down alongside with the code the same way you'd write a paper.
1