[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: utilizing ++ and -- for comments

Peña, Botp

2/16/2005 4:20:00 AM

Edgardo Hames [mailto:ehames@gmail.com] wrote:
//<botp@delmonte-phil.com> wrote:
//> Since ++ and -- wont see the light of day in ruby, can we
//use it for
//> comment notation?
//
//Come on! Real programmers don't comment their code. It was
//hard to write, it should be hard to understand ;)

:-))

let's just say I'm just one of the weirdos on the other side. I read code
if and only if there is a comment :-)

The closest connection bw code and comments I can think of is (eiffel's)
pre/post condition..

but that is just me of course and am not a real proggmr -just a nuby :-)

//
//Kind Regards,
//Ed
//

kind regards -botp


2 Answers

neo.matrix.fr

2/16/2005 8:58:00 AM

0


> //Come on! Real programmers don't comment their code. It was
> //hard to write, it should be hard to understand ;)
>
it's so funny ;-)
>
)
>
> The closest connection bw code and comments I can think of is (eiffel's)
> pre/post condition..
if fully agree with you and I believe at 100% in pre/post conditions,
class invariant, check clause... and in general in Design By Contract

it answers well at the question : Who do what ? With wich garanties ?
== The *most* important question to solve the issue of the quality of
software ==

Ytoba

Brian Mitchell

2/16/2005 4:06:00 PM

0

On Wed, 16 Feb 2005 17:59:51 +0900, at <"neo.matrix.fr(at)"@wanadoo.fr> wrote:
>
> > //Come on! Real programmers don't comment their code. It was
> > //hard to write, it should be hard to understand ;)
> >
> it's so funny ;-)
> >
> )
> >
> > The closest connection bw code and comments I can think of is (eiffel's)
> > pre/post condition..
> if fully agree with you and I believe at 100% in pre/post conditions,
> class invariant, check clause... and in general in Design By Contract
>
> it answers well at the question : Who do what ? With wich garanties ?
> == The *most* important question to solve the issue of the quality of
> software ==
>
> Ytoba
>
>

Part of that can be done by well written AND explained unit tests.
That is my current favorite method. Pre/Post can be so limiting for
some things as ruby supports diverse behavior and I tend to use its
dynamics to the fullest (even to the point where the method is
dynamically added so I can't easily add a comment to it).

Just my thoughts. Still a bright green nuby although I am getting
shades of red finally ;-)

Brian.