Topics

I'm curious about a styling choice in NVDA's code


Alex Hall
 

All,
I've noticed that many function calls in NVDA don't place spaces between the comma of one argument and the start of the next argument. Using Espeak, this makes it very hard to read these argument lists, as this synthesizer runs everything together as a single sentence. It basically skips the commas unless there are spaces between them.

Given that NVDA's long-time default synthesizer, and one of the best synths for speaking quickly yet precisely, can't articulate without spaces, why was this styling choice made? Is it a hold-over that the team plans to clean up one day, but isn't important enough to bother with? Or is it intentional, and something the developers want contributors to continue to do?

It just strikes me as odd, so I figured I'd ask the experts. Thanks for indulging my curiosity.

--
Alex Hall
Automatic Distributors, IT department
ahall@...


Julien Cochuyt
 

Dear Alex,

Code styling has been enforced in the last few month with a proper linting of all new contributions merged into the code base of NVDA.
Indeed, a whitespace between the comma and the next call argument is now the rule.
It has nevertheless been decided not to lint existing code, mainly for two reasons:
 - Allow for an easier tracking of contribution history
 - Avoid the risk of causing regressions


Best regards,

Julien Cochuyt
Accessolutions

Le mer. 4 mars 2020 à 23:50, Alex Hall <ahall@...> a écrit :
All,
I've noticed that many function calls in NVDA don't place spaces between the comma of one argument and the start of the next argument. Using Espeak, this makes it very hard to read these argument lists, as this synthesizer runs everything together as a single sentence. It basically skips the commas unless there are spaces between them.

Given that NVDA's long-time default synthesizer, and one of the best synths for speaking quickly yet precisely, can't articulate without spaces, why was this styling choice made? Is it a hold-over that the team plans to clean up one day, but isn't important enough to bother with? Or is it intentional, and something the developers want contributors to continue to do?

It just strikes me as odd, so I figured I'd ask the experts. Thanks for indulging my curiosity.

--
Alex Hall
Automatic Distributors, IT department
ahall@...


Alex Hall
 

Makes sense. Thanks for the explanation.

On Thu, Mar 5, 2020 at 3:07 AM Julien Cochuyt <j.cochuyt@...> wrote:
Dear Alex,

Code styling has been enforced in the last few month with a proper linting of all new contributions merged into the code base of NVDA.
Indeed, a whitespace between the comma and the next call argument is now the rule.
It has nevertheless been decided not to lint existing code, mainly for two reasons:
 - Allow for an easier tracking of contribution history
 - Avoid the risk of causing regressions


Best regards,

Julien Cochuyt
Accessolutions

Le mer. 4 mars 2020 à 23:50, Alex Hall <ahall@...> a écrit :
All,
I've noticed that many function calls in NVDA don't place spaces between the comma of one argument and the start of the next argument. Using Espeak, this makes it very hard to read these argument lists, as this synthesizer runs everything together as a single sentence. It basically skips the commas unless there are spaces between them.

Given that NVDA's long-time default synthesizer, and one of the best synths for speaking quickly yet precisely, can't articulate without spaces, why was this styling choice made? Is it a hold-over that the team plans to clean up one day, but isn't important enough to bother with? Or is it intentional, and something the developers want contributors to continue to do?

It just strikes me as odd, so I figured I'd ask the experts. Thanks for indulging my curiosity.

--
Alex Hall
Automatic Distributors, IT department
ahall@...



--
Alex Hall
Automatic Distributors, IT department
ahall@...


Reef Turner
 

Hi Alex,

 

What is your “Punctuation/symbol level” set to? You can use NVDA+p to toggle through the options, or check the option in the NVDA settings, speech category.

 

When set to all, the comma should be announced.

 

Regards,

Reef (NV Access)

 

From: nvda-devel@groups.io On Behalf Of Alex Hall
Sent: Thursday, 5 March 2020 12:32 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] I'm curious about a styling choice in NVDA's code

 

Makes sense. Thanks for the explanation.

 

On Thu, Mar 5, 2020 at 3:07 AM Julien Cochuyt <j.cochuyt@...> wrote:

Dear Alex,

 

Code styling has been enforced in the last few month with a proper linting of all new contributions merged into the code base of NVDA.

Indeed, a whitespace between the comma and the next call argument is now the rule.

It has nevertheless been decided not to lint existing code, mainly for two reasons:

 - Allow for an easier tracking of contribution history

 - Avoid the risk of causing regressions

 

 

Best regards,

 

Julien Cochuyt

Accessolutions

 

Le mer. 4 mars 2020 à 23:50, Alex Hall <ahall@...> a écrit :

All,

I've noticed that many function calls in NVDA don't place spaces between the comma of one argument and the start of the next argument. Using Espeak, this makes it very hard to read these argument lists, as this synthesizer runs everything together as a single sentence. It basically skips the commas unless there are spaces between them.

 

Given that NVDA's long-time default synthesizer, and one of the best synths for speaking quickly yet precisely, can't articulate without spaces, why was this styling choice made? Is it a hold-over that the team plans to clean up one day, but isn't important enough to bother with? Or is it intentional, and something the developers want contributors to continue to do?

 

It just strikes me as odd, so I figured I'd ask the experts. Thanks for indulging my curiosity.


--

Alex Hall

Automatic Distributors, IT department

ahall@...



--

Alex Hall

Automatic Distributors, IT department

ahall@...


Alex Hall
 

I use a customized version of "most". Normally, when I'm coding, I rely on the pause Espeak inserts to know where commas are. I find "all" to be too verbose, preferring the easily-distinguished pause to having to hear "comma" aloud. At least with Espeak, though, a comma between two words isn't spoken or indicated at all if no space is between it and the following word. This makes argument or parameter lists run together as a single, unbroken sentence with no pauses at all.

On Tue, Mar 10, 2020 at 9:19 AM Reef Turner <reef@...> wrote:

Hi Alex,

 

What is your “Punctuation/symbol level” set to? You can use NVDA+p to toggle through the options, or check the option in the NVDA settings, speech category.

 

When set to all, the comma should be announced.

 

Regards,

Reef (NV Access)

 

From: nvda-devel@groups.io On Behalf Of Alex Hall
Sent: Thursday, 5 March 2020 12:32 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] I'm curious about a styling choice in NVDA's code

 

Makes sense. Thanks for the explanation.

 

On Thu, Mar 5, 2020 at 3:07 AM Julien Cochuyt <j.cochuyt@...> wrote:

Dear Alex,

 

Code styling has been enforced in the last few month with a proper linting of all new contributions merged into the code base of NVDA.

Indeed, a whitespace between the comma and the next call argument is now the rule.

It has nevertheless been decided not to lint existing code, mainly for two reasons:

 - Allow for an easier tracking of contribution history

 - Avoid the risk of causing regressions

 

 

Best regards,

 

Julien Cochuyt

Accessolutions

 

Le mer. 4 mars 2020 à 23:50, Alex Hall <ahall@...> a écrit :

All,

I've noticed that many function calls in NVDA don't place spaces between the comma of one argument and the start of the next argument. Using Espeak, this makes it very hard to read these argument lists, as this synthesizer runs everything together as a single sentence. It basically skips the commas unless there are spaces between them.

 

Given that NVDA's long-time default synthesizer, and one of the best synths for speaking quickly yet precisely, can't articulate without spaces, why was this styling choice made? Is it a hold-over that the team plans to clean up one day, but isn't important enough to bother with? Or is it intentional, and something the developers want contributors to continue to do?

 

It just strikes me as odd, so I figured I'd ask the experts. Thanks for indulging my curiosity.


--

Alex Hall

Automatic Distributors, IT department

ahall@...



--

Alex Hall

Automatic Distributors, IT department

ahall@...



--
Alex Hall
Automatic Distributors, IT department
ahall@...


Reef Turner
 

> At least with Espeak, though, a comma between two words isn't spoken or indicated at all if no space is between it and the following word. This makes argument or parameter lists run together as a single, unbroken sentence with no pauses at all.

 

I assume this is with punctuation set to “most”. If you want to force this to be handled differently, you could change the rule in the symbol pronunciation dialog. To do so, find ‘comma’ (use the filter to make this faster), set the level to ‘most’. I think generally, for reading code people have the punctuation level set to “all”, since it’s important not to miss symbols.

 

From: nvda-devel@groups.io On Behalf Of Alex Hall
Sent: Tuesday, 10 March 2020 3:52 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] I'm curious about a styling choice in NVDA's code

 

I use a customized version of "most". Normally, when I'm coding, I rely on the pause Espeak inserts to know where commas are. I find "all" to be too verbose, preferring the easily-distinguished pause to having to hear "comma" aloud. At least with Espeak, though, a comma between two words isn't spoken or indicated at all if no space is between it and the following word. This makes argument or parameter lists run together as a single, unbroken sentence with no pauses at all.

 

On Tue, Mar 10, 2020 at 9:19 AM Reef Turner <reef@...> wrote:

Hi Alex,

 

What is your “Punctuation/symbol level” set to? You can use NVDA+p to toggle through the options, or check the option in the NVDA settings, speech category.

 

When set to all, the comma should be announced.

 

Regards,

Reef (NV Access)

 

From: nvda-devel@groups.io On Behalf Of Alex Hall
Sent: Thursday, 5 March 2020 12:32 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] I'm curious about a styling choice in NVDA's code

 

Makes sense. Thanks for the explanation.

 

On Thu, Mar 5, 2020 at 3:07 AM Julien Cochuyt <j.cochuyt@...> wrote:

Dear Alex,

 

Code styling has been enforced in the last few month with a proper linting of all new contributions merged into the code base of NVDA.

Indeed, a whitespace between the comma and the next call argument is now the rule.

It has nevertheless been decided not to lint existing code, mainly for two reasons:

 - Allow for an easier tracking of contribution history

 - Avoid the risk of causing regressions

 

 

Best regards,

 

Julien Cochuyt

Accessolutions

 

Le mer. 4 mars 2020 à 23:50, Alex Hall <ahall@...> a écrit :

All,

I've noticed that many function calls in NVDA don't place spaces between the comma of one argument and the start of the next argument. Using Espeak, this makes it very hard to read these argument lists, as this synthesizer runs everything together as a single sentence. It basically skips the commas unless there are spaces between them.

 

Given that NVDA's long-time default synthesizer, and one of the best synths for speaking quickly yet precisely, can't articulate without spaces, why was this styling choice made? Is it a hold-over that the team plans to clean up one day, but isn't important enough to bother with? Or is it intentional, and something the developers want contributors to continue to do?

 

It just strikes me as odd, so I figured I'd ask the experts. Thanks for indulging my curiosity.


--

Alex Hall

Automatic Distributors, IT department

ahall@...



--

Alex Hall

Automatic Distributors, IT department

ahall@...



--

Alex Hall

Automatic Distributors, IT department

ahall@...