and preferly nice. sometimes it is better to keep 250 columns, if there is string, or data set, which you are sure, is supposible after you see starting few data... also if you have some message like "Error in datareading occured" ... - rest can be easily hidden. Depends if you plan ever to edit this text in future, or you bet your pants it is totally final version.
Visual Studio will show two red vertical lines at columns 80 and 96 giving a visual indication on how long the statement is getting, they will not influence the editing though.
Luc Pattyn [Forum Guidelines][My Articles] - before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
You can't impose it on an existing team or an existing project. It has to be there from the start. The only time I worked at a place that had a style guide it had (probably) been in place since the 1970s. Among other things, it specified eighty characters per line max.
Most other employers I've worked for simply don't have one.
Without one, you get chaos. You might check a file out, apply your preferred formatting, and check it back in with nothing but formatting changes.
Coding standards are good but in my experience, subject to continuous refinement. Software written to an old standard should be maintained in keeping with the way it was written. Unfortunately we don't always have the luxury of writing new code and I hate it when I need to modify code that written/edited in multiple styles.
Maybe Microsoft should do away with the idea of code being stored in "text" files and consider a xml style.
The advantages would be everyone can format code any which way they like and the actual code itself is just a big block of code.
And commenting would only be allowed in ONE style so it's not like // random /* occurances ********* of weird */ /// styles... Just have it all render as some graphical primitive, like a sticky-note colored rectangle with text?.
Other advantages would be "smart" code files... like they can preserve edit history much like a photoshop .psd file can.
Disadvantage is printing will be a area of concern... but not so much if printing of code is no longer practiced.
Another advantage is the ability to embed any type of document in-line with code as a advanced form of comment/information... like having PICTURES and PDF files and WEBPAGES as small resizable elements right their above the function that is based on their information.
If the future is 3D representation of files and code then Ms better jump on this right away :P
Not every member of the team has the same monitor size as I do, so limiting the width makes no sense. There will always be colleagues that have bigger monitors than mine. And everybody upgrades the monitor once in a while.
And since I like to see the entire line of code, Word Wrap solves the issue. There is never code that is hidden on the right side, because of the horizontal scroll, so I never wonder why the application doesn't perform how I want it to.
True, but word wrap offends my sense of geometry and proportion. A line should be a line not a rectangle after all. I bought a 30" Dell Monitor to get over the problem, which is cool because not only can you fit a massive line of code on it, it also makes you feel like a God. Recommended to all.