If coding languages were sandwiches …

CoffeeScript = open-faced jam sandwich

Where JavaScript is PB&J, CoffeeScript is an open-faced jam sandwich. CoffeeScript is JavaScript but without semicolons and curly brackets. It was made for JavaScript programmers who wanted to save time and code in shorthand.

Just as eating an open-faced sandwich is messier than eating a closed-faced sandwich, having no brackets can make it harder to understand nested code.

CSS = cucumber sandwich

CSS is all about appearance, just like cucumber sandwiches. Despite the cutting of crusts, cucumber sandwiches require minimal ingredients and are easy to make. Likewise, CSS is easy to learn. It’s one of the first languages most coders learn, alongside HTML and JavaScript.

Forget Cascading Style Sheets; CSS shall now stand for Cucumber-Style Sandwiches.

Java = open-faced smoked salmon with onions

Java is an open-faced smoked salmon with onions sandwich because Java is complicated. The sandwich uses a lot of ingredients, and Java uses a lot of memory. Java is evolving and continues to add more features, which is why I made the sandwich open-faced.

Though Java is complex, it can run anywhere. Likewise, you can use whip up this sandwich or something similar to it with whatever ingredients you have in your fridge.

C# = roasted mushroom and mozzarella with greens

Java and C# are similar. They are well optimized, as are the sandwiches for health. C# is like Java but with more features (Or, in the sandwich case, ingredients.) 

Python = grilled cheese sandwich

Python is a grilled cheese. Like a grilled cheese is simple to make, Python is intuitive to use.

Grilled cheese is versatile and easy adaptable. So is Python. Python is portable, meaning it can be used in different operating systems, like both PC and Mac. No wonder Python is used to make so many websites! (Youtube, Google, and DropBox, to name a few).

However, Python does take a longer time than other coding languages to work. Programs written in Python are slow because Python is an interpreted language rather than a compiled one. This is like a grilled cheese, which can take longer than other sandwiches to make because you have to, y’know, grill the cheese.

THE Habit of Highly Effective Coders

A good coder is good because they code.

“I never took a day off in my twenties,” says Bill Gates. “Not one.”

The number 1 way to get better at anything is to practice. It doesn’t matter if you do it wrong. As long as you do it.

Suppose you want to improve your typing speed. Typing fast and not worrying about making mistakes is the best way to improve your average speed over time. (Rather than being careful to spell everything correctly and take your time.)

At first, you’ll make tons of mistakes while typing at faster than your comfortable speed. But over time, you’ll make fewer mistakes. You have to push past your comfort level in order to raise it.

Making mistakes is the #1 way to learn.

Instead of copying and pasting, write code out yourself. Though it may be harder, understanding what you’re doing is how you truly learn. 

The tech field changes constantly. Technology innovates faster and faster day by day. The truth is, to be a developer, you have to keep learning. You can’t just get a degree in computer science and expect to use what you learned and nothing else for the rest of your life.

You have to be willing to continue to expand your skill set.

Lucky for you, that’s good for your brain. Your mind (and resume) will thank you for it.

New coding languages become the rage every year, and they’re all competing for the top spot. Just like you as a developer.

The greats didn’t become great overnight. Everyone was a beginner once. You can have some natural talent, sure, but you can’t expect to become great over that alone. Success takes work.

And don’t worry, there are tons of resources that make it easy for you to keep up with the newest releases and what’s in demand in the field. (Such as Mammoth Interactive’s courses).


Creating a C++ Script | Unreal Tutorial

Scripts are so important when it comes to making a game in Unreal. For an in-depth lesson on Unreal, consider enrolling in Mammoth Interactive’s Unreal course

If you want to add a player to your game, you need to write code to give the player its own behavior. Default modes contain logic from Unreal. To create a new mode with custom behavior, you need to write a script.

Go to C++ Classes > CoinCollector in the Content Browser. Right-click in the Content Browser. Select “New C++ Class”.

Select “Pawn” from the “Choose Parent Class” to extend a pawn. With the Pawn class, the mode to be able to receive input from the player. The player will be able to move the mode.

Press Next. Name the pawn “HeroController”. Our player to be a hero who collects coins. Press “Create Class”. Unreal will create the script. Note that it does take some time for Unreal to create or compile a script.

We will enable HeroController to move based on user input. When the code compiles, you can open Xcode to view the files of the script if you are on a Mac. If you do not own Xcode, you can download it from the App Store. Xcode is a free program that you can use to write code.

If you are using Windows, you can use Visual Studio to write your code. Visual Studio should already be on your computer.

The Files of a C++ Script

Two files will open with the script: HeroController.h and HeroController.cpp. These are two different files for a single class. .h files are header files. They are used to list variables and methods in a class.

.cpp files are implementation files. They are used to implement those methods and variables. HeroController.cpp contains the implementation of HeroController’s behavior.

We will begin coding in HeroController.h. Some default code is already in the file. class COINCOLLECTOR_API AHeroController : public creates the class. Then there are five public functions:

  • The ACoinController function is a constructor. ACoinController is called when the script loads (when the object is created).
  • BeginPlay is a function that is called when the game starts (after the constructor and internal processes complete). A function performs a method or operation. You can use functions to set the behavior of an object.
  • Tick is a function that is called every frame (every time the game is processed by your computer, smartphone, or console).
  • SetupPlayerInputComponent is a function that is called to configure the input. Whenever we want to make HeroController move left, right, top, or bottom, we need to register the input bindings in this function.

Note that typing // in front of a line turns the code into a comment, which is not read by the compiler. You can use comments to organize code.

To learn how to build 6 games in Unreal, enroll in our Unreal course.