[Cuis-dev] Would like to contribute

Juan Vuletich juan at cuis.st
Sat Sep 14 12:11:02 PDT 2024


Hi Damián,

Welcome to the Cuis Community!

I think such refactoring might have a place at 
https://github.com/hernanwilkinson/Cuis-Smalltalk-Refactoring. On how to 
implement it, there are other refactorings, both in the Cuis base image 
and in https://github.com/hernanwilkinson/Cuis-Smalltalk-Refactoring 
that should give clues.

Good luck!

Cheers,

On 9/13/2024 8:47 PM, Damián Ortiz via Cuis-dev wrote:
> Hello,
>
> I am Damian, a student in my second year of computer degree in 
> Universidad de Buenos Aires. Right now I am taking a class called 
> "Software engineering" whose professor is Hernan Wilkinson and we use 
> cuis university.
>
> While I was doing my homework which is about getting repeated code 
> out, I got a problem when I had repeated code in which the only 
> instance variables that changed were the ones called: active and 
> suspended. I decided to parametrize that code in another method in 
> which both suspended and active were replaced by category, and 
> category was a parameter. So the previous code was replaced by two 
> lines, one calling the method with active, and the other with suspended.
>
> However, you can not extract that variable as an argument. So I had to 
> do it manually, change all active and suspended, one by one.
>
> I think the fact of being able to parametrize a variable as an 
> argument, and also be able to parametrize it as an argument that 
> already exists (When it asks you for the name of the label, it detects 
> if there is already an argument called by that, it is parametrized as 
> that already-existed parameter).
>
> I would like you to tell me what you think about this change, and 
> maybe give me a hint to try to implement it. I do think this would 
> help to extract different-named objects/variables as a single 
> parameter, and also extract variables as parameters.
>
> Thank you for reading.
>
> I attach the code I talk about here (The given and the desired ones)


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich



More information about the Cuis-dev mailing list