A small game: do one trivial improvement every day

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

A small game: do one trivial improvement every day

Marcus Denker-4
Hi,

I have started again to do one absolutely trivial improvement every week-day.

The idea is that this is something that can be done in <15minutes, the right thing to do when stuck with other work
or as the first or last thing of the day.

I will do one per day and put another one on the issue tracker for others to do.

Today:

withAllSubclassesDo: and withAllSuperclasses can be implemented a little bit nicer:
        https://github.com/pharo-project/pharo/pull/3629

(review needed!)

new issue (for someone else to submit a PR):

small cleanup traits in Behaviour: isComposedBy: move to traits
        https://github.com/pharo-project/pharo/issues/3630


The “every day” might be a bit too much, other frequencies could be  “every week” or “every month”  or “one for every release”

I think the  “one for every release” is something everyone on this list should have as a minimal goal.

We have a list of simple things to do here: https://github.com/orgs/pharo-project/projects/8


        Marcus
Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Pharo Smalltalk Developers mailing list
I really like this idea! Will see if i can do something with this too.

On Wed, 26 Jun 2019 at 09:16, Marcus Denker <[hidden email]> wrote:
Hi,

I have started again to do one absolutely trivial improvement every week-day.

The idea is that this is something that can be done in <15minutes, the right thing to do when stuck with other work
or as the first or last thing of the day.

I will do one per day and put another one on the issue tracker for others to do.

Today:

withAllSubclassesDo: and withAllSuperclasses can be implemented a little bit nicer:
        https://github.com/pharo-project/pharo/pull/3629

(review needed!)

new issue (for someone else to submit a PR):

small cleanup traits in Behaviour: isComposedBy: move to traits
        https://github.com/pharo-project/pharo/issues/3630


The “every day” might be a bit too much, other frequencies could be  “every week” or “every month”  or “one for every release”

I think the  “one for every release” is something everyone on this list should have as a minimal goal.

We have a list of simple things to do here: https://github.com/orgs/pharo-project/projects/8


        Marcus


--
З повагою, 
Мирослава Романюк.
Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Marcus Denker-4
In reply to this post by Marcus Denker-4


> On 26 Jun 2019, at 08:16, Marcus Denker <[hidden email]> wrote:
>
> Hi,
>
> I have started again to do one absolutely trivial improvement every week-day.
>

Trivial improvement of the day:

simplify #allSelectorsInProtocol:
        https://github.com/pharo-project/pharo/pull/3647

review needed. This is an example that an improvement can be useful even though “one could do even better”.
e.g. why has this method the name allSelectorsInProtocol: but takes a string/symbol? good question, but we can
improve that method nevertheless.

Trivial thing to do for someone else:

#zapAllMethods can be removed
        https://github.com/pharo-project/pharo/issues/3656

zapAllMethods was a private methods used by the "we remove all methods when a class gets obsoleted". We do not delete methods anymore in this case --> method can be removed

        Marcus
Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Marcus Denker-4

>
> Trivial improvement of the day:
>
> simplify #allSelectorsInProtocol:
> https://github.com/pharo-project/pharo/pull/3647
>

has been merged.
>
>
> Trivial thing to do for someone else:
>
> #zapAllMethods can be removed
> https://github.com/pharo-project/pharo/issues/3656
>

was done (not by me!) and merged!

Trivial thing done today:

        simplify allUnreferencedClassVariables
                https://github.com/pharo-project/pharo/issues/3661

this is a nice example how other trivial unimportant changes make things trivial that where not trivial before.
After
        - adding  #isReferenced for class variables (https://github.com/pharo-project/pharo/pull/3653)
        - adding #allClassVariables for classes (https://github.com/pharo-project/pharo/pull/3658)

this was trivial. So I guess doing trivial things (that you might think are not important because they are oh so trivial) actually
have the effect to make something trivial that was not trivial before? That is odd…

Trivial thing for someone else to do:

fix typo in Welcome bot message: “runn”
        https://github.com/pharo-project/pharo/issues/3696

        One of the welcome bot messages has a typo: “runn" should be “run"

        This needs to be fixed here:

        https://github.com/pharo-project/pharo/blob/Pharo8.0/.github/config.yml

        the file can be edited right from the GitHub interface


Marcus


Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

SergeStinckwich
Can we define a tag for such issues ?


On Fri, Jun 28, 2019 at 9:37 PM Marcus Denker <[hidden email]> wrote:

>
> Trivial improvement of the day:
>
> simplify #allSelectorsInProtocol:
>       https://github.com/pharo-project/pharo/pull/3647
>

has been merged.
>
>
> Trivial thing to do for someone else:
>
> #zapAllMethods can be removed
>       https://github.com/pharo-project/pharo/issues/3656
>

was done (not by me!) and merged!

Trivial thing done today:

        simplify allUnreferencedClassVariables
                https://github.com/pharo-project/pharo/issues/3661

this is a nice example how other trivial unimportant changes make things trivial that where not trivial before.
After
        - adding  #isReferenced for class variables (https://github.com/pharo-project/pharo/pull/3653)
        - adding #allClassVariables for classes (https://github.com/pharo-project/pharo/pull/3658)

this was trivial. So I guess doing trivial things (that you might think are not important because they are oh so trivial) actually
have the effect to make something trivial that was not trivial before? That is odd…

Trivial thing for someone else to do:

fix typo in Welcome bot message: “runn”
        https://github.com/pharo-project/pharo/issues/3696

        One of the welcome bot messages has a typo: “runn" should be “run"

        This needs to be fixed here:

        https://github.com/pharo-project/pharo/blob/Pharo8.0/.github/config.yml

        the file can be edited right from the GitHub interface


Marcus




--
Serge Stinckwic
​h​

Int. Research Unit
 on Modelling/Simulation of Complex Systems (UMMISCO)
​Sorbonne University
 (SU)
French National Research Institute for Sustainable Development (IRD)​
U
​niversity of Yaoundé I​, Cameroon
"Programs must be written for people to read, and only incidentally for machines to execute."
https://twitter.com/SergeStinckwich
Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Marcus Denker-4
For the ones I add for other to do I put the “Easy” tag and add them to this GitHub project (kanban board):



On 29 Jun 2019, at 18:11, Serge Stinckwich <[hidden email]> wrote:

Can we define a tag for such issues ?


On Fri, Jun 28, 2019 at 9:37 PM Marcus Denker <[hidden email]> wrote:

>
> Trivial improvement of the day:
>
> simplify #allSelectorsInProtocol:
>       https://github.com/pharo-project/pharo/pull/3647
>

has been merged.
>
>
> Trivial thing to do for someone else:
>
> #zapAllMethods can be removed
>       https://github.com/pharo-project/pharo/issues/3656
>

was done (not by me!) and merged!

Trivial thing done today:

        simplify allUnreferencedClassVariables
                https://github.com/pharo-project/pharo/issues/3661

this is a nice example how other trivial unimportant changes make things trivial that where not trivial before.
After
        - adding  #isReferenced for class variables (https://github.com/pharo-project/pharo/pull/3653)
        - adding #allClassVariables for classes (https://github.com/pharo-project/pharo/pull/3658)

this was trivial. So I guess doing trivial things (that you might think are not important because they are oh so trivial) actually
have the effect to make something trivial that was not trivial before? That is odd…

Trivial thing for someone else to do:

fix typo in Welcome bot message: “runn”
        https://github.com/pharo-project/pharo/issues/3696

        One of the welcome bot messages has a typo: “runn" should be “run"

        This needs to be fixed here:

        https://github.com/pharo-project/pharo/blob/Pharo8.0/.github/config.yml

        the file can be edited right from the GitHub interface


Marcus




--
Serge Stinckwic
​h​

Int. Research Unit
 on Modelling/Simulation of Complex Systems (UMMISCO)
​Sorbonne University
 (SU)
French National Research Institute for Sustainable Development (IRD)​
U
​niversity of Yaoundé I​, Cameroon
"Programs must be written for people to read, and only incidentally for machines to execute."
https://twitter.com/SergeStinckwich

Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Marcus Denker-4


> On 1 Jul 2019, at 08:45, Marcus Denker <[hidden email]> wrote:
>
> For the ones I add for other to do I put the “Easy” tag and add them to this GitHub project (kanban board):
>
> https://github.com/orgs/pharo-project/projects/8
>


Small fix Friday:
=============

3700-simplify-allUnreferencedInstanceVariables
        https://github.com/pharo-project/pharo/pull/3701/files

same idea as the class vars, now that variables are object, bit strings, we can implement it simply as:

        ^self allSlots reject: [:slot | slot isReferenced]

(and it will returns object, that e.g. know the class they are declared in)

Saturday
=======

 I did one of the simple ones posted the day before:

        3630-small-cleanup-traits-in-Behaviour-isComposedBy-move-to-traits
        https://github.com/pharo-project/pharo/pull/3704

Then I did a small (one var added, two lines changed)l, but definitely not trivial improvement:

        SystemDictionary: add a cache for allBehaviors
        https://github.com/pharo-project/pharo/issues/3702

Right now SystemDictionary caches names, we should cache Objects instead. this is the first step.

And it enables Sunday
===================

speedup "implementors of
        https://github.com/pharo-project/pharo/pull/3711

With the allBehaviors cache, we can radically simplify (and speedup!) a lot of code used very very often.

[#name implementors] bench

before: "'69.688 per second'"
after: "'119.385 per second'"

The new implementation is this:

SystemNavigation>>allImplementorsOf: aSelector
"Answer all the methods that implement the message aSelector."

^self allBehaviors
        select: [:class | class includesSelector: aSelector]
        thenCollect: [:class | (class>>aSelector) methodReference ]

This #allBehaviors cache will allow many more simplifications (check senders of #allBehaviorsDo:)
e.g. for today, I did two as part of this (isUnsentMessage:  and allPrimitiveMethods):

https://github.com/pharo-project/pharo/pull/3725/files

        Marcus




Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Marcus Denker-4


> On 1 Jul 2019, at 09:59, Marcus Denker <[hidden email]> wrote:
>
>
>
>> On 1 Jul 2019, at 08:45, Marcus Denker <[hidden email]> wrote:
>>
>> For the ones I add for other to do I put the “Easy” tag and add them to this GitHub project (kanban board):
>>
>> https://github.com/orgs/pharo-project/projects/8
>>
>

And two issue for someone to do:

- allBehaviorsDo: can now use the cached allBehaviors
        https://github.com/pharo-project/pharo/issues/3726

simple, but quite some impact (we should of course refactor all the senders of allBehaviorsDo: later
as they now can be transformed to use collection methods and be even faster then do:…)

and a slightly harder one:

add #whichMethodsReferTo:
        https://github.com/pharo-project/pharo/issues/3727

nearly all clients of thoroughWhichSelectorsReferTo: are interested in the methods, not the selector.
we should add #whichMethodsReferTo: and rewrite the clients to use that instead.


        Marcus
Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Marcus Denker-4
In reply to this post by Marcus Denker-4


> On 26 Jun 2019, at 08:16, Marcus Denker <[hidden email]> wrote:
>
> Hi,
>
> I have started again to do one absolutely trivial improvement every week-day.
>

Small cleanup of the day:

        • deprecate #allLocalCallsOn:ofClass: in SystemNavigation, implement it in ClassDescription>>allLocalCallsOn:
        • add withAllSuperAndSubclasses, use it in #allInstVarNamesEverywhere
        • simplify allLocalCallsOn: to use allInstVarNamesEverywhere and flatCollect

Review needed: https://github.com/pharo-project/pharo/pull/3733/files

        Marcus
Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Marcus Denker-4


> On 2 Jul 2019, at 07:35, Marcus Denker <[hidden email]> wrote:
>
>
>
>> On 26 Jun 2019, at 08:16, Marcus Denker <[hidden email]> wrote:
>>
>> Hi,
>>
>> I have started again to do one absolutely trivial improvement every week-day.
>>

Simple improvement done:

Simplify and speedup CompiledMethod>>#overriddenMethods
        https://github.com/pharo-project/pharo/pull/3746/files

New simple issue to do:
       
browseAllCallsOnClass: should not call asSortedCollection
        https://github.com/pharo-project/pharo/issues/3747
Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Marcus Denker-4
In reply to this post by Marcus Denker-4


> On 2 Jul 2019, at 07:35, Marcus Denker <[hidden email]> wrote:
>
>
>
>> On 26 Jun 2019, at 08:16, Marcus Denker <[hidden email]> wrote:
>>
>> Hi,
>>
>> I have started again to do one absolutely trivial improvement every week-day.
>>
>
Trivial cleanup of the day:

remove 3 methods that make no sense in RPackage
        https://github.com/pharo-project/pharo/pull/3759

review needed

        Marcus


Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

Torsten Bergmann
Hey YOU, YES YOU !

it was in 2017 when I asked people here on this list to help cleaning and raise the quality level of our Pharo system:
http://forum.world.st/Pharo-Quality-raising-the-quality-level-in-Pharo-7-and-onwards-tp5027111.html

I not only talked. I took action - meanwhile with around 658 (!) sometimes very trivial changes to
get Pharo 7 and 8 into a cleaner state (https://github.com/astares/pharo/branches)

One step at a time ... evening per evening, week per week. Sometimes there was a minute - sometimes not.

And yes: Pharo already became cleaner with small contributions from my and many others contributors side. Pharo now
already feels a little bit better - has class and test comments, more aligned packages, fixed categories,
less typos, cleaner and more understandable code and more rules to hopefully keep that quality level.


What if YOU, YES YOU would also step in and also apply simple or complex fixes and cleanups on internal
and also external packages? You could also help with documentation or feedback on what is working and what not.

If we all clean the house TOGETHER the next guest would feel already more comfortable and also try not to
wear his dirty shoes...

I also intentionally opened one single trivial issue without fixing it myself. Now today this issue got somehow
"famous" on Twitter:  https://twitter.com/marcusdenker/status/1148287564937400321

and YOU can get famous for FIXING or REVIEWING this single issue too.

Or you can help with many others that are left either here: https://github.com/orgs/pharo-project/projects/8
or here: https://github.com/pharo-project/pharo/issues

Jump in - the water is just fine!

Bye
Torsten (aka "astares" on Discord)


Reply | Threaded
Open this post in threaded view
|

Re: A small game: do one trivial improvement every day

ducasse
nice email :)
Just helping reviewing PR is a nice action. I do that systematically and I enjoy it.
Tx!

> On 8 Jul 2019, at 21:25, Torsten Bergmann <[hidden email]> wrote:
>
> Hey YOU, YES YOU !
>
> it was in 2017 when I asked people here on this list to help cleaning and raise the quality level of our Pharo system:
> http://forum.world.st/Pharo-Quality-raising-the-quality-level-in-Pharo-7-and-onwards-tp5027111.html
>
> I not only talked. I took action - meanwhile with around 658 (!) sometimes very trivial changes to
> get Pharo 7 and 8 into a cleaner state (https://github.com/astares/pharo/branches)
>
> One step at a time ... evening per evening, week per week. Sometimes there was a minute - sometimes not.
>
> And yes: Pharo already became cleaner with small contributions from my and many others contributors side. Pharo now
> already feels a little bit better - has class and test comments, more aligned packages, fixed categories,
> less typos, cleaner and more understandable code and more rules to hopefully keep that quality level.
>
>
> What if YOU, YES YOU would also step in and also apply simple or complex fixes and cleanups on internal
> and also external packages? You could also help with documentation or feedback on what is working and what not.
>
> If we all clean the house TOGETHER the next guest would feel already more comfortable and also try not to
> wear his dirty shoes...
>
> I also intentionally opened one single trivial issue without fixing it myself. Now today this issue got somehow
> "famous" on Twitter:  https://twitter.com/marcusdenker/status/1148287564937400321
>
> and YOU can get famous for FIXING or REVIEWING this single issue too.
>
> Or you can help with many others that are left either here: https://github.com/orgs/pharo-project/projects/8
> or here: https://github.com/pharo-project/pharo/issues
>
> Jump in - the water is just fine!
>
> Bye
> Torsten (aka "astares" on Discord)
>
>