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. code aesthetics

code aesthetics

Scheduled Pinned Locked Moved The Lounge
comquestiondiscussion
103 Posts 42 Posters 8 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.
  • V Vikram A Punathambekar

    I wish VS had a similar shortcut for stripping out Hungarian notation! :sigh:

    Cheers, Vıkram.


    "if abusing me makes you a credible then i better give u the chance which didnt get in real" - Adnan Siddiqi.

    J Offline
    J Offline
    John M Drescher
    wrote on last edited by
    #46

    :laugh: I want a shortcut for adding it to code that does not use it!

    John

    T 1 Reply Last reply
    0
    • T Tom Deketelaere

      If you are talking internaly in a company I agree but I thought the OP was talking generaly. And yes getting everyone to agree is not always easy, fortunatly for me I was at the startup of the .NET department in my company (and was the only one in it for 8 months) so I got to do what I want ;P (and make the company standard)

      S Offline
      S Offline
      Scott Dorman
      wrote on last edited by
      #47

      Yes, I think Marc was talking generally. I was directly addressing your comment of "what looks good for one programmer may look like crap for another" which I took in the context of everyone working together in a company.

      Tom deketelaere wrote:

      And yes getting everyone to agree is not always easy, fortunatly for me I was at the startup of the .NET department in my company (and was the only one in it for 8 months) so I got to do what I want (and make the company standard)

      Lucky you...sometimes the best way to create a standard. :)

      Scott Dorman

      Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


      Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

      T 1 Reply Last reply
      0
      • T Todd Smith

        120 columns? Are you still stuck on a CRT?

        Todd Smith

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #48

        I can only see about 100 columns (in VS, using 1 screen) CRT's FTW though, they're the only kind of screen that doesn't give me a headache (anyone else have this problem?)

        T 1 Reply Last reply
        0
        • M Marc Clifton

          I take care to ensure the aesthetics of my code. That spacing and formatting is consistent. I don't care if I'm writing throw away code or production code. The code should always look neat and tidy. Why don't other programmers do the same??? OK, I'm sure there are some out there. And yes, there are code beautifiers, so who really cares, right? What's your thoughts on whether code should look good, in terms of spacing, formatting, structure, etc.? Marc

          Thyme In The Country Interacx My Blog

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #49

          Ugly as sin - that's the way. Why should other people be able to read your code? Why they'll totally fail to appreciate your genius. Remember, if only you can understand your code then others will naturally think you're a gifted genius - granted one who's unable to relate to others, but tortured genius nonetheless.

          Deja View - the feeling that you've seen this post before.

          My blog | My articles

          M 1 Reply Last reply
          0
          • M Marc Clifton

            I take care to ensure the aesthetics of my code. That spacing and formatting is consistent. I don't care if I'm writing throw away code or production code. The code should always look neat and tidy. Why don't other programmers do the same??? OK, I'm sure there are some out there. And yes, there are code beautifiers, so who really cares, right? What's your thoughts on whether code should look good, in terms of spacing, formatting, structure, etc.? Marc

            Thyme In The Country Interacx My Blog

            H Offline
            H Offline
            Hans Dietrich
            wrote on last edited by
            #50

            Fortunately, most of the programmers I meet feel the way you do. But you're missing an important point: there are some people who just don't care - to them it's a job, and a clean compile is the best you can expect from them.

            Best wishes, Hans


            [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

            P M 2 Replies Last reply
            0
            • M Marc Clifton

              I take care to ensure the aesthetics of my code. That spacing and formatting is consistent. I don't care if I'm writing throw away code or production code. The code should always look neat and tidy. Why don't other programmers do the same??? OK, I'm sure there are some out there. And yes, there are code beautifiers, so who really cares, right? What's your thoughts on whether code should look good, in terms of spacing, formatting, structure, etc.? Marc

              Thyme In The Country Interacx My Blog

              R Offline
              R Offline
              Roger Wright
              wrote on last edited by
              #51

              Code should be organized, clear, and consistent. You never know when you might be called upon to modify it years later, and anything that will make reading and understanding it is a Good ThingTM.

              "A Journey of a Thousand Rest Stops Begins with a Single Movement"

              1 Reply Last reply
              0
              • G geoffs

                What is the width of a "normal" screen? I've always liked to think that the standard is an 80 column CRT or printed page. Thus, I don't like to see code extend beyond the 79th column. Apparently that standard isn't true of developers where I work. I've seen lines of code that extend out to almost 200 characters in width. It absolutely drives me batty. Asking the other developers to limit their code line lengths hasn't helped. It's funny because the so-called coding standard here stipulates some guidelines which seem inane to me, but says nothing about the maximum length of a line of code.

                T Offline
                T Offline
                Tom Deketelaere
                wrote on last edited by
                #52

                I usually take a 120-140 rule (have to admit I'm used to 21" or 24" screen) normal screen these days is resolution 1280*1024, at least that's what I consider to be normal (especially for developers) But like I said I kind off have the handicap that I never work with screen beneath 21" anymore

                G 1 Reply Last reply
                0
                • S Scott Dorman

                  Yes, I think Marc was talking generally. I was directly addressing your comment of "what looks good for one programmer may look like crap for another" which I took in the context of everyone working together in a company.

                  Tom deketelaere wrote:

                  And yes getting everyone to agree is not always easy, fortunatly for me I was at the startup of the .NET department in my company (and was the only one in it for 8 months) so I got to do what I want (and make the company standard)

                  Lucky you...sometimes the best way to create a standard. :)

                  Scott Dorman

                  Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


                  Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

                  T Offline
                  T Offline
                  Tom Deketelaere
                  wrote on last edited by
                  #53

                  Scott Dorman wrote:

                  I took in the context of everyone working together in a company.

                  I was actually more thinking about code placed here but the same can go for people in the same company altough that's somewhat easyer to fix ;P

                  Scott Dorman wrote:

                  Lucky you...sometimes the best way to create a standard.

                  Yeah well the company did have a "senior" programmer at first who was going to 'lead' the department but he turned out to be a very big mistake, so my boss fired him and well I got stuck doing the standerd (with only 1year experiance, but so far I'v been doing well (I think ;P )) and cleaning up his mess, and he left quite a mess behind, still feel the effects now olmost 1 year later

                  S 1 Reply Last reply
                  0
                  • T Tom Deketelaere

                    Scott Dorman wrote:

                    I took in the context of everyone working together in a company.

                    I was actually more thinking about code placed here but the same can go for people in the same company altough that's somewhat easyer to fix ;P

                    Scott Dorman wrote:

                    Lucky you...sometimes the best way to create a standard.

                    Yeah well the company did have a "senior" programmer at first who was going to 'lead' the department but he turned out to be a very big mistake, so my boss fired him and well I got stuck doing the standerd (with only 1year experiance, but so far I'v been doing well (I think ;P )) and cleaning up his mess, and he left quite a mess behind, still feel the effects now olmost 1 year later

                    S Offline
                    S Offline
                    Scott Dorman
                    wrote on last edited by
                    #54

                    Tom deketelaere wrote:

                    was actually more thinking about code placed here

                    Yes, the same would apply to code here; and it's certainly a larger problem here due to the size and scope of the community.

                    Tom deketelaere wrote:

                    Yeah well the company did have a "senior" programmer at first who was going to 'lead' the department but he turned out to be a very big mistake, so my boss fired him and well I got stuck doing the standerd (with only 1year experiance, but so far I'v been doing well (I think )) and cleaning up his mess, and he left quite a mess behind, still feel the effects now olmost 1 year later

                    You will probabbly be feeling the effects for a long time. That's almost always a difficult situation to find oneself in, but it sounds like it's working out for you. Code standards/style is one of those spaces I actually like to play in and have established them at several of the companies I've worked for.

                    Scott Dorman

                    Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


                    Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

                    G T 2 Replies Last reply
                    0
                    • G Graham Bradshaw

                      Steve Hazel wrote:

                      (I prefer a width of 80 myself).

                      I'm guessing you either don't indent much, or have really short function and variable names.

                      S Offline
                      S Offline
                      stephen hazel
                      wrote on last edited by
                      #55

                      well, i indent 3 spaces and try to keep variable names short yet still meaningful.

                      1 Reply Last reply
                      0
                      • T Todd Smith

                        120 columns? Are you still stuck on a CRT?

                        Todd Smith

                        S Offline
                        S Offline
                        stephen hazel
                        wrote on last edited by
                        #56

                        Not a crt, but often crappy monitors at the job. When I'm readin code I don't want to have to scroll the freakin screen left n right.

                        1 Reply Last reply
                        0
                        • B Brady Kelly

                          It must suck to be you! :omg:

                          S Offline
                          S Offline
                          stephen hazel
                          wrote on last edited by
                          #57

                          With the code base I'm starin' at, it definitely does suck to be me - no joke. And it'll suck for the guy after me. And the next guy. And the... You get the idea... Well, except for those "few" modules that break in prod that I'm forced to touch.

                          modified on Wednesday, September 17, 2008 5:37 PM

                          1 Reply Last reply
                          0
                          • H Hans Dietrich

                            Fortunately, most of the programmers I meet feel the way you do. But you're missing an important point: there are some people who just don't care - to them it's a job, and a clean compile is the best you can expect from them.

                            Best wishes, Hans


                            [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

                            P Offline
                            P Offline
                            Pete OHanlon
                            wrote on last edited by
                            #58

                            Hans Dietrich wrote:

                            there are some people who just don't care - to them it's a job, and a clean compile is the best you can expect from them.

                            For some coders, a clean compile is shippable code.

                            Deja View - the feeling that you've seen this post before.

                            My blog | My articles

                            T 1 Reply Last reply
                            0
                            • S Scott Dorman

                              Tom deketelaere wrote:

                              was actually more thinking about code placed here

                              Yes, the same would apply to code here; and it's certainly a larger problem here due to the size and scope of the community.

                              Tom deketelaere wrote:

                              Yeah well the company did have a "senior" programmer at first who was going to 'lead' the department but he turned out to be a very big mistake, so my boss fired him and well I got stuck doing the standerd (with only 1year experiance, but so far I'v been doing well (I think )) and cleaning up his mess, and he left quite a mess behind, still feel the effects now olmost 1 year later

                              You will probabbly be feeling the effects for a long time. That's almost always a difficult situation to find oneself in, but it sounds like it's working out for you. Code standards/style is one of those spaces I actually like to play in and have established them at several of the companies I've worked for.

                              Scott Dorman

                              Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


                              Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

                              G Offline
                              G Offline
                              geoffs
                              wrote on last edited by
                              #59

                              Well, I am heading up a committee of 3 that is going to establish a new standard for future development in our company. Over more than 30 years in the development arena I've amassed quite a bit of my own ideas about what makes for a good standard. Also knowing that just because I think a particular guideline is good doesn't necessarily mean it really is, I'd like to ask you if you could point me in the direction of what you would consider some decent coding standard documents...

                              S I 2 Replies Last reply
                              0
                              • T Tom Deketelaere

                                I usually take a 120-140 rule (have to admit I'm used to 21" or 24" screen) normal screen these days is resolution 1280*1024, at least that's what I consider to be normal (especially for developers) But like I said I kind off have the handicap that I never work with screen beneath 21" anymore

                                G Offline
                                G Offline
                                geoffs
                                wrote on last edited by
                                #60

                                Do any of your developers ever find there to be a need to print sections of code? That is still a pretty good lowest common denominator (80 cols for readability on an 8.5 x 11 page) which makes me hesitate to accept anything greater than 80 columns width in the code.

                                T S 2 Replies Last reply
                                0
                                • M Marc Clifton

                                  I take care to ensure the aesthetics of my code. That spacing and formatting is consistent. I don't care if I'm writing throw away code or production code. The code should always look neat and tidy. Why don't other programmers do the same??? OK, I'm sure there are some out there. And yes, there are code beautifiers, so who really cares, right? What's your thoughts on whether code should look good, in terms of spacing, formatting, structure, etc.? Marc

                                  Thyme In The Country Interacx My Blog

                                  M Offline
                                  M Offline
                                  Mike Hankey
                                  wrote on last edited by
                                  #61

                                  I totally agree. I'm not fanatical but like to write and read code that is neatly formatted. Easier to read and follow. My biggest pet peeve is no comments. The app I'm supporting at the moment, although very well written is extremely sophisticated and comments are very very rare, and of course no docs. Though I do not comment every line of code I write I do comment in places where it makes sense. Mike

                                  Semper Fi http://www.hq4thmarinescomm.com[^] My Site

                                  T 1 Reply Last reply
                                  0
                                  • P Pete OHanlon

                                    Ugly as sin - that's the way. Why should other people be able to read your code? Why they'll totally fail to appreciate your genius. Remember, if only you can understand your code then others will naturally think you're a gifted genius - granted one who's unable to relate to others, but tortured genius nonetheless.

                                    Deja View - the feeling that you've seen this post before.

                                    My blog | My articles

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

                                    Pete O'Hanlon wrote:

                                    if only you can understand your code then others will naturally think you're a gifted genius

                                    There must be a phrase for when I can't understand my own code 7 years later. Maybe "gifted jerking off genius" since it's definitely a one-man show. Marc

                                    Thyme In The Country Interacx My Blog

                                    1 Reply Last reply
                                    0
                                    • H Hans Dietrich

                                      Fortunately, most of the programmers I meet feel the way you do. But you're missing an important point: there are some people who just don't care - to them it's a job, and a clean compile is the best you can expect from them.

                                      Best wishes, Hans


                                      [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

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

                                      Hans Dietrich wrote:

                                      to them it's a job, and a clean compile is the best you can expect from them.

                                      That pretty much sums it up. Sadly, a clean compile doesn't mean a bug free execution. "Your code looks like shit, and by the way, I can spot 5 logic errors just by looking at the code". That's what I seem to be saying a lot lately. :sigh: Marc

                                      Thyme In The Country Interacx My Blog

                                      S 1 Reply Last reply
                                      0
                                      • M Marc Clifton

                                        I take care to ensure the aesthetics of my code. That spacing and formatting is consistent. I don't care if I'm writing throw away code or production code. The code should always look neat and tidy. Why don't other programmers do the same??? OK, I'm sure there are some out there. And yes, there are code beautifiers, so who really cares, right? What's your thoughts on whether code should look good, in terms of spacing, formatting, structure, etc.? Marc

                                        Thyme In The Country Interacx My Blog

                                        R Offline
                                        R Offline
                                        Ri Qen Sin
                                        wrote on last edited by
                                        #64

                                        Do not go against Visual Studio's automatic formatting. That's one rule I always follow. :)

                                        So the creationist says: Everything must have a designer. God designed everything. I say: Why is God the only exception? Why not make the "designs" (like man) exceptions and make God a creation of man?

                                        1 Reply Last reply
                                        0
                                        • G geoffs

                                          Well, I am heading up a committee of 3 that is going to establish a new standard for future development in our company. Over more than 30 years in the development arena I've amassed quite a bit of my own ideas about what makes for a good standard. Also knowing that just because I think a particular guideline is good doesn't necessarily mean it really is, I'd like to ask you if you could point me in the direction of what you would consider some decent coding standard documents...

                                          S Offline
                                          S Offline
                                          Scott Dorman
                                          wrote on last edited by
                                          #65

                                          geoffs wrote:

                                          knowing that just because I think a particular guideline is good doesn't necessarily mean it really is

                                          That's an excellent start. It's important that your standards are a result of quality input from the rest of the team and not designed in a vacuum.

                                          geoffs wrote:

                                          point me in the direction of what you would consider some decent coding standard documents...

                                          I can, but a lot of it depends on your chosen programming language. I really like the Framework Design Guidelines book. It is focused on .NET and designing public facing APIs but at least 90% of the guidelines specified apply to any language. The other one (although more for a really solid reference and background information) is the Ada 95 Quality and Style Guide. (If you can't find it, email me directly from CP and I can email it to you.) From one of my talks on this: What is a code standard?

                                          • Encompasses all aspects of code construction
                                          • Designed to improve program adaptation and maintenance
                                          • Do not form an inflexible set of standards
                                          • Consistent
                                          • Is not “one size fits all” – different for different languages
                                          • Defines the “best practices” for writing code for your development group
                                          • Must adapt to changes in technology and language

                                          What is a code standard?

                                          • Source Code Presentation (Code Formatting)
                                          • Readability
                                          • Program Structure
                                          • Programming Practices
                                          • Concurrency
                                          • Portability/Interoperability
                                          • Reusability
                                          • Performance
                                          • Globalization

                                          The rest of the slide deck (it's short but a lot of the slides have speaker notes) is available on my blog if you want to browse through it. Also, if you're ever in the Florida area (or any of the east coast southern states) I present at a lot of the code camps and usually have a round-table discussion on this topic.

                                          Scott Dorman

                                          Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


                                          Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buc

                                          G 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