Google Blockly (better than Scratch) for easy visual mod development

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Sat Nov 16, 2013 19:41

Blockly wrote:Our goal with Blockly is to expose as many children as possible to the joy of programming, letting them put off details like syntax until later when and if they're sufficiently motivated. My reason for creating Blockly Lua is to leverage kids' interest in Minecraft and other games to get them to try programming.

FWIW, regular Blockly lets you see the JavaScript and Python code corresponding to the blocks, to ease the eventual transition to text-based programming languages.


Man,I really respect your work,but i don't think this can be considered programming,or at least not programming at a sufficient level.

That's like speaking spanish using google translate:You can actually write some sentences in spanish,but if you study spanish you'll complete master the language and you can speak it without being on a translator.I hope i expressed the concept i want to say enough nicely.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
Excalibur Zero
Member
 
Posts: 142
Joined: Tue Apr 02, 2013 19:45
GitHub: ExcaliburZero

by Excalibur Zero » Sat Nov 16, 2013 20:13

LorenzoVulcan wrote:
Neuromancer wrote:That's kind of the point. Everyone starts out a noob. Blockly helps you bridge the gap from being a noob to an expert. Otherwise all you will ever have are a few experts and a boatload of people who can't bridge the gap.

I think this GUI just breaks out all concept of programming.When you program you must have the scheme of every class in your head,an programming LUA mods for minetest is a nice training to learn this concept.Using Blockly to code mods for minetest will just make every user of this forum a noob.

And the gap can be bridged asking help to expert users or reading tutorial and APIs.

I disagree. When people use a simplified way of making code (like Blockly) they are more likely to go on to learn the more complex way of making that type of code. Many people can't jump right from newbie to expert, they have to go from newbie to mid-experience to expert. Having Blocky be used to code mods would allow people who are new to coding Minetest mods to learn how to take on the task of coding mods by actually coding mods and getting them to work. Then after they understand basic mod making (mod making using only Blocky) they will be able to jump the small gap between making mods using Blockly to making mods using regular coding methods.

Many people new to coding are frightened by the amount and appearance of code and don't think that they are able of writing such code, but a program like Blockly would be able to show them that it isn't as difficult as they think it is and they then will like go on to learn the actual code because they know that learning that code is within their reach.

Sure, some people may just rely on Blockly alone to make mods, and not go on to learn the regular ways of coding. But Blockly would help people who ordinarily wouldn't go on to learn the normal coding to go on to learn the normal coding.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Nov 16, 2013 20:55

I forked the Blockly - Lua repository on GitHub:
https://github.com/Neuromancer56/blockly-lua

If you want to contribute, let me know, and I'll add you.

Once you have it downloaded, you can run it by navigating here:
file:///C:/Users/x/Documents/GitHub/blockly-lua/apps/code/index.html

I think what we want to edit is here:
C:\Users\x\Documents\GitHub\blockly-lua\blocks\*.js

I'm guessing that we add a new .js file here called minetest.js
and a new C:\Users\x\Documents\GitHub\blockly-lua\generators\lua\minetest.js
then we need to add <category name="Minetest"> to apps/code/index.html

and add
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
goog.provide('Blockly.Blocks.minetest');

goog.require('Blockly.Blocks');

at the top.

Hmmm...
blockly-lua/apps/code/index.html uses these files
<script type="text/javascript" src="../../blockly_compressed.js"></script>
<script type="text/javascript" src="../../blocks_compressed.js"></script>
<script type="text/javascript" src="../../lua_compressed.js"></script>
Instead of the .js files I'm editing. I installed Python to run Build.py which will put the minetest.js files into these compressed.js files. But when I run it in IDLE I get "Invalid Syntax" error at this line print 'SERVER ERROR: %s' % target_filename

I'm not sure if that means there is invalid syntax in the Python script or in the .js files it is trying to compress. I might be able to find another compression tool, or just add all the uncompressed .js files to the html, but that doesn't seem like a good way to go.


@Blockly: I'm guessing that making this fork was the best idea, then if we need to make contributions to the lua part of your repository (non-minetest blocks) we could always do a pull request.
Last edited by Neuromancer on Sat Nov 16, 2013 22:06, edited 1 time in total.
 

User avatar
Blockly
New member
 
Posts: 6
Joined: Sat Nov 16, 2013 02:26

by Blockly » Sat Nov 16, 2013 21:14

LorenzoVulcan wrote:Man,I really respect your work,but i don't think this can be considered programming,or at least not programming at a sufficient level.

That's like speaking spanish using google translate:You can actually write some sentences in spanish,but if you study spanish you'll complete master the language and you can speak it without being on a translator.I hope i expressed the concept i want to say enough nicely.


I disagree. I'd say the correct analogy is that someone using Blockly to write programs doesn't know JavaScript, just as someone entering English into Google Translate doesn't known Spanish, even if that is what output.

To me, programming is more about logic, abstraction, and algorithms, rather than syntax, although eventually you have to learn more syntax and conventional programming languages in order to build complex systems. As mentioned earlier in the discussion:

Please do not attempt to maintain the Linux kernel using Blockly.
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Sun Nov 17, 2013 00:10

I don't really see a difference between using Blockly and how most modders make their blocks. They copy-paste.

For now, I would love to contribute to this fork, however I took a look at Espertus' source code, and it all goes over my head XD. I don't think I can understand anything till I actually learn JavaScript.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sun Nov 17, 2013 02:43

hoodedice wrote:I don't really see a difference between using Blockly and how most modders make their blocks. They copy-paste.

For now, I would love to contribute to this fork, however I took a look at Espertus' source code, and it all goes over my head XD. I don't think I can understand anything till I actually learn JavaScript.

Not knowing your level of general programming experience, You can try this:
http://net.tutsplus.com/tutorials/javascript-ajax/the-best-way-to-learn-javascript/
There are some suggestions in here that are either too simple or too complicated, but it does cover a lot of free resources and a few books.

The good part of this is that over time javascript has become vastly more important as a language and will continue to become more important as a cross platform language, and the language of the browser.
Last edited by Neuromancer on Sun Nov 17, 2013 02:46, edited 1 time in total.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

by addi » Sun Nov 17, 2013 03:19

Neuromancer wrote:
hoodedice wrote:I don't really see a difference between using Blockly and how most modders make their blocks. They copy-paste.

For now, I would love to contribute to this fork, however I took a look at Espertus' source code, and it all goes over my head XD. I don't think I can understand anything till I actually learn JavaScript.

Not knowing your level of general programming experience, You can try this:
http://net.tutsplus.com/tutorials/javascript-ajax/the-best-way-to-learn-javascript/
There are some suggestions in here that are either too simple or too complicated, but it does cover a lot of free resources and a few books.

The good part of this is that over time javascript has become vastly more important as a language and will continue to become more important as a cross platform language, and the language of the browser.


this is one and only way to learn a programming language!

not by clicking on colored blocks!

also to start learning you should not start with such a huge project.
start with building a webpage first to learn more about the Basics and how javascript works.

in some points i totaly agree with LorenzoVulcan
 

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Sun Nov 17, 2013 09:43

Blockly wrote:I disagree. I'd say the correct analogy is that someone using Blockly to write programs doesn't know JavaScript, just as someone entering English into Google Translate doesn't known Spanish, even if that is what output.

To me, programming is more about logic, abstraction, and algorithms, rather than syntax, although eventually you have to learn more syntax and conventional programming languages in order to build complex systems. As mentioned earlier in the discussion:

Please do not attempt to maintain the Linux kernel using Blockly.


Ok,i'll get many critics for this,but i think if you can't understand programming,just don't program.

Those thinks are what makes informatic a big noob zone,engines like Unity3d or game makers are just ruining all the concept of programming to make some dumb kids happy of making something.

That's what happened to music in 1950-2000:Many new ways of making music are made and many programs like VirtualDJ can let you define yourself a "musician",but that's not true.I really love electronic music,but easier is NEVER better.
Last edited by LorenzoVulcan on Sun Nov 17, 2013 09:43, edited 1 time in total.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Nov 17, 2013 12:59

I just wanted to throw my two cents in there. Okay, I learned to program using Scratch. The point of Scratch is to move on afterwards to another programming language(like python). Also, Scratch is not meant to be a serious programming language(When I say scratch, I mean any block language like it). Its purpose is to teach the basics of programming to kids, and to move them on to bigger and more complex programming languages once they have gotten really good with scratch. Also, scratch code really looks like just a visualized version of code you would normally see in any language.
Last edited by Evergreen on Sun Nov 17, 2013 13:01, edited 1 time in total.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Sun Nov 17, 2013 17:03

Image

YAAY.

Me and my bud solved this. Since the day Neuromancer showed us Blockly, I've been heating my brain, thinking of a way to finish level 10. Well, with my bud's great help, we solved it. Well...

[spoiler]The thing was that I was making the code too complex, which resulted in me running out of blocks. My friend simplified it, and technically - solved it. In. Two. Minutes. -.-[/spoiler]
Last edited by hoodedice on Sun Nov 17, 2013 17:08, edited 1 time in total.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
Blockly
New member
 
Posts: 6
Joined: Sat Nov 16, 2013 02:26

by Blockly » Sun Nov 17, 2013 18:36

hoodedice wrote:http://i.imgur.com/v2DBseW.jpg

YAAY.

Me and my bud solved this. Since the day Neuromancer showed us Blockly, I've been heating my brain, thinking of a way to finish level 10. Well, with my bud's great help, we solved it. Well...


Well done! Surprisingly many professional programmers can't do it.

At Maker Faire, we had three machines next to each other for people to play with. We had fun watching a kid beat two professional developers at solving level 10.
Last edited by Blockly on Sun Nov 17, 2013 19:28, edited 1 time in total.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sun Nov 17, 2013 23:00

Dunno, even doing html/css/javascript etc. i've always found WYSIWYG/visual editors to be more limiting and time consuming than simply using a text editor, and certainly no substitute for a good book/tutorial.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Mon Nov 18, 2013 00:17

mauvebic wrote:Dunno, even doing html/css/javascript etc. i've always found WYSIWYG/visual editors to be more limiting and time consuming than simply using a text editor, and certainly no substitute for a good book/tutorial.

Ahh mauvebic, you are a power developer. This isn't for you. This is for kids, and brand new developers.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Mon Nov 18, 2013 00:40

Well as a kid I did learn perl and php from books, and html, javascript, css from playing with various websites' source. My friends used Frontpage 98 and kept asking me how I did what I did. I think Lorenzo is right, there's no shortcut to learning this stuff.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
Blockly
New member
 
Posts: 6
Joined: Sat Nov 16, 2013 02:26

by Blockly » Mon Nov 18, 2013 04:21

mauvebic wrote:Well as a kid I did learn perl and php from books, and html, javascript, css from playing with various websites' source. My friends used Frontpage 98 and kept asking me how I did what I did. I think Lorenzo is right, there's no shortcut to learning this stuff.

The goal isn't to provide a shortcut. It's to provide a gentler learning curve for people who, unlike you and me, weren't sufficiently motivated, independent, etc., to learn through conventional means. The more points of entry, the more people who will be exposed to programming.

In my other job (as a computer science professor), I work with college graduates (mostly women) who didn't discover an aptitude and love for CS until after getting a degree in something else. If they'd been exposed to something other than what was available to them when they were young, they would have discovered this passion sooner.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Mon Nov 18, 2013 11:02

LorenzoVulcan wrote:
Neuromancer wrote:That's kind of the point. Everyone starts out a noob. Blockly helps you bridge the gap from being a noob to an expert. Otherwise all you will ever have are a few experts and a boatload of people who can't bridge the gap.

I think this GUI just breaks out all concept of programming.When you program you must have the scheme of every class in your head,an programming LUA mods for minetest is a nice training to learn this concept.Using Blockly to code mods for minetest will just make every user of this forum a noob.

And the gap can be bridged asking help to expert users or reading tutorial and APIs.
I agree. I was a noob but i learned the hard way and got experience. Though this program could help newer people learn the basics of lua.
Edit: I would also like to point out that this program would probably be limited. There are many good mods that depend on maker written base code that isn't in the api. This would be good for beginners but eventually it would be quicker to just code itsn by hand.
Last edited by jojoa1997 on Mon Nov 18, 2013 11:58, edited 1 time in total.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
nextmissinglink
Member
 
Posts: 145
Joined: Mon Feb 04, 2013 16:43

by nextmissinglink » Mon Nov 18, 2013 13:21

Neuromancer wrote:A while back, I threw out the idea of using scratch to program mods, that wouldn't have worked out because scratch is a specific purpose language. Then I found blockly. It uses the visual programming of scratch, but lets you output/generate ANY language (in our case it could be lua). But what is also really cool is that it lets you create custom blocks that could be specific to Minetest modding. Thus there could be blocks to define nodes, nodeboxes or any other common aspect of Minetest modding.

Why is this cool? Because it would allow anyone to create Mods for minetest, even kids and non-developers.

cool but just because your a kid doesn't meen you can't mod but I like your idea
IF in doubt hit it with a hammer
This is a signature virus. Add me to your signature so that I can multiply id10t ERROR
do not abuse me i am 11 and i like hitting things with a hammer that may include you
this is ment to be secret http://forum.minetest.net/viewtopic.php?pid=86467#p86467
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Mon Nov 18, 2013 14:35

nextmissinglink wrote:
Neuromancer wrote:Why is this cool? Because it would allow anyone to create Mods for minetest, even kids and non-developers.

cool but just because your a kid doesn't meen you can't mod but I like your idea
Yes i know you are older Neuromancer but I am a little offended that you think us kids can't mod. Now is it that a lot of kids can't mod yes but why can't we learn the old fashioned way.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Mon Nov 18, 2013 16:51

LorenzoVulcan wrote:
Blockly wrote:I disagree. I'd say the correct analogy is that someone using Blockly to write programs doesn't know JavaScript, just as someone entering English into Google Translate doesn't known Spanish, even if that is what output.

To me, programming is more about logic, abstraction, and algorithms, rather than syntax, although eventually you have to learn more syntax and conventional programming languages in order to build complex systems. As mentioned earlier in the discussion:

Please do not attempt to maintain the Linux kernel using Blockly.


Ok,i'll get many critics for this,but i think if you can't understand programming,just don't program.

Those thinks are what makes informatic a big noob zone,engines like Unity3d or game makers are just ruining all the concept of programming to make some dumb kids happy of making something.

That's what happened to music in 1950-2000:Many new ways of making music are made and many programs like VirtualDJ can let you define yourself a "musician",but that's not true.I really love electronic music,but easier is NEVER better.


You seem like the kind of person that would enjoy the game mentioned in the topic beyond the link below, LorenzoVulcan. I can assure you that it is pretty hardcore.
https://forum.minetest.net/viewtopic.php?id=7566

It is important to remember that not everyone likes things to be difficult, nor should everything be difficult. Torture should not be pleasure.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Tue Nov 19, 2013 02:13

jojoa1997 wrote:
nextmissinglink wrote:
Neuromancer wrote:Why is this cool? Because it would allow anyone to create Mods for minetest, even kids and non-developers.

cool but just because your a kid doesn't meen you can't mod but I like your idea
Yes i know you are older Neuromancer but I am a little offended that you think us kids can't mod. Now is it that a lot of kids can't mod yes but why can't we learn the old fashioned way.

Sorry Jojoa, I didn't mean it that way. As a 14 year old I was writing c and assembly language. I know kids can code. I'm talking more about adults and kids who are more like my kids who don't take naturally to programming, but with something like Blockly can start to learn how to code.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Tue Nov 19, 2013 03:29

Well if people need visual aides to get interested in programming, id suggest they might already prefer doing things like CAD, graphic design or 3D. The world has enough bad software.
"Fuck the hat." - Paulie Gualtieri
 

hackware
New member
 
Posts: 1
Joined: Fri Feb 28, 2014 06:22

by hackware » Fri Feb 28, 2014 06:30

well guys, i've seen this many times before, when a new tool is built, and all that many can see, is a weapon to kill a sacred cow...

when a new tool is available, it is ez to just not use it, ez to not get involved, and ez to holler about that poor old sacred cow...

this set of tools will come to exist, if for no other reason than i want it to be so, as it will assist me in another fork for lisp... :-)

william...
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Feb 28, 2014 12:23

It is technically a programming language.

Just a visual language.
 

Previous

Return to Minetest-Related

Who is online

Users browsing this forum: No registered users and 17 guests

cron