Programming Languages Explained

You might hear someone call themselves a programmer, but what does that really mean?
It means that they know one or more programming languages. Now what is a programming language?
A programming language is the way a programmer can tell the computer what to do. There are many programming languages out there, but I will touch on the ones that I have used and liked for this post.
First off, we have C. C is one of the oldest languages (1972) that is still in heavy use today. Operating systems are written in it; most other languages are based on it. C is one of the highest performing languages as well, however it can be a pain to code in for beginners. Here is an example “Hello World” program.
/* Hello World program */


    printf("Hello World");

File:The C Programming Language logo.svg
Photo Credit:
What this program will do is, if run in a terminal/cmd, it will print out the text “Hello World”. Most of this is easy to understand, however things like manual memory management and pointers make C harder to work with for beginners.
A successor to C, C++ was created to add object orientation to C. It aims to keep the same performance, and since it is object oriented, many games are written in it. Object oriented means that you can write classes, which make it easier to have a lot of something appear on a screen.
// my first program in C++
#include <iostream>

int main()
  std::cout << "Hello World!";
File:C plus plus.svg
Photo Credit:

As you can see, the two languages are quite similar, and you can sometimes use C libraries in C++. Next up we have Golang, a language backed by google. Golang is quite fast, as it compiles into C code. Golang was created by google in order to reduce their server processing time by rewriting some of their application in Golang. It also has a nicer syntax than C or C++ for some people, so one could use it as a beginning language.

package main
import "fmt"
func main() { 
    fmt.Println("hello world") 
Photo Credit:
Still is pretty simple. Next up, we have the king of beginning languages, Python. Python is an interpreted language, which means that each line is read by the compiler as you run it, then each line is evaluated. This makes it a much, much slower language then all of the ones I have covered so far.
print("Hello, World!")
That’s it. Very, very simple and easy to read. My favorite out of all of these, however, would have to be C++. You can do almost anything in it, and it is high performance. It might have a bit of an ugly syntax, but it clicks for me in my head, and I love using it for simple stuff. However, if I was asked to write a GUI application, I would probably switch to a different language, like D. D was designed as the successor to C++, and it is also quite fast. It hasn’t really caught on in the rest of the world however, because no one wants to move away from C++ and rewrite everything.
import std.stdio;
void main()
    writeln("Hello, world without explicit compilations!");

As you can see, the syntax is close to C and C++, but quite easier to work with due to the lack of header files, which I can get into quite later.

That’s all for this post!

Spell Dev Log: 0.1.6


Welcome back to another Spell Dev Log. In this log, I will be discussing what the current state of Spell is, and why I have decided to change all of the gameplay. This is a pretty short one, since all of the changes can be described succinctly.

Photo from me

First off, a ridiculous amount of changes have happened since I last posted one of these. We have working multiplayer, and better graphics than before. We had an actually playable, not too bad game. However, after discussing it with some of my friends, we realized that the way the gameplay worked was kind of limiting.

We had a 2d platformer type of game, where you can shoot only in two directions and move in only two. This makes it somewhat easy to “camp” in a corner and spam long range spells. If done right, you could kill everyone on the map. For games such as Mario, it works because you are trying to solve a puzzle. However, for a game like Spell, where all you need to do is shoot and move, this becomes very boring.

After thinking about it for a while, we decided a top down tile based game would be better for the feeling we were trying to achieve. A top down game is more like Pokemon, and it adds on two new directions the player can travel and fire in: up and down. If you have ever played games like Realm of the Mad God,, or Binding of Issac, you know what I am talking about.

Photo from me

We decided to leave most of the controls the same, but to implement aiming with the mouse, so that the game would require more skill. Right now, you face the mouse, but the spell don’t actually fire in the right direction, rendering it useless. However, this will be fixed within a few days. Some of the math requires trig and basic calculus, so that is why we are looking for a better way to do things.

Another gameplay change is the way the controls are mapped. Since we are planning on using a mouse to aim, that means that one hand will always be on the mouse. This means that you have to move with your left hand and choose your combo with your left hand. While this could get a bit cramped, we can’t really think of a better way to do it. If you have any suggestions as to how we should go about implementing the controls, feel free to leave a comment!

One change that has happened to our Dev Team is that it has grown substantially. We now have two developers, two graphics artists, and one game designer. EpicMittMitt, Ajusa(me), AlphaBetaR, Dark_P1ant, and FunnyWabbit are part of our current team. The game master, Dark_P1ant, has already started to balance Spell and make it more fun to play. He has also been suggesting good ideas for us to implement. Other people that I bounce ideas off of are my friends at school. They have helped a bit in the brainstorming process.

Photo taken by me, from

What is coming in the near future? Right now, basic aiming and 4 base spells are our goal. By sometime in May we will probably have some spell combos implemented for you guys to test out. We will be designing a map so that you can move around and shoot people with spells strategically. Lastly, we will be adding a chat bar of sorts, so that you can run commands and talk with other players.

In short, Spell development has not halted. It is accelerating much faster than I had thought it would, and I hope it manages to become popular, like See you all in the next spell update!

Reusing an Old Laptop


Hello everyone! Today I will be talking about an operating system named Solus. Solus is based on Linux. When most people think of Linux, they immediately think of hackers and programmers. However, this is flawed. Linux can be used for many purposes, including a normal alternative to OSX or Windows. In fact, if you use a Chromebook, or even visit websites, you are most likely interacting with Linux, though you may not realize it.
So, why should one install Solus? Well, if you are like me, you probably have an old laptop. I have one from 2009. These laptops are usually pretty bad nowadays, and even selling it won’t get you that much money. Since electronics age quickly, you might think it is practically worthless. However, many of the issues you may be having with the laptop can be fixed by using a lightweight Linux Operating System. In this case, I chose to install Solus on my laptop.
My laptop is an Acer Extensa. It is 7 years old now, and it only has 2 GB of ram, along with a 2.0 GHz processor. In other words, my phone had better specs than it does. It takes about a minute to boot into Windows, crashes a lot, takes ages to open up a word processor or chrome, and tends to lag out when on YouTube. For this reason, it had been lying under my bed for a while.
I installed Solus on it about two weeks ago. Now it is actually usable, and faster at booting than my other laptop, which has an i3 processor with 6 GB of ram. Both laptops have a normal HDD, which is much slower than an SSD, but even then, the old laptop manages to perform quite well. I can watch YouTube, do homework, browse the internet, and play music. I can technically play Minecraft, but it runs at about 20 fps, which is borderline unplayable.
Here is some more info about Solus. First off, it is a 64-bit operating system. That means that some very old computers will not be able to run it. The OS is designed for desktops, however it runs just fine on laptops. Some wifi cards are not supported, but I recommend you try it out before assuming it will not work. The minimum specs on their website is 1 GB of ram, which most older laptops will have. They recently released a new version, 1.1, which has many updated packages. Here is a link to their website if you want more info.
Now on to the exciting part. Benchmarks. Boot time is quite fast for an older laptop. I have attached a video at the bottom of this post showcasing the laptop booting, but the actual time was about 20 seconds on my stopwatch.
That’s it for this post. If you think this is useful for reducing e-waste, tell me in the comments so I can write more posts like it. Robotic Arm Part 4
post will be next!

Building a Robotic Arm for Cheap: Part 3

This post covers the base of the arm, and putting it together. I have built the base with my partner, along with a rudimentary claw. We are almost done, we just need to attach the two. It has been lots of fun, and I hope that we will do well in regionals for Science Olympiad.

So, to start off I will go over the parts. We ended up buying 4 servos: one for the base to rotate left and right, one for base up/down, on for up/down, and one for the claw opening and closing. We bought one servo driver board, and one Arduino. We were able to make the body out of duct tape, paint stirring sticks, and a some screws. It is surprisingly stable for the price of all of those items put together.

The total cost of the arm so far is pretty low. I’ll post some numbers once the competition is over.

TO build the base, you need a box of some sort. We went to hobby lobby and bought a generic wooden crate, but you can experiment with any box. Next, we drilled a hole in the top of the box, to allow the servo to rotate side to side. We have one servo under the box, for side to side, and one over, for up and down. Currently, the one on the top is unstable, but it is working.

If you were to build the arm, and put it on top of that base, you would notice that there isn’t anything to stop it fro tipping over. I recommend trying to use your power supply as you counter weight, but if it is too light, you can use 2 pound dumbbells like we did. They are heavy enough to cover the weight of the arm flailing around and stop the entire contraption from tipping over.

That is the base. Here is a quick photo of the arm itself, shaking hands. Pretty cool, eh?

Now, on to the code and technology. We are using Arduino code to drive the servos, but all of the values that change come from the computer. The computer is connected to joysticks. The joysticks are able to move the arm, and rather smoothly. There is some code to stop it from jerking around.

The data that is being sent is formatted like this:
You get the idea. For each one of those, we are sending forward, neutral, or backward. All of these are being sent over the Serial protocol, which is hooked up over USB.

The code to do all of this is located on the computer and written in Javascript. It is using a Javascript run-time called Nodejs, and I have mentioned Node before on this blog. The code check the joysticks, and spams the Arduino with the values every 20 milliseconds. This way, there is no easily identifiable delay between the two.

Finally, here is some video of the entire thing in action.

See you all next post! In part four, I’ll include how we did, what I learned, and what I would change.

Spell Dev Log: 0.1.1

Hello everyone! This post is about a game called Spell, which I am currently developing with some friends. The game is currently in Alpha 0.1.1, hence the title being a version number. Right now, the team consists of two developers, so the graphics are virtually non existent. All of the code is located on Github. This is NOT a tutorial on how to write a game, just a write up on how I made a game.


Here is a brief summary of the history of this project. The code is based on a game I wrote called Zdefense 2, which in turn is loosely based on ZDefense. ZDefense was a game I wrote in the summer of 2014, right before I had started high school. If anyone wants to play it, click here. As you can see, it seems like a final product, but the gameplay was really lacking. You couldn't move around. All you could do was spam one button, and your score was determined by your upgrades. That is why I wrote ZDefense 2. It, however, never really got off the ground. I felt limited with the original game getting in my way. I didn't want Zombies anymore.


Then, on Jul 26, 2015, Spell was created. The idea itself was based off of a google doc my friend and I had made back in 2012, with magic and the different elements. At the time, none of us had been developers, so it had been forgotten for the next three years. One day, I was going through my Google Drive, and I saw that document at the very bottom. I realized that I now knew how to develop games. I contacted my friend, he ended up writing the input code, while I worked on the multiplayer support for the game. The game server ran in my house, and development was going great. Then, I noticed that the game was running rather slowly. It would log out my laptop, and drive the CPU up to 100%. So, I decided to rewrite the game using a framework called Pixi.js. This JavaScript framework was created for speed, and used webgl. Unfortunately, school had started, so my friend and I had scant time to devote to the game.


Over winter break, we both met up, and got the webgl rendering working. That was about two weeks ago. Now, the game is under development, and will be released sometime before this summer. We are currently implementing a large amount of the game play. Adding things like levels, and skill points are our current focus. Want to know what technologies we used while making it? Keep reading.

Here are the stacks of technology we are using. First, we are using Javascript. Being a web game, we had to use JS. However, we had to decide between the plethora of rendering options. There was canvas, webgl, css, and a few others. We decided on WebGl, the fastest, after our canvas version started to lag heavily.


For the multiplayer, I originally used Golang, a language created by google. It is ridiculously fast. However, I noticed that the language wasn't as great as I had initially thought. I wasn't able to use many of the libraries I was depending on. So, I switched to Node.js. Node.js takes Javascript code, and lets you run in on a server, instead of a browser. You lose a little bit of speed, but the language is a lot easier to work with. The multiplayer is now written in Node.js.


Finally, we are using a few different libraries. Riot.js, for rendering out html, Martmotta, for executing ajax calls, and Pixi.js, for the rendering of the game. These libraries greatly simplify game development, as you can focus on coding the game instead of spending large amounts of time on drawing a box. We have already written roughly 800 lines of code, and that number is going up.

That is all for this post. I will be posting more updates as more and more of the game gets done. Within a month or so, the game will be released for official alpha testing. Keep an eye out for that post if you want to see it in action.

Building a Robotic Arm for Cheap: Part 2

As I had said in the first part, this post will be covering the frame of the robotic arm, the power source, the code, and any other miscellaneous items. I have been working with my partner on it, and we almost have a prototype built. We will finish it over winter break. Remember, the best arm in the world is useless if the drivers haven’t practiced using it.


So, the frame. The “backbone” of the arm needs to be very sturdy and stiff. Some people try using PVC piping, the piping used to carry water through a house, however that is a bad idea for several reasons. Number one, is that PVC piping is hard to attach flat things to. Since the servos are flat, attaching them to a rounded object is hard and less secure. Secondly, PVC is relatively heavy, compared to the alternatives. The material that I recommend is aluminium.

Aluminium is lightweight, flat, and best of all, cheap. The amount of aluminium that I need for my arm is about $10 from Home Depot. It is much stronger than PVC, and metals do not bend easily. You may be thinking, “Isn’t aluminium hard to cut and shape?”. The truth is, yes, but you can do it with a simple hacksaw. Cutting it isn’t very difficult, as aluminium is one of the softer metals. All you need are some screws, a drill, and you can mount the servos to it with ease.

Next, we need a power source. As you can imagine, it will be rather beefy and need enough power to run a micro-processor and several servos lifting each other. If you buy a shield, then the shield will tell you how many volts it requires. After you know that, search on a site like HobbyKing for that volt of a battery. Next click on a link that has the most amount of mA, or milliamps. More mA means you can run your arm longer.

One really important thing that you need is the claw. The claw that I am using is from an old toy, and it is shaped like a bowl, but can open and close easily. For anyone else perusing this project, I recommend that you buy something prebuilt from ebay, such as this arm.
Make sure to wrap the arm in some sort of rubbery material so that it has a good grip. I plan on using electrical tape, with the sticky side facing in.

Another thing to consider is the base of the robot. The base will have to have some sort of weight, to stop it from tipping, but it will also need to have the Arduino and the power source housed within. One nifty idea one can use is to simply use the power source as your weight. Most of them should be heavy enough to support the weight of the arm. As for the material, something like a wooden box should be fine, because the weight inside will stop it from tipping over. The wooden box will also be easy to mount things to, such as the power source and the servo to move the entire arm side to side.

In short, building a robotic arm can seem outrageous on paper, but if you spend some time understanding the concepts behind it, you can quickly develop a plan to build one. Part 3 will be coming soon!

HTML Tutorial: Getting Started

HTML. Hyper-Text Markup Language. The programming language that changed the web as we know it. Every since the early days of the internet, this programming language has been used on all web pages, and it is what all web browser use to display web pages. But that is just an overview. How do you actually start using it to create websites? Simple.

Start by downloading a text editor, such as Brackets. This is a common, cross-platform text editor designed to build websites. After you finish downloading the installer for your computer, open it up. You will be presented with an interface like this:


The interface is much simpler than most other code editors out there. You may be looking at the text in the middle and being confused, but the rest of the interface is simple enough for most people to figure out. The lightning bolt figure at the right of the screen is what you use to display the page that you code. If you click on it now, you will see that the text in the middle is now being displayed in a webpage, inside your selected browser, or in most people’s case, Google Chrome.

You have just displayed your first web page. Now let us code a really basic one. Create a new file within Brackets by hitting the New button under the File menu. Now copy this code, I will explain it step by step.



First thing that you may see is the greater than and less than symbols everywhere. Don’t worry, they are quite simple to understand. When a computer looks at the code, it needs something to know where the content is located within the text. So, it scans for certain symbols, such as <, or >, and gives them importance based on the text between them.

The < and > define tags. Here is an example of a tag: <p>Some Info</p>
The <sometag> part defined the “opening” of a tag. The one with a slash in it defines the end of the tag, </sometag>. The info in between the < and > tell what to do with the information in between the <> and the </>.

So, the first line. <html> means that this document is an HTML document, and that the browser should process it as such. The second line defines the <head> of an HTML document. The head is like the extra information that doesn’t get displayed on the page. Many extra things, such as font styles and website styles go in the head.

Next we have the <title> tag. This sets the tab name to the text in between the opening and closing tag. In this case, the tab name in the upper left area will be set to Document. As you can see, we then close the tag, because the entire document is not a title, only that area is. It is still part of the head, which is still part of the html.

Now we have the <body>. This is the most important tag, because this is where all of the information will go. All of the content is here! So, we can simply type in text to that area, and it will show up in the web page. Try it now. Type in something to that area, then hit the lightning button on the right to see the result.


Pretty cool, eh! After that line of code, we end each of the tags that we opened up above, in this case the html tag and the body tag.

I will cover more in the next part of this series, which will be mostly video based. If you have any questions, ask me in the comments. Enjoy!

Technology Terms

Do you know the names of many of the things you interact with on a daily basis? Then why don’t people know how technology works, and what things make it up? Your phone, to your laptop, all use these pieces of technology in one cohesive device.

First off we have RAM. Your ram is like your short term memory. Every time you click on a program, it runs in your ram and takes up space there. RAM stands for Random Access Memory. It is measured in GB, or gigabytes. Ram is useful when you are running large programs.


Next up, we have your processor. Your processor, or CPU, executes instructions that are given to it by you. It is measured in GHz, or gigahertz. Gigahertz measures operations per second. It is what determines the speed of your computer, for the most part. Common CPU names include i7, i5, i3, A9, A6. The “i” processors are made by Intel, the “A” processors are made by AMD. CPU’s can also have several cores. Each core is like another “brain” for your computer. It allows it to multitask much better than with less cores.


What about your screen? If you look at a screen, you have many pixels, which are like little light bulbs. A common resolution is HD, or 1920 x 1080. If you multiply the two numbers together, then you get the number of pixels a screen has (which is 2073600). Your TV, your phone, and anything else with a screen has a resolution. A new resolution you may have heard about is 4k. 4k promises 4 times the resolution of HD, and it is an insane amount of pixels in a tiny area. Another term within screens is pixel density. All that tells you is the number of pixels per inch. Each one of these pixels has to be controlled by the computer if you want to use a monitor/screen. What controls it?


Another term you have probably heard is the graphics card. Everyone has that one friend who claims that they have the fastest graphics and the coolest games. All the graphics card does is control the pixels on your screen. It too has it’s own type of RAM, and has cores. However, the graphics card has many more cores than a CPU. The trade off of having many more cores is that each one has a very low gigahertz, such as 1Ghz per core. The reason it has many cores is because it has to run millions of pixels and determine which ones are on. The RAM of a graphics card holds the color values for each pixel. So, the more pixels or higher resolution your screen has, the more RAM you need to hold all of those values.


You have probably heard of Windows, OSX, Android, and IOS. So what do all of these share in common? They are all operating systems! An operating system is a very large program that controls your entire computer. The operating system dictates how you use your computer, and it is the one of the first things your computer runs when it turns on. It is why you can’t usually run apps from your phone on your computer.


There are a few programming languages you have probably heard about, such as HTML, CSS and Java. Where are they used? HTML and CSS are languages of the web. This means that they are used in nearly all web pages, such as Google, and this blog. This is why if you look at the address bar, it will usually end in “.html”. CSS is the language for styling your websites. HTML usually holds all of the content, like this post, and CSS is the one which tells the post how large to be, where to be, and the color. I will be making a HTML tutorial soon!


That’s all for this post. I hope you learned something and have walked away with a greater understanding of the technology around you.