PencilCode / pencilcode

An online IDE for kids: pencilcode.net.
http://dev.pencilcode.net/
MIT License
167 stars 100 forks source link

Addition of a block to the Palette - Operators #180

Closed DeepaMuralidhar closed 9 years ago

DeepaMuralidhar commented 9 years ago

image

davidbau commented 9 years ago

Hi Deepa - what's being shown here - was this issue accidentally created?

DeepaMuralidhar commented 9 years ago

Sorry for my initial brevity. So this block which lets multiple programming statements in one statement is useful when a programmer is creating variables. I recommend that the block be available under operators for drag and drop use.

davidbau commented 9 years ago

Is it still important in coffeescript where variables are created automatically on first use? Unlike Javascript and Java (but like python), you do not need "var x, y;" or "int x, y;" declarations before use.

We could add a semicolon operator __ ; __ that allows chains of commands to be sequenced, but it just combines two things....

I guess my feeling is that we're best off just having students drag multiple blocks in to sequence them vertically in a line rather than providing a horizontal combiner block.

DeepaMuralidhar commented 9 years ago

You know, I really agree with you. I prefer to have students write one block below another. The only reason I thought this may be necessary is when I saw the code for "star" and tried to understand and look for the block. I am good with closing this issue and paying close attention to making all programming statements be one on each line for all the text based code as well as block based code. (Maybe even make it a programming style suggestion)

davidbau commented 9 years ago

Yes. The reason that there are so many semicolons in the book is to make the book compact.

I think when we create or copy the examples for the classroom material, we shouldn't use semicolons.

On Mon, Aug 3, 2015 at 7:04 PM, DeepaMuralidhar notifications@github.com wrote:

You know, I really agree with you. I prefer to have students write one block below another. The only reason I thought this may be necessary is when I saw the code for "star" and tried to understand and look for the block. I am good with closing this issue and paying close attention to making all programming statements be one on each line for all the text based code as well as block based code. (Maybe even make it a programming style suggestion)

— Reply to this email directly or view it on GitHub https://github.com/PencilCode/pencilcode/issues/180#issuecomment-127427769 .

DeepaMuralidhar commented 9 years ago

Perfect. And also have a style guide where we recommend best practices.