This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-07-10 16:11:39

mdusoe
Scratcher
Registered: 2007-06-14
Posts: 32

Suggestion - Comment Block (or comment Tag, or...)

I think it would be useful to have a comment block or something like it to describe what a section of code is doing.  This would be nice not only for sharing projects and helping to describe what is happening, but also as I myself am working on a  project, to remember what a tricky section of code does.

I am envisioning a block to add to your script that allows for freeform typing (limited to x number of chars???) like this:

When Flag clicked
>CommentBlock - "This executes the bounce"
>>IfBlock - If Touching Something
>>>MotionBlock - point in direction (180 - direction)
>>End IfBlock
>End CommentBlock

Another possible implementation might just be to have Sticky notes to add to the Script window.  Just be sure that they can be "stuck" to certain sections of code and move around with them.

As a developer myself, I see this as a great way to begin instilling the idea of documentation at a very early age.  Especially if this becomes a career path choice.

What a wonderful project this is, and I for one am grateful to you for providing an opportunity to work directly with my children on something that "daddy does at work".

Thank you,
Mike.

Offline

 

#2 2007-09-10 02:15:31

wffinney
Scratcher
Registered: 2007-09-10
Posts: 1

Re: Suggestion - Comment Block (or comment Tag, or...)

I second this suggestion - perhaps the comment blocks could lock-in on the right hand sides of each of the code blocks in a similar manner to the way the code blocks lock together top and bottom.

Offline

 

#3 2007-09-10 07:58:33

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: Suggestion - Comment Block (or comment Tag, or...)

This would be pretty nice.  It's a good thing for less experienced users who might download a project and wonder just what the heck is being done.  Also, I will often look at something I did a while ago and wonder just what the heck I did.

Programmers are notorious for not using comments, but if they start learning early...

Offline

 

#4 2007-09-10 16:53:18

relyt12101
Scratcher
Registered: 2007-05-19
Posts: 500+

Re: Suggestion - Comment Block (or comment Tag, or...)

If you ask me it is pointless. I know what everyone of my scripts is doing.

Maybe you don't, and until you do it would be an idea.


http://img392.imageshack.us/img392/2860/pspbanneregg089deiy0.png

Offline

 

#5 2007-09-11 14:22:29

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Suggestion - Comment Block (or comment Tag, or...)

I can tell that relyt12101 has not been programming long and has not written large programs, if he knows "what every one of my scripts is doing."

Comments are essential for code that is to be shared or maintained, and I remain *AMAZED* that a project that considered sharing of code to be a primary objective left out this most important feature.  (I shudder to think how hard their code must be to maintain, if they are so unaware of the importance of internal code documentation.)

Offline

 

#6 2007-09-15 07:56:34

relyt12101
Scratcher
Registered: 2007-05-19
Posts: 500+

Re: Suggestion - Comment Block (or comment Tag, or...)

I have been programming other languages for a long time.


http://img392.imageshack.us/img392/2860/pspbanneregg089deiy0.png

Offline

 

Board footer