5 ms·
Bob Martin said in one of his lectures that Software Engineering is the only field where people can't even agree on one thing.
by byebyetech 8y ago
Bob Martin said in one of his lectures that Software Engineering is the only field where people can't even agree on one thing.
- tabtab 8y agoOnce we got into a big discussion at c2.com about "proving nested blocks were objectively better than go-to's". Being most agreed nested blocks are usually "better", it seemed like it would be an easy task. Not! Too much depends on human psychology/physiology, which both varies between people, and is poorly understood. We couldn't even agree on a definition of nested blocks, being hybrid structures were presented as case studies. I personally believe nested blocks produce a visual structure (indenting) that helps one understand the code by its "shape". Go-to's have no known visual equivalent. Computers don't "care" how you organize software, they just blindly follow commands. Thus, you are writing it for people more than machines, and people differ too much in how they perceive and process code. For the most part, software is NOT about machines.
- marcosdumay 8y ago> proving nested blocks were objectively better than go-to's Dijkstra spent many, many pages on that. And it's still not a clear cut "this one is always better" case, as there are some obvious exceptions.
- vajrabum 8y agoIf you'd ever had to support some old Fortran or Cobol littered with gotos you'd probably sing a different tune. I'd guess you've never seen that sort of mess though. It's gotten pretty rare.
- marcosdumay 8y agoWell "some excceptions" of course is not the same as the entirely unstructured languages out there. I've written a lot on the fortran-inspired MS Basic when a child. I know quite well how bad they can become.
- tabtab 8y agoI wish to make it clear I am NOT defending goto's as an actual practice. I'm only saying that objective proof that they are "bad" is lacking. Goto's served as a test case of objective evidence of code design. Do note that some actual coders have claimed that if you establish goto conventions within a shop, people handle them just fine.
- sheepmullet 8y ago> and people differ too much in how they perceive and process code. Yes, for example I love dense code. A 1 line regex is a lot simpler to me than the 50-60 lines of code equivalent. Yet some programmers find the 1 line regex significantly more difficult even if they know regex.
- neffy 8y agoFisher consensus problem :)
- crdoconnor 8y agoWell, it's pretty hard to agree with him specifically.