Refactoring squeak

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

Refactoring squeak

Damien Cassou-3
Hi,

sometimes when I dive into Squeak source code, I would like to refactor
some piece of code that can be enhanced. Does someone care to have
better source code in Squeak ? Where is the best place to post the
enhancements ? To post new tests ? Often, it will be just one line or
two, do I need to write bug reports in mantis ? Will somebody have a
look at this ?


Bye

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak

Michael van der Gulik
Damien Cassou wrote:
> Hi,
>
> sometimes when I dive into Squeak source code, I would like to refactor
> some piece of code that can be enhanced. Does someone care to have
> better source code in Squeak ? Where is the best place to post the
> enhancements ? To post new tests ? Often, it will be just one line or
> two, do I need to write bug reports in mantis ? Will somebody have a
> look at this ?

If somebody on this list could give an "official" and comprehensive
answer, I believe it would be a good thing to put on the web site (which
I could organise).

There was a post by Stef some time ago, but I can't find it.

Mikevdg.


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak

Jerome Peace
In reply to this post by Damien Cassou-3
Hi Damien,
>
>Refactoring squeak
>Damien Cassou damien.cassou at laposte.net
>Fri Jun 30 08:34:13 UTC 2006 wrote:

>Hi,
>
>sometimes when I dive into Squeak source code, I
would like to refactor
>some piece of code that can be enhanced.

>Does someone care to have better source code in
Squeak?

Yes.


>Where is the best place to post the
>enhancements ? To post new tests ? Often, it will be
just one line or
>two, do I need to write bug reports in mantis ?

Do you need to write a bug report on mantis?  How
would you respond to your own question?

My experience is that when I find something that
bothers me about a piece of squeak. I need to write
the mantis report first. Then when I dive into it I
have a place to put my partial results. Analysis etc.
And when I triumph over the code my fixes and
enhancements go there also.

.
> Will somebody have a look at this ?

Will it be interesting to look at?

Have you included a good recipe for reproducing the
bug?  Is your explanation of code enhancements clear?
Have you a good answer to the question: “What makes it
worthwhile?”


You will find it interesting. You put it there.
Whether someone else will depends on whether its in
their field of interest. And on whether they’ve
discovered reading mantis can be more interesting than
follow the mailing list.

There are a few of us who look at new mantis issues
regularly (if they are in our field of interest).  I
have had mantis issues that have attracted outside
attention and ones that have remained ‘mine’ for long
periods of time.

Markus Denker in his work on 3dot9 harvested a LOT of
code reported in mantis issues.

Mantis is patiently persistent.  An issue there has a
better chance of getting noticed eventually than the
mail list.  

A lot of people add bugs to mantis then include the
url in a mail post to draw attention to it.
If you report a bug here and its a good one, someone
will suggest you put it on mantis, so why not beat
them to the punch?

Squeak is meant to be iterative.  Good code review and
good Simplifing refactorings would improve its next
iteration greatly. I hope you go for it.

Yours in service, Jerome Peace


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak

stéphane ducasse-2
In reply to this post by Damien Cassou-3
If you want to increase the chance that your fixes get attention here  
are some tricks.

        - write tests to show that you do not break the system
        - do not refactor for the sake of it
        - use deprecation to support users of the old code
        - ask people for feedback and review
        - and yes having a better system is important (even if this is  
difficult and may break some existing code)

Stef

On 30 juin 06, at 10:34, Damien Cassou wrote:

> Hi,
>
> sometimes when I dive into Squeak source code, I would like to  
> refactor some piece of code that can be enhanced. Does someone care  
> to have better source code in Squeak ? Where is the best place to  
> post the enhancements ? To post new tests ? Often, it will be just  
> one line or two, do I need to write bug reports in mantis ? Will  
> somebody have a look at this ?
>
>
> Bye
>


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak

Damien Cassou-3
stéphane ducasse wrote:
> If you want to increase the chance that your fixes get attention here
> are some tricks.
>
>     - write tests to show that you do not break the system
>     - do not refactor for the sake of it


What do you mean ?




Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak

Damien Cassou-3
In reply to this post by Jerome Peace
Thank you very much for this very interesting mail

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak

stéphane ducasse-2
In reply to this post by Damien Cassou-3

On 1 juil. 06, at 13:27, Damien Cassou wrote:

> stéphane ducasse wrote:
>> If you want to increase the chance that your fixes get attention  
>> here are some tricks.
>>     - write tests to show that you do not break the system
>>     - do not refactor for the sake of it
>
>
> What do you mean ?

I mean that if you have lot of clients using an interface this is  
complex since
even if the refactoring is simple we should not neglect the cost of  
the client's update.
When you are the sole user of your code refactoring is cool, now we  
should take into
account others. There is a tension between these two considerations ;)
Stef
Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak (version for squeak.org)

Michael van der Gulik
In reply to this post by stéphane ducasse-2
Comments below. This is also BCC'ed to the web team.

stéphane ducasse wrote:

> If you want to increase the chance that your fixes get attention here  
> are some tricks.
>
>     - write tests to show that you do not break the system
>     - do not refactor for the sake of it
>     - use deprecation to support users of the old code
>     - ask people for feedback and review
>     - and yes having a better system is important (even if this is  
> difficult and may break some existing code)
>
> Stef
>
> On 30 juin 06, at 10:34, Damien Cassou wrote:
>
>> Hi,
>>
>> sometimes when I dive into Squeak source code, I would like to  
>> refactor some piece of code that can be enhanced. Does someone care  
>> to have better source code in Squeak ? Where is the best place to  
>> post the enhancements ? To post new tests ? Often, it will be just  
>> one line or two, do I need to write bug reports in mantis ? Will  
>> somebody have a look at this ?

Would authoritive-sounding people comment on the following as a page on
the official Squeak website:

Contributing (subcategory under "Community").
----------------------


Contributing small amounts of code
-------------------------------------

Bug reports and small code contributions can be either added to the
*Mantis* bug reporting system, or to the *Squeak mailing list*. Squeak
developers (which, after a contribution, will include you!) use the
Mantis system to keep track of small changes and to eventually merge
them into Squeak.

Remember that Squeak is developed by volunteers so that your
contribution of code or a bug report may or may not get attention. In
order to increase the chances that your bug or code contribution
receives attention, try the following:

* Ensure that your code is submitted to the relevant *Team*. Each team
has their own preferences as to the preferred format of that code
(Monticello / Change sets).

* Write tests that verify that your code does not break the current
Squeak system.

* Contribute changes that keep as much backwards compatibility as possible.

* [What's deprecation???]


Contributing large amounts of code
------------------------------------------

If you want to contribute a significant amount of code, your project can
be published using *SqueakMap*. If your code is of a different nature,
as on the *Squeak mailing list*.

You can start your own mailing list for your project using the *Squeak
foundation mailing lists server*.

*SqueakSource* can be used to store a repository of your code. [and a
wiki?].


Filing bug reports
---------------------

Bug reports should be submitted to the *Mantis bug reported system*.

In order to aid others in fixing your bug, try the following:

* Spend at least a non-trivial amount of time tracking down the bug
yourself.

* In your bug report, include the nature of the bug and good
instructions on how to reproduce that bug.

* If you have written a test to reproduce the buggy behaviour, include
that as an attachment to your bug report.



Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak (version for squeak.org)

Damien Cassou-3
> Bug reports and small code contributions can be either added to the
> *Mantis* bug reporting system, or to the *Squeak mailing list*.


You should replace 'or the Squeak mailing list' by 'and the squeak
mailing list' in my opinion.


> * Ensure that your code is submitted to the relevant *Team*.


Replace *Team* by *Category* because this is what Mantis ask for.

> * [What's deprecation???]


Deprecation means that a method still exist in the image because some
code use it, but new code must not use it. Deprecated methods may be
removed sooner or later. Use #deprecated: to signal that a method should
not be sent anymore.


> Bug reports should be submitted to the *Mantis bug reported system*.

Add the web address: http://bugs.impara.de


Bye

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak (version for squeak.org)

karl-8
In reply to this post by Michael van der Gulik
Michael van der Gulik skrev:

> Comments below. This is also BCC'ed to the web team.
>
> stéphane ducasse wrote:
>> If you want to increase the chance that your fixes get attention
>> here  are some tricks.
>>
>>     - write tests to show that you do not break the system
>>     - do not refactor for the sake of it
>>     - use deprecation to support users of the old code
>>     - ask people for feedback and review
>>     - and yes having a better system is important (even if this is  
>> difficult and may break some existing code)
>>
>> Stef
>>
>> On 30 juin 06, at 10:34, Damien Cassou wrote:
>>
>>> Hi,
>>>
>>> sometimes when I dive into Squeak source code, I would like to  
>>> refactor some piece of code that can be enhanced. Does someone care  
>>> to have better source code in Squeak ? Where is the best place to  
>>> post the enhancements ? To post new tests ? Often, it will be just  
>>> one line or two, do I need to write bug reports in mantis ? Will  
>>> somebody have a look at this ?
>
> Would authoritive-sounding people comment on the following as a page
> on the official Squeak website:
>
> Contributing (subcategory under "Community").
> ----------------------
>
>
> Contributing small amounts of code
> -------------------------------------
>
> Bug reports and small code contributions can be either added to the
> *Mantis* bug reporting system, or to the *Squeak mailing list*. Squeak
> developers (which, after a contribution, will include you!) use the
> Mantis system to keep track of small changes and to eventually merge
> them into Squeak.
>
> Remember that Squeak is developed by volunteers so that your
> contribution of code or a bug report may or may not get attention. In
> order to increase the chances that your bug or code contribution
> receives attention, try the following:
>
> * Ensure that your code is submitted to the relevant *Team*. Each team
> has their own preferences as to the preferred format of that code
> (Monticello / Change sets).
>
> * Write tests that verify that your code does not break the current
> Squeak system.
>
> * Contribute changes that keep as much backwards compatibility as
> possible.
>
> * [What's deprecation???]
>
>
> Contributing large amounts of code
> ------------------------------------------
>
> If you want to contribute a significant amount of code, your project
> can be published using *SqueakMap*. If your code is of a different
> nature, as on the *Squeak mailing list*.
>
> You can start your own mailing list for your project using the *Squeak
> foundation mailing lists server*.
>
> *SqueakSource* can be used to store a repository of your code. [and a
> wiki?].
>
>
> Filing bug reports
> ---------------------
>
> Bug reports should be submitted to the *Mantis bug reported system*.
>
> In order to aid others in fixing your bug, try the following:
>
> * Spend at least a non-trivial amount of time tracking down the bug
> yourself.
>
> * In your bug report, include the nature of the bug and good
> instructions on how to reproduce that bug.
>
> * If you have written a test to reproduce the buggy behaviour, include
> that as an attachment to your bug report.
>
>
>
Looks good, Michael.
One remark, before adding a bug report one should first search mantis to
see if the bug is
already reported.
Karl

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring squeak (version for squeak.org)

Michael van der Gulik
In reply to this post by Damien Cassou-3
Damien Cassou wrote:
>> Bug reports and small code contributions can be either added to the
>> *Mantis* bug reporting system, or to the *Squeak mailing list*.
>
>
>
> You should replace 'or the Squeak mailing list' by 'and the squeak
> mailing list' in my opinion.

...that's a subjective opinion.

I think I'll add your version to the website and wait for disagreement :-).

>> * Ensure that your code is submitted to the relevant *Team*.
>
> Replace *Team* by *Category* because this is what Mantis ask for.

Umm... I meant directly to that team's mailing list. I think all of the
"how to use Mantis" should be in its own section. Hmm...

>> Bug reports should be submitted to the *Mantis bug reported system*.
>
> Add the web address: http://bugs.impara.de

All of the *items in stars* would be replaced with relevant URLs when I
get around to writing this up.

Thanks for the comments! Much appreciated.

Michael.