Download as pdf or txt
Download as pdf or txt
You are on page 1of 47

Computer

Programming
Simplified

Introduction to Computer Dialects, Introduction to The


Web and Internet, Basic Terminal Commands to know
WEEK 1, MODULE 1

Deebug Institute
Computer Dialects

INTRODUCTION
The field of computer science, is less about strictly programming and more
about problem solving. As opposed to an end in itself, CS(with programming
as the focus here) is a tool we can use to do more powerful and interesting
things in any other field.
Be it Robotics, Medicine, Banking Accounts, Transportation, Power Grids,
Government Secrets, Home Security, Weapons, Vehicles e.t.c
AIM

To demystify computer programming concepts while simplifying


them and relating these concepts with real world scenarios. We
will also look at the real world applications of these concepts as
well
BLACK BOX

We could describe this blackbox as an algorithm, a series of


steps to solve a problem
we need some standard ways to represent our inputs and
outputs.
Computers use the binary system, with two digits, 0 and 1, as
opposed to humans, who typically use the decimal system, with
10 digits.
COMPUTERS AND BINARY
It turns out that computers can conveniently represent a 0 or 1 with electricity, since
something can either be turned on or off. And computers have lots of transistors,
microscopic switches inside, that can be turned on and off to represent data.
ASCII

American Standard Code for Information Interchange


Now that we can store numbers, we need to represent words, or
letters. Luckily, there is a standard mapping from numbers to
letters, called ASCII.
USING ASCII TO DISPLAY TEXT
A series of bits, that represent the numbers 72 73 33 might be the characters
H I ! in ASCII, but could also be interpreted by graphics programs as a color.

https://www.w3schools.com/colors/colors_rgb.asp
MORE ASCII...

RGB, for example, is a system where a color is represented by


the amount of red, green, and blue light it is composed of. By
mixing the above amounts of red, green, and blue, we get a color
like a murky yellow. A picture on a screen, then, can be
represented by lots and lots of these pixels, or single squares of
color.
ABSTRACTION
In computer science, a common theme is abstraction, where we start by
taking ideas to solve simple problems, and layering these solutions until we
can build more and more interesting applications.
ALGORITHMS

Now that we know how to represent inputs and outputs, we can


work on algorithms, which is just step-by-step instructions on
how to solve a problem.
In fact, when we write algorithms to solve problems, we need to
think about cases when something unexpected happens. For
example, the input might not be within the range of what we
expect, so our computer might freeze or come up with an
incorrect solution.
COMPUTATIONAL THINKING
Computational thinking is the idea of having these precise instructions.
In computational thinking, you must work with very precise instructions to get
a particular job done or to solve a specific problem
ALGORITHM EXAMPLE

We can see this in action with trying to find a name in the phone
book, John Mote.
One correct algorithm might be flipping through the phone book,
page by page, until we find the person we are looking for.
EXAMPLE CONTD.
We can see this in action with trying to find a name in the phone book, John
Mote.
ALGORITHM 1

One correct algorithm might be flipping through the phone book,


page by page, until we find the person we are looking for.
ALGORITHM 2
Another algorithm could be flipping through two pages at a time, but it’s no
longer correct since we might skip our friend John. We can fix this by adding
another step, where if we notice we have passed our friend (since the phone
book is alphabetized), we go back a page and check.
ALGORITHM 3

We can also open the book to the middle, and find ourselves in
the J section (by last name), and know that John Mote is in the
right half of the book, and throw the left half away. We can repeat
this again and again, and eventually have one page left to look
at. With 1000 pages, it would only take about 10 steps of division
to reach that one page.
We can consider how fast each of these algorithms are, with a
chart like this:
GRAPH EXPLANATION
The size of the problem might be defined in this case as the number of
pages in the phone book, or n.
So our first algorithm, going page by page, requires n steps to
complete, since there are n pages.
The second algorithm, going two pages at a time, requires n/2 steps.
Our last algorithm is a different shape, with time to solve growing more
and more slowly as the size of the problem increases, since we are
dividing the problem in half with each step. So an increase from 1000 to
2000 pages only requires one more step to solve.
● 0 pick up phone book
● 1 open to middle of phone book
● 2 look at names
● 3 if Mote is among names
● 4 call John
● 5 else if Mote is earlier in book
● 6 open to middle of left half of book
● 7 go back to step 2
● 8 else if "Mote" is later in book
● 9 open to middle of right half of book
● 10 go back to step 2
● 11 else
● 12 quit
PSEUDOCODE
These steps are pseudocode, English-like syntax that is similar in precision to
code.

Pseudocode when written out should be simple enough for a lay person to
understand.

Words like pick up, open, and look are equivalent to functions in code, like
verbs or actions that allow us to do something.
PSEUDOCODE CONTD.

if, else if, and else are the keywords which represent forks in the
road, or decisions based on answers to certain questions. These
questions are called Boolean expressions, which have an answer
of either true or false. For example, Mote among names is a
question, as is Mote is earlier in book and Mote is later in book.
Finally go back creates loops, or series of steps that happen over
and over again, until we complete our algorithm.
THE WEB & THE INTERNET
● What is website development
● Why is web development important?
● Web Development Basics
● Building blocks of a website
What Is Website Development?
Website development refers to the work that goes into building a website. This could
apply to anything from creating a single plain-text webpage to developing a complex web
application or social network.

While web development typically refers to web markup and coding, it includes all related
development tasks, such as: Client-Side Scripting, Server-Side Scripting, Server and
Network Security Configuration, E-commerce development, and Content Management
System (CMS) development.
Why is web development important?
You might be a business owner hiring a freelance developer to build your website, a marketer
pitching a vision to your development team, or a student learning about development as a
career. Regardless of who you are or why you’re reading this guide, understanding the basics
of website development can be helpful in this technology-driven world.

The internet isn’t going away anytime soon. In fact, it’s become a portal and primary method of
research, connection, education, and entertainment in the world.
As of 2022, there were 5 billion global internet users. That’s more than half the world’s
population, and these folks are using the internet for a vast variety of reasons. What’s
the one thing those reasons have in common?

They require a website, and each website requires a skilled web developer.

Web development is also a rapidly expanding industry. Between now and 2028, the
employment of web developers is expected to grow by 13%. That’s much faster than
most other technology careers.
Web Development Basics
● What a Website Is
● What an IP Address Is
● What HTTP Means
● What Coding Is
● What Front-end Means
● What Back-end Means
● What a CMS Is
● What Cybersecurity Is
1. What a Website Is

Websites are files stored on servers, which are


computers that host (fancy term for “store files for”)
websites. These servers are connected to a giant
network called the internet … or the World Wide
Web (if we’re sticking with 90s terminology).
2. What an IP Address Is

An IP (Internet Protocol) address is a unique string


of numbers. Each device has an IP address to
distinguish itself from the billions of websites and
devices connected via the internet.
3. What HTTP Means

HyperText Transfer Protocol (HTTP) connects you and your website request to the
remote server that houses all website data. It’s a set of rules (a protocol) that defines
how messages should be sent over the internet. It allows you to jump between site
pages and websites.
4. What Coding Is
Coding refers to writing code for servers and applications using programming languages. They’re
called “languages” because they comprise vocabulary and grammatical rules for communicating
with computers. They also include special commands, abbreviations, and punctuation that can
only be read by devices and programs.
5. What Front-end Means

Front-end (or client-side) is the side of a website or software that you see and interact
with as an internet user. When website information is transferred from a server to a
browser, front-end coding languages allow the website to function without having to
continually “communicate” with the internet.
6. What Back-end Means
Back-end (or server-side) is the side that you don’t see when you use the internet. It’s the digital
infrastructure, and to non-developers, it looks like a bunch of numbers, letters, and symbols.
7. What a CMS Is

CMS is a software application that provides a user-friendly interface that enables


users (content authors, editors, and publishers) to easily create, modify, and organize
content, and publish it on a website or other digital platform.
Some popular examples of CMS platforms include WordPress, Drupal, and Joomla.

(Note: CMSs aren’t the same as site builders, like Squarespace or Wix.)
8. What Cybersecurity Is
As long as the internet exists, there will be users looking to find vulnerabilities in websites to
expose private information, steal data, and crash servers. Cybersecurity practice of securing data,
networks, and computers from these threats.

The methods used by hackers are constantly evolving, as are the security measures taken to
defend against them. Failing to understand how your site could be targeted could result in
disaster.
Building Blocks of A
Website
1. Write your website code
Developers will use different coding languages for the front-end and back-end of websites, as well
as for different functionalities of the site (such as design, interactivity, etc.) These different
languages work together to build and run your site.

Let’s start with the most commonly-used languages. Almost every website uses these three
together, and yours probably will, too.
● HTML
● CSS
● Javascript
2. Acquire a domain name

At this point, your website will have an IP address. It also needs a domain name, a
memorable website name that your visitors can use to find your site.

Perhaps you’ve heard of sites like GoDaddy and Hover. These services help you
purchase a domain name and register with ICANN (Internet Corporation for Assigned
Names and Numbers). Most domain registrations are good for a year before you’re
required to renew.
3. Launch your site

Once you’ve set up a domain name and linked it to your host, you’re almost ready to
unveil your work to the web.

But, not so fast — there are still a handful of things you’ll need to check before an
official launch. These include:
● Testing your site thoroughly for any glitches
● Optimizing for SEO
● A final check before “flipping the switch” and making your site live.
● Maintaining your website
BASIC CLI COMMANDS TO
KNOW
Basic CLI Commands
1. cd
2. dir
3. rm
4. mv
5. mkdir
6. rmdir
7. clear
8. exit
Week 1 Completed
Thank You

You might also like