|
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.
- pat
|
|
|
|
|
When you add a registry entry, as in:
CurrentUser\Software\Microsoft\VisualStudio\...\Text Editor\
REG_SZ: Guides=RGB(255,0,0) 80,96
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
|
|
|
|
|
NOW, that is a cool nerd trick. Good work!
Regards,
Rob Philpott.
|
|
|
|
|
You can also apply this to SQL Server using the same values.
\\Current User\Microsoft\Microsoft SQL Server\90\Tools\Shell\Text Editor
|
|
|
|
|
Ooooh, how about Notepad?
|
|
|
|
|
Nice trick!
Hope I remember to press Enter when the code reach the mark.
"Go for it!"
|
|
|
|
|
I expect that the "sometimes yes, sometimes no" votes should be added to the "no" votes.
And shouldn't there be an, "as prescribed by my employer's coding style guide", option?
|
|
|
|
|
Do they know?
Don't let my name fool you. That's my job.
|
|
|
|
|
|
Sure, but statistically speaking, aren't they insignificant?
I had an employer that tried that once, but most of the senior staff flat out refused to change because they already had consistent styles.
The problem wasn't really having a standard, but that the guy who chose it was less qualified to determine it than most of the people who had to use it.
Most other employers I've worked for simply don't have one.
Don't let my name fool you. That's my job.
|
|
|
|
|
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.
Naruki wrote: 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.
|
|
|
|
|
Standards like that are outdated IMHO and seemed only justified in the old telnet terminal/vi days.
|
|
|
|
|
ohmikkie wrote: telnet terminal/vi
Those days aren't completely gone (yet). I telnet into my AlphaServers... if only I could use C# on them.
|
|
|
|
|
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
|
|
|
|
|
The yes category did not fit my reasoning either but the second was closer to the first.
John
|
|
|
|
|
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.
Regards,
Rob Philpott.
|
|
|
|
|
Hope its a flat screen. Or if its a tube, they included free sunscreen.
|
|
|
|
|
And a small crane to pick it up on the desk.
|
|
|
|
|
Mihai Maerean wrote: Not every member of the team has the same monitor size
That's exactly why the team needs to set a limit.
|
|
|
|
|
If you don't flaunt your monitor size by extending the lines too long, how will you know your ePenis is bigger than theirs? You just don't seem to know a thing about programming.
Don't let my name fool you. That's my job.
|
|
|
|
|
What I lack in girth I make for in length.
|
|
|
|
|
Is that a 30" monitor in your pocket, or do you just buy really big, squared pants?
private void geekLove(char[] condom) {
if (condom == null || condom.length < 5) return;
int sex = 0;
do {
thrust();
Thread.sleep(1000);
sex++;
} while (sex < 10)
pay();
return;
}
Don't let my name fool you. That's my job.
|
|
|
|
|
Personally, I'd have used a for-loop rather than a do-while. A lot more conventional. Also, your return statement is redundant.
Regards,
Rob Philpott.
|
|
|
|