Commenting your blocks

I was thinking about commenting every block in the ebook sample i made to make it easier for beginners to understand what each block or procedure does. It looks very crowded to me.

There are others ways to use comments, like this for instance.

But if you have many blocks and you want to keep them open then it is also crowded.

If you export blocks to a png the comments are not visible in the exported block.

What commentsystems do you use in your projects to make things clear for yourself or others?

9 Likes

Would this be better? It’s much less crowded.

image

2 Likes

Yes this looks much better :v:

2 Likes

Do you comment your code?

1 Like

Really awesome. Peter Great Job. Waiting for other comments also…

I first touched Kodular just a week ago. Thanks, i learnt how to put comments by looking at your blocks now. Usually when i write Python / JavaScript / C++ code i try to put comments but in Kodular didn’t try commenting till now.

1 Like

Do you comment your code?

1 Like

Nope buddy. Very busy day for me… And My hand is not so good in kodular. Now i will try to learn from your method…

Sometimes when I found it hard to understand why a particular block exists or I have used that.
Instead of commenting blocks I use to write it in notepad and save as file.And I use this in about screen.
To kill two birds with one stone

3 Likes

giphy

1 Like

No not at all…
Actually I haven’t even killed an insect in real life(so much in games).
Birds are quite away…

-From a peace angel

1 Like

Please guys. Don go to off-topic.

Yes…
I comment code for myself only - when I bisect a block, looking for bugs, I can’t remember how to arrange them back sequentially. :confused:
So, I use comments to note that the particular block lies below which block.

Comments are very useful for me, and @peter u gave a great idea for organising them and keeping the screen clean :smile:

Thanks a lot! :smile:

1 Like

no i don’t comment blocks, don’t know why?:upside_down_face:

It depends, honestly. If I’m helping someone with a complex Kodular concept with an example AIA, I try to comment on the blocks to explain what each blocks does (much like the last image you shared), unless I’m in a hurry.

As for personal Koding, I do not comment on my blocks unless I’m ending my Koding session of the night in the middle of a block flow, in order to remind me what the thinking behind the blocks was. Emphasis on “thought process”, because I can study the block flow and understand what it does - the key part is to understand why. Otherwise this happens:

0_0jBreLbQiLwEDd_g

However, I also sometimes use desktop notes to remind me what to do next.

Not commenting my code has the unintended consequence of making optimization fairly impossible (although, not bragging, I do optimize my blocks reasonably before being done with it). Also, older projects become progressively harder to work on, thus demanding a rework.

4 Likes

The old programmer joke – nice to see it again.
Getting to the topic, I am lazy and never comment my Kodular code. I just find it harder than remembering everything. If I forget something, I can easily test with the “Do it” feature of the companion. Pro tip: use thoughtful component names.

I comment my code that’s written in other languages (Not sure if AI2 is a language) every time.

3 Likes

I never do that either. //unless I'm goofing around with humorous comments

2 Likes

Yes I do. Especially when this could save time in the future to remember what I did.
I use my own technique or the Comment option in the blocks.

2 Likes