Click here to Skip to main content
15,887,027 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: if else Style Pin
Gary R. Wheeler26-Jan-24 13:12
Gary R. Wheeler26-Jan-24 13:12 
GeneralRe: if else Style Pin
BernardIE531726-Jan-24 13:34
BernardIE531726-Jan-24 13:34 
AnswerRe: if else Style Pin
Ravi Bhavnani26-Jan-24 20:53
professionalRavi Bhavnani26-Jan-24 20:53 
GeneralRe: if else Style Pin
trønderen27-Jan-24 9:05
trønderen27-Jan-24 9:05 
GeneralRe: if else Style Pin
BernardIE531727-Jan-24 10:24
BernardIE531727-Jan-24 10:24 
GeneralRe: if else Style Pin
trønderen27-Jan-24 11:44
trønderen27-Jan-24 11:44 
GeneralRe: if else Style Pin
BernardIE531727-Jan-24 12:16
BernardIE531727-Jan-24 12:16 
GeneralRe: if else Style Pin
trønderen27-Jan-24 14:32
trønderen27-Jan-24 14:32 
BernardIE5317 wrote:
I kindly request your opinion of the IDE feature id est vertical dots connecting vertically aligned matching braces.
Visual Studio provides such vertical dots regardless of brace alignment. It doesn't go by the braces, but by the statement structure. There is, however, no indication of inconsistent indentation: If you undent a few lines in the middle of a block, there is no warning. You might notice that the last line before the undent is not a single closing brace (as it should be) but VS won't tell you explicitly.

I am generally positive to the dot columns, but personally, I see moderate need for them. One reason is that I tend to keep the number of indentation levels so low that I can follow it by the indentations alone. Second: The dot columns really says nothing that the indentation doesn't. For me, the indentation is far more significant.

VS provides dot columns even for namespaces, classes and methods. I wish those could be separately turned off: If you really need to follow a dot column up or down, they just add to the bundle, making it more difficult to follow a specific one when you have to scroll screenfuls. I very rarely need support to know where a namespace starts and ends: With very few exceptions, all code in a source file is in the same name space. Large class definitions may have a source file to themselves, and if there are multiple classes in a single file, each of them is headed by a comment block that is hard to overlook. I need no dot column to see where a class starts/ends.

If you put the text cursor (the I-beam) immediately to the left of an opening brace or to the left of a closing brace, the matching one is highlighted. If I cannot see it (e.g. because it is outside the window); I can hit ctrl-å (on my Norwegian keyboard; I don't know what is is on a US keyboard) to jump to the matching brace. Doing it with the shift key down, ctrl-Å, will highlight the entire block, everything between and including the two braces. This reduces the need for the dot columns as well.

One feature that I use less frequently, but I am happy that it is available: In the window left edge, for every line opening a structure feature - name space, class, method, if-statements and loops - there is a box with a minus. Click it, and anything but the first line is collapsed. The box changes to a +. Click it (or the "..." box at the end of the line), and the hidden lines reappear. Using this feature, you can collapse, say, the inner three or four nesting levels for working on the not-as-deeply-nested parts of a method (so that it will fit within your editor window).

Most of all: When I have done extensive editing - in particular with a lot of moving code around, when you can very easily end up copying an opening brace but not the closing one - I go to the end of the workspace, delete and reinsert the closing brace. On reinsert, VS will reformat the entire workspace code according to the layout rules I have specified as my preferences. Then I can trust the indentations to reflect the block nesting correctly.

Given all of this, I see little need for those dot columns, but in VS they are so discrete that I am not bothered with them. I tried right now to turn them off, and I actually think that the structure now is visually clearer: With clean white space to the left of blocks, the indentations stand out more clearly. I think I will leave it off, at least for a period of time.

I have seen co-workers (using other editors) having set up their editor to display columns of bright yellow dots the size of full stops, on a black background. These are typically the people who also display each keyword and each delimiter type in a different color; a screenful of source code looks like an art painter's palette after a full day's work at the canvas. I find the bright yellow dots (and the multitude of color spots everywhere) to be very disturbing. So I am not unconditionally praising the dot columns; they must be discrete, subdued.

Religious freedom is the freedom to say that two plus two make five.

GeneralRe: if else Style Pin
BernardIE531727-Jan-24 14:42
BernardIE531727-Jan-24 14:42 
GeneralRe: if else Style Pin
BernardIE531727-Jan-24 19:16
BernardIE531727-Jan-24 19:16 
GeneralRe: if else Style Pin
BernardIE531727-Jan-24 11:59
BernardIE531727-Jan-24 11:59 
GeneralRe: if else Style Pin
Ravi Bhavnani28-Jan-24 16:52
professionalRavi Bhavnani28-Jan-24 16:52 
GeneralRe: if else Style Pin
Iacopo Vettori28-Jan-24 23:47
Iacopo Vettori28-Jan-24 23:47 
GeneralRe: if else Style Pin
Peter Kelley 202128-Jan-24 23:58
Peter Kelley 202128-Jan-24 23:58 
GeneralRe: if else Style Pin
John Wellbelove29-Jan-24 1:29
John Wellbelove29-Jan-24 1:29 
GeneralRe: if else Style Pin
MikeCO1029-Jan-24 1:42
MikeCO1029-Jan-24 1:42 
GeneralRe: if else Style Pin
Matt Bond29-Jan-24 2:49
Matt Bond29-Jan-24 2:49 
GeneralRe: if else Style Pin
jschell29-Jan-24 5:22
jschell29-Jan-24 5:22 
GeneralRe: if else Style Pin
Alister Morton30-Jan-24 23:46
Alister Morton30-Jan-24 23:46 
GeneralRe: if else Style Pin
Stacy Dudovitz29-Jan-24 13:56
professionalStacy Dudovitz29-Jan-24 13:56 
GeneralRe: if else Style Pin
jschell30-Jan-24 4:40
jschell30-Jan-24 4:40 
GeneralRe: if else Style Pin
Stacy Dudovitz30-Jan-24 10:38
professionalStacy Dudovitz30-Jan-24 10:38 
GeneralRe: if else Style Pin
jschell31-Jan-24 4:53
jschell31-Jan-24 4:53 
GeneralRe: if else Style Pin
englebart2-Feb-24 13:43
professionalenglebart2-Feb-24 13:43 
GeneralRe: if else Style Pin
englebart30-Jan-24 14:42
professionalenglebart30-Jan-24 14:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.