[vwnc] Code Formatting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[vwnc] Code Formatting

Travis Griggs-3
I've been playing with handling comments better in the RBParser/
Formatter. I haven't actually done much with formatting them, other  
than to modify the model so that more information is had about where  
they go, so they don't jump around between tokens when you format. And  
that when you put extra CRs between them, you meant for them to stay  
there.

That said, the configurable formatter is kind of a pain because it has  
so many options in it, and they're presented in a "set of screws"  
presentation, where you have to know what to set and how to get the  
desired result you want.

So I'd like to gather feedback on what the hot items are for people,  
and if some of these options couldn't be coalesced to simpler options.

1) Periods. Are there people out there that want to put periods at the  
end of the every block but NOT the end of methods? Rather than two  
binary settings, it seems one could reduce this option to:
+ "only when necessary"
+ "at the ends of methods"
+ "at the ends of methods AND blocks".

2) Method comments. You've got a knob for newlines after method  
comments. And another knob for the same before method body. One for  
after temporaries. And another for after the method pattern. But are  
there people who set one two 5, and another to 3. It seems everyone  
wants at least one cr at the end, and sometimes a blank line before  
the next element. Could this be reasonably reduced to something like:
+ "Compact (no blank lines between)"
+ "After comments (one blank line at the end of all the comments)"
+ "Always One (one blank like after the comments or pattern if no  
comments)"
+ "Extreme" (put a blank line in between every element)

3) Strings after/before () and [] and ^. Are there those that put  
spaces for ()'s, but not for blocks? Do some really want to be able to  
put 3 spaces? or tabs? Could this be simplified as:
+ "Compact" (no spaces)
+ "Spaces" (put a space between ^ andReturnValue, as well as after/
before () and []s).

4) Indent String. Does anyone set this to other than a single tab? And  
if this were an adjustable thing, wouldn't it be better to make the  
width of the tabs in a code view be settable, rather than tune this  
string?

--
Travis Griggs
Objologist
What's next, Intel Processors branded with "Apple Outside" stickers?


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Reinout Heeck
Travis,

your proposal covers my preferences just fine.


R
-

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Antony Blakey-2
In reply to this post by Travis Griggs-3
Travis,

I think collecting aesthetic preferences isn't that valuable because  
they are likely to be simply what people have become used to, without  
necessarily any objective basis to such preferences.

I know research has been done into how source layout can both aid and  
hinder understanding of code, although I must admit can't lay my hands  
on it right now - I remember reading stuff in places like TOPLAS/
SIGPLAN/SIGCHI/Software Practice & Experience at least, although that  
was many many years ago.

I'd be happy with something that wasn't configurable iff it was based  
on solid research into the psychological basis of readability and  
comprehension. Which is to say I'd prefer that such research was  
applied to this case and the formatter was minimally configurable,  
acknowledging that there may be certain factors which differ  
objectively between individuals. Colour blindness/visual acuity/
dyslexia being good examples, but even in these cases it would IMO be  
better to capture the cause and adjust the system accordingly rather  
than falling back to low-level choices.

At the risk of being flamed: IMHO the general casting of choice as a  
moral good is a fallacy - one that can most obviously been seen in the  
enormous configurability of ugly and unusable open source GUI software  
vs. the highly constrained and usable OSX environment.

Antony Blakey
-------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

If a train station is a place where a train stops, what's a workstation?

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Arden Thomas
There is research that shows that too many choices make us less happy, but
some choice still makes us happier than none.
An interesting book on the topic:

http://www.amazon.com/Stumbling-Happiness-Daniel-Gilbert/dp/1400077427/ref=p
d_bbs_sr_1?ie=UTF8&s=books&qid=1204327007&sr=1-1

..was an interesting read.

Fewer choices, as long as they are good choices, tends to make things a
whole lot easier and simpler.

Arden

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf
Of Antony Blakey
Sent: Friday, February 29, 2008 6:07 PM
To: Travis Griggs
Cc: VWNC List; VW-Dev DEV
Subject: Re: [vwnc] Code Formatting

Travis,

I think collecting aesthetic preferences isn't that valuable because  
they are likely to be simply what people have become used to, without  
necessarily any objective basis to such preferences.

I know research has been done into how source layout can both aid and  
hinder understanding of code, although I must admit can't lay my hands  
on it right now - I remember reading stuff in places like TOPLAS/
SIGPLAN/SIGCHI/Software Practice & Experience at least, although that  
was many many years ago.

I'd be happy with something that wasn't configurable iff it was based  
on solid research into the psychological basis of readability and  
comprehension. Which is to say I'd prefer that such research was  
applied to this case and the formatter was minimally configurable,  
acknowledging that there may be certain factors which differ  
objectively between individuals. Colour blindness/visual acuity/
dyslexia being good examples, but even in these cases it would IMO be  
better to capture the cause and adjust the system accordingly rather  
than falling back to low-level choices.

At the risk of being flamed: IMHO the general casting of choice as a  
moral good is a fallacy - one that can most obviously been seen in the  
enormous configurability of ugly and unusable open source GUI software  
vs. the highly constrained and usable OSX environment.

Antony Blakey
-------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

If a train station is a place where a train stops, what's a workstation?

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.2/1304 - Release Date: 2/29/2008
8:18 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.2/1304 - Release Date: 2/29/2008
8:18 AM
 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Reinout Heeck
In reply to this post by Antony Blakey-2

On Mar 1, 2008, at 12:06 AM, Antony Blakey wrote:
>
> At the risk of being flamed: IMHO the general casting of choice as a  
> moral good is a fallacy - one that can most obviously been seen in  
> the enormous configurability of ugly and unusable open source GUI  
> software vs. the highly constrained and usable OSX environment.


It seemed to me that Travis was attacking exactly this aspect of the  
formatter (too many options) rather than its aesthetics.



R
-

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Antony Blakey-2

On 01/03/2008, at 9:54 AM, Reinout Heeck wrote:

>
> On Mar 1, 2008, at 12:06 AM, Antony Blakey wrote:
>>
>> At the risk of being flamed: IMHO the general casting of choice as a
>> moral good is a fallacy - one that can most obviously been seen in
>> the enormous configurability of ugly and unusable open source GUI
>> software vs. the highly constrained and usable OSX environment.
>
>
> It seemed to me that Travis was attacking exactly this aspect of the
> formatter (too many options) rather than its aesthetics.

In case it wasn't clear, this comment wasn't directed at Travis. It  
was to show a general input to my reasoning.

Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

You can't just ask customers what they want and then try to give that  
to them. By the time you get it built, they'll want something new.
   -- Steve Jobs


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Andre Schnoor
In reply to this post by Arden Thomas
Arden Thomas wrote:
> There is research that shows that too many choices make us less happy, but
> some choice still makes us happier than none.

This insight should be consequently applied to all VW tools in the long
term. IMHO this would greatly support the recognition and adoption of VW.

Regarding the code formatter however, I'd prefer to see as many options
as possible. Often one needs to conform to a style that is already used
in an existing project, or that has been used for many years. Me
personally, I find it very hard to get used to different ways of using
indentation and block formatting.

Regarding Travis' suggestions:

1) and 2) and 4) are fine with me

3) should include an option for 1 space /inside/ brackets only, e.g. [_
_] independent from the option of putting a space between ^ and the
return expression. IMO these are completely different things.

Andre


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Paul Baumann
In reply to this post by Travis Griggs-3
Travis,

Here are the options I'd look for:

Indent one tab per for each multi-line nested block. The block starting
bracket is the last token on the statement line that began it. The block
ending bracket is in visual alignment with the start of the statement
that began the block. Use periods for all statements except statements
that return from the method. All cascaded messages (that can't fit on a
single line) should be intended one level from the receiver. When the
receiver of cascaded message is the result of a unary message then
enclose receiver code in (). Don't automatically add # to symbols within
literal arrays.

Here are some benefits from these preferences:

This style is familiar to developers who use other languages. Code
changes are easily shown--because the code formatting is not radically
affected by the addition or removal of code. Code is easily copied and
pasted as lines between methods. It isn't necessary to double-click to
discover the end of contexts. File-based change management tools (like
cvs) can resolve differences better. With "unnecessary" periods, you
have fewer MNU errors because someone forgot to add a period to the
statement that they added code below; it also means the period is not a
change shown later in the changes browser. Less scrolling is involved
because more logic fits nicely within a standard size code pane.

When code is formatted is just as important as how it is formatted:

Code can be saved formatted according to a company standard. Code can be
displayed in browsers according to individual formatting preferences.
Code should be formatted consistently in all panes of a changes browser.
Formatting should be an option that can be easily turned off--sometimes
even as a check box on an individual browser.

Paul Baumann

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Travis Griggs
Sent: Friday, February 29, 2008 3:11 PM
To: VWNC List; VW-Dev DEV
Subject: [vwnc] Code Formatting

I've been playing with handling comments better in the RBParser/
Formatter. I haven't actually done much with formatting them, other than
to modify the model so that more information is had about where they go,
so they don't jump around between tokens when you format. And that when
you put extra CRs between them, you meant for them to stay there.

That said, the configurable formatter is kind of a pain because it has
so many options in it, and they're presented in a "set of screws"  
presentation, where you have to know what to set and how to get the
desired result you want.

So I'd like to gather feedback on what the hot items are for people, and
if some of these options couldn't be coalesced to simpler options.

1) Periods. Are there people out there that want to put periods at the
end of the every block but NOT the end of methods? Rather than two
binary settings, it seems one could reduce this option to:
+ "only when necessary"
+ "at the ends of methods"
+ "at the ends of methods AND blocks".

2) Method comments. You've got a knob for newlines after method
comments. And another knob for the same before method body. One for
after temporaries. And another for after the method pattern. But are
there people who set one two 5, and another to 3. It seems everyone
wants at least one cr at the end, and sometimes a blank line before the
next element. Could this be reasonably reduced to something like:
+ "Compact (no blank lines between)"
+ "After comments (one blank line at the end of all the comments)"
+ "Always One (one blank like after the comments or pattern if no
comments)"
+ "Extreme" (put a blank line in between every element)

3) Strings after/before () and [] and ^. Are there those that put spaces
for ()'s, but not for blocks? Do some really want to be able to put 3
spaces? or tabs? Could this be simplified as:
+ "Compact" (no spaces)
+ "Spaces" (put a space between ^ andReturnValue, as well as after/
before () and []s).

4) Indent String. Does anyone set this to other than a single tab? And  
if this were an adjustable thing, wouldn't it be better to make the  
width of the tabs in a code view be settable, rather than tune this  
string?

--
Travis Griggs
Objologist
What's next, Intel Processors branded with "Apple Outside" stickers?


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
 
--------------------------------------------------------
This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Tudor Girba-3
Hi,

I subscribe to your preferences, Paul :)

Cheers,
Doru

On Mar 3, 2008, at 4:54 PM, Paul Baumann wrote:

> Travis,
>
> Here are the options I'd look for:
>
> Indent one tab per for each multi-line nested block. The block  
> starting
> bracket is the last token on the statement line that began it. The  
> block
> ending bracket is in visual alignment with the start of the statement
> that began the block. Use periods for all statements except statements
> that return from the method. All cascaded messages (that can't fit  
> on a
> single line) should be intended one level from the receiver. When the
> receiver of cascaded message is the result of a unary message then
> enclose receiver code in (). Don't automatically add # to symbols  
> within
> literal arrays.
>
> Here are some benefits from these preferences:
>
> This style is familiar to developers who use other languages. Code
> changes are easily shown--because the code formatting is not radically
> affected by the addition or removal of code. Code is easily copied and
> pasted as lines between methods. It isn't necessary to double-click to
> discover the end of contexts. File-based change management tools (like
> cvs) can resolve differences better. With "unnecessary" periods, you
> have fewer MNU errors because someone forgot to add a period to the
> statement that they added code below; it also means the period is  
> not a
> change shown later in the changes browser. Less scrolling is involved
> because more logic fits nicely within a standard size code pane.
>
> When code is formatted is just as important as how it is formatted:
>
> Code can be saved formatted according to a company standard. Code  
> can be
> displayed in browsers according to individual formatting preferences.
> Code should be formatted consistently in all panes of a changes  
> browser.
> Formatting should be an option that can be easily turned off--
> sometimes
> even as a check box on an individual browser.
>
> Paul Baumann
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Travis Griggs
> Sent: Friday, February 29, 2008 3:11 PM
> To: VWNC List; VW-Dev DEV
> Subject: [vwnc] Code Formatting
>
> I've been playing with handling comments better in the RBParser/
> Formatter. I haven't actually done much with formatting them, other  
> than
> to modify the model so that more information is had about where they  
> go,
> so they don't jump around between tokens when you format. And that  
> when
> you put extra CRs between them, you meant for them to stay there.
>
> That said, the configurable formatter is kind of a pain because it has
> so many options in it, and they're presented in a "set of screws"
> presentation, where you have to know what to set and how to get the
> desired result you want.
>
> So I'd like to gather feedback on what the hot items are for people,  
> and
> if some of these options couldn't be coalesced to simpler options.
>
> 1) Periods. Are there people out there that want to put periods at the
> end of the every block but NOT the end of methods? Rather than two
> binary settings, it seems one could reduce this option to:
> + "only when necessary"
> + "at the ends of methods"
> + "at the ends of methods AND blocks".
>
> 2) Method comments. You've got a knob for newlines after method
> comments. And another knob for the same before method body. One for
> after temporaries. And another for after the method pattern. But are
> there people who set one two 5, and another to 3. It seems everyone
> wants at least one cr at the end, and sometimes a blank line before  
> the
> next element. Could this be reasonably reduced to something like:
> + "Compact (no blank lines between)"
> + "After comments (one blank line at the end of all the comments)"
> + "Always One (one blank like after the comments or pattern if no
> comments)"
> + "Extreme" (put a blank line in between every element)
>
> 3) Strings after/before () and [] and ^. Are there those that put  
> spaces
> for ()'s, but not for blocks? Do some really want to be able to put 3
> spaces? or tabs? Could this be simplified as:
> + "Compact" (no spaces)
> + "Spaces" (put a space between ^ andReturnValue, as well as after/
> before () and []s).
>
> 4) Indent String. Does anyone set this to other than a single tab? And
> if this were an adjustable thing, wouldn't it be better to make the
> width of the tabs in a code view be settable, rather than tune this
> string?
>
> --
> Travis Griggs
> Objologist
> What's next, Intel Processors branded with "Apple Outside" stickers?
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
> --------------------------------------------------------
> This message may contain confidential information and is intended  
> for specific recipients unless explicitly noted otherwise. If you  
> have reason to believe you are not an intended recipient of this  
> message, please delete it and notify the sender. This message may  
> not represent the opinion of IntercontinentalExchange, Inc. (ICE),  
> its subsidiaries or affiliates, and does not constitute a contract  
> or guarantee. Unencrypted electronic mail is not secure and the  
> recipient of this message is expected to provide safeguards from  
> viruses and pursue alternate means of communication where privacy or  
> a binding message is desired.
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
www.tudorgirba.com
www.tudorgirba.com/blog

"Sometimes the best solution is not the best solution."

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Karsten Kusche
In reply to this post by Paul Baumann
Hi Travis,

I think your approach to simplify things is great! However, if there's
someone who needs complete customization, why not allow these people to
specify a custom formatter class that should be used instead of the
configurable formatter.
If there would be a simple way of creating a custom formatter class and
if the settings allow for choosing such a custom class, that should be a
big help for those people, too.

I for myself am already satisfied (or got used to) with the standard
formatting, although i think i would use the settings you described.

While i think about settings: The formatter and stuff like
CodeHighlighting settings are things that every developer has to setup
everytime he starts from scratch. it would be great if the settings are
stored into the system and can be loaded if the image starts for the
first time. that would be a great timesaver!

Kind Regards
Karsten



Travis wrote:

> I've been playing with handling comments better in the RBParser/
> Formatter. I haven't actually done much with formatting them, other than
> to modify the model so that more information is had about where they go,
> so they don't jump around between tokens when you format. And that when
> you put extra CRs between them, you meant for them to stay there.
>
> That said, the configurable formatter is kind of a pain because it has
> so many options in it, and they're presented in a "set of screws"  
> presentation, where you have to know what to set and how to get the
> desired result you want.
>
> So I'd like to gather feedback on what the hot items are for people, and
> if some of these options couldn't be coalesced to simpler options.
>
> 1) Periods. Are there people out there that want to put periods at the
> end of the every block but NOT the end of methods? Rather than two
> binary settings, it seems one could reduce this option to:
> + "only when necessary"
> + "at the ends of methods"
> + "at the ends of methods AND blocks".
>
> 2) Method comments. You've got a knob for newlines after method
> comments. And another knob for the same before method body. One for
> after temporaries. And another for after the method pattern. But are
> there people who set one two 5, and another to 3. It seems everyone
> wants at least one cr at the end, and sometimes a blank line before the
> next element. Could this be reasonably reduced to something like:
> + "Compact (no blank lines between)"
> + "After comments (one blank line at the end of all the comments)"
> + "Always One (one blank like after the comments or pattern if no
> comments)"
> + "Extreme" (put a blank line in between every element)
>
> 3) Strings after/before () and [] and ^. Are there those that put spaces
> for ()'s, but not for blocks? Do some really want to be able to put 3
> spaces? or tabs? Could this be simplified as:
> + "Compact" (no spaces)
> + "Spaces" (put a space between ^ andReturnValue, as well as after/
> before () and []s).
>
> 4) Indent String. Does anyone set this to other than a single tab? And  
> if this were an adjustable thing, wouldn't it be better to make the  
> width of the tabs in a code view be settable, rather than tune this  
> string?
>
> --
> Travis Griggs
> Objologist
> What's next, Intel Processors branded with "Apple Outside" stickers?
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>  
> --------------------------------------------------------
> This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>  

--
Karsten Kusche - Dipl.Inf. - [hidden email]
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Andre Schnoor
In reply to this post by Paul Baumann
+1

Your suggestions nicely summarize my preferred style. I guess there are
two factions: Those who got used to writing blocks as separate objects
(i.e. ifTrue: on one line and the block on the next), and those who
"come from other languages" and write them like nested control
structures (as described below). Both styles should be supported.

Andre


Paul Baumann wrote:

> Travis,
>
> Here are the options I'd look for:
>
> Indent one tab per for each multi-line nested block. The block starting
> bracket is the last token on the statement line that began it. The block
> ending bracket is in visual alignment with the start of the statement
> that began the block. Use periods for all statements except statements
> that return from the method. All cascaded messages (that can't fit on a
> single line) should be intended one level from the receiver. When the
> receiver of cascaded message is the result of a unary message then
> enclose receiver code in (). Don't automatically add # to symbols within
> literal arrays.
>
>  
[...]
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Travis Griggs-3
In reply to this post by Paul Baumann
On Mar 3, 2008, at 7:54 AM, Paul Baumann wrote:

> Indent one tab per for each multi-line nested block. The block  
> starting
> bracket is the last token on the statement line that began it. The  
> block
> ending bracket is in visual alignment with the start of the statement
> that began the block. Use periods for all statements except statements
> that return from the method.

Thanks Paul, took me a minute to get to the bottom of this, but this  
preference would not be included in the simplified options for periods  
that I had mentioned. Because you really are keeping extra periods in  
blocks, but not at the end. Good to know.

--
Travis Griggs
Objologist
Time and Countertops. They both get used up way too fast.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Andres Fortier-2
In reply to this post by Travis Griggs-3
Travis, List:
                    I don't know if this already
exists, so in case it does sorry for bothering.
One of the things that annoys me is to see code from
other developers formatted in a different way that I
do. So, if I could define a formatter that yields
acceptable results, it would be nice to have a feature
to "autofomat" the code when is displayed in the RB. Of
course I don't mean to recompile the sources, just
instead of showing the code, to show the formatted
version.

HTH,
         Andrés

Travis Griggs escribió:

> I've been playing with handling comments better in the RBParser/
> Formatter. I haven't actually done much with formatting them, other  
> than to modify the model so that more information is had about where  
> they go, so they don't jump around between tokens when you format. And  
> that when you put extra CRs between them, you meant for them to stay  
> there.
>
> That said, the configurable formatter is kind of a pain because it has  
> so many options in it, and they're presented in a "set of screws"  
> presentation, where you have to know what to set and how to get the  
> desired result you want.
>
> So I'd like to gather feedback on what the hot items are for people,  
> and if some of these options couldn't be coalesced to simpler options.
>
> 1) Periods. Are there people out there that want to put periods at the  
> end of the every block but NOT the end of methods? Rather than two  
> binary settings, it seems one could reduce this option to:
> + "only when necessary"
> + "at the ends of methods"
> + "at the ends of methods AND blocks".
>
> 2) Method comments. You've got a knob for newlines after method  
> comments. And another knob for the same before method body. One for  
> after temporaries. And another for after the method pattern. But are  
> there people who set one two 5, and another to 3. It seems everyone  
> wants at least one cr at the end, and sometimes a blank line before  
> the next element. Could this be reasonably reduced to something like:
> + "Compact (no blank lines between)"
> + "After comments (one blank line at the end of all the comments)"
> + "Always One (one blank like after the comments or pattern if no  
> comments)"
> + "Extreme" (put a blank line in between every element)
>
> 3) Strings after/before () and [] and ^. Are there those that put  
> spaces for ()'s, but not for blocks? Do some really want to be able to  
> put 3 spaces? or tabs? Could this be simplified as:
> + "Compact" (no spaces)
> + "Spaces" (put a space between ^ andReturnValue, as well as after/
> before () and []s).
>
> 4) Indent String. Does anyone set this to other than a single tab? And  
> if this were an adjustable thing, wouldn't it be better to make the  
> width of the tabs in a code view be settable, rather than tune this  
> string?
>
> --
> Travis Griggs
> Objologist
> What's next, Intel Processors branded with "Apple Outside" stickers?
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Travis Griggs-3
On Mar 5, 2008, at 6:14 AM, Andres Fortier wrote:

> Travis, List:
>                    I don't know if this already
> exists, so in case it does sorry for bothering.
> One of the things that annoys me is to see code from
> other developers formatted in a different way that I
> do. So, if I could define a formatter that yields
> acceptable results, it would be nice to have a feature
> to "autofomat" the code when is displayed in the RB. Of
> course I don't mean to recompile the sources, just
> instead of showing the code, to show the formatted
> version.

The Formatting page in 7.6 has the terse option to enable "Browse Auto  
Formats". Turn that on. I agree with you very much. It's like suddenly  
I wrote all of the code and it all looks the way I want, kind of.

--
Travis Griggs
Objologist
Time and Countertops. They both get used up way too fast.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Andres Fortier-2
Great then! We are still using 7.4.1, so I'll have it
in mind when we switch to 7.6

Travis Griggs escribió:

> On Mar 5, 2008, at 6:14 AM, Andres Fortier wrote:
>
>> Travis, List:
>>                    I don't know if this already
>> exists, so in case it does sorry for bothering.
>> One of the things that annoys me is to see code from
>> other developers formatted in a different way that I
>> do. So, if I could define a formatter that yields
>> acceptable results, it would be nice to have a feature
>> to "autofomat" the code when is displayed in the RB. Of
>> course I don't mean to recompile the sources, just
>> instead of showing the code, to show the formatted
>> version.
>
> The Formatting page in 7.6 has the terse option to enable "Browse Auto
> Formats". Turn that on. I agree with you very much. It's like suddenly I
> wrote all of the code and it all looks the way I want, kind of.
>
> --
> Travis Griggs
> Objologist
> Time and Countertops. They both get used up way too fast.
>
>
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

[vwnc] Cosmetic bug ?

Martin Rubi
In reply to this post by Travis Griggs-3
Hi.
Is there a place to post minor cosmetic things ?
It's not that I'm a complete neurotic, it's just that I'm new to VW so I'm reading quite a lot of code, web services in particular.
Anyway, I think that
XMLTypesParser>>baseURI: aString
 
should be:
XMLTypesParser>>baseURI: aURI
 
regards
martin

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

[vwnc] XMLTypesParser can't parse unions ?

Martin Rubi
In reply to this post by Travis Griggs-3
Hi. I'm using the WebServices.XMLTypesParser to create the binding classes
for several schemas.
At least one of the schemas uses the union type several times, as in the
example below:

'<xs:annotation>
<xs:documentation xml:lang="en">A construct to validate either a date or a
dateTime value.</xs:documentation>
</xs:annotation>
<xs:union memberTypes="xs:date xs:dateTime"/>
</xs:simpleType>'

and I'm getting a "Can not parse union type" errors.
Are unions not supported ? How do you deal with them ?

Thanks in advance.
martin

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Cosmetic bug ?

Reinout Heeck
In reply to this post by Martin Rubi

On Mar 5, 2008, at 6:47 PM, Martin Rubi wrote:

> Hi.
> Is there a place to post minor cosmetic things ?
> It's not that I'm a complete neurotic, it's just that I'm new to VW  
> so I'm reading quite a lot of code, web services in particular.
> Anyway, I think that
> XMLTypesParser>>baseURI: aString
>
> should be:
> XMLTypesParser>>baseURI: aURI


Several Cincom people read this list, so here is a good spot.

If you want a little more attention to be given to your reports you  
could consider joining the VW-dev program.
This requires signing a non-disclosure agreement, but I found this  
particular NDA quite friendly relative to other NDAs I've seen (but  
refused to sign ;-).
See: http://www.parcplace.net/


R
-

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] XMLTypesParser can't parse unions ?

Kogan, Tamara
In reply to this post by Martin Rubi
Union elements are not supported yet.
There is the AR:
51088: "Add support for union  types in XMLTypeParser"


Tamara Kogan
Smalltalk development,
Cincom Systems

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
Behalf
> Of Martin Rubi
> Sent: Wednesday, March 05, 2008 1:06 PM
> To: VWNC List
> Subject: [vwnc] XMLTypesParser can't parse unions ?
>
> Hi. I'm using the WebServices.XMLTypesParser to create the binding
classes
> for several schemas.
> At least one of the schemas uses the union type several times, as in
the
> example below:
>
> '<xs:annotation>
> <xs:documentation xml:lang="en">A construct to validate either a date
or a

> dateTime value.</xs:documentation>
> </xs:annotation>
> <xs:union memberTypes="xs:date xs:dateTime"/>
> </xs:simpleType>'
>
> and I'm getting a "Can not parse union type" errors.
> Are unions not supported ? How do you deal with them ?
>
> Thanks in advance.
> martin
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Code Formatting

Bruce Badger
In reply to this post by Antony Blakey-2
On 29/02/2008, Antony Blakey <[hidden email]> wrote:
>  At the risk of being flamed: IMHO the general casting of choice as a
>  moral good is a fallacy - one that can most obviously been seen in the
>  enormous configurability of ugly and unusable open source GUI software
>  vs. the highly constrained and usable OSX environment.

Consider yourself flamed for the completely unnecessary and unfounded
swipe at free and open source software.  For a very popular desktop
environment which has, by design, minimised the number of
configuration options see Gnome.  If you like configuration options
for your desktop, see KDE.   Good grief.

Other than that I agree that something consistent is the main thing.
Frankly I would like to see the formatter use the pre 7.5 layout since
almost all my code is already formatted that way because even though
the format was not beautiful to my eyes, it was consistent and that
was the more valuable thing.

--
Make the most of your skills - with OpenSkills
http://www.openskills.org/
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
12