[squeak-dev] Balance of metrics

Tobias Pape Das.Linux at gmx.de
Mon Mar 12 20:13:46 UTC 2018


> On 12.03.2018, at 20:55, tim Rowledge <tim at rowledge.org> wrote:
> 
> 
> 
>> On 12-03-2018, at 12:42 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
>> 
>> 
>>> On 12.03.2018, at 20:26, tim Rowledge <tim at rowledge.org> wrote:
>>> 
>>> Personally I'd be more inclined to go for "methods are private unless explicitly set to public" as a way to aggressively make people think about what they're doing!
>> 
>> welcome to java world, where everyone is making everything final, because, why yes, nobody should use that but my code!
> 
> I'm a long way from a java expert, having taken a look at it in the late 90's and reeled in horror, but I thought 'final' was a way to say that no subclass can be made, or no subclass can over-ride a method? Is it used for runtime privacy?

No. You caught me, but this is my personal equivalent :P :D

> 
>> I've been bitten by that, and I've always appreciate the kind of responsibility that Smalltalk gives to the client of objects: "you send that message, you're gonna be responsible for it".
> 
> My problem here is that people just don't seem to take that responsibility often enough.

Yes, that is true. So it is an education problem.

With our students I see that those who are willing to:
 - explore the image
 - take the risk of _sometimes_ grill it (they soon make backups :D)
 - and _take on_ the responsibility
will deliver the best code. This list is ordered, by the way, it starts with willingness to explore. 
Some students say "I didn't imagine squeak could do that", and then either "so I didn't search" or "tell me what will make it work", which are both, equally disappointing and annoying. 
Luckily, this is a minority.

> 
>> Where was I? Oh yeah, the safety argument.
>> There's a German road security specialist who says, the way to make driving the safest is to put a point stick right on the driving wheel so that should you brake too hard, it'll puncture your skull. That way, nobody would ever dare to drive too fast or dangerously. Casualties  would certainly drop, considering everything.
>> [side note]
>> No, I'm not making this up
>> [/side note]
> 
> That's a very old joke indeed, along with "What's the most dangerous part of a car? The nut that holds the steering wheel"

That guy said it in a rather serious tone (but maybe that just a trope..)

> 
>> The other method he suggests is better education and better awareness, combined with better helpers (viz. tools)
>> 
>> I'd rather have the latter, in Smalltalk, than a pointy stick. :)
> 
> Yes indeed but see my previous point.
>>> 
>>> 
> 
>>> And while I'm being all dictatorial, I really hate to see code like
>>> 
>>> self foo bim baz wibble at: weeble state count + 1
>>> 
>>> ie chains of accessors that imply far too much knowledge of the type of what you get returned. Should be more like
>>> 
>>> self wibbleStateAt: weeble nextState
>>> 
>>> with suitable delegations though whatever foo is, and its baz, and its wibble, and so on.
>> 
>> Clearly, Law of Demeter! We teach that our students every year in quite some detail with quite some emphasis.
> 
> Good to hear. It needs applying massively in the image.  :-(
> 

Yes!

That being said, I'd like to invite you all to read the following, IMHO very succinct and well written essay: http://web.cecs.pdx.edu/~black/publications/egal.pdf

I especially like the concept of autognosis, which would, if applied, help here a bit, I think.


>> 
>> But I think both points are orthogonal here. :)
> 
> Maintaining orthogonality is important. Save the orthogones!

Orthothropes!


Best regards
	-Tobias
> 
> 
>>> 
>>> Strange OpCodes: FA: Failsafe Armed
>> 
>> HCF!
> 
> If you have NetFlix and you are lucky you might be able to watch the really rather fun series called Halt and Catch Fire. It's one of those historidramas that is completely not how it happened and yet completely true to what happened. I loved it. PARC and Smalltalk even get a mention!

I heard good of it, yes.
> 
> 
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> The colder the X-ray table, the more of your body is required on it.

*shiver* 


More information about the Squeak-dev mailing list