Live data from Hacker News

Google Blockly - a visual programming language

code.google.com

51–60 of 129 posts

Re: Google Blockly - a visual programming language

#51
post #41

Earlier quoted context omitted.

Ah scratch. Some years ago I wanted to show what cool stuff you can do with computers to a 10y old boy. Found scratch and actually got hooked myself for a bit ^^. Ended up with this (slightly embarassing thing): http://scratch.mit.edu/projects/DeepDuh/941811 . After programming a bit, the limitations become apparent big time. Google's idea to implement this as a Javascript parser is probably a good idea, this way som…

have you tried BYOB [1]? It's "an advanced offshoot of Scratch" [1] http://byob.berkeley.edu/

That website is glorious :). Yeah, I think this might go a bit far. Scratch's community sadly isn't so big, further fragmentation won't help that much I think. And the platform doesn't make a very solid impression to me. That's why I like google's idea, I hope they pour some money into this.

Re: Google Blockly - a visual programming language

#52
post #27

I'm surprised about the negative criticism. Looks like it would be a great teaching tool for non-computer programmers.

Possibly, but as far as I can see, all it adds to the mix (that textual teaching languages, e.g. LOGO, don't have) is the certain impossibility of certain syntax errors by only allowing certain parts to click together[1]. The semantic model behind the system is otherwise identical to BASIC or some other ALGOL-ish programming language, with loops and subroutines and mutable variables and so forth. It is quite probable that this might make some tasks easier, especially to a wholly inexperienced programmer, but what I assert are the real challenges of learning to program—algorithmic thinking, code organization, reasoning about program state, &c—remain just as difficult.

[1]: It also only allows variables to be specified from an extendable set, preventing certain problems with unbound or misspelled variables. I can see the possibility of also preventing type errors by constraining shapes further, e.g. all integers could be circular while booleans are hexagonal, so and would have two hexagonal spaces while + would have two circles. If I'm not mistaken, Scratch does something like this, although I do not know how far it is taken there. It would be interesting to see how far this can be developed to constrain the space of possible incorrect programs.

Re: Google Blockly - a visual programming language

#53
post #43

https://imgur.com/VBsht while (true) do if not (wall to the left) then (turn left) while (wall ahead) do (turn right) (move forward) This uses the general maze-solving logic of following the outer wall in one direction until you find the exit. It never turns then turns back or runs into a wall.

Nice. I didn't realize you could parameterize the conditionals so I did this (bumps into walls):

while (true) do if(wall ahead) then turn left else move forward turn left if(wall ahead) turn right

Re: Google Blockly - a visual programming language

#54
post #4

Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png

Not the fastest but its just about as short as yours (counting all blocks as one): http://cdn-images.9cloud.us/716/best-solution-kay_1568014138...

I would blur out those browser favorites, if I were you.

Re: Google Blockly - a visual programming language

#55

I made a prime sieve: http://i.imgur.com/Elk5A.png It was pretty fun. JS generated isn't so bad.. var n; var A; var i; var x; var j; n = 100; A = []; for (i = 0; i

Interesting that in the initialization loop it sets A[0 - 1] to true, yet in your blocky code it appears to be iterating from 0 to n. In fact it always seems to be offsetting by one in array access ... 1 based indexing maybe?

Re: Google Blockly - a visual programming language

#56
I should note that the appearance of Blockly is very similar to App Inventor[1]. It seems that visual programming languages with imperative and sequential semantics converge to one direction: "blocky" combining core primitives and custom primitives. In this sense I think it's THE future of domain-specific languages.

[1] http://www.appinventor.org/

Re: Google Blockly - a visual programming language

#58
post #41

Earlier quoted context omitted.

Ah scratch. Some years ago I wanted to show what cool stuff you can do with computers to a 10y old boy. Found scratch and actually got hooked myself for a bit ^^. Ended up with this (slightly embarassing thing): http://scratch.mit.edu/projects/DeepDuh/941811 . After programming a bit, the limitations become apparent big time. Google's idea to implement this as a Javascript parser is probably a good idea, this way som…

My niece was telling me about Scratch and how she knew what was wrong with other people's code and how she'd fix it. I am so freaking proud.

You should be. I hope we will have some kids to show things like this some day ;).
Post reply on HN