Programming 101
- Description
- Curriculum
- FAQ
- Reviews
Most people do not know how their device’s process binary and work with data, from their washing machine to their smart phone. I found even some programmers don’t have the knowledge of such; I’m in fact guilty of this sin!
I missed out by learning a programming language first rather than trying to understand the computer on the hardware level. As programmers we are controlling the hardware and eventually even if you’re programming in Javascript you need to know about memory and how the language works. So understanding binary data, persistent and temporary memory, CPU, SPU, GPU, networking and more is crucial even if you’re a web developer this still applies to you.
This course will be a broad foundation of knowledge giving understanding of certain topics that need to be covered; giving you a solid foundation to grow from. I don’t believe in understanding a programming language first is the correct way to go about things. Programming languages have evolved as a tool for us. NOT the computer! So if we understand the computer’s hardware we’ll understand clearly how our program’s are controlling our device’s.
Computers are tools that we created to benefit man kind, however as all tools we need to improve them more and more. However the core principle of computers from the very first computer ever invented hasn’t changed. Over time the tool or computer has been refined. However the very core process and simplicity in underlying principles has been the same from the foundation of computing which is, processing ones and noughts. Computers have gone from processing 8 to 64 bits at any one time. This is just the computer being able to process more bits and thus more powerful operations can be done at a single time.
Don’t get me wrong computers are far more advanced, but the concept is all I’m saying is simple enough that even a beginner can learn what most people consider advanced and above their pay grade.
Likewise understanding networking is of vital importance especially for the web developers of today. More apps are going online so understanding network infrastructure, that has been around for over a decade, is still important today.
What about programming languages? We invented them as tools to communicate with these raw processing machines. We must understand why we have programming languages and how they work. For example what’re compilers or transpilers? How have we taken our form of communication, human languages, and turned it into an effective communication to manipulate the computer, programming languages? What about variables, constants, functions, objects and arrays that are in all major programming languages today? Also all languages have operators and if you didn’t have them in a programming language you wouldn’t actually have a programming language at all.
In this course we’ll cover even more, what about programming paradigms. Paradigm just means a model on how to do something. So in this case we can write our program’s in a certain way or in a certain paradigm. Very few beginners consider the style with which they program. When creating small scale apps it isn’t that difficult, however when creating large scale apps, paradigms become imperative.
Most programming languages give you the flexibility to mix and match programming paradigms or styles for writing your app’s. You have a few major styles to choose from such as assembly, procedural and object oriented. Do note in a single app you can mix these paradigms usually procedural and object oriented to best suite that part of your large scale app. I’ll show you the styles of these paradigms and then apply procedural and OOP (object oriented paradigm/programming) to demonstrate how the human mind works with differing paradigms; proving that multiple paradigms are the way forward.
Finally at the end of learning such a broad range of topics in a clear and concise course; you’ll also be learning about the licensing which should be covered especially for new comers. Then learning about software morality such as DRM, software patents and many other aspects of how the government is dealing with your data.
After all this, if you’re still not satisfied you can have your 100% money back guarantee if the course actually cost anything. So this last bit is really the bit that sells it, what have you got to loose?
-
2What is base 2?
How do bits work? Why do we humans have base ten, and for that matter what is base ten? Also why do computers work with base two? How are these base two numbers replicated in the hardware? This lecture will explain what is base two numbers and why the computer can only work with base two binary numbers.
-
3Understanding bits and bytes
Understanding bits and bytes is crucial to how your computer works and has evolved over time to increase processing power. It clearly shows what your computer is doing on a basic hardware level via a clear 8bit calculator example.
-
4Counting binaryTo find out how we convert a base 10 number like 125 to a binary base 2 number to [ 0 1 1 1 1 1 1 0 1 ] then we need to understand primary numbers, why they are so special and how bits actually represent primary numbers.
-
5Signed magnitude, signed or unsigned byte
We've already reviewed an unsigned bit system that only allows for unsigned bits. However a signed bit system is where we can make positive and negative numbers; whereas an unsigned bit system is only positive. It's impossible for you to create negative numbers in an unsigned bit system.
-
6How do computers process binary data
Computers only work with base two numbers or numbers that only consist of ones and zeros. So how does our computer take the base 2 numbers and display colors on the screen? Or sound out of our speaker’s? Or be used within a mathematical statement? This lecture will show how these base 2 numbers are used to produce all the essential media outputs that makes your computer a computer.
-
7Evolution of 8 16 32 and 64bit computing
How computers have evolved shows the simplicity of computers. Quite frankly the reason your computer is more powerful is because we’re processing more units or bits. This means our processing units whether they be CPU, GPU or SPU are now able to process more units or more ones and noughts; having a dramatic effect on the evolution of the computer.
For example an 8bit arcade game is only allowed a top score of zero to 255 because that’s the highest possible number in an 8bit system. Also the game can only have zero to 255 levels and once the maximum level and score has been reached the game cannot go any further. Also consider an 8bit GPU can only have 256 colors, and likewise an 8bit SPU can only produce 256 sound waves. That’s why the old arcade games sounded so flat but they still made a cool retro noise.
Then consider doubling the bits and going to 16bit, we now can have a score and level of 65535. We can now have 65536 colors on the GPU and 65536 sound waves on the SPU. So by adding 1 byte, 8bits, we have significantly increase the number range for the score, levels, colors and sound; improving and evolving the quality of our game.
Then imagine 32bit with near 3billion possible base 2 numbers and 64bit with around 64 quintillion base 2 numbers, you can see just how amazing this really is and how the computer evolves with arithmetic, sound and color.
-
8Sound and recording
Sound and recording is one of the most easiest mediums to work with in computing. This lecture will prove that sound is an easy concept and that what makes our computers sound so good or be able to record our voice is not complex to grasp. Also with a better bit system we can have better sound and recording quality.
-
9Firmware and BIOS
Without firmware you wouldn’t be able to boot up your computer. Firmware is hard coded software; it’s literally positive and negative charges in the silicon ( silicon is the stuff your computer chip's are made of ). Don’t forget the hardware only works with positive and negative charges or ones and noughts. When your computer first boots up it cannot understand a programming language, so without firmware or physical software that is... positive and negative charges your computer wouldn't be able to boot up.
BIOS is firmware but it’s a class of firmware. BIOS stands for Basic Input Output System. In order for any firmware to be classed as a BIOS all it needs to do is receive basic input and pass back basic output. We’ve all heard of the main BIOS chip that you can change the configuration of on startup. However please do note there’re lots of BIOS's found throughout your computer. The main BIOS chip holds the basic instruction set and all those positive and negative charges get stored in memory. You can think of this BIOS chip as a basic set of instructions for your computer to understand itself, if that chip goes wrong your motherboard will be a paper weight.
-
10Temporary and persistent memory
Temporary and persistent storage is crucial when programming. Your program will have many processes or functions that'll sit in temporary or volatile memory. Like us we don't need to remember every last process we've conducted throughout the day; such as making a cup of coffee or preparing a dinner for these processes will soon be forgotten.
However what if the user saves a file? We now have something much more important that our program should keep. This data requires persistent or nonvolatile memory to save the users data. This is like our long lasting memory where, like us, we need to go back and look at this data later on.
But that's all there is to it! Persistent and temporary memory are the only two types of storage out there. You can either have volatile slash temporary, or nonvolatile, persistent storage.
-
11Basic network structure
Understanding networks is important when you consider that behind every computer there's a human being and we're using computers as a tool of communication. Computers are just better than telephones with added media like videos, animated GIFs and all sorts of comments being made online. It's just so much better or worse depending on your circumstances. So how do networks really work?
-
12IPV4, IPV6 and packets
This lecture is all about understanding how the addressing system works for computers. Just like your homes have addresses, you also need an addressing system for your computer's. Hence IP which stands for internet protocol, protocol meaning a system and internet means a network of computers accessible globally via this protocol.
So with the IP system we can address a computer just like I can address your home or address you directly in a conversation by saying your name. The IP protocol assigns a unique number for the time your router is connected and then when your router is disconnected that number can be assigned to someone else's router.
Finally in this lecture we'll look at packets and how they're structured to communicate with computers all over the world using HTTP. HTTP is like the rules the post office, it defines the requirements for them to make a delivery and send back to the original sender upon request including the data within the packet.
-
13MAC Addresses
MAC stands for Media Access Control. This again is an addressing system and whenever we have an addressing system we have a targeting something; in this case we’re targeting network devices. These devices can either be an ethernet or wireless device and each one has a unique device address assigned to it.
MAC is a little different from IP addresses; MAC addresses are here so that a network admin can monitor which devices are on the network. IP addresses can vary and change when you disconnect and reconnect with a different IP address. But this is only unique for a time until that IP address is unallocated. A MAC address is a base two binary number hard coded into the the device itself. In other words this address or base 2 number is physical positive and negative charges that make a unique number for that device.
So now when the device has a hard coded number, I can keep track of that device and what it’s downloading on my network. This allows me to monitor the local network and note, private IP and Mac addresses are for the local network only. It’s only the public IP address that is broadcasted over the global internet.
-
14Servers and HTTP
Servers are basically computers that are connected to the internet 24/7 for as long as possible. With possibly a few days or hours down time, when they need to be maintained. After discovering this we'll take a look at how our server's receive data by a packet system; also we'll review how these packets are transported over the network using ISP's. Finally we'll understand how domain name communication works and why we need domain name registration.
-
15What is an operating system?
Understanding operating systems is a very important aspect for any programer. Without operating systems or OS’s for short, we wouldn’t have computer functionality as we have today; able to do so much compared to computers in the past.
This lecture I hope to cover the basics of what an OS is and how it works in a very general and broad way. Cover also the three main desktop OS’s at the moment of recording which is Windows, GNU/Linux and Mac OSX.
-
16API and the console
When understanding human beings we need to be able to communicate with them so that we understand what we have to do. Well with computers they’re no different. Your computer’s like humans can be addressed and communicate with one another through API’s or Application Programming Interfaces, more on that later.
It’s also imperative that we understand humans can think inside their mind’s and also externally to other people. So for example if someone asks John, 5 + 5 this is an external form of communication; one individual communicating with another. However John has now received this information and he thinks to himself what is 5 + 5; he is asking himself the question in his own mind, communicating with certain parts of his own mind to produce the answer. Then when John has finished processing the information in his internal API he then speaks and passes the information back to the individual that asked the question.
Likewise your computer is the same, it has external API’s and internal API’s. When another program communicates externally with another program this is an external API. However an internal API is when a program has it’s own set of functions and uses them to come up with the answer; just like when John thinks to himself. Then after that program has finished with its internal processes, it passes the answer back to the original program that asked the question.
API stands for Application Programming Interface, meaning we’re interfacing or communicating with other programs externally or the program is communicating with itself internally. Also external programs can likewise have external and internal API’s just like human beings can communicate externally with others and internally within themselves. Every program has the option of doing this. Understanding API’s is the bedrock of programming because without API’s we would simply not have operating systems or the complex applications we have today.
-
17Programming languages & execution
To get a broad view of programming languages is very important. How do they work? Can they easily be understood? The answer is yes!
1. Programming languages where created for us, the people and not the computer.
2. Your computer doesn’t understand programming languages, programming languages are tools for us.
3. In order for your computer to understand what you’ve coded we need compilers.
4. Compilers convert human readable code into machine code or binary data.
5. Every programming language has its own syntax.
6. Syntax is the way you write the program, think in terms of languages such as English has its own syntax, French another syntax and so on. Likewise each programming language has its own syntax.Additional side note:
1. A transpiler is a type of compiler.
2. Transpilers convert one human readable code into another human readable code.
3. This saves us having to learn multiple languages; for example HAXE can transpile into C++, C#, Java, Javascript, PHP and more.
4. By transpiling your code you can target as many platforms as possible.You can see that transpilation opens the door for more possibilities, allowing us to target multiple platforms without having to write code for each platform. Also compilation is all about taking human readable code and bringing it way down low to binary data so your computer's hardware can understand it.
-
18Interpreters, compilers & JIT compilation
This lecture will cover all you need to know about interpretation, compilation and a mixture of the two.
-
19Programming, scripting & markup languages
It's important to understand the difference between the types of languages you can use. Every language can fit into one of the following categories, it'll either be a programming, scripting or markup language.
By knowing the language type you can learn very quickly what that language was designed to do. Also when it comes to programming and scripting languages they're very similar in nature but have distinct differences in the way they're compiled.
-
20Client vs server side languages
When understanding computer languages we need to understand where they're compiled to find out if a programming language is server side or client side.
For example if you download a webpage that consists of HTML, CSS and Javascript those files are downloaded to the clients web browser or your computer. Then once the files have been downloaded they're compiled on the client side or your computer.
Server side languages are compiled on the server. A server is just a computer and can compile and run programs just like your computer can. So for example I have a PHP file which PHP is a server side programming language and I connect to the database with a username and password. I need to make sure the username and password to my database stay secure otherwise anyone can connect to my database. So this syntax or script is compiled on the server, run on the server and only provides the output or the data I fetched from the database. This data is then given back to the user. At no point did the user, or client side, receive any syntax or script they only received the output. Protecting the username and password of my database.
-
21Higher & lower level programming languages
What is the difference between higher and lower level languages? Well in this lecture I'll demonstrate that higher level languages are higher to us but lower level languages are closer to the hardware.
-
22Primitive data, nouns, adjectives & verbs
To understand programming languages we must first understand primitive data. Primitive just means basic like a cave man is a primitive human being. So when we talk about primitive data we're really talking about basic forms of data. It's data in the most simplest form. Primitive data could either be a string, integer, float or boolean. A string like this one can consist of regular or special characters and numbers; they're either wrapped in ‘single’ or “double” quotes. Integers are whole numbers, they cannot have a decimal place such as 100, 200 or 300, these are all whole numbers. However there is another number primitive type called float; floating point numbers can have a decimal place and fractional numbers. For example if we work with currency such as one pound fifty we are using the decimal number 1.5 so floats are good for currency, weights and such like. If we didn’t have primitive data then it’d be impossible for us to create any form of program, you need the basics and then you can evolve from there.
Next, to really understand programming languages we need to understand languages themselves. We have a system of communication whether it’s French, English or Japanese it has nouns, adjectives and verbs. Likewise we use a similar system by analogy for programming languages; don’t forget programming languages where created for us programmers to communicate with the computer; just like we created languages to communicate with each other.
Nouns allow us to describe objects coupled with adjectives to describe the nouns. For example 'the color of the car is red'. ‘Color’ is the noun but on its own it isn’t enough, we need the adjective ‘red’ which describes the noun 'color'. Finally we have verbs. In programming verbs are functions or actions. Functions allow us to describe and map out a verb and perform that action within our program.
-
23Variables and constants
Can we work with data randomly floating around? The answer is no we can’t! We need a referencing system to reference data when needed.
Variables and constants are containers to contain and act like a storage system for data. We reference data stored in these containers by giving them a name. Once labeled that container name can be referenced providing the data within the container.
Variables vary in value, hence the name variable. Constants are consistent, once set they cannot vary their value in anyway. If you try to change a constants’ value your program will error. In other words you can look but you can’t touch!
With different programming languages you have strictly and loosely typed languages. Strictly and loosely refer to how your variable’s can be set. Note constants can only be set once so strictly or loosely typed has nothing to do with constants, only variables.
In strictly typed programming languages variables can be strictly limited to certain datatypes. Meaning the value can vary but the data type cannot.
For example strictly typed languages state specifically a datatype that is allowed be assigned to that variable. Lets say I have a variable that can only accept the datatype of integer. This means the variable can have a different value, but not a different data type. So in this example I could have a different integer to be assigned to my variable. However assigning a string would error because we’ve strictly prohibited the variable to only accept integers, by trying to assign the different datatype of string our program will refuse.
However loosely typed languages will allow my variable’s to contain differing values and datatypes; so both can change. Now I can create a variable that contains an integer of 100. Then I’d like to assign the string “hello world”. This is allowed in a loosely typed language where the value has changed but also the datatype has changed to a string.
RECAP
1. Variables and constants are containers with names so we can reference data stored within them.
2. Variables vary in value.
3. Constants must be set and they're not allowed to be changed.
4. Loosely typed languages allow variableness of values and datatype.
5. Strictly typed languages allow for variableness of only the value but NOT the datatype. -
24Functions, parameters & arguments
Functions are verbs that allow our application's to run and perform certain tasks when invoked. Invoking or calling a function is a call to action to perform the list of command's that function has stored. All functions have an execution context's. An execution context is a list of instruction's that complete the action behind the verb.
Parameters are variables, they are empty containers that can be populated or given values when the function is invoked. This helps the process to adapt the verb to suit many situations; a lot like verbs in human languages.
Arguments are the values that are passed to the parameters; these arguments can effect the outcome or process of a function to suit the situation.
-
25Objects & arrays
Objects are literal, when you look around you can see objects and identify them; they're obvious for what they are. They contain key and value pairs, the keys could either be a noun or verb. For example a property consisting of a key and value pair would be...
{
color : "red"
}...The key or noun is color and the adjective or value is "red". This is called a property, properties help describe and define your object. However you can also provide verbs to perform on that object. The key is the verb and the value is a function, to complete the verb. For an example of a method or verb which consists of a key and value pair would be...
{
drive : function( ){ ... }
}... The key 'drive' is now a verb and to perform that action on the object we need the function to complete the verb. So the key is the verb and the value is the action behind the verb.
Identifying objects is also very important to programmers. To identify whether something should be an object in your program ask yourself, can it be owned? Just by asking if something can be owned will identify if it is in fact an object. This may seem obvious for example we make a program that catalogs furniture, we can easily see furniture can be owned. But sometimes the object is virtual, for example a bank account. Bank accounts can be owned however you can't physically touch the account however bank accounts can be owned.
Also consider objects can be exactly the same but in their own right they are unique. So for example take two iPads, exactly the same make and model. They physically are the same when they come off the production line; but they can go to two different owners. They can store different user data and app's; so in their own right they maybe physically the same but they are in fact unique.
Also you have arrays, arrays are objects but they're a different type of object. For example arrays are registers. They register data that you can iterate through. So when I count five one pound coins one by one I'm iterating over those pound coins. Likewise we may want to count or analyse data one by one. For example names on a register, well this is not a single object or person it is a register of all names with each name having an index so we can count through them like so...
[
0 : "Lawrence",
1: "Jeff",
2: "John",
3: "Stephanie",
]These are all names, one name has nothing to do with another, and nothing specifically to do with one specific object or person. But however the data can be collated together, because we're working with the same type of data. In this case peoples names. With each name having an index number from zero upwards we can see how arrays would be useful.
In summary...
1. objects have key and value pairs and so do arrays.
2. Keys in a standard object can be a noun or verb.
3. A key noun coupled with the adjective value is a property to describe the object.
4. A key verb and a function value is called a method to perform an action on that object.Arrays are objects however they contain key and value pairs for iteration. The keys are numbers starting from zero to give each piece of data an index so we can iterate or find it within our register. Each value is called an element when placed inside of an array.
-
26Object hierarchy
In the real world we'd have to build objects from other objects. For example you have a car, but a car encapsulates other objects, in essence we have a hierarchy of objects to make a car object. When you group... four wheel objects, an engine object, panel objects, dashboard, seats and so forth you end up with a car object. This is in-essence is an object hierarchy where multiple objects are grouped together to make another object.
Likewise your computer can consist of many objects. This could include the track pad, screen, keyboard and motherboard; also on the mother board there’s a CPU, SPU and GPU. So as with the real world of objects in our program’s can have objects inside of objects and keep going in that fashion to replicate the real world.
-
27Operators
Operators are imperative to programming languages. Removing operators from a programming language is like stripping A to Z from the english language. Seriously? Yes absolutely you need them, no language could function without operators. But what are they? Operators are functions within the compiler of that programming language. An example of an operator…
5 + 5;
… Here we’re using the plus operator which invokes a function within the compiler. The compiler holds the instructions to add whatever number is to the left and to the right of the the plus + operator. The numbers to the left and right are parameters passed into the compiled function which both are 5. Think of a function named with the plus symbol and you’re passing it to that function; in other words…
function +( a , b ){ return a + b; }
… Now evoke the + function…
+( 5 , 5 );
… Or in other words…
5 + 5;
… Operators are inline functions; meaning you just need to type the symbol instead of writing it out function like syntax making it read nicer. Essentially they're the A to Z of the english language, or that means to create statements or instructions to the compiler.
Just take a look at some of the operators here…
+ - / * % = -= += /= %= ( ) { } [ ] < > ? || && == === != !== > >= < <=
… take a look at any script and replace all the operators. What's left? Well nothing really, you have no way of running any decent set of instructions therefore removing operators would gut any programming language; from brackets to mathematical or string operators a language is hopeless without them
-
28Programming paradigms
Paradigms are simply a model, for example a pattern or way of doing something. Programming languages do have paradigms or models, the way in which we write our code. If we right our code in a different way, we're using a different paradigm. Likewise we could use paradigms to suit different situations, it's just the style in which we write our program's.
For example the assembly paradigm is where we create programs that are line upon line of instructions with no functional group of commands. This style of programming is still around today in modern computers; but is not widely used for large scale applications.
The procedural paradigm or functional programming is another way of writing our program's. You can think of this as a level up from assembly as we're breaking our command's down into sections and then only invoking them when needed. It's more modular than assembly and allows more flexibility in our code. Again this is just another way of writing our program's; or in other words another paradigm.
Finally we have OOP or object oriented programming. This paradigm or style of writing a program is dominated by objects. So for example, if we create a banking application we want to use OOP for the bank account structure as bank accounts are objects which can be owned. So to map this out in a program, we're better off using the OOP model or paradigm as it closely fits with what we're trying to code.
-
29Programmable paradigm mindset
Being in the programming mindset is very important for new programmers. I’ve wasted countless hours listening to experts talk about OOP verses procedural and how one is much better than the other. I found out both where right and you maybe wondering how that’s possible. Well it’s possible because sometimes procedural is better and sometimes OOP is better for the job and by combining both styles you can benefit.
To understand both paradigms and how they work in parallel, look at the way your mind works. For example firstly it's procedural; it’s functionally looking around the room thinking of what it's going to do next. This is procedural, it's not working with any objects specifically but it's analysing data which may or may not include objects. Now you've gone through the procedures of looking around the room and decided you want to watch the television.
Now we can work with objects so we shift from the procedural paradigm to the OOP paradigm. Now our mind is in the OOP paradigm for our television object; so we can work with this object easily. Then when we’ve turned the television on, we need to go back to procedural again by making a choice of what program to watch. So now we switch back into procedural mode to think logically about what we want to watch; we're in effect analysing channel data to find what we’re looking for.
You can see by mapping out our minds in the real world we can understand multi paradigm programming with procedural and OOP by observing the shift that occurs. This'll help when building large scale applications that require the ability to implore both of these paradigms to build apps extremely quickly.
When considering analysis could take hours, days, months or even longer it shows procedural is supposed to be harder. It’s slower and can be more difficult depending on the task. However when the analysis is finished we can now decide what object to work with. Our world consists purely of objects so whenever we do something in the real world we’re in the OOP paradigm; wether it’s a television, cooker, lawn mower or any other object type.
Consider also the OOP paradigm is simpler when working with object types. For example we can work with the television type object. It maybe your television or you're friends, however because we have general understanding this television type object, identifying its purpose, we can easily work with that object type. Yes they can differ and they're unique; but regardless the type of object has familiarity with us naturally so it's supposed to be easier in this paradigm when working with objects but not analysis which is procedural and is more difficult sometimes.
-
30The difference between OOP and object construction
Many programmers believe if a programming language has the class syntax it means that language is object oriented; and any other language that doesn't have the class syntax is not truly object oriented language. However the truth is that if the class syntax is missing from a programming language it doesn't mean that language is not object oriented; in fact it has no bearing whatsoever on the programming paradigm you choose.
For example if I made a banking app with five bank account object's manually, without classes, and my banking app accessed those objects; How is that not an object oriented program? My banking application literally orientates around bank account objects accesses and manipulating them. Simply put my program is orientating around bank account objects.
This is the point I'm trying to get at, object oriented programming doesn't need classes. Classes however are useful, they allow for construction of objects which is useful. For example how does our banking app create a new bank account objects when a new customer walks through the door? The simple answer is you need to create an object dynamically with a constructor like a class or in the case of Javascript a constructor function. When you instantiate the class you create an object with a basic set of properties and methods that are associated with the bank account object. Classes make creating object templates easy. However do note it’s just constructing the object; it doesn't mean if there weren't classes then it would be impossible for our program to be object oriented. That is simply not true! In order for there to be an object oriented paradigm all you need is just objects regardless of wether it contains classes or constructor functions.