There are no comment blocks in Scratch 1.2. Visit this forum topic for all information: http://scratch.mit.edu/forums/viewtopic.php?id=2359
Offline
If you have comment blocks from the v1.2 beta, they will still work in v1.2.1, but i don't know if you can edit them or do anything with them.
The Scratch team is planning on a different commenting mechanism in a future release—I'm afraid that they will pick a mechanism that makes reading comments harder (like having to click or mouse-over to see comments). Personally, I thought that the comment blocks in v1.2beta were a big improvement over no comments, and better than any of the other proposals I've seen on these forums, but perhaps they'll do something good when they're done.
In the meantime, you can still do
if 0=1
say "..."
to put short comments in your code.
Offline
Hi Kevin, Mick, and all,
I wanted to chime in to say that one big concern about the initial comment blocks design we tried in 1.2 is that beginners may think that what is typed in the comment block is actually a command
e.g., if the comment says "move to the right" then they might think the block is actually is doing that action.
So we want to continue to consider other ways of commenting that are more clearly not like other blocks.
It's helpful to see your ongoing discussion and interest in adding comments to Scratch.
Scratch --and comment --on!
Offline
I understand the concern about beginners getting confused about the difference between comment to the reader and commands to the computer. I do want to be sure that the comments are always visible, without mouseover or clicking, and that the new "save picture of scripts" gets all the comments. The most useful comments for scratch are those attached to chunks of code as a header, like a topic sentence for a paragraph.
Comments for variables and messages would also be nice, though finding a good way to display them and print them may be tricky.
Offline
Hi, Kevin.
Thanks for your thoughts about comments.
One of our alternate comment designs is for every hat block to have a built-in comment that you can hide or show. We found that, after a period of over-commenting, most our own uses for comments was of the "topic sentence" form that you describe. That is, we'd use one comment at the top to explain the purpose of an entire stack of blocks. This approach could encourage people who want to comment their code to create shorter stacks, which tend to be easier to understand and explain.
But we are also considering other designs that would allow you to attach a comment to a single block anywhere in the stack. Or maybe we'll have both forms.
-- John
Last edited by johnm (2007-12-19 11:02:56)
Offline
The problem with putting comments only in hats is that scripts may consist of more than one paragraph. Having to create a message just to get a comment block seems awkward.
One common structure for scripts below a green flag is to have an initialization "paragraph" followed by a forever loop. If would be very useful to have a comment just before the forever loop, explaining what it was doing.
I don't think comments should attach to single blocks-—it is rare that a comment refers to a single block. Perhaps a comment should be a wrapper (like the forever and if blocks), since a comment usually describes what a chunk of code is about.
Offline
I also don't like the comments only in hats approach. The wrapper idea that Kevin mentioned might work...but it will make the script wider and more likely to require side scrolling to see. My scripts are already too wide now, driven mostly by constructing long blocks for equations or boolean expressons. And I've got a widescreen monitor! So I'm for blocks you can insert in the script, much like the original beta comment block. I was looking at Kevin's Schoolhouse Pinball project, which uses the beta comment blocks and they add an incredible amout of clarity. There must be some way to make them look different enough so that kids don't mistake them for commands. Different font color, italics, something. How about the entire block made to look like a thought bubble coming from a thinking character (or cat)?
I'd still like the ability to do an inline short comment attached to a single block but I can see that topic comments are more important. I really miss them. My recent Battleship project uses somewhere around 50 variables, 38 messages and has a shot selection routine that took me hours to code. Heaven help anybody that tries to figure it out (including me, in about a week). It needs comments!
Offline
Yes, comments are very important and not just for the program users but also the programmers. Often I forget what a specific script does and comment blocks could be used to remind me of the exact function of a script.
Offline
Well they got rid of comment script but I know what you want do, look
<you put some scripts here if you want>
repeat 0 times:
say: <put here the comment or note>
say: <if you do not want one large line put for example 5 lines with about 5 words each>
end repeat 0 times
<and keep one going with the rest of you script>
So that is my idea, because it will not actually say it because you put repeat 0 times, but you can read it when you want. Credit from Canthiar because she never told this idea and I saw it in one of her program's scripts.
Here is another picture:
<when green flag clicked>
you put whatever you want here
<repeat( 0
<say[ Whatever you want here
<end>
And put whatever you want rest here
Offline