Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Clean Code, who missed the p(o)int... ?

Clean Code, who missed the p(o)int... ?

Scheduled Pinned Locked Moved The Lounge
question
25 Posts 16 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P peterkmx

    Spot on ... upvoted :-)

    N Offline
    N Offline
    Nelek
    wrote on last edited by
    #7

    Thanks :)

    M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

    1 Reply Last reply
    0
    • L Lost User

      Clean Code: I like it, at least parts of it. But now I just recognized that some co workers interprets this, that it is enough having their code clean formatted text whise (indentation etc.) Can be that I'm wrong, but I think they have missed the point :(

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #8

      Well, I recently saw some code in which the "o" was left out of a variable named "count", sooo...

      1 Reply Last reply
      0
      • L Lost User

        Clean Code: I like it, at least parts of it. But now I just recognized that some co workers interprets this, that it is enough having their code clean formatted text whise (indentation etc.) Can be that I'm wrong, but I think they have missed the point :(

        M Offline
        M Offline
        Marc Clifton
        wrote on last edited by
        #9

        Unfortunately much of our field is littered with terms like "clean code", "Agile", "SOLID" but without concrete instructions, if you will, on how to implement those concepts. And lacking code reviews...and lacking people who know what they are doing though they claim they know...it's a mad mad world. I still have no idea how to explain SOLID to a junior developer (heck, or a senior developer) and I still have no idea who the heck Liskov is/was. [edit]OMG. I thought it was guy! Barbara Liskov - Wikipedia[^] [/edit]

        Latest Articles:
        DivWindow: Size, drag, minimize, and maximize floating windows with layout persistence

        J 1 Reply Last reply
        0
        • M Marc Clifton

          Unfortunately much of our field is littered with terms like "clean code", "Agile", "SOLID" but without concrete instructions, if you will, on how to implement those concepts. And lacking code reviews...and lacking people who know what they are doing though they claim they know...it's a mad mad world. I still have no idea how to explain SOLID to a junior developer (heck, or a senior developer) and I still have no idea who the heck Liskov is/was. [edit]OMG. I thought it was guy! Barbara Liskov - Wikipedia[^] [/edit]

          Latest Articles:
          DivWindow: Size, drag, minimize, and maximize floating windows with layout persistence

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #10

          Marc Clifton wrote:

          Unfortunately much of our field is littered with terms like "clean code", "Agile", "SOLID"

          And "readability".

          Marc Clifton wrote:

          I still have no idea who the heck Liskov is/was.

          I looked for actual studies on "readability" at one time. There must be some given how much developers use that term to justify almost anything. There was one study that involved fonts used in marketing materials (and it was probably printed marketing also.) As I recall the conclusion was that 4 or fewer fonts should be used. Nothing else.

          P D P K 4 Replies Last reply
          0
          • J jschell

            Marc Clifton wrote:

            Unfortunately much of our field is littered with terms like "clean code", "Agile", "SOLID"

            And "readability".

            Marc Clifton wrote:

            I still have no idea who the heck Liskov is/was.

            I looked for actual studies on "readability" at one time. There must be some given how much developers use that term to justify almost anything. There was one study that involved fonts used in marketing materials (and it was probably printed marketing also.) As I recall the conclusion was that 4 or fewer fonts should be used. Nothing else.

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #11

            jschell wrote:

            4 or fewer fonts

            :cough: typefaces :cough: But to stay off-topic, yes, so few web designers seem to have any graphic design education.

            1 Reply Last reply
            0
            • J jschell

              Marc Clifton wrote:

              Unfortunately much of our field is littered with terms like "clean code", "Agile", "SOLID"

              And "readability".

              Marc Clifton wrote:

              I still have no idea who the heck Liskov is/was.

              I looked for actual studies on "readability" at one time. There must be some given how much developers use that term to justify almost anything. There was one study that involved fonts used in marketing materials (and it was probably printed marketing also.) As I recall the conclusion was that 4 or fewer fonts should be used. Nothing else.

              D Offline
              D Offline
              DeerBear
              wrote on last edited by
              #12

              Readability is actually really important. The reason you can't find studies on it is that it varies by language, norms, code history, etc. I mean, sure, there are *some things* that are simply unreadable no matter what, but most often readability is highly subjective and team-based. Making hard and fast rules about it is very impractical and verging - in my opinion - on impossible.

              J 1 Reply Last reply
              0
              • L Lost User

                Clean Code: I like it, at least parts of it. But now I just recognized that some co workers interprets this, that it is enough having their code clean formatted text whise (indentation etc.) Can be that I'm wrong, but I think they have missed the point :(

                Sander RosselS Offline
                Sander RosselS Offline
                Sander Rossel
                wrote on last edited by
                #13

                They missed the point alright. You should also wash your computer with soap at least weekly. Especially your hard disk because that's where your code is stored. In production it's important to also wash your RAM because that's where lots of it runs.

                Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                1 Reply Last reply
                0
                • L Lost User

                  Clean Code: I like it, at least parts of it. But now I just recognized that some co workers interprets this, that it is enough having their code clean formatted text whise (indentation etc.) Can be that I'm wrong, but I think they have missed the point :(

                  M Offline
                  M Offline
                  maze3
                  wrote on last edited by
                  #14

                  If they mid level plus, then just share out this summary, which is nice quick scan over. Just helped me when I was trying to recall what clean code is. [Summary of 'Clean code' by Robert C. Martin · GitHub](https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988cf8d29)

                  Greg UtasG 1 Reply Last reply
                  0
                  • L Lost User

                    Clean Code: I like it, at least parts of it. But now I just recognized that some co workers interprets this, that it is enough having their code clean formatted text whise (indentation etc.) Can be that I'm wrong, but I think they have missed the point :(

                    M Offline
                    M Offline
                    Member 9167057
                    wrote on last edited by
                    #15

                    People following the form because they don't bother understanding the content ain't news, sadly.

                    D 1 Reply Last reply
                    0
                    • J jschell

                      Marc Clifton wrote:

                      Unfortunately much of our field is littered with terms like "clean code", "Agile", "SOLID"

                      And "readability".

                      Marc Clifton wrote:

                      I still have no idea who the heck Liskov is/was.

                      I looked for actual studies on "readability" at one time. There must be some given how much developers use that term to justify almost anything. There was one study that involved fonts used in marketing materials (and it was probably printed marketing also.) As I recall the conclusion was that 4 or fewer fonts should be used. Nothing else.

                      P Offline
                      P Offline
                      PhilipOakley
                      wrote on last edited by
                      #16

                      Most readability responses are along the lines of: - "They don't RTFM, so why write a good one", - "Comments in code is bad", - "I'm not good at (variable) naming". Nothing to read. Unplanned code obsolescence! Thank goodness(?) for Emoji's.

                      D 1 Reply Last reply
                      0
                      • M maze3

                        If they mid level plus, then just share out this summary, which is nice quick scan over. Just helped me when I was trying to recall what clean code is. [Summary of 'Clean code' by Robert C. Martin · GitHub](https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988cf8d29)

                        Greg UtasG Offline
                        Greg UtasG Offline
                        Greg Utas
                        wrote on last edited by
                        #17

                        I've never read it, but that's a really good summary, though there are a few terms that need explaining.

                        Robust Services Core | Software Techniques for Lemmings | Articles
                        The fox knows many things, but the hedgehog knows one big thing.

                        <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
                        <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

                        1 Reply Last reply
                        0
                        • M Member 9167057

                          People following the form because they don't bother understanding the content ain't news, sadly.

                          D Offline
                          D Offline
                          Daniel Pfeffer
                          wrote on last edited by
                          #18

                          It's called Cargo Cult [whatever]. :-\

                          Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                          M 1 Reply Last reply
                          0
                          • P PhilipOakley

                            Most readability responses are along the lines of: - "They don't RTFM, so why write a good one", - "Comments in code is bad", - "I'm not good at (variable) naming". Nothing to read. Unplanned code obsolescence! Thank goodness(?) for Emoji's.

                            D Offline
                            D Offline
                            Daniel Pfeffer
                            wrote on last edited by
                            #19

                            PhilipOakley wrote:

                            Thank goodness(?) for Emoji's

                            Especially this one: 💩

                            Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                            1 Reply Last reply
                            0
                            • J jschell

                              Marc Clifton wrote:

                              Unfortunately much of our field is littered with terms like "clean code", "Agile", "SOLID"

                              And "readability".

                              Marc Clifton wrote:

                              I still have no idea who the heck Liskov is/was.

                              I looked for actual studies on "readability" at one time. There must be some given how much developers use that term to justify almost anything. There was one study that involved fonts used in marketing materials (and it was probably printed marketing also.) As I recall the conclusion was that 4 or fewer fonts should be used. Nothing else.

                              K Offline
                              K Offline
                              KateAshman
                              wrote on last edited by
                              #20

                              I have one person in my team who will insist on doing things their way, because of clean code and readability. It's such a moot point, IMHO. Practically speaking, you should stick to the following: Structurally, you should keep the cyclometric complexity low --> you'll have cheaper A/B testing in the future, which is a good fallback strategy for unforeseen issues of all sizes. Syntax wise, just copy whatever style is prevalent in the code-base already, and reduce inconsistencies --> cheaper refactoring in the future. Quality wise, you should always aim for less lines of code, without resorting to ANY advanced language techniques --> less reading to understand the code, less esoteric bugs. Just do those three things to drive costs down and quality up. Everything else is pointless. The compiler doesn't care about the look and feel of the code and the user definitely doesn't care. We should take a hint and stop caring so much too.

                              A 1 Reply Last reply
                              0
                              • D Daniel Pfeffer

                                It's called Cargo Cult [whatever]. :-\

                                Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                M Offline
                                M Offline
                                Member 9167057
                                wrote on last edited by
                                #21

                                Right, thank you!

                                1 Reply Last reply
                                0
                                • K KateAshman

                                  I have one person in my team who will insist on doing things their way, because of clean code and readability. It's such a moot point, IMHO. Practically speaking, you should stick to the following: Structurally, you should keep the cyclometric complexity low --> you'll have cheaper A/B testing in the future, which is a good fallback strategy for unforeseen issues of all sizes. Syntax wise, just copy whatever style is prevalent in the code-base already, and reduce inconsistencies --> cheaper refactoring in the future. Quality wise, you should always aim for less lines of code, without resorting to ANY advanced language techniques --> less reading to understand the code, less esoteric bugs. Just do those three things to drive costs down and quality up. Everything else is pointless. The compiler doesn't care about the look and feel of the code and the user definitely doesn't care. We should take a hint and stop caring so much too.

                                  A Offline
                                  A Offline
                                  Andre_Prellwitz
                                  wrote on last edited by
                                  #22

                                  Programmers who can't be bothered to use linting tools are rarely concerned with cyclometric complexity, or maintenance cost, or refactoring. Also, it seems the broken window theory applies to software: if it's already crap software, most people won't bother with writing good code, resorting instead to the metric of lowest cost to write (even if it means the user or company pays the price many times over).

                                  J 1 Reply Last reply
                                  0
                                  • D DeerBear

                                    Readability is actually really important. The reason you can't find studies on it is that it varies by language, norms, code history, etc. I mean, sure, there are *some things* that are simply unreadable no matter what, but most often readability is highly subjective and team-based. Making hard and fast rules about it is very impractical and verging - in my opinion - on impossible.

                                    J Offline
                                    J Offline
                                    jschell
                                    wrote on last edited by
                                    #23

                                    DeerBear wrote:

                                    The reason you can't find studies on it is that it varies by language, norms, code history, etc.

                                    Nope. The reason you can't find any studies on it is because one needs to first be able to measure something to do a study. You can't declare that something is 'better' if you cannot define how to measure that it is so. Would you sign a contract that said your code must be 'better' or you don't get paid unless the contract specifically stated how that would be measured?

                                    1 Reply Last reply
                                    0
                                    • A Andre_Prellwitz

                                      Programmers who can't be bothered to use linting tools are rarely concerned with cyclometric complexity, or maintenance cost, or refactoring. Also, it seems the broken window theory applies to software: if it's already crap software, most people won't bother with writing good code, resorting instead to the metric of lowest cost to write (even if it means the user or company pays the price many times over).

                                      J Offline
                                      J Offline
                                      jschell
                                      wrote on last edited by
                                      #24

                                      Andre_Prellwitz wrote:

                                      bothered to use linting tools are

                                      Sigh... Static checkers are useless. They were useless 40 years ago when I first saw them and just as useless now. I have seen a static checked which tagged switch statements as being too complex. The 'solution' which some programmer implemented to fix that and which was reviewed and passed involved creating 40 objects every single time. 40 objects that could not even be created successfully every time. That code ended up in production. So it went from a very valid and correct idiom to one that failed. If the teams consists of NOTHING but junior developers then maybe they might provide a benefit. But if there is even one mid level developer and that person actually takes code review seriously then that is going to be far more effective.

                                      A 1 Reply Last reply
                                      0
                                      • J jschell

                                        Andre_Prellwitz wrote:

                                        bothered to use linting tools are

                                        Sigh... Static checkers are useless. They were useless 40 years ago when I first saw them and just as useless now. I have seen a static checked which tagged switch statements as being too complex. The 'solution' which some programmer implemented to fix that and which was reviewed and passed involved creating 40 objects every single time. 40 objects that could not even be created successfully every time. That code ended up in production. So it went from a very valid and correct idiom to one that failed. If the teams consists of NOTHING but junior developers then maybe they might provide a benefit. But if there is even one mid level developer and that person actually takes code review seriously then that is going to be far more effective.

                                        A Offline
                                        A Offline
                                        Andre_Prellwitz
                                        wrote on last edited by
                                        #25

                                        Agreed, static code analysis is designed to provide false positives over false negatives. What I actually meant was the simple linters that fix code style differences; if you cannot even agree on standards (rules such as "interface names should start with the letter 'I'", or "avoid Hungarian notation") then what are the odds you can agree on what's considered "clean"?

                                        1 Reply Last reply
                                        0
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • World
                                        • Users
                                        • Groups