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. Sloppy Code - thoughts

Sloppy Code - thoughts

Scheduled Pinned Locked Moved The Lounge
questiondiscussion
55 Posts 32 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.
  • K Kenneth Haugland

    We don't really have time for facts, we mostly go with assumptions instead.

    J Offline
    J Offline
    Jeremy Falcon
    wrote on last edited by
    #18

    I'll accept that as a fact.

    Jeremy Falcon

    K 1 Reply Last reply
    0
    • J Jeremy Falcon

      I'll accept that as a fact.

      Jeremy Falcon

      K Offline
      K Offline
      Kenneth Haugland
      wrote on last edited by
      #19

      You assume too much :laugh:

      1 Reply Last reply
      0
      • K Kenneth Haugland

        So you think Einstein was wrong? ;P

        R Offline
        R Offline
        R Giskard Reventlov
        wrote on last edited by
        #20

        About what?

        K J 2 Replies Last reply
        0
        • R R Giskard Reventlov

          About what?

          K Offline
          K Offline
          Kenneth Haugland
          wrote on last edited by
          #21

          Quote:

          if you can't be bothered to take care of yourself

          Pic[^]. Do you think he`looks like a physicist or a hobo?

          R 1 Reply Last reply
          0
          • K Kenneth Haugland

            Quote:

            if you can't be bothered to take care of yourself

            Pic[^]. Do you think he`looks like a physicist or a hobo?

            R Offline
            R Offline
            R Giskard Reventlov
            wrote on last edited by
            #22

            He looked somewhat disheveled which is not the same as looking like a hobo. Besides, I, like the man, hate wearing socks.

            K 1 Reply Last reply
            0
            • J Jeremy Falcon

              While we're on the subject of code reviews, what do you guys think about sloppy code that's not formatted well? I tend to not think I'm that anal retentive, but I admit the poindexter comes out when I see sloppy code that's not kept up to a proper margin, not indented decently, old commented code left in, etc. Oddly enough, the coders that write messy code tend to also have messy cars and homes. It's gross.

              Jeremy Falcon

              S Offline
              S Offline
              Simon_Whale
              wrote on last edited by
              #23

              I'm with you on that code should be indented properly. Couple of things I have to add the format of code. Where people have excessive white space between code or methods and silly naming conventions that make code difficult to read

              Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON

              C 1 Reply Last reply
              0
              • R R Giskard Reventlov

                He looked somewhat disheveled which is not the same as looking like a hobo. Besides, I, like the man, hate wearing socks.

                K Offline
                K Offline
                Kenneth Haugland
                wrote on last edited by
                #24

                I think the comments about the looks on one subject also reflects the action in another. If it truly were like that you'd never be fooled, by, let's say, politicians. ;)

                M 1 Reply Last reply
                0
                • J Jeremy Falcon

                  While we're on the subject of code reviews, what do you guys think about sloppy code that's not formatted well? I tend to not think I'm that anal retentive, but I admit the poindexter comes out when I see sloppy code that's not kept up to a proper margin, not indented decently, old commented code left in, etc. Oddly enough, the coders that write messy code tend to also have messy cars and homes. It's gross.

                  Jeremy Falcon

                  M Offline
                  M Offline
                  Mycroft Holmes
                  wrote on last edited by
                  #25

                  ctrl e,d in xaml formats the code, I find I am doing that in all sorts of applications, word, excel, bloody annoying. VS formats the layout for me so it is consistent and neat. Now old comments are another matter.

                  Never underestimate the power of human stupidity RAH

                  1 Reply Last reply
                  0
                  • S Simon_Whale

                    I'm with you on that code should be indented properly. Couple of things I have to add the format of code. Where people have excessive white space between code or methods and silly naming conventions that make code difficult to read

                    Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON

                    C Offline
                    C Offline
                    charlieg
                    wrote on last edited by
                    #26

                    "silly naming conventions" like absurd Hungarian notation? There are only two variable naming conventions I prefer - the first is putting a "p" in front of a pointer: int *pInt; I know that's simple, but to just have it so obvious makes it easier for me to understand. The second is adding lsbs to the variable name: "crankshaft_diameter_mm" but I'm losing my love for this. I do work in the embedded world, and all is wonderful as long as the next product version does not roll out. I'm dealing with this now - common code base, version one had 1mm lsb, next version is .1 mm. Sort of elephants the variable names.

                    Charlie Gilley Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                    S 1 Reply Last reply
                    0
                    • L Lost User

                      How is it even possible to have badly formatted code in this day and age? You can just press ctrl+shift+alt+windows+1+F and have it automatically formatted.

                      P Offline
                      P Offline
                      PaulLinton
                      wrote on last edited by
                      #27

                      How does 'just' relate to 'ctrl+shift+alt+windows+1+F'? :) https://www.youtube.com/watch?v=ab8GtuPdrUQ[^]

                      1 Reply Last reply
                      0
                      • J Jeremy Falcon

                        While we're on the subject of code reviews, what do you guys think about sloppy code that's not formatted well? I tend to not think I'm that anal retentive, but I admit the poindexter comes out when I see sloppy code that's not kept up to a proper margin, not indented decently, old commented code left in, etc. Oddly enough, the coders that write messy code tend to also have messy cars and homes. It's gross.

                        Jeremy Falcon

                        D Offline
                        D Offline
                        dazfuller
                        wrote on last edited by
                        #28

                        I would say that poorly formatted code makes it more difficult to maintain (depending on how badly formatted it is exactly), if it's not easy to spot a bug in the slop then it's harder to fix. Of course, if you have something like ReSharper installed then CTRL+E+C :) at which point there's no excuse for sloppy code and the offender deserves a thorough booting!

                        Eagles may soar, but weasels don't get sucked into jet engines

                        1 Reply Last reply
                        0
                        • J Jeremy Falcon

                          While we're on the subject of code reviews, what do you guys think about sloppy code that's not formatted well? I tend to not think I'm that anal retentive, but I admit the poindexter comes out when I see sloppy code that's not kept up to a proper margin, not indented decently, old commented code left in, etc. Oddly enough, the coders that write messy code tend to also have messy cars and homes. It's gross.

                          Jeremy Falcon

                          J Offline
                          J Offline
                          Jorgen Andersson
                          wrote on last edited by
                          #29

                          I don't care overly much as long as it's readable and consistent. And doesn't contain that abomination systems Hungarian, from the Redundancy Department of Redundancy. That said, I prefer Allman style, but I'm not anal about it. And about messy people. I know a guy that owns a show car, and his cars and garage are in immaculate condition while his home is a complete dirty mess (unmarried). It's what you care about. I can imagine the same to be true for coders.

                          Wrong is evil and must be defeated. - Jeff Ello

                          1 Reply Last reply
                          0
                          • C charlieg

                            "silly naming conventions" like absurd Hungarian notation? There are only two variable naming conventions I prefer - the first is putting a "p" in front of a pointer: int *pInt; I know that's simple, but to just have it so obvious makes it easier for me to understand. The second is adding lsbs to the variable name: "crankshaft_diameter_mm" but I'm losing my love for this. I do work in the embedded world, and all is wonderful as long as the next product version does not roll out. I'm dealing with this now - common code base, version one had 1mm lsb, next version is .1 mm. Sort of elephants the variable names.

                            Charlie Gilley Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                            S Offline
                            S Offline
                            Simon_Whale
                            wrote on last edited by
                            #30

                            No I can deal with Hungarian notation as It was something that was considered good practice when I started with coding. An example of what I meant about silly naming convetions was..

                            private ClientPropertyForm m_RW_CPForm = null;

                            it took me a while to see that this was a supposed to be a read write instance of the client property form.

                            Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON

                            C 1 Reply Last reply
                            0
                            • R R Giskard Reventlov

                              However awful my code might be, at least it's properly formatted... :-) I agree with you; it's the same when I interview a developer that turns up looking like a homeless person: if you can't be bothered to take care of yourself, why would I believe that you'd be any different with your attitude to coding?

                              L Offline
                              L Offline
                              Le Page
                              wrote on last edited by
                              #31

                              That's kind of a shallow analogy. It's like comparing Tesla's love for physics and women. You just cannot seek connections between ones physical appearance and mental capabilities.

                              A R R 3 Replies Last reply
                              0
                              • J Jeremy Falcon

                                While we're on the subject of code reviews, what do you guys think about sloppy code that's not formatted well? I tend to not think I'm that anal retentive, but I admit the poindexter comes out when I see sloppy code that's not kept up to a proper margin, not indented decently, old commented code left in, etc. Oddly enough, the coders that write messy code tend to also have messy cars and homes. It's gross.

                                Jeremy Falcon

                                K Offline
                                K Offline
                                Kirk Wood
                                wrote on last edited by
                                #32

                                Two things that really annoy me are sloppy formatting and leaving old commented code. One, formatting is just so easy in a number of environments. And two, if you need the old code, that is what the source control is for. Makes me wonder if a person bothers taking out the trash at home.

                                1 Reply Last reply
                                0
                                • J Jeremy Falcon

                                  While we're on the subject of code reviews, what do you guys think about sloppy code that's not formatted well? I tend to not think I'm that anal retentive, but I admit the poindexter comes out when I see sloppy code that's not kept up to a proper margin, not indented decently, old commented code left in, etc. Oddly enough, the coders that write messy code tend to also have messy cars and homes. It's gross.

                                  Jeremy Falcon

                                  C Offline
                                  C Offline
                                  cramotowski
                                  wrote on last edited by
                                  #33

                                  It bothers me a great deal and for very specific reasons. When working in a team, it is not good enough to clean up someone else's code by running an auto format tool. Depending on the tabs vs spaces issue this can potentially be a far from trivial task. Additionally, if you do just clean up every file in a project before you commit your changes, you may be horribly polluting the commit history and your diff will give no one on your team any clue as to what you actually implemented. It's a dangerous game that will compound over time. Best is to review code as a group and set up all of your editors to be consistent. Then define a standard art form that you all agree on. Anything less than that and you're asking for a world of hurt.

                                  1 Reply Last reply
                                  0
                                  • J Jeremy Falcon

                                    While we're on the subject of code reviews, what do you guys think about sloppy code that's not formatted well? I tend to not think I'm that anal retentive, but I admit the poindexter comes out when I see sloppy code that's not kept up to a proper margin, not indented decently, old commented code left in, etc. Oddly enough, the coders that write messy code tend to also have messy cars and homes. It's gross.

                                    Jeremy Falcon

                                    C Offline
                                    C Offline
                                    coding4ever
                                    wrote on last edited by
                                    #34

                                    I agree that it irks me when you go to look at someones code and the indenting and spacing is all off (or worse, mix CamelCase and snake_case). I'm a stickler for making sure everything in my code is formatted nicely so it's readable. However I do have 3 kids so the "formatting" of my house and car on the other hand......

                                    1 Reply Last reply
                                    0
                                    • K Kenneth Haugland

                                      I think the comments about the looks on one subject also reflects the action in another. If it truly were like that you'd never be fooled, by, let's say, politicians. ;)

                                      M Offline
                                      M Offline
                                      milo xml
                                      wrote on last edited by
                                      #35

                                      I doubt Einstein ever showed up for a job interview looking like that, especially in his younger years. Once you've established yourself you can pull off the disheveled look :) (Found a pic [^])

                                      T 1 Reply Last reply
                                      0
                                      • L Le Page

                                        That's kind of a shallow analogy. It's like comparing Tesla's love for physics and women. You just cannot seek connections between ones physical appearance and mental capabilities.

                                        A Offline
                                        A Offline
                                        agolddog
                                        wrote on last edited by
                                        #36

                                        Years of research have shown that I can develop software just as well in jeans and tennis shoes as compared to slacks and dress shoes.

                                        1 Reply Last reply
                                        0
                                        • L Le Page

                                          That's kind of a shallow analogy. It's like comparing Tesla's love for physics and women. You just cannot seek connections between ones physical appearance and mental capabilities.

                                          R Offline
                                          R Offline
                                          R Giskard Reventlov
                                          wrote on last edited by
                                          #37

                                          It was, of course, somewhat of a generalization - my wife tells me I look like a tramp on the days I can't be asked to shave. :)

                                          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