code aesthetics
-
someone 5 this for me! I can't on this phone. :) lunch? that would be illegal. I know a project (not ours) that was tri-service unification for one specific piece of hardware that was already in use by all 3 major groups, but without any common standard. They spent 10 years in meetings trying for consensus, never got it. But buying lunch would be a gift which is illegal to provide or accept. :-P
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
AIUI it's only illegal if you're giving it tor govt employees for free, not for internal use.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
-
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
Marc Clifton wrote:
What's your thoughts on whether code should look good, in terms of spacing, formatting, structure, etc.?
I'm right there with you, Marc.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
-
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
Of course it should... but only my style looks good. :-D I've only worked at one place that published (and enforced) a coding standard, and because it was followed maintaining the code was a snap. This is one of the areas where a new graduate can really benefit from working for a large shop.
-
AIUI it's only illegal if you're giving it tor govt employees for free, not for internal use.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
dan neely wrote:
not for internal use.
true, but the company only does what the government provides. :) so they don't we don't. :) simple. And if they were to try, we couldn't, because that would not be good. :) so we can't. :) keeps things logical. ;)
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
-
dan neely wrote:
not for internal use.
true, but the company only does what the government provides. :) so they don't we don't. :) simple. And if they were to try, we couldn't, because that would not be good. :) so we can't. :) keeps things logical. ;)
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
Sucks to be you. SOP here is that if you're required to say in for a working lunch (not billable time) the manager(s) responsible buy a meal (typically pizza). Which naturally triggers griping about management equating 1hr of work with $5 of pizza whenever they do it for something we don't want to attend. :rolleyes:
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
-
If everyone is working for the same company they should all be following the same standard. This alleviates (mostly) the problem of relativity. Of course, getting everyone to agree and follow the standard is a completely different problem.
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
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)
-
I try to do the same, but isn't this sort of relative, what looks good for one programmer may look like crap for another. Of course some rules are very basic (like not letting code be longer then the width of a normal screen) and should always be followed (I think)
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.
-
Sucks to be you. SOP here is that if you're required to say in for a working lunch (not billable time) the manager(s) responsible buy a meal (typically pizza). Which naturally triggers griping about management equating 1hr of work with $5 of pizza whenever they do it for something we don't want to attend. :rolleyes:
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall
dan neely wrote:
Sucks to be you.
if we work through lunch we don't get paid for it. :) manditory lunch time, but not manditory time off for it. :)
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
-
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
Marc Clifton wrote:
Why don't other programmers do the same
Others do :-) I try and use a consistent style no matter what kind of code I am writing. I don't always succeed but I try.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns
-
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.
:laugh: I want a shortcut for adding it to code that does not use it!
John
-
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)
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
-
120 columns? Are you still stuck on a CRT?
Todd Smith
-
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
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.
-
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
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]
-
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
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"
-
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.
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
-
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
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
-
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
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
-
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.
well, i indent 3 spaces and try to keep variable names short yet still meaningful.
-
120 columns? Are you still stuck on a CRT?
Todd Smith
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.