Live data from Hacker News

Google Blockly - a visual programming language

code.google.com

71–80 of 129 posts

Re: Google Blockly - a visual programming language

#71

Earlier quoted context omitted.

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.

indeed

Re: Google Blockly - a visual programming language

#73
post #4

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

http://imgur.com/Nvy8u

Here's one with same amount of code and optimal logic (for this map) without hard coding. It also ensures that there is a forward step in every iteration of the while loop.

Basically it's just an order of preference:

Turn right > turn left > go straight

Re: Google Blockly - a visual programming language

#75
I noticed something interesting and disturbing after reading some of the answers: people are more concerned with the length of the code rather than the optimal solution (no extra turns / backtracking). This reminds me of interviewing at MS about 12 years ago and all they cared about was the ability to write recursive code.

IMO, yes, elegant code is fantastic, but don't lose track of why we write code in the first place.

Edit: consolidating from post below.

http://imgur.com/Nvy8u

Here's a minimal solution with optimal logic (for this map) without hard coding. It also ensures that there is a forward step in every iteration of the while loop.

Basically it's just an order of precedence:

Turn right > turn left > go straight

Re: Google Blockly - a visual programming language

#76
This could become pretty interesting, especially if there is a platform aspect. Meaning I could easily extend this with my own elements and commands.

I can see some use for example in one application where we are importing data from other systems. Something like this could be used to create a quite nice user interface for creating simple programs that would manipulate and filter the incoming data.

Re: Google Blockly - a visual programming language

#77
post #75

I noticed something interesting and disturbing after reading some of the answers: people are more concerned with the length of the code rather than the optimal solution (no extra turns / backtracking). This reminds me of interviewing at MS about 12 years ago and all they cared about was the ability to write recursive code. IMO, yes, elegant code is fantastic, but don't lose track of why we write code in the first pla…

[deleted]

Re: Google Blockly - a visual programming language

#78
I've always thought it would be cool to have a backend environment similar to labVIEW (but faster!). I use labview in my research and it is the best solution I've found for encouraging / allowing for code re-use. This Google Blockly, to some extent, seems to be heading that way - I'm looking forward to seeing how it develops.

Re: Google Blockly - a visual programming language

#80
post #79

Love this idea for teaching kids. Reminds me of the visual programming in Click N Create / Multimedia Fusion / Games factory which was/is very advanced and powerful. Given sufficient resource and polish something like this could be awesome.

interesting attempt; things on my mind; what if I colorize my python code based on block depth or what if we do a 3D version of this; and what if we do a game of "angry blocks" to program.
Post reply on HN