Discuss Scratch

BelleRae99
Scratcher
40 posts

Should Scratch enforce proper coding etiquette?

I feel like scratch would be a wonderful tool to help newcomers understand the logic behind coding firsthand without having to worry about memorizing coding terms and technicalities. I brought this up to my teacher, but her biggest complaint with scratch is that anything goes. In some way this can be good, but her concern is that sloppy coders won't get too far in the industry, and scratch doesn't really have any specific guidelines or tooltips for beginners trying to stay organized. Should Scratch pay attention to the neatness of a creator's code and reinforce positive procedure? Would this improve the standard of projects and learning or scare away casuals by enforcing code “law” in an otherwise freelancing environment?

Leave your opinion in this thread for others to build on!

Personally, I think it could be a good idea to introduce official guidelines to formatting code as well as how to better set up projects. In my computer programming class my teacher was always very picky about naming variables and asset labels. Global variables were always capitalized at the beginning of every new word, like this >

(GlobalVariableExample)

While local variables capitalized the beginning of every word after the first word like this >

(localVariableExample)

Even then, we were instructed to abbreviate where possible >

(GblVarEx) or (locVarEx)

It could be tedious at times, but trick like these help to identify the type of variable quickly, and keep everything organized in a similar fashion, as opposed to naming random variables random ways >

(LOCAL_var)
(my variable)
(character 2 showing?)
(turnpage)
(Half-COUNT)
The benefit is not only will writing more complex code be easier to follow, but other programmers who come along to review or modify your work (like in a professional situation) will be able to follow your train of thought easier. We also had to leave a comment for every main function of the project, which I believe is a good idea in any situation. That being said, I'd also like to see improvements on the way comments are displayed. Like maybe instead of a sticky-note type attachment, there could be an actual
comment [...]

block that can be snapped right into place with the rest of the code without actually interfering with any functions. Let me know what you guys think!
raspykoo
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?

No support. Scratch is a program designed to introduce programming, not a real programming language, (technically it is) but it's for starters. The Scratch community actually does a lot of things other than coding from what ways they have found through the editor. Things like art and animations, for example.


And for the comment part, that already exists
when green flag clicked // Starts the project.

Just right click the block and select “Add a comment”

Last edited by raspykoo (Sept. 8, 2016 04:39:15)

Jonathan50
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?

I don't think Scratch should force any variable naming conventions, but perhaps there could be coding conventions recommended in the tips and wiki. Different people have different coding styles and they should be free to chose their own.
Personally I think words should have spaces in between them, and everything should be lowercase, because it is a bit easier to read and consistent with Scratch's primitive blocks, but that's just my opinion.
If you don't like Scratch's comments you can make a custom block like
define comment (string)
BelleRae99
Scratcher
40 posts

Should Scratch enforce proper coding etiquette?

raspykoo wrote:

No support. Scratch is a program designed to introduce programming, not a real programming language, (technically it is) but it's for starters. The Scratch community actually does a lot of things other than coding from what ways they have found through the editor. Things like art and animations, for example.


And for the comment part, that already exists
when green flag clicked // Starts the project.

Just right click the block and select “Add a comment”

Yes, I am aware of the current comment system, but I feel it could still use improvement. I don't necessarily like how it disconnects from the attached line of code when you try to reposition it. I'm not saying to do-away with that style of comment, but simply add an alternative that would be easier to organize in some cases.

I am also aware of the second method, but when code gets complex it can be hard to distinguish “define comment” blocks from other custom blocks. Perhaps if the comment blocks could display in a different color.

Also, none of the code etiquette things necessarily have to be ENFORCED either, I simply think it could be helpful to starting scratchers to have an introductory project, guide or tooltip on the improtance of developing a consistent coding style. Scratch could offer tips in the help menu, or even a Getting Started guide. I'm suggestion a reference for those who are interested in learning, not an enforcement for those who aren't.
Sigton
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?

The thing with Scratch is that it is coding without the syntax, which makes it nice and easy for beginners. Enforcing some syntax would make it quite confusing, since this only applies to variable names. Plus, not everyone uses the same naming system as your teacher. For example, I put global variables in all caps, but I wouldn't be allowed to do this with this new system. I like how Scratch fits to everyone's coding style.

Sigton
The4thPixel
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?

Scratch is an entry level language, and adding the forced syntaxes/prefixes might make it too hard for new Scratchers. You can also just add the prefixes yourself.
Jonathan50
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?

Sigton wrote:

The thing with Scratch is that it is coding without the syntax, which makes it nice and easy for beginners. Enforcing some syntax would make it quite confusing, since this only applies to variable names. Plus, not everyone uses the same naming system as your teacher. For example, I put global variables in all caps, but I wouldn't be allowed to do this with this new system. I like how Scratch fits to everyone's coding style.

Sigton
Blocks and scripts are syntax.

Edit: I think abbreviating is bad style and makes code much harder to read.

Last edited by Jonathan50 (Sept. 8, 2016 22:24:37)

gdpr533f604550b2f20900645890
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?

Different programmers have different naming styles, and all of them are “professional.” Different languages may even have different identifier rules. For example, Scheme allows “-” in identifiers, but most (probably all?) C-style languages do not. I do not support enforcing one specific naming convention throughout Scratch.

In addition, I believe that teaching concepts and good programming style practices is more important than teaching people professional naming styles.
raspykoo
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?



Yes, I am aware of the current comment system, but I feel it could still use improvement. I don't necessarily like how it disconnects from the attached line of code when you try to reposition it. I'm not saying to do-away with that style of comment, but simply add an alternative that would be easier to organize in some cases.

Improvement? It seems good enough for everybody.

I am also aware of the second method, but when code gets complex it can be hard to distinguish “define comment” blocks from other custom blocks. Perhaps if the comment blocks could display in a different color.

I really don't find this as a necessary block. What would it do that the other method can't do on Scratch?

Also, none of the code etiquette things necessarily have to be ENFORCED either, I simply think it could be helpful to starting scratchers to have an introductory project, guide or tooltip on the improtance of developing a consistent coding style. Scratch could offer tips in the help menu, or even a Getting Started guide. I'm suggestion a reference for those who are interested in learning, not an enforcement for those who aren't.

Most of the tips are made for the Scratch program language itself. Scratch doesn't need capitalized variables. Maybe an advanced version of Scratch for people who want to program can enforce that.
cheddargirl
Scratch Team
1000+ posts

Should Scratch enforce proper coding etiquette?

BelleRae99 wrote:

That being said, I'd also like to see improvements on the way comments are displayed. Like maybe instead of a sticky-note type attachment, there could be an actual
comment [...]

block that can be snapped right into place with the rest of the code without actually interfering with any functions. Let me know what you guys think!
We used to have that for older versions of Scratch, but it got removed due to confusion (see this Scratch Wiki article)
Jonathan50
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?

cheddargirl wrote:

We used to have that for older versions of Scratch, but it got removed due to confusion (see this Scratch Wiki article)
Why were they confused? Did the confusion go away when they were removed?
cheddargirl
Scratch Team
1000+ posts

Should Scratch enforce proper coding etiquette?

Jonathan50 wrote:

cheddargirl wrote:

We used to have that for older versions of Scratch, but it got removed due to confusion (see this Scratch Wiki article)
Why were they confused? Did the confusion go away when they were removed?
The purpose of the block wasn't exactly clear, especially to new users (people thought the block did something and didn't realize the block just held text that wasn't integral to the script). I wouldn't necessarily say the confusion went away (older projects still have the block lying around, there is no way to remove them from older projects), but the system we have today where you can attach a comment to a block is a lot more clear and intuitive.

Last edited by cheddargirl (Sept. 9, 2016 04:41:23)

Sigton
Scratcher
1000+ posts

Should Scratch enforce proper coding etiquette?

Jonathan50 wrote:

Sigton wrote:

The thing with Scratch is that it is coding without the syntax, which makes it nice and easy for beginners. Enforcing some syntax would make it quite confusing, since this only applies to variable names. Plus, not everyone uses the same naming system as your teacher. For example, I put global variables in all caps, but I wouldn't be allowed to do this with this new system. I like how Scratch fits to everyone's coding style.

Sigton
Blocks and scripts are syntax.

Edit: I think abbreviating is bad style and makes code much harder to read.
I suppose, but it's not a syntax that you can make errors with

Sigton

Powered by DjangoBB