0

This is a quote from "Clean Code"--a quite renowned book by Robert C. Martin:

The Total Cost of Owning a Mess

If you have been a programmer for more than two or three years, you have probably been significantly slowed down by someone else’s messy code. If you have been a programmer for longer than two or three years, you have probably been slowed down by messy code. The degree of the slowdown can be significant. (...)

For me the first two sentences bear exactly the same meaning and I am at loss of why they were written next to each other (to the point of suspecting the author to placing a pun on bad style of coding).

What is the semantic difference between the first two sentences that both the author and the editor decided to include?


Author uses this kind of stylistic repetition throughout the book:

Have you ever waded through a mess so grave that it took weeks to do what should have taken hours? Have you seen what should have been a one-line change, made instead in hundreds of different modules? These symptoms are all too common. (...)

Let’s say you believe that messy code is a significant impediment. Let’s say that you accept that the only way to go fast is to keep your code clean. (...)

However in these cases the phrases have clearly distinct or complementary meaning. This is not the case for the passage in question.

  • 4
    The clear difference to me is the lack of "someone else's" in the second sentence. The first is about recognizing problems in other peoples' code, the second is about problems in your own, older code. – Hellion Jul 21 '16 at 14:00
  • 1
    I think it means someone else's code in the first sentence and your own code in the second. It could be a subtle reminder to not be critical of others without being self critical. – user23614 Jul 21 '16 at 14:00
  • 1
    There is a difference, as @Hellion points out, but it's very badly written, and I think would confuse most people. The other examples you give are ok, I think: nowhere near as bad, anyway. – Max Williams Jul 21 '16 at 14:01
  • @Hellion "messy code" is a superset of "someone else's messy code", not a disjoint one. It should be "your own", if the author wanted to stress it. – macraf Jul 21 '16 at 14:02
  • 1
    I think it's well written, it reminds you that you may have written messy code, as other pointed out, but it also gives a very common example of pseudo messy code: a good practice in coding is not the repeat elements, but put them as functions or sub-routines. Here in "totally made up pseudo English code" he should have written " Function MainSentence(): you have been probably slowed down by messy code written by+@parameters. 1stSentence=MainSentence( "someone else") 2nd sentence= MainSentence("yourself) – P. O. Jul 21 '16 at 14:14
-1

If you have been a programmer for more than two or three years, you have probably been significantly slowed down by someone else’s messy code.

The second sentence "If you have been a programmer for longer than two or three years, you have probably been slowed down by messy code. The degree of the slowdown can be significant. (...)

The intention is that yours as well others' codes may have been messy- though the degrees of messiness could have been different.

Another way of saying "When you point one finger, there are three fingers pointing back to you." Or "Look in the mirror. You might just be talking about yourself."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.