NAV
Homework

Introduction

Are you a newcomer in programming and IT? Does it look complicated, painful and unclear? Is it a gray area for you? So, here it is. The course is designed especially for you. During the course, we're going to get through the essentials of the main areas of IT starting with computer hardware and finishing with data structures and algorithms. We'll help you to make your first steps to your path of the success and fortune!

The main goal to achieve is to prepare the students without experience in IT for the next courses and to give them a minimal amount of information which is necessary for a successful start in the bussiness area.

Computer hardware

Task 1

Provide the photos of your computer and add the description of it's hardware 
as much as possible (CPU, RAM, Storage and etc). 

The module itself mostly focused on the basics of computer hardware and it's components. A student is going to understand how it works under the hood and learn a bunch of new terms. The self-study materials are partitioned into groups by the level of complexity.

Self-study materials

Computer hardware notes

Information Technology (IT)

The use of digital technology, like computers and the Internet, to store and process data into useful information. Network Engineers, Hardware technicians, desktop support personnel.

Computer - a device that stores and processes data by performing calculations.

Evolution

Algorithm - a series of steps that solve specific problems.

Path to Modern Computing

Major Developments post World War II

Computer Architecture Layer

Abstraction. To take a relatively complex system and simplify it for our use. We have a mouse, keyboard to use and interact with the computer system without having to know and understand the underlying technical details (under the hood) or undelying implementation of the technology.

Computer Architecture Overview

Introduction to computer hardware

Program and Hardware

Programs - instructions that tell the computer what to do.

Inside the CPU there are components known as Registers. Registers - stores the data that our CPU works with. To add two numbers - one is stores in register A and the other in register B, and the result is stored in register C.

RAM is not the fastest way to get more data to the CPU, the CPU also uses cache. Cache - smaller than RAM but let's us store data often use / quickly reference. Cache - there are three different cache levels in a CPU : L1, L2, and L3. L1 - smallest and fastest cache;

How does the CPU know when the set of instructions ends, and when a new one begins? CPU - has an internal clock - that keeps the operation in sync, it connects to a clock wire.Overclocking - Increase the rate of CPU clock cycles in order to perform more tasks.

Hardware Components

CPU.

Common CPU/ chipset manufacturers - Intel (Intel Core i7), AMD (AMD Athlon), Qualcomm (Snapdragon 810), Apple (Apple A8). CPU has an instruction set that enables it to process instructions. When you select your CPU, you'll need to make sure it's compatible with your motherboard -- the circuit board that connects all the components together;

2 types of motherboard sockets - CPU and motherboard socket must match:

Require a Heat sink - to prevent the CPU from overheating. It takes the heat from the CPU and dissipates it through a fan/ another medium;

CPU architecture - based on the way CPU handles data.

RAM (RAM stick needs to be compatible with the motherboard)

Computer's Short Term Memory - store data that we want to access quickly, it is volatile. The computer is comprised of programs, to run a program we need to make a copy of it in the RAM so that the CPU can process it. RAM - 16GB - 16 Gb of programs can be run in that time.

Lots of RAMS, commonly found is - DRAM (Dynamic Random-Access Memory).

DRAM: When a 1 or 0 is sent to DRAM it stores eash bit in a microscopic capacitor. Based on the value 1 or 0 the capitor is charged or discharged. These semiconductors are put into a chip that are on the RAM and store the data.

SDRAM - Synchronous DRAM. This RAM is synchronized to the system's clock speed allowing quicker processing of data.

DDR SDRAM - Double Data Rate SDRAM. DDR1, DDR2, DDR3, DDR4. Faster, less power, larger capacity. Programs can run faster and more programs can be run simultaneously;

Motherboards

Foundation that holds the computer together. Expands computer functionality by adding expansion cards. Routes power from supply. Enables different parts of the computer to communicate with each other (manages data between CPU, RAM and peripherals);

Chipset - decides how components communicate with each other in the machine. Chipset is made of 2 chips.

Pheripherals - external devices we connect to our computer- mouse, keyboard, monitor, etc. Expansion Slots - provide the ability to increase the functionality of the computer. Standard for expansion slots - PCI Express - Pheripheral Component Interconnect Express

Form factor. Different mother board sizes available, decide the amount that can be put into them. Common form factor - ATX (Advanced Technology eXtended) - diffeerent sizes. ITX - Information Technology eXtended;

Storage

Data size:

Hard Drive - allows to store programs files. Two basic types of hard drives used:

Power supplies

Computers - convert electricity from volts to useable. Consists of fan, voltage information, cables -> motherboard, power cable.

Peripherals

USB - Universal Serial Bus - popular connections for gadgets; USB 2.0,3.0, and 3.1. USB 2.0 - Transfer spead - 480 Mb/s (megabit per second) and not megabytes. USB 3.0 - Transfer speed of 5 Gb/s. USB 3.1 - Transfer speed of 10 Gb/s. Backward compatible, olderr ones are compatible with newer ports.

Type-C Connector - new and common - outputs audio, video, data and power.

Display peripherals - monitors have them:

Essentials of Networking and the Internet

Task 2

Prepare a presentation or a schema about Web and the Internet. 

It should include the answers to the questions below:

What's the Internet?
How does it work?
What's a protocol?
What protocols are vital for the Internet?
What's a server and a client?

Using the command-line interface
and ping utility just Google website (google.com).

Using the command-line interface and traceroute utility,
gather the information about the way to the Google website (google.com). 

Using the command-line interface and nslookup utility 
provide the IP address of the Google website (google.com).

The module itself mostly focused on the essentials of the Internet and WWW. A student is going to understand how it works under the hood and learn a bunch of new terms.

Self-study materials

Additional materials

Essentials of Networking and the Internet notes

Networking

Internet - The physical connection of the computers and wires around the world; Web - Information on the internet. Ways to access the internet - Web, Email, Chat, File-sharing programs;

The Internet is composed of a massive network of satellites, cellular networks, and physical cables buried beneath the ground; Computers called servers connect to the internet directly and not all pc, desktops; Servers - store the websites we use - wikipedia, google, etc. These websites serve the content requested by the client (mobile phines, laptops, etc). Internet (Satellites/Cellular networks/cables) -> Server -> Websites (Google, wikipedia) -> Client (phone, desktop);

Clients don't connect directly to the internet, but connect to a network run by the ISP (Internet Service Provider) like - Beltelecom (Minsk), and etc;

ISPs have built networks and run all the necessary physical cabling that connects millions of computers together in one network. They also connect to other networks and ISPs; The other network connect to google, universities, etc. Together form the Internet;

Computers on a network have an identifier called an IP address which is composed of digits and dots. To access websites like - www.coursera.org - go to the IP address. Devices that can connect to the network have another unique identifier MAC address permanemt ad hardcoded onto a device. Eg: - 82:4f:23:59:47:4. When data is sent or received on a network both IP and MAC address must be available. Data sent through a network is sent in packets (bits of binary data);

Networking Hardware

The ways to connect to the Internet:

Router - connects lots of different devices together and helps route the network traffic. Router utilizes network protocols to determine where to send the data packet; Switches and hubs are devices that help the data travel;

Network Stack - a set of hardware or software that provides the infrastructure for a computer;

The Language of the Internet

Network protocols - Set of rules in order to route data through a network. Route efficiently, aren't corrupted, secure, destination, names appropriately;

TCP (Transmission Control Protocol) and the IP (Interpet Protocol) - TCP/IP:

Web

Many ways to access the internat - web, mail, chat, file sharing, etc;

All websites can be access through the Web. Websites are text documents that are formatted with HTML - hypertext markup language - coding language used by web browsers. Web pages - made of very basic components, multimedia content.

To navigate into a website you type a url - www.google.com. URL - Uniform Resource Locator - is a web address.

Domain Name - can be registered to ICANN (Internet Corporation for Assigned Names and Numbers). Domain Endings

172.217.6.46 - maps to google homepage through a protocal called DNS (Domain Name System). DNS - acts like the Internet's directory and uses human readable words to map to an IP address.

Limitations

NAT - Network Address Translation - Lets organizations use one public IP address and many private IP addresses within the network The router may need to be configured with NAT to facilitate communication between the company's network and the outside world.

Programming basics

Task 3

Hello, my dear friend. If you're here you did an awesome job! 
You've spent plenty of time learning the basics of computers and programming, 
thus I hope you can handle the next task as well easily.

Please, recall the flowchart term and have a look at the "draw.io" service. 
Afterwards, please prepare the flowcharts for the algorithms listed below:

Imagine that you are really-really hungry and you have several eggs in the fridge, 
so draw the flowchart of cooking fried eggs.

The first one was simple and clear, that's why let's change the dish to the hard-boiled eggs. 
Do not forget about the cooking time (use conditions). 

The module itself mostly focused on the basics of programming languages, understand the main terms and get acquainted with pseudocode, flowcharts, basics of programming languages and conditions, realize their first algorithm.

Self-study materials

Programming basics notes

What is programming?

Before we can introduce you to some key concepts, we need to make sure we understand what programming really is.

A computer is a hardware machine that can store and process information. The language of a computer is Binary, a complex set of ones and zeroes. Programming is essentially the larger-scale process of developing a complex machine program that acts according to our wishes. Programming is the basic communication between human input and machine output. It is the way that a computer knows how and when to process data.

So, what is coding, then?

Think of coding as a translator between English (or a different human language) and the computer’s binary. Coding involves the actual syntax and structure by which we write commands. A computer can then take those commands, translate it into binary, and do what is written. Coding involves writing commands in a language that a computer can understand. Coding is the initial step in communication with a computer.

What is hardware? What is software?

In order for a computer to work, it requires both hardware and software. Software is a collection of instructions and programs that are downloaded to a computer. These enable a user to interact with the computer. The apps on an iPad or Microsoft Word are examples of software. Hardware, on the other hand, is the physical device that stores, delivers, and executes that software. The physical iPad or monitor would be an example of hardware.

A hardware engineer is responsible for manufacturing and designing devices that interact with software. They will usually have a background in Electrical and Computer Engineering. A software engineer, on the other hand, develops and codes software programs for those devices. They will usually have a background in Software Engineering or Computer Science.

What is front-end? What is back-end?

Within the world of software development, there are two common camps that programmers fall into that utilize different tools, skills, and end-goals: front-end and back-end development.

Front-end development focuses on what the user will actually see on their screen. This involves the design, application debugging, and coding for user experience. This job is all about the feel, look, and design of a program or website.

Back-end development focuses on everything that makes the front-end possible. This job is all about how a site or application works, how quickly it functions, and how it communicates with databases (where data is stored). Many programmers are more generalists on both sides. They are called full-stack developers. What do I need to learn to be a programmer?

Now that you have your bearings on the world of programming, let’s discuss what you will actually need to learn to become a programmer. We will start with the fundamentals of programming on the whole.

In this section, we will discuss the following need-to-know concepts to become a programmer:

Programming languages Coding syntax, vocabulary, and lingo Data structures and algorithms

Programming languages

As we discussed earlier, a programmer writes code that a computer can understand and translate into binary. Just as we use different human languages to communicate, we also use programming languages to communicate with a computer. A programming language is a formal set of notations and rules that function similarly to a human language. They generate instructions and implement algorithms based on the predetermined rules of that language. A computer can then produce an output from that text.

Let’s introduce some of the most important programming languages that you should be aware of as a beginner.

The need-to-know programming languages There are tons of programming languages, and they each serve different purposes, styles, and specializations. Many programming languages build off of previous ones, and some are developed for particular careers. For example, some languages are better for game development, while others are used for complex robotics.

In order to get you started, let’s get familiar with the ten most popular programming languages out there. Keep in mind that there are many more, and these lists are notoriously subjective!

If you want to get started with any of these languages from scratch, check out Educative’ free beginner’s courses on a variety of programming languages.

Imperative vs. Declarative Paradigms

As we mentioned, programming languages have different styles. In fact, every programming language operates according to a paradigm. A paradigm is basically the way that a computer will logically approach a problem. It is the style of that language. There are many different paradigms out there, and they all fall under two branches: imperative and declarative.

For imperative programming, you tell the compiler what you want to happen to your code. You give it all the steps, and it “listens” to your imperative commands. You give the instructions, not the desired outcome.

For declarative programming, you will write code that describes what you want to happen, but you don’t explain how to get that result. You give the outcome you want, not the instructions to get there.

As a beginner, there are really only two paradigms that you need to know about: Object-Oriented and Functional.

Object-Oriented programming is an imperative paradigm that largely dominates the field. In this paradigm, everything is treated like an object, a thing you can interact with or alter.

Functional programming is a declarative paradigm that thinks about data through sets of tasks, which we call functions.

Compiled vs. Interpreted Languages

A programming language isn’t the only tool necessary for communicating with a computer. After all, the computer “thinks” in binary. Compilers and interpreters take human-readable code and translate it to computer-readable code. A compiled language means that the machine directly translates the program that you input. These tend to be faster and more efficient but require an extra “build” step. An interpreted language, however, requires another program to read and execute the code, sort of like a middle-man. These are generally more portable and require less effort to change the code later.

Basics of coding syntax

Now that you’re familiar with programming languages, let’s take a deeper look at how you write them. We will go over the key concepts and vocab terms to get you familiar with coding syntax.

Note: for these examples, we will be using Python for its readability, so keep in mind that other languages will look different!

Keywords

Just like any human language, a programming language has words with reserved meaning. That’s how any language conveys meaning! Keywords are reserved words that have pre-determined meanings and uses. Each programming language has its own set of keywords, though there is a lot of cross-over.

The keyword var, for example, defines a variable, and the keyword return runs that function and returns the result. Take a look below and try it out yourself once you understand how it works.

Note: In many languages, you can use the # to make notes. The compiler will ignore anything after the number sign.

Identifiers

Identifiers are similar to keywords, but these are the names that the programmer would create to label different entities in their program. We use these to differentiate one entity from another. To create an identifier, you must follow the syntactic rules as outlined by the programming language of your choice. For example, in Python, identifiers must follow these rules:

Identifiers can be a combination of lowercase letters, uppercase letters, digits (0-9), or an underscore Keywords cannot be used as identifiers Identifiers cannot include any special characters like !, @, &, $, %, etc. They cannot begin with a digit

Variables

Variables allow you to store information that can be accessed over and over again. These are similar to variables in algebra. But in programming, we name our variables according to the syntax of that language. Naming a variable is called declaring a variable. These are useful for any data or value that you want to use more than once. Take a look below and test it out for yourself.

name = "Amanda" # declaring the name age = 23 # declaring the age

Data Types

As we have learned, programming is all about data processing, and each language has different kinds of data. Data types are like classifications that tell the compiler or interpreter how to use a piece of information. Let’s take a look at four commonly used data types to get a better sense of how they work.

Integers are numbers without decimals, just like in algebra. In fact, they can be used to do algebra in your programs. Integers can be stored in variables so we can use them over and over again.

123 number_of_bagels = 10 - 2 print(number_of_bagels)

Boolean is basically a yes or no response. They will return either True or False. These can serve tons of different purposes, like comparing the equality of two numbers or variables.

123 print(10 > 20) # False print (10 > 5) # True

Strings are commonly pieces of text in programming languages, such as our Hello World! statement They are written with quotation marks.

print ("Let's learn programming!")

Operators

Operators are symbols that perform mathematical functions to your data. There are different categories of operators. The most important operators for you at this stage are the following:

Arithmetic (for simple arithmetic)

Assignment (to assign value)

Relational (for comparison, returning boolean values)

Logical (to return boolean from a boolean input)

a + b = 30 c = a + b 40 > 30 abc == abc (2 < 3) and (2 < 5)

Conditionals

Conditionals allow us to perform certain actions depending on a condition. We use booleans to determine if data meets certain requirements, and then define what the program should do if that requirement is or is not met. In other words, we want to tell the computer, “if this thing is true, do this other thing”.

Programming basics II

Task 4

And here you are. Let's start the next challenge. 

What you have to do is the following:

Imagine that you were snowed under at your job and forgot to wash dishes. 
Now you have to do that immediately because your mom is coming. 
Create a flowchart of the algorithm and take into account the amount of the dishes (10).

Your friend asked you to go to grocery shopping and gave you a list. 
Create a flowchart of the algorithm (use given arrays of goods).

And the last one, you need to prepare the list of favourite films of your friend. 
Create a flowchart of the algorithm (use array).

Good luck!

The module opens the door to the next key topics of the programming such as variables, data types, loops and arrays. And of course, there will be intro to the functions.

Self-study materials

Programming basics II notes

Arrays

A list is a sequence of several variables, grouped together under a single name. Instead of writing a program with many variables x0, x1, x2, … you can define a single variable x and access its members x[0], x[1], x[2], etc. More importantly, you can put other expressions and variables inside the square brackets, like x[i] and x[i+1]. This allows us to deal with arbitrarily large data sets using just a single small piece of code.

One way to create an array is by enclosing several values, separated with commas, between square brackets:

myList = ["the first value in the list", 1999, 4.5]

This creates a list called myList of length 3. Each element of the list gets a number called its index: the initial element has index 0, the next element has index 1, and so forth. The individual variables comprising the list have the names «listName»[«indexNumber»]

Loops

Loops are among the most basic and powerful of programming concepts. A loop in a computer program is an instruction that repeats until a specified condition is reached. In a loop structure, the loop asks a question. If the answer requires action, it is executed. The same question is asked again and again until no further action is required. Each time the question is asked is called an iteration.

A computer programmer who needs to use the same lines of code many times in a program can use a loop to save time.

Just about every programming language includes the concept of a loop. High-level programs accommodate several types of loops. C, C++, and C# are all high-level computer programs and have the capacity to use several types of loops.

Types of Loops

Loop Control Statements

A statement that alters the execution of a loop from its designated sequence is a loop control statement. C#, for example, provides two loop control statements.

Functions

In programming, a named section of a program that performs a specific task. In this sense, a function is a type of procedure or routine. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value.

Most programming languages come with a prewritten set of functions that are kept in a library. You can also write your own functions to perform specialized tasks.

The term function is also used synonymously with operation and command. For example, you execute the delete function to erase a word.

Javascript Basics

Task 5

Here you are. Your fabulous adventure is just started. 
From now and ever you'll use the programming languages instead of painting the logic.

Home task is the following:

Implement the tasks from Programming basics module on JS.

Using if..else, write the code which gets a number via prompt and then shows in alert:
1, if the value is greater than zero,
-1, if less than zero,
0, if equals zero.

In this task, we assume that the input is always a number.

Good luck!

Dear friend, it's the time to write some code! In this section, you'll able to write a couple lines of pure Javascript! That's what you wanted, didn't you? Let's get started then.

Self-study materials

Javascript Basics II

Task 6

You've proved yourself as a JS warrior! Let's do one more task.

So, first off, please, implement the algorithm you've written in Module 6 on Javascript.

The second part is way interesting than just rewriting your own solution:

Task 1:
Given an array arr consists of upper/lower-case alphabets and empty space characters ' ', 
return the length of the last word in the array.

If the array is empty, return 0.

Example:
Input: ["Hello", "World"] Output: 5

Task 2:
Given two arrays arr1 and arr2. Return array which consists of these two arrays.

Example:
Input: ["Hello"], ["World"] Output: ["Hello", "World"]

Task 3:
Given an array of numbers arr, please find the maximum value in the array.

Example:
Input: [1,2,3,4] Output: 4

Task 4:
Given an array of numbers, return the sum of all elements in the array.

Example:
Input: [1,2,3,4] Output: 10

Task 5:
Given an array of objects with property salary, return the average salary in the array.

Example:
Input: [{ salary: 10 }, { salary: 4 }] Output: 7

After the first part where you've realized your first algorithm, you should dig deeper and iterate through arrays using loops in Javascript!

Self-study materials

Code Editors and IDEs

Task 7

You've learned a bunch of new terms such as IDEs, DevTools and so on. 

So, the home task is the following:

1) Install the IDE and just play with it;
2) Publish your code on the codepen or jsbin;
3) Try to use console and network tab in the chrome dev tools.
4) Sign up on the github and pass though the course https://lab.github.com/githubtraining/introduction-to-github. 
5) Additionally, create repository and push your code from previous lessons to it. 

Hi, hero! You've already passed through the basics of programming. Congrats! The next part is to add a few tools to your programmer's toolbelt.

Self-study materials

Data structures and Algorithms

Task 8

Let's challenge your skills. 
Please, sing up the leetcode website and try to solve the brain teasers.

1) https://leetcode.com/problems/remove-duplicates-from-sorted-array/
2) https://leetcode.com/problems/merge-sorted-array/
3) https://leetcode.com/problems/intersection-of-two-arrays/

Welcome back! In this section, you're going to pass with flying colors "Data structure and Algorithms" basics. 

Self-study materials

What's next?

And you've nailed it! However, I don't wanna make you upset but it's just a beginning of your developer path. What should you learn next? Actually, it depends on what you'll choose. Please refer to the https://roadmap.sh website. There you can find the "algorithms" of self-improvement in different areas for the next few years.

Despite that, do not forget to try yourself in computer science, you're able to join for free to the courses below on coursera.org.

In addition to that, there is an option to study and get the bachelor or master degree online!

And let me give you several advices:

Useful sources