Skip to content

Commit

Permalink
Update blockcode.markdown
Browse files Browse the repository at this point in the history
block.js -> blocks.js
  • Loading branch information
cndpzc committed May 20, 2016
1 parent 5b24691 commit 35c8500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blockcode/blockcode.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you would like to get a feel for what a block-based-language is like, you can

I want to accomplish a couple of things with this code. First and foremost, I want to implement a block language for turtle graphics, with which you can write code to create images through simple dragging-and-dropping of blocks, using as simple a structure of HTML, CSS, and JavaScript as possible. Second, but still important, I want to show how the blocks themselves can serve as a framework for other languages besides our mini turtle language.

To do this, we encapsulate everything that is specific to the turtle language into one file \newline (`turtle.js`) that we can easily swap with another file. Nothing else should be specific to the turtle language; the rest should just be about handling the blocks (`block.js` and `menu.js`) or be generally useful web utilities (`util.js`, `drag.js`, `file.js`). That is the goal, although to maintain the small size of the project, some of those utilities are less general-purpose and more specific to their use with the blocks.
To do this, we encapsulate everything that is specific to the turtle language into one file \newline (`turtle.js`) that we can easily swap with another file. Nothing else should be specific to the turtle language; the rest should just be about handling the blocks (`blocks.js` and `menu.js`) or be generally useful web utilities (`util.js`, `drag.js`, `file.js`). That is the goal, although to maintain the small size of the project, some of those utilities are less general-purpose and more specific to their use with the blocks.

One thing that struck me when writing a block language was that the language is its own IDE. You can't just code up blocks in your favourite text editor; the IDE has to be designed and developed in parallel with the block language. This has some pros and cons. On the plus side, everyone will use a consistent environment and there is no room for religious wars about what editor to use. On the downside, it can be a huge distraction from building the block language itself.

Expand Down

0 comments on commit 35c8500

Please sign in to comment.