Google Blockly — a Language With a Difference 141
mikejuk writes "There are aspects of Google that increasingly don't make sense. First they dump App Inventor — a graphical language for Android apps — in a fit of spring cleaning and closures — and now they have launched another Scratch-like graphical language, Blockly. However Blockly is different. It works like Scratch or App inventor but it is written in JavaScript. This means it can be included in any web page or web app very easily. This, in turn, means that it can be used for education, getting people to learn to program, or as an easy-to-use script generator for the app. The FAQ gives the example of automating GMail filters and management. The additional difference is that Blockly can compile its programs to JavaScript, Dart or Python so you can take the script and develop it further. This is a really good idea. As long as Google doesn't throw this one out in a fit of reorganization and spring cleaning, it's a welcome new language."
reinventing the wheel (Score:5, Funny)
Re: (Score:2, Informative)
Dwarf Fortress [dwarffortresswiki.org] did it better in my opinion. Using fluids you can construct literal logic gates!
Re: (Score:2)
Redstone is great, but it simulates digital circuits. Programming languages exist at a high abstraction. You can certainly create programming "units" in Minecraft, but to actually make it do useful work requires a lot of time and room.
Some mods and add-ons address the tediousness, but at best, it goes from circuit design to coding in assembly. Assembly isn't exactly what you'd learn to write code with.
Minecraft is probably more suited for the EE or MicroE novice who's learnnig circuit layout and design. Wit
Re: (Score:3, Informative)
You know you can run a webserver and access it locally, right? You don't need (and in fact, it's best if there ISN'T) external access to a webserver you're learning to code on.
Re:reinventing the wheel (Score:4, Funny)
Re:reinventing the wheel (Score:4, Informative)
File: Open File...
You're welcome.
Re: (Score:1)
Re: (Score:2)
You honestly could not be more wrong.
was meant to be in reply to:
You know you can run a webserver and access it locally, right? You don't need (and in fact, it's best if there ISN'T) external access to a webserver you're learning to code on
Re: (Score:2)
JavaScript is useless for learning to program. You have to run your own web server, and ISPs don't allow that.
I'll shutup now. Please downvote me.
Re: (Score:2)
Every single thing you just said is wrong.
In particular, ISPs have nothing to do with running a webserver on your computer; the most they can do is prevent others from accessing it. Secondly, Javascript has nothing to do with webservers.
(For the record, PHP, which does run on webservers, doesn't require a webserver either.)
Re: (Score:2)
Did you know you can type "file:" instead of "http:" in a URL...?
Schizophrenia is a disease. (Score:2, Insightful)
There are things Google does that don't make sense, such as X and Y. Now they've done Z that makes sense of X and Y. I sure hope they don't do to Z what they did with X and Y!
Tired of Google's lack of product maintenance (Score:5, Insightful)
When you bring a product to market, your users just don't expect it to suddenly go away and be replaced by something else a year down the road.
If you violate this expectation too many times, people will stop paying attention. For this reason, "maintenance mode" is one of the most overlooked -- yet most important -- parts of the product lifecycle.
Look Google, yeah, we get it: you like inventing stuff. Great. But here's the thing -- people want to use the products you've invented. We'd rather have you support your existing products than throw them away and spend a year or two developing a replacement. Yes, there's a cost to doing this. But if you care about the long term, you'll put in the extra effort.
Re:Tired of Google's lack of product maintenance (Score:4, Insightful)
Most of the things they trash have userbases measured in the hundreds. It's just not worth it financially to put money into maintaining something that has a few thousand users even if it does cost them some goodwill to the project. Kill it, move on to the next thing and if its an area that you really want to make something happen in try again with a different approach. Staying static with what can only be described as a failed approach isn't going to win you any profit.
Re:Tired of Google's lack of product maintenance (Score:5, Insightful)
Many of the projects Google kills are ones that I only hear about when Slashdot announces they've been killed. That's a failure on Google's part unrelated to the people responsible for making the project. You can't call a project a failure in popularity if it never was given a legitimate chance.
Even though these killed projects have very few users, I hear about so damn many projects of Google's that get killed that I don't wouldn't want to risk relying on them to maintain anything beyond mail. Why bother investing your time in a new Google service when it's probably going to be killed soon anyways? You're going to end up shit out of luck with wasted effort, and you knew it was coming before you even started.
Re: (Score:2)
You would prefer that Google support every little project for perpetuity?
It's funny to me that /. can be so libertarian and yet so completely misunderstand why unsuccessful projects must be killed. Google tries a lot of stuff out. Most of it will not make the cut. The SMARTEST thing they can do is give each project a chance to catch hold and if it fails then stop dumping resources into it.
Granted, they might do a better job of announcing things prior to killing them. Also, in most cases they should simply r
Re: (Score:3)
Re: (Score:1)
Re: (Score:3)
Aren't pretty much all of the projects they trashed free to use? I could see your argument holding a lot more water if it was a pay service or some kind of contract, but what Google's doing is trying a whole bunch of stuff. If it doesn't catch on, then why should they pay to maintain it if no one is paying them to use it?
Re: (Score:3)
Re: (Score:2)
Trying a whole bunch of stuff is great -- in a closed beta. Once you open it up to the world it's a different story because the expectations are different.
I might also add that nobody pays to use Google Search, Google Maps, etc. So in that respect, it's no different than App Creator, Code Search, Wave, Meebo, or any of the other products they've killed.
Re: (Score:1)
Re: (Score:2)
it's no different than App Creator
App inventor wasn't killed.
It was gifted to MIT. You can use it here: http://www.appinventor.mit.edu/ [mit.edu]
Re:Tired of Google's lack of product maintenance (Score:5, Funny)
You should totally post this on Google Wave.
Re: (Score:1)
That doesn't sound very Agile(tm). It's over the waterfall for you, heretic!
Re: (Score:3)
Google: Really good at launching. Really good at hyping.
Maintenance, upgrade, and support? Not so much.
Re: (Score:3)
Maintenance, upgrade, and support? Not so much.
Upgrade? Are you sure? google are always upgrading stuff.
All the time.
I, personally love the upgrade to google maps where all the country names are in the country's language an script. It's *so* cool. There's unicode all over the place. It's the coolest thing ever. Really. And so culturally sensitive and aware. It's a good job I can read all the latin script languages, Greek, Farsi, Arabic, Thai, Cyrillic (Russian and Georgian), Ethopian, Japanese and Chinese o
Re:Tired of Google's lack of product maintenance (Score:4, Interesting)
If you violate this expectation too many times, people will stop paying attention.
This very true line made me think of network executives and programming *cough* Firefly *cough* Caprica.
Re: (Score:2)
Not just "network execs", but those bastards at 'syfy'. .
Don't forget Farscape, one of the first causalities by those idiots, and the sign of things to come.
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
Forever, no. But when its making money for them i don't expect them to cut it off mid-story line and at least let them wind the series up if it is going to go away.
Re: (Score:2)
Re:Tired of Google's lack of product maintenance (Score:4, Insightful)
Just keep in mind how many defunct companies are, in retrospect, faulted for refusing to sacrifice their sacred cow / cannibalize their existing business / streamline their offerings. Keep in mind how many slashdotters revile Intel for maintaining x86, and Microsoft for not being innovative enough, and for feature creep. I realize you did address that a little bit in your post, but still I don't think people realize what "being willing to fail" actually means in practice. It means you often incur losses associated with failure, including a hit to your credibility.
Re: (Score:2)
This.
We've hit the "fashion" stage of technology (Score:4, Insightful)
Model-Ts were "any color you like, as long as it's black". It was General Motors that started coloring things up and I think they also invented model years. The model year is a not so subtle suggestion that you are driving an "old" car even though it still runs fine.
As people "acquire" technology like search and programming languages, the people who made their scratch creating these things are left with nothing to do. You might think they'd move on to create something entirely different, or that they'd move into maintenance mode as you suggest. However, they have special expertise in creating not maintaining, and moreover they have special exerptise in creating particular kinds of things. The easiest thing for them to do is fool people into believing that thing A is obsolete so they can create thing B which is fundamentally the same. They maximize their profit that way. It's not so much malice as it is simple laziness. It's economics 101, really.
People want recurring revenue. It's the next best thing to economic rent. Or as I like to say, "everybody wants to be a subsidized farmer".
Re: (Score:2)
FYI, I'm referring to 'all intensive purposes', it gives me a headache just typing it
Re: (Score:2)
It's a joke. It's an old joke. I would change it, but it's drawn a lot of remarks and that causes problems with the integrity of the archives.
Why? Because AFAIK Slashdot archives a function call to the "sig function" that you define in your preferences. If I change my sig, I change the appearance of the archived pages. It would create too many bizarre non sequiturs regarding the comments about the sig.
Slashdot could fix this by crawling the entire archive, replacing the function call with the current r
Re: (Score:2)
Re: (Score:2)
Actually, for the first half decade the model T was in a few colours: none of them black. The quote is correct though, but the all-black period is later in the car's life cycle.
Re: (Score:2)
Geeks like making geeky stuff for other geeks, which is fine in itself, but not a basis for a publicly owned company with shares held by non-geeky investors.
Re: (Score:1)
As a teacher, I'd put my money on "no" (Score:5, Insightful)
I've taught quite a few courses ranging from traditional programming to tools such as Adobe Flash (which allows you to use any combination of the graphical tools and ActionScript, the latter being a full-fledged object-oriented programming language, with GC and all the other modern niceties). I've drawn boxes around variables to symbolize how they contain the values, I've given assignments to write pseudo-code, I've demonstrated the concept of algorithms by asking students to give me clear instructions on how to order a stack of documents alphabetically, when I only know how to access them by index and compare two documents... and I'm not sure if any of that has been worth the time.
I don't think I've ever run into a student, who would have been able to actually grasp the concept but would then have stumbled because the code part is difficult. There are people who can grasp the concepts and who then have no real trouble with the code and then there are people who don't really understand having one loop inside another, no matter whether you allow them to write down code, draw flowcharts or whatever.
Re: (Score:3)
Let me introduce you to my 8 year old daughter. She had quite a lot of fun trying to solve the maze problem and come up with an algorithm to do it. She was interested in the problem, trying to teach her the syntax of a programming language would have made the problem less accessible, I doubt she would have enjoyed it.
Re: (Score:3)
Same for my 9 year old daughter. After the maze we moved on to write a program to count to 100 by intervals.
Seeing my daughter excited about programming like that was awesome. A little less coo
Re: (Score:1)
I'll provide an alternate use case for you: I'm a professional computer programmer on disability with late Lyme disease. I have encephalopathy which specifically affects my ability to retain arbitrary abstract associations, while my abstract logic and spatial reasoning is fairly intact. Actual programming by hand? I haven't been able to do that for two years now. But something like this could have a fair bit of potential as a rehabilitary tool for someone like me.
I would also hazard a guess that there are p
Yes (Score:5, Interesting)
Also, is there any evidence whatsoever that these "graphical" languages are easier for people to learn?
My kid is 5, and he spends hours writing little programs in Scratch. The click and drag aspect of the graphical language makes it much easier for him. If he had to rely on his nascent typing skills to write code, he'd be stuck in the frustration of Syntax Error Hell, as I was for years when I first started pounding out Basic code on the Apple II.
Re: (Score:1)
There is next to no real evidence. Indeed, these puzzle piece programming languages are almost 30 years old, e.g., ancient paper [psu.edu].The puzzle piece idea back then did not do the trick. Why should it now?
Of course, syntax is only a very small part of the problem. Semantics is the real challenge. The idea that syntax alone makes programming simple would be like saying "an English sentence needs to have a noun and a verb [that is the syntax]" and then suggesting "now that you know the syntax write a best sell
Instead of relying on Google..... (Score:2)
Re:Instead of relying on Google..... (Score:5, Informative)
Its released under an Apache license. Anyone can run with it if they want to.
At the risk of sounding elitist... (Score:1, Insightful)
..."building an app graphically" is to "learning programming" what "using a calculator" is to "learning math." You've replaced an actual understanding of the underlying process with a bunch of buttons to be punched.
It's only still "programming" if you have the knowledge to do it without the tools, but not the time.
Re: (Score:2, Interesting)
Re:At the risk of sounding elitist... (Score:4)
Says the elitist. The demo of a maze solver is a perfect example of teaching logic programming.
Re: (Score:1)
Repeat forever
do
turn left
if wall ahead
then turn right
else move forward
if wall ahead
then turn right
else move forward
Re: (Score:1)
If [not wall to the left] or [wall ahead] then turn left
Else move forward
Re: (Score:3)
...,but with the man walking backwards:
Thought for sure that was a goatse link :)
Re: (Score:2)
I assume lists and variables were left out as a demonstration of how you can build different interfaces for different purposes. If you were designing a programming course, you could introduce block types as you introduced concepts.
"I'm feeling lucky" (Score:2)
..."building an app graphically" is to "learning programming" what "using a calculator" is to "learning math." You've replaced an actual understanding of the underlying process with a bunch of buttons to be punched.
It's only still "programming" if you have the knowledge to do it without the tools, but not the time.
You've just summed up Google's whole business model.
Re: (Score:3)
I've heard that before...
http://verydemotivational.files.wordpress.com/2011/10/demotivational-posters-th-grade.jpg [wordpress.com]
Re:At the risk of sounding elitist... (Score:5, Insightful)
Re: (Score:1)
Not sure where you got the machine language from but... I always tell people "anybody can learn to program in 7 days, but to learn to write software that is relatively bug-free, usable, and maintainable, that takes several years of study + several years of field experience." I think that's what the GP meant too.
Another analogy, it doesn't matter whether you use a regular hammer and handsaw or you use laser-guided power tools, if you don't understand the underlying principles of construction the house you bu
Re: (Score:2)
Re: (Score:2)
Re: (Score:3)
Not at all. There are two sides to mathematics: the theoretical side, and the practical side. The theoretician would agree completely with what you say: if you can only use the calculator and don't know the underlying process, you aren't doing math.
The practical side disagrees. If you don't need to have an understanding of the underlying principles to do the problem, there is no point to learn it. The thing is, except for a fairly small group of people, programming is a strictly practical function. If you
Re: (Score:3, Insightful)
If you can accomplish what you need to, there is absolutely no point in having an understanding of the underlying process
*shudders* I hate to actually have to watch as civilization collapses...
Re: (Score:2)
That's why I said "from the practical side", i.e. as someone interesting in making a program that works, rather than in designing a programming language or taking on a project for fun. Obviously, there is a tremendous value in knowing the underlying mechanics, ideally all the way down to the bare metal. But if all you need to do is create something that performs a function, that understanding adds little in value. My example with the car was, I thought, a pretty good illustration: obviously, someone needs t
Re:At the risk of sounding elitist... (Score:5, Insightful)
Re: (Score:1)
That is actually how civilization advances.
No it's not exactly the case, and you gave a perfect example right after. Are you advancing the civilization by being more efficient at your job thanks to a tool you don't understand? I don't think so. You are surely advancing the profits of your company, or your own profit if the paycheck at the end of the month is all you are looking for. But for the somewhat positive evolution of of masses behavior that you named civilization advancement, it's another story.
Civilization changes due to a deeper comprehens
Re: (Score:2)
Are you advancing the civilization by being more efficient at your job thanks to a tool you don't understand?
Yes.
Civilization is the sum of its parts. If a genius scientist is bad at technical writing, it is not a failure of civilization. He will instead just find a person who is good at technical writing to help him write his papers. If an astronomer uses Blockly to help him make his telescope scan the sky more efficiently, and discovers dark energy, the fact that he does not know javascript is not really important. If someone is trying to advance civilization in the field of computer science, and doesn't und
Re: (Score:2)
I disagree. My whole point is that it is perfectly fine for most people to not understand the underlying concept. This is the whole reason for Object Oriented Programming. If you are using a well made tool (class), then you do not need to understand how it converts your input into an output. As long as you know that the output is correct (hence the "well made" part), then you can worry about learning about and solving the problems that you are good at. Not to say that people do not need to know any und
Re: (Score:1)
I just showed my daughter the maze demo.
Forward 1, Right 1, Forward 2, Left 1, etc, etc, - it reminded me of my school days with the turtle and Logo. It's a manual list of commands and no fun after the first time.
Then I said something like:
Move forward until wall ahead
if No Wall On Right then Turn Right
Turn Left
And we put the jigsaw pieces together and the maze was solved.
How's that not programming? Does it matter if I typed the code in words or fitted jigsaw piece? It has statements and loops, a
Re: (Score:3)
Your analogy doesn't quite work. Calculators solve math problems. Besides addition and subtraction, a calculator trivializes the work needed to arrive at the solution. It gives you the solution, without you needing to perform any of the in-between steps.
Programming is not a math problem. Computer science is applied mathematics, but even that is not a math problem. Computer science is more like fitting the right mathematics to the problem to arrive at a solution. But programming isn't computer science either
Not elitist, but you're missing the point. (Score:5, Insightful)
You're quibbling over symbology, while missing the important distinctions.
At the most trivial level, just about all programming is "graphical". Characters are symbols. A two-dimensional array of symbols is a graphic. You don't think of it as a graphic, but there it is, right there on your display.
If you've got a graphical language that lets you drag colorful boxes around, snap them together, and watch them twinkle contentedly as the program executes, how exactly is that different from using text? If it's "less rich" -- if there are constructs available in a "conventional language" that aren't available in the graphical language -- then we can discuss the graphical language's particular deficits, and perhaps correct them.
Re: (Score:3)
I think the key point of a visual programming language/editor is functionality. I once used a *terrible* flowchart-based C compiler. It was literally impossible to do some things. Like, say, a modulus. Or define your own subroutines. And so on.
You know what would be a good test for this? You should be able to write a program (any program) in regular text mode, then import it into a visual editor and edit it there, and then re-export it into regular text and have it still be legible. If a visual editor can d
Re: (Score:2)
You know what would be a good test for this? You should be able to write a program (any program) in regular text mode, then import it into a visual editor and edit it there, and then re-export it into regular text and have it still be legible. If a visual editor can do that, it's as good as any other IDE.
No, that's not the aim. The lead dev wouldn't do his real coding with jigsaw pieces. It's an educational tool. You can export to JS/Dart/Python and that's good for two reasons:
1. The learner can see how their jigsaw pieces translate into text
2. The learner can take that text and use it as the starting point for something bigger
The real point of this is that you can get started without learning syntax. Most of us don't remember how hard we found syntax when we got started, but it's a real issue for many begi
Try it... (Score:2)
By the way I doubt this is a product, looks more like an experiment. And let not blame Google stop wasting money on this when they do...
Instead I'd give them a little respect for wasting money trying to make something that m
Re: (Score:3)
That's a good one! (Score:5, Funny)
As long as Google doesn't throw this one out in a fit of reorganization and spring cleaning, it's a welcome new language.
If the sun doesn't come up in the morning, I can sleep all day!
Google OR Microsoft (Score:3)
We've developed this new language that... SQUIRREL! Oh, what was that language again. Screw it. Let's dump it and develop a purely functional... SQUIRREL!
May I gently suggest that another language is NOT needed, and that rationally built, compatible extensions and frameworks added to existing languages might, instead, be far, far more useful. C to C++ worked.
Re:Google OR Microsoft (Score:5, Interesting)
Is this really a language as much as it is an IDE that saves to Javascript, Dart, or Python? It's not like they took the new language all the way down, they just wrote a nice Javascript based way to make more Javascript, or Dart, or Python. I suppose in the sense of "knowing how to use it" it then becomes a language since it completely obfuscates the layer below it, but there are plenty of people who make their way through C# with nothing more than the help of Visual Studio. So, is Visual Studio a language too?
Re: (Score:2)
Indeed, how would you "close" a programming language?
C and C++ (Score:2)
Is this really a language as much as it is an IDE that saves to Javascript, Dart, or Python?
Well, you could say the same thing about C and C++. C++ code is "saved" to C code and THEN compiled to machine code (at least that's how it used to work) using the C compiler.
YAGL (Score:3, Insightful)
Yet Another Google Language.
Another Failed Product by Goog (Score:1)
Looks like another 20% project (Score:4, Interesting)
I'm seeing no evidence this is a Google-backed project, at least in the links provided - it's a project from a guy who works at Google, that's all. So expecting Google to guarantee this exists in perpetuity is not particularly realistic. Realistically, you should have the same expectations you'd have on a project from, say, SourceForge.
Basically this looks like a Javascript re-envisioning of Apple's Automator [wikipedia.org]. Might be a fun toy, but not much more than that.
Re: (Score:2)
It's probably worse than that, since I don't think management would like to see an employee spend all his 20% time on the same project year after year. I somehow imagine you'd be expected to come with new ideas on your 20% time, so if the project doesn't get any traction quickly it might be discarded even if the creator was willing to maintain it.
I want a direct Python version of this (Score:4, Interesting)
While I've never made time to go do the experiments, I've often wondered why someone hasn't done a Python IDE that provides a Scratch-like UI, but manipulates the Python AST directly. Seems like that should be doable.
Anyway, I believe Scratch-like interfaces are the future of programming languages. Much as when Backus discovered Noam Chomsky's formal grammars and compilers development as it was done in FORTRAN and COBOL was replaced by a grammar-driven parser in the development of Algol, and pretty much all languages since, eventually, the Scratch-ification of the IDE will become the "obvious" replacement for linear streams of ASCII character codes.
Again with this self-promoting troll? (Score:2)
Why is "mikejuk" allowed to just post his own opinion pieces as news?
What does this improve on? (Score:2)
while(true){
turn(left);
while(wall(ahead)){
turn(right);
}
move(forward);
}
assuming i was given an api with functions like turn(), wall(), and move() and they took those constants it would be a hell of a lot easier just to type what i typed there than to navigate menus and drag things all over the place. maybe it's inviting to non programmers, but sooner or later they are going to realize that the punctuation isn't what's
Now the truth can be told (Score:4, Funny)
I got a version that looks like this
when (aProblem.comes(along)){
you.whip(it,must);
}
before(cream.sitsOut(tooLong)){
you.whip(it,must);
}
go(forward);
move(ahead);
try(detect(it));
if(it != too late) {
you.whip(it,good)
}
Re: (Score:2)
After some playing around, i had a script that could solve the maze with
Same algorithm I came up with. Well done.
assuming i was given an api with functions like turn(), wall(), and move() and they took those constants it would be a hell of a lot easier just to type what i typed there than to navigate menus and drag things all over the place. maybe it's inviting to non programmers, but sooner or later they are going to realize that the punctuation isn't what's hard about programming, it's the logic.
That "sooner or later" is what it's all about. The jigsaw interface lets the beginner play with logic and control with literally no opportunity for a syntax error.
Later, they export to JS/Python/Dart and can see how the exported text corresponds to their shapes. If they're at all curious, they try modifying and running the text version of the code.
That's when they realise that they can be more productive if they just hack at the text -- and that the tradeoff (having
Re: (Score:2)
Related nostalgia (Score:2)
Anyone remember HyperCard?
Re: (Score:2)
I cut my programming teeth on HyperCard (well, really BASIC, but HyperCard was next).
I built so many damn useful little apps in HyperCard in my youth...one of my favorites was one that displayed porn images hidden in the resource fork of that particular Hypercard stack (to hide from Dad).
And then there were all those awesome Hypercard extensions that added functionality, etc etc. I loved it.
JAVA was the problem (well oracle) (Score:1)
And now Oracle seems to be getting blacklisted in the industry, which is good. A lesson well learned for those that become greedy and try to change the way of open source
Re: (Score:2)
Sorry, dont trust them (Score:2)
At the rate they float these trial balloons then yank them back just as you get used to it, no thanks.
Google is far too unstable with their 'extra' offerings to even warrant a look at them.
App INventor lives on (Score:1)
jump to: Stop reading; Lose interest; exit(1); (Score:2)
It works like Scratch or App inventor but it is written in JavaScript.
Stop reading. Lose interest. Next story.
Re: (Score:2)
Good luck teaching 7 year olds to "grok structures made of text", or at least structures complex enough to represent even reasonably interesting programming projects (beyond "hello world"). For kids that age, it's more important to get their head around the concepts and logic of it all than it is to baffle them with complex syntax and non-standard use of punctuation. They won't even have gotten to grip with regular English punctuation usage by that point!
To demonstrate, here is a bit of JavaScript generated