Better documenting and consistency

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

Better documenting and consistency

Stéphane Ducasse
Hi all

today I wanted to finish my ThreadSafeTrasncript
so I started to code

buildWith: aBuilder
        "(self buildWith: MorphicToolBuilder new) openInWorld"
       
       
        ^self new buildWith: aBuilder

and open

open
        "self open"
       
        ^ (self buildWith: MorphicToolBuilder new) openInWorld


and I realised that I do not know what open should return.
Should it return the window or the model.

I could not figure out

I tried to understand what buildWith: should return but it was totally  
unclear


Having better comment than
        buildWith: aBuilder
                ^self subclassResponsibility

is needed if we want to continue to bash Java people.
So what do we do?
Stef



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Better documenting and consistency

keith1y

>
> is needed if we want to continue to bash Java people.
> So what do we do?
> Stef
>
>  
I wrote Scripter for scripting UI elements. The inconsistencies in what
#open returns is a problem.

I think it should return the window, and the window should respond to
#model. If we cant decide upon a convention for #open, then perhaps
adding #openInWindow, or #openWindow, which does return the window.

Keith


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Better documenting and consistency

Stéphane Ducasse
yes something like that would be better.

Stef

On Mar 27, 2009, at 1:26 PM, Keith Hodges wrote:

>
>>
>> is needed if we want to continue to bash Java people.
>> So what do we do?
>> Stef
>>
>>
> I wrote Scripter for scripting UI elements. The inconsistencies in  
> what
> #open returns is a problem.
>
> I think it should return the window, and the window should respond to
> #model. If we cant decide upon a convention for #open, then perhaps
> adding #openInWindow, or #openWindow, which does return the window.
>
> Keith
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Better documenting and consistency

Damien Cassou
In reply to this post by keith1y
On Fri, Mar 27, 2009 at 1:26 PM, Keith Hodges <[hidden email]> wrote:
> I think it should return the window, and the window should respond to
> #model. If we cant decide upon a convention for #open, then perhaps
> adding #openInWindow, or #openWindow, which does return the window.

I like the convention of #open because it makes things clear and
simple. It's easy to access both the model and the window and only one
method is required.

--
Damien Cassou
http://damiencassou.seasidehosting.st

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Better documenting and consistency

Robert Peters
In reply to this post by Stéphane Ducasse
I agree with this sentiment.  I have been trying to learn Smalltalk with the help of 'Squeak by Example', but while it is a good read, it is almost useless as a reference.

When I have a Python issue, I type (for example), "initialize multi-dimensional array Python" into Google and get 14,000 responses.  Replace 'Python' with 'Smalltalk' and I get 2,000, most of which aren't about Smalltalk, and I still haven't found a code example.

There are a number of books on-line, but some don't even have tables of contents or indexes, and they're all in .pdf, which makes them extremely cumbersome to use as references.

I, of course, only speak for myself, but I am officially closing my current foray into Smalltalk.  It's too hard to learn.  There's not adequate reference material.  There are very few code examples.

If, at some point in the future, Smalltalk becomes easier to learn, I will try again.  Until then, I'm going back to Python.

I mentioned on the Pharo IRC channel that I was a Django developer, and would consider building a site to assist with getting the material inside these books onto the web, and I will continue to think about that.  If there's any interest, please let me know.

Kind regards,
Robert Peters

Stéphane Ducasse-2 wrote
Having better comment than
        buildWith: aBuilder
                ^self subclassResponsibility

is needed if we want to continue to bash Java people.
So what do we do?
Stef
Reply | Threaded
Open this post in threaded view
|

Re: Better documenting and consistency

Stéphane Ducasse
you can also use the smalltalk tools.
        senders.
        implementers
        message tools
       
we say that a guy is ok in smalltalk when he understand senders and  
implementors.
Now you can also send this kind of message to the squeak and smalltalk  
community because I should be
guy that wrote the larger number of smalltalk book so I do not know  
how I could do more.

Stef

On Mar 27, 2009, at 6:51 PM, Robert Peters wrote:

>
> I agree with this sentiment.  I have been trying to learn Smalltalk  
> with the help of 'Squeak by Example', but while it is a good read,  
> it is almost useless as a reference.
>
> When I have a Python issue, I type (for example), "initialize multi-
> dimensional array Python" into Google and get 14,000 responses.  
> Replace 'Python' with 'Smalltalk' and I get 2,000, most of which  
> aren't about Smalltalk, and I still haven't found a code example.
>
> There are a number of books on-line, but some don't even have tables  
> of contents or indexes, and they're all in .pdf, which makes them  
> extremely cumbersome to use as references.
>
> I, of course, only speak for myself, but I am officially closing my  
> current foray into Smalltalk.  It's too hard to learn.  There's not  
> adequate reference material.  There are very few code examples.
>
> If, at some point in the future, Smalltalk becomes easier to learn,  
> I will try again.  Until then, I'm going back to Python.
>
> I mentioned on the Pharo IRC channel that I was a Django developer,  
> and would consider building a site to assist with getting the  
> material inside these books onto the web, and I will continue to  
> think about that.  If there's any interest, please let me know.
>
> Kind regards,
> Robert Peters
>
>
> Having better comment than
> buildWith: aBuilder
> ^self subclassResponsibility
>
> is needed if we want to continue to bash Java people.
> So what do we do?
> Stef
>
>
> --
> View this message in context: http://n2.nabble.com/Better-documenting-and-consistency-tp2542850p2545717.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Better documenting and consistency

SergeStinckwich
In reply to this post by Robert Peters
On Sat, Mar 28, 2009 at 12:51 AM, Robert Peters <[hidden email]> wrote:
>
> I agree with this sentiment.  I have been trying to learn Smalltalk with the help of 'Squeak by Example', but while it is a good read, it is almost useless as a reference.

You mean a book with a list of all the classes and methods ? The
problem is that this list depends on the classes loaded in your image.

> When I have a Python issue, I type (for example), "initialize multi-dimensional array Python" into Google and get 14,000 responses.  Replace 'Python' with 'Smalltalk' and I get 2,000, most of which aren't about Smalltalk, and I still haven't found a code example.

You need something like a Smalltalk cookbook ?

> There are a number of books on-line, but some don't even have tables of contents or indexes, and they're all in .pdf, which makes them extremely cumbersome to use as references.
>
> I, of course, only speak for myself, but I am officially closing my current foray into Smalltalk.  It's too hard to learn.  There's not adequate reference material.  There are very few code examples.

In fact the examples are inside a Smalltak image. You have to explore
and learn by reading the code.

> If, at some point in the future, Smalltalk becomes easier to learn, I will try again.  Until then, I'm going back to Python.

The main problem is that the Smalltalk community is much smaller than
the Python, so it's more difficult to find people who are able to
wrote tutorials and books. People like Stéphane and others have
already great efforts to wrote books like "Squeak by Example",
"Squeak: learn programming with robots", ... Most of these books are
available freely on the web. Ask also the publishers to publish
Smalltalk books. They just want to publish mainstream stuff ...

> I mentioned on the Pharo IRC channel that I was a Django developer, and would consider building a site to assist with getting the material inside these books onto the web, and I will continue to think about that.  If there's any interest, please let me know.

Most of the book are available as pdf files but you need the authors
and editors permissions to diffuse them in another format.
Maybe some of there is no copyright issues with some of the books, we
can make some wikibooks from them.

Best regards,
--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Smalltalkers do: [:it | All with: Class, (And love: it)]
http://doesnotunderstand.org/

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Better documenting and consistency

Damien Pollet
On Sat, Mar 28, 2009 at 10:14, Serge Stinckwich
<[hidden email]> wrote:
> In fact the examples are inside a Smalltak image. You have to explore
> and learn by reading the code.

Yes but that's the bootstrap problem… Google doesn't index senders and
implementors :)
I think what would be nice here is for the next generation of
SqueakSource to make it easy to google and browse code/comments
online. Sourcetalk is a nice start, though it still has the non-REST
seasidish URLs.

--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Better documenting and consistency

Alexandre Bergel
This is a very good point. Maybe the code of Pharo could be dump  
somewhere on the web.
Cyrille worked on a SmalltalkDoc no?

Alexandre

On 28 Mar 2009, at 15:45, Damien Pollet wrote:

> On Sat, Mar 28, 2009 at 10:14, Serge Stinckwich
> <[hidden email]> wrote:
>> In fact the examples are inside a Smalltak image. You have to explore
>> and learn by reading the code.
>
> Yes but that's the bootstrap problem… Google doesn't index senders and
> implementors :)
> I think what would be nice here is for the next generation of
> SqueakSource to make it easy to google and browse code/comments
> online. Sourcetalk is a nice start, though it still has the non-REST
> seasidish URLs.
>
> --
> Damien Pollet
> type less, do more [ | ] http://people.untyped.org/damien.pollet
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project