Friday, September 13, 2013

1. Languages and end results

Languages and end results

What’s the point of learning a computer language? This is usually to get a job or build something you are passionate about.

I started in computer languages with simple scripts called batch files. For most of you, this will sound foreign. For everyone else, you know a batch file is a file that “does a bunch of things on the computer, in order when you run it”. Funny thing is that all computer languages do this. The only difference is that more advances languages do it on more than one computer. But it is still the same basic concept: “doing a bunch of things, in order”.

As everyone knows, computers get faster every year. Therefore, the tasks can be run faster every year. So fast that you can automate or simulate things that human beings can’t do, especially that fast.

Computers are everywhere! You can now wear them on your wrist and on your eyes to add to everything else we use them for in work and life. And each new phone or tablet is much faster than anything we have seen before. This creates a need for talented, high-end software engineers in the workplace to keep up with the advancements in computers.

If you want a job or build something that has never been built before, it is in your grasp to learn high end programming and make your passion a reality.

As I stated earlier, I started with writing batch files. Then, I learned internet technologies called html and css. Eventually, I realized that I needed to learn something called “object oriented software in order to build applications like video games, high end security data software and animation production software. Then, I learned that I needed to learn something called MVC in order to organize complex applications.

It was a very long and exhausting journey. Eventually I create simplified explanations of each step which I will explain along the way.

Html vs Applications

The websites you visit every day are most likely built using some sort of html language.

The applications you download from iTunes, Google Play and get at your local Best Buy store or local software retail store, was not necessarily built using html.

HTML is the web standard for websites. But, there is no standard language for building applications.

If you want to build websites, use html or something that supports html. This blog will not cover html development.

Applications allow users to charge for content, protect code and take advantage of mobile hardware features on the device, like location, camera and microphone. Many of these features are also available in HTML. But, the tight integration with hardware along with the advancements in tools has made building cross platform applications easier and can retain more value to the end user than HTML sites, if done correctly.

Most applications use some HTML. Applications are much more difficult to build than an HMTL site, as I will teach you. Applications usually take 2 to 5 times longer to build than an HTML site. They are usually investments in time and money that most people and small companies do not want to take on because of the scale of it. 
I will simplify the entire process of building applications on many platforms.

Let’s get started

Let’s get right into it.

Learning a computer language is similar to learning a new spoken language. I speak English. So, I already know how complex the English language is. To translate that to another language sounds daunting. It seems like I need to learn thousands of words, rules, exceptions, etc. And, to learn multiple languages sounds like a lifetime of work.

The bad news is that computer languages are also very complex. Each one also has many “words, rules, exceptions”. WOW! That also sounds like a lifetime of work!

The good news, is that I can simplify the learning into four categories.
There are four major terms to remember about all languages.

1.    Location
2.    Variables
3.    Functions
4.    Objects

That’s it! Everything you learn falls into these four categories, no matter what language you learn. So, instead of thinking about languages as being thousands of stuff to learn. Think of it as putting everything you learn into four easy to understand categories.

How is this easier? Well, a car also has thousands of parts. But, thinking of them as major components (body, drive train, engine, and cooling system, electric) makes it easier to understand. It’s easy to understand that a broken electrical system it will not change the body of the car. In software, if you start by learning these four fundamental aspects it much easier to learn any high end language because every language you learn has the same for elements (like every car has a body, engine, etc.).

Location

In the real world, we call this the same thing, a place where you put things. In the computer, it is pretty obvious but sometimes overlooked. Your file remains at the same location until you move the data of the file or delete the file and clean the garbage. When you put down a note in the real word, you can physically see where you place it. But in the computer, every file has a location that might not be obvious human beings. In fact every file has a specific address (unique number on the computer) where the file is stored.

The computer has two major places to store data, the drive and the memory. All data is stored on the hard drive. When you turn on the computer, it loads the files it needs to run the computer into memory. The interface is displayed by the files that were loaded into memory. When you load an application, it is loaded from the hard drive into memory and takes up the same amount of space in memory as it did on the hard drive.

A location can also be called a path, address or namespace. A location can also be physical or related to another. For example you can put down the shirt on the bed (physical). Or you can put down the shirt next to the bed” (related to another). Location is very important!

Variables

If you do not like math, you might think “Oh no, a math term”. You do not need to know match to understand variables, as I will now demonstrate.

If you have an empty box, and label the box “kitchen stuff”. You now have an empty storage container to hold some stuff that you labeled “kitchen stuff”. What do you want to call that? Well how about an empty box? What happens if you have 20 boxes and each one is labeled differently? Now, what do you want to call one of the boxes? Well, you could call it “the empty box labeled kitchen stuff”. In the real world that all makes sense. But the computer is always doing this… creating an empty box to store stuff. The “box” could be on the hard drive, on in memory. The “box” is always labeled like “kitchen stuff” and as I said earlier, it has a physical location. Unlike the real world, the box can start very small and grow as you put things into it. That’s pretty cool! What do you want to call that? Well, let’s call it a variable! It makes sense, since its size and contents can change at any time!

Functions

Remember I told you that the computer fundamentally is a device that does a bunch of things, really fast. If I want to make a list of things for the computer to do, I would write it down somehow, right? If you went shopping you write down a single list. If you were to write down the instructions to build a battleship, it would be many, many lists and very complex. So, how do I simplify the lists of things to do? How about “boxing them up”, kind of like the definition of a variable above. But, with lists of things to do, instead of a bunch of files. OK, let’s box all actions into lists and call them Functions! Eventually, you will have hundreds or thousands of functions. But, just like the box of kitchen stuff, you don’t need to know the contents of a faction called login, you only have to know that it does a bunch of stuff to login.

A functions can be also called a method.

Objects

An object is a combination of functions and variables at a specific location. If you read the previous descriptions, that should make perfect sense. The term object is usually referred to something that was loaded into memory. I am simplifying the description to make it easier to understand. Objects are also referred to as classes. Since an object has a location, the object in your applications can have relationships between them including parent / child relationships which I will explain later.

PREVIOUS - NEXT


W69EM58PEFWX  

No comments:

Post a Comment