[squeak-dev] Re: SwaLint

Tobias Pape Das.Linux at gmx.de
Fri Mar 13 12:04:53 UTC 2009


Hello Mariano,

sorry for the late reply, I have been busy  the last weeks.

Am 2009-03-03 um 23:08 schrieb Mariano Martinez Peck:
>
[…]
>
> Sorry. What's what you don't understand ? I dont' understand what  
> you didn't understand hahaaha. I give you an exampple (the firstone  
> I found):
>
> <code>
> executeDDLScript: aDDLScript
> "Its very common you need to execute a complete DDL script: create,  
> drop or alter tables. In these cases, you don't have any interesting  
> results from each query. In such a case, you should use this method.  
> Remember SqueakDBX doesn't do any translation so your statement  
> delimiter must be understood by the backend. In order to know which  
> delimiter we use, you can see the message queryDelimiter of the  
> current platform backend, for example DBXPostgresPlatform.
> This message doesn't use the multistatements option of openDBX, it  
> is all done by SqueakDBX so you don't have to care about it''"
>
>     | ddlStatements |
>     ddlStatements := aDDLScript findTokens: self platform  
> queryDelimiter.
>     ddlStatements
>         do: [:ddlStatement | self execute: ddlStatement]
>  </code>

So, now I get it. In fact, I understood your question the way, that  
you put empty comments
into your code, as in:

aMessage
	""

	self anotherMessage; aThirdMessage: true.


Which would not make sense to me.
   Regarding your example method, in my humble opinion, this is a  
large methos even though
it is long only due its comment. I (or wie in that case) as SwaLint  
developers thought that
7 lines average in a class would fit smalltalk style and should cope  
with small getter/setters
and rather lagre initializer.
   Well, I presume this average wouldnt fit for you, so simply change  
it in the preferences. In
fact, it is merely a matter of taste and/or style, so don't hesitate  
to change if it don't fit for you.

[…]
> > Ok, this might be useful. Did I got this right there? You'd like  
> to right click on the test group and browse all of them?
>
> EXACTLY. I don't know if was just me, but actually that was my way  
> of resolving the issues. Go test after test, and browsing for each  
> one all the classes. Perhaps, I am the only one, so, It just doesn't  
> worth it.

I consider it a useful feature. Yet, currently my time to work on  
SwaLint is fairly limitied,
so please dont expect it before summer.

>
> > Currenetly, you can select multiple (or one, depending on your  
> personal settings) "occurences" of test results and
> > right-click -> browse them all.
>
> Exactly. For all of test I did that. I don't know it was the  
> esasiest way. So, because of this, I imagine 2)   :)

Point taken.

[…]
>
> >> 3) What does "Data class" mean ? are all the test detailed deeply  
> somewhere ? like a webpage, wiki, or just SwaLint browser ?
> >
> > This notion has been taken from Michele Lanza's and Radu  
> Marinescu's nice book "Object-Oriented Metrics in Practice".
> > If you like to see the underlying metrics used to "calculate" the  
> Data class, just enable them in the Preferences. You will
> > notice, that they are named after the ones described in the book.
> > Our mechanism of reusing results allows for simple creation of new  
> Test Plugins. Just play around with them.
> > There has been plans to cover all Metrics described in the book,  
> however, time is short and I'll be able to Implement them not before  
> summer, I presume.
>
> Ok, perfect. Thanks!

You're welcome.

> > As you mention the Wiki, I'm looking forward to bring it up aroung  
> mid March, again, or late March, depending on how my new server is  
> running.
>
> Excellent news!

It depends. It actually depends, on some frineds of mine in this case,  
because theyre
don't get settled buying the server *getting_nervous* ;)
>
> >> 4) What does "Dot after return consistency" mean ? I don't  
> understand the % and when it is average, low or high.
> >
> > Oh that's a nice one :)
> > This is a Style tests. It simply tests, how many returns are written
> >
> >  ^ anObject aMessage
> >
> > and how many are written
> >
> > ^ anObject aMessage.

> > Where 100% is "all with" and 0% "all without" dot after return.
> > Thus, 50% is the worst value you can get in this test, as it  
> implies, that every second return statement
> > is written in the opposing style.
>

> and are there some differences between both ways? I mean, a real  
> difference ? or just to do it the same way in all the code ?

The latter. Its "just" about style consistency.

Have a nice weekend,
	-Tobias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: Signierter Teil der Nachricht
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090313/6794e9c7/PGP.pgp


More information about the Squeak-dev mailing list