Discuss Scratch

johandsa2020
Scratcher
76 posts

Remove change my variable

Remove change my variable by (value). It is used by many people but the thing is that the user might find it tricky to learn other programming languages eg: javascript.. its better if the user uses set my variable to (variable+1). It might improve the editor loading speed too. The editor will still be
the same but the blocks will be reduced and the block is useless but it makes scratch easy to use.

It would be a good habit to use that method because if the user kept using change my variable they would find it challenging to make text-based programming language projects. The user might get confused too. Because they used to use change my variable in their projects.

What do you think about this theory?

Last edited by johandsa2020 (Aug. 23, 2021 10:34:16)

-EmeraldThunder-
Scratcher
1000+ posts

Remove change my variable

Please don't create lists of suggestions, they will get more discussion if they have their own thread.
johandsa2020
Scratcher
76 posts

Remove change my variable

Last edited by johandsa2020 (Aug. 23, 2021 07:14:32)

Reev0102
Scratcher
1000+ posts

Remove change my variable

Support, other programming languages all use that method, so it would be easier for Scratchers to progress to other programming languages.
// javascript
foo = foo + 1;
bar = bar - 1;
# python
foo = foo + 1
bar = bar - 1

A lot of existing projects already use the
change [foo v] by (1)
block, so they could all be replaced with
set [foo v] to ((foo) + (1))
and
set [foo v] to ((foo) - (1))

Last edited by Reev0102 (Aug. 23, 2021 07:41:58)

Wei-ern_520
Scratcher
500+ posts

Remove change my variable

What if a project uses many of that? You are adding 2 blocks to every change variable by(). What if it exceeds the project Json or it will lag the project even more?

Besides python also uses this

Foo+=1

Last edited by Wei-ern_520 (Aug. 23, 2021 07:47:07)

warriorcats2155
Scratcher
500+ posts

Remove change my variable

No support, Scratch is an introductory language, I understand that you want it to be more complex, but sometimes simplicity can work just as good.
Reev0102
Scratcher
1000+ posts

Remove change my variable

warriorcats2155 wrote:

No support, Scratch is an introductory language, I understand that you want it to be more complex, but sometimes simplicity can work just as good.
How is
set [var v] to ((var) + (1))
complex? Besides, this would be more helpful for users who want to progress to text-based programming.
johandsa2020
Scratcher
76 posts

Remove change my variable

Wei-ern_520 wrote:

What if a project uses many of that? You are adding 2 blocks to every change variable by(). What if it exceeds the project Json or it will lag the project even more?

Besides python also uses this

Foo+=1
People can use any of their methods in which they are comfortable.
johandsa2020
Scratcher
76 posts

Remove change my variable

Wei-ern_520 wrote:

What if a project uses many of that? You are adding 2 blocks to every change variable by(). What if it exceeds the project Json or it will lag the project even more?

Besides python also uses this

Foo+=1
I think so but it would be “equal” even if you removed it because of space reduction and quick loading and also scratch uses “variable = variable+1” for change variables it won't affect the program
hello_smile
Scratcher
1000+ posts

Remove change my variable

Reev0102 wrote:

Support, other programming languages all use that method, so it would be easier for Scratchers to progress to other programming languages.
// javascript
foo = foo + 1;
bar = bar - 1;
# python
foo = foo + 1
bar = bar - 1

A lot of existing projects already use the
change [foo v] by (1)
block, so they could all be replaced with
set [foo v] to ((foo) + (1))
and
set [foo v] to ((foo) - (1))
Sorry, but:
x++;
x+=2;
in js.
johandsa2020
Scratcher
76 posts

Remove change my variable

warriorcats2155 wrote:

No support, Scratch is an introductory language, I understand that you want it to be more complex, but sometimes simplicity can work just as good.
It would be a good habit to use that method because if the user kept using change my variable they would find it challenging to make text-based programming language projects. The user might get confused too. Because they used to use change my variable in their projects.
johandsa2020
Scratcher
76 posts

Remove change my variable

hello_smile wrote:

Reev0102 wrote:

Support, other programming languages all use that method, so it would be easier for Scratchers to progress to other programming languages.
// javascript
foo = foo + 1;
bar = bar - 1;
# python
foo = foo + 1
bar = bar - 1

A lot of existing projects already use the
change [foo v] by (1)
block, so they could all be replaced with
set [foo v] to ((foo) + (1))
and
set [foo v] to ((foo) - (1))
Sorry, but:
x++;
x+=2;
in js.

No x+=2 is possible in python also x= x+1 is possible

Last edited by johandsa2020 (Aug. 23, 2021 09:18:50)

dertermenter
Scratcher
1000+ posts

Remove change my variable

Although it has an easy workaround, change blocks are used so much that it is more efficient to have it as its own block. I don’t see benefits for anyone removing this, and new/young programmers may not even know the workaround.

Does this mean we have to remove all change blocks is well?
johandsa2020
Scratcher
76 posts

Remove change my variable

dertermenter wrote:

Although it has an easy workaround, change blocks are used so much that it is more efficient to have it as its own block. I don’t see benefits for anyone removing this, and new/young programmers may not even know the workaround.

Does this mean we have to remove all change blocks *as well?
I don't really think so because most of the others aren't available in text-based programming. It is not useful to remove all change blocks but it gets more “complicated” while making projects and it uses more space. And also how do scratchers begin learning to make “platformers”, other games? Of course they learn to. And also everyone began just like that. Some people didn't even know they use of variables, but they get to know the use of it after some days/weeks or even months
johandsa2020
Scratcher
76 posts

Remove change my variable

It's best to remove only variables because most of the text-based programming languages, the way it is used is similar to scratch's
johandsa2020
Scratcher
76 posts

Remove change my variable

Reev0102 wrote:

Support, other programming languages all use that method, so it would be easier for Scratchers to progress to other programming languages.
// javascript
foo = foo + 1;
bar = bar - 1;
# python
foo = foo + 1
bar = bar - 1

A lot of existing projects already use the
change [foo v] by (1)
block, so they could all be replaced with
set [foo v] to ((foo) + (1))
and
set [foo v] to ((foo) - (1))
It might be hard to replace them all because there are 500000+ projects in scratch
Last time after scratch 3.0 update many projects were broken
Maybe before the 4.0 update, they could slowly begin changing blocks one by one. Ik my recommendation isn't so good

Last edited by johandsa2020 (Aug. 23, 2021 10:32:17)

colinmacc
Scratcher
1000+ posts

Remove change my variable

You can't really remove things that will break millions of projects. It's just not worth it.
-EmeraldThunder-
Scratcher
1000+ posts

Remove change my variable

Support, this is used in more advanced programming languages although we should allow all projects with the block to retain it and as long as there is some way to drag the two blocks onto the stage together rather than having to assemble this every time (the variable reported should change with the dropdown)

johandsa2020
Scratcher
76 posts

Remove change my variable

colinmacc wrote:

You can't really remove things that will break millions of projects. It's just not worth it.
You have a point but the code can be replaced.
Quantum-Cat
Scratcher
1000+ posts

Remove change my variable

Does removing it really make learning text-based programming languages any easier or simpler to understand? I don't think so. This would also make using the block more annoying as you have to drag 2 extra blocks each time.

Powered by DjangoBB