Journey of block code: Section 1, Chapter 1: block code

Welcome everyone, to the very first Chapter of the Journey of block code!

Lesson 1: what is block code?

Today I will answer a essential question to block code, which is: what is block code?? Block code is a programming language. It has a basic syntax.
New word! Syntax

Syntax is really just a word for the way something is meant to be written. For example, in an English sentence you need subject → verb → direct object for it to be a real sentence. Same works with programming. When creating a function(will teach what that is later on) in Python you do this:

def functionName(parameters): 
    #indentation is required
    #code goes here

Notice how we had to add def at the start of the function. This is because when creating a function in Python the program is looking for the word def. If it finds it it knows the word after that is the function name. This is syntax. Another way of looking at that code snippet(some code written out) is like this:
keyword: def → function name: functionName → OpenParen: true → Parameter(s): parameter → CloseParen: true → Colon: true → Comment: true, ignore → Comment: true, ignore ↔ indentation: true, noError.
So now we(you) understand syntax!

Block code is mainly taught to beginner coders(maybe like yourself!) and was the third programming language I ever learned(if you consider turtle an actual programming language on its on). Block code is simple because when you’re programming in it you don’t need to type as much as in a real(text) programming language(like python). Another reason why block code is easy is because you can never wind up stuck with a syntax error.

New word! Syntax error

We know what syntax is, but what is a syntax error? Well taking into consideration that syntax is when you follow a set of rules to do something(like in English) when you misspell something it is called a typo. Think of a syntax error as that typo, but in a programming language.
If we didn’t have def at the start of our function decleration in the python example(check the syntax hidden detail) we would get an error message because we made a “typo” or a syntax error.

Why is it impossibble to stumble upon a syntax error in block code? The reason is because when connecting the blocks you can’t put certain blocks into each. This is because block coding is built to be beginner-friendly and makes sure its coders don’t do something that will lead to a syntax error. Now that we know what block code is…

Lesson 2: Why Should you learn it?

One main reason is because when trying to create very complicated or advanced game mechanics in GKC(gimkit creative) you’ll find yourself(sometimes) needing to use block code. Even though you may be great at the devices, you can’t fully create things you want to because of the absence of block code.
Another reason is because block code can replace some devices(not all) this makes it very useful for when you have little memory(do remeber that block code takes up a massive amount of memory).
So in conclusion to this lesson(lesson 2) it is good to learn to code. Why? Well, it depends on your situacion. Do you want to make an extremely complicated game mechanic? Do you want to save memory? What do you want? Is block code needed?

Lesson 3: Ask for help

Even the greatest of coders in the world have needed to ask someone for help(sometimes the other person wasn’t even close to being at that person’s knowledge). Coding is hard sometimes, you reachh a point where everything becomes overly complicated and the only way to solve something is to ask for help(not even the internet can solve it).
Asking for help isn’t bad, it doesn’t show you as someone less, it just shows you as someone who understands their limitations. So don’t worry about asking for help, for every good coder knows when to ask for help. The gimforum here is a great place to ask for help as it is specifically made to ask for help(anything related to GKC).
Notice:
A syntax error is gimpossible in block code, but a bug is possible. The question is…What is a bug? An example of a bug(not an actual bug!) is the following:
You create a game that grants a player cash every second using block code, but it doesn’t do that. Instead it takes away 1 cash every second. The answer to this is very simple: change the block code from a minus to a plus. The thing is: some bugs can be huge and very difficult to find. There comes your problem solving skills and the community!


Quiz:

  1. What is block code?
  2. Why should you learn block code?
  3. Why ask for help?
    Add your answers in the comments!


    How helpful was this?
  • Not at all!
  • Eh a bit
  • Ya it was ok
  • Not the best but good job!
  • Really good job!
  • AWESOME
  • The BEST
0 voters
13 Likes

Nice guide!

1 Like

This helped me out a TON! Thank you so much for posting this.

1 Like

WOW nice guide!

1 Like

nice guide might help peeps who annoy the game and cause it to crash by messing up some block code (coughs* totally didnt crash the game by doing this once)

Nice guide!

(you should continue this journey)

I absolutely love this guide! I am going to recommend this to my guides which use block code! BUMP

Thank you so much! PS: you don’t need to bump a new guide like this one.

PS: there is a spelling error typo at the top of lesson 3; havve?

Fixed typos.

This Journey of block code series of guides came from that idea. I just rather change some of the stuff, so I made my own guide series.

ah okay that makes sense

(I would like that post but im out of likes :frowning_face:)

2 Likes

Wait, what is the limit of likes for TL2?

bump this thing, block code good

pretty sure indentation is optional in a lot of coding languages, like javascript, which I’m pretty sure is the coding language used in preformatted text.