hello world my name is richard and i'm an instructor here at treehouse the following video is a 20-minute workshop introducing you to the fundamentals of computer science i created this course as part of our learn to code for beginners track which introduces students to many of the essential skills and disciplines in the tech industry including design development engineering and more for a limited time you can enroll in the learning track for just five dollars that's eighty percent off eighty percent check out the link in the description to learn more and get your discount happy learning [Music] hello world my name is richard i'm an instructor at treehouse and my background is computer science your first question might be what exactly is computer science is it the science of working with computers well there's no set definition it seems that every major university and computing organization has their own take on it to help us define computer science consider the oscar-nominated film hidden figures released in 2016. it was the true story of black women who are hired at nasa to perform complex mathematical calculations for upcoming space missions their job title computers so the term computer science doesn't necessarily refer to this machine we call a computer because the term existed long before computers were widely available in fact ed skidzykstra an influential figure in the early days of the discipline once stated that computer science is no more about computers than astronomy is about telescopes it has been argued that a more appropriate term might be computing science although most of the work in the modern age is done for and by computers so here's our definition computer science is the study and design of algorithms computations and information systems in both theory and practice typically with the aid of computers i know that's a mouthful as we move forward we will provide more understanding of the term computer science as you begin this new journey just like telescopes are tools in the study of astronomy computers are tools in computer science in the next video we will unpack the history of computers and the internet see you there let's talk a little history it's hard to know where you're going if you don't know where you've been charles babbage is widely considered the father of the computer babbage is credited with inventing the first mechanical computers in the 1800s mathematician ada lovelace is credited with publishing the first computer program in the 1840s designed for use on one of babbage's early machines but even after ada lovelace wrote the first program it would still be over a century before the first large-scale programmable computer was introduced built in 1945 the iniac was commissioned at the university of pennsylvania in philadelphia the iniac was nine feet tall covered 1800 square feet weighed nearly 30 tons and cost five hundred thousand dollars adjusted for inflation that's over seven million dollars in 2021. it sported an impressive clock speed of 100 000 cycles per second in other words it could add two large numbers together five thousand times in one second the first personal computers were introduced in 1977 by three different companies known as the trinity one of those computers the apple ii helped launch the apple computer company known today for the macbook line of laptop computers and mobile devices such as the iphone and the ipad in 1982 the commodore 64 was born selling 17 million units the commodore 64 still holds the title as the best selling computer of all time fast forward to now the iphone 10 was released in 2017. compared to the 30-ton basement size iniac the iphone 10 weighs less than half a pound and fits comfortably in your hands it has a clock speed of 2.1 billion cycles per second and costs about a thousand dollars at the time of its launch to put that in perspective the iphone is over 20 000 times faster than the iniac and a tiny fraction of its size and cost in fact the mobile devices of today can do things that even the most powerful computers of 20 years ago couldn't accomplish for instance i have access to the internet and the world wide web right in the palm of my hand let's talk about them the internet is a global system of interconnected computer networks to communicate between devices and other networks in other words the internet is a network of networks that consist of public private academic business and government networks it has completely reshaped the way we communicate shop learn and conduct business the world wide web was invented by tim berners-lee in 1989 and the public was first granted access to this new network in 1991. the web allows us to access information on the internet using a web browser i can visit a website like teamtreehouse.com and click on hyperlinks to access other web pages in the next video we talk about different computer components hardware software storage oh my stay tuned welcome in this video we'll introduce you to different components of the computer we will define and provide examples of hardware software input output and storage let's start with hardware hardware refers to the physical components of a computer in other words the parts you can actually touch and yes they are typically hard the main brain of a computer consists of the cpu and ram or the main memory i can teach an entire course on how these components work but just know that all of the parts of the computer communicate with the main brain outside of that we can divide hardware into three device categories input output and storage an input device is hardware that provides data to a computer for example you may use a keyboard and mouse to enter data into a word processing application a camera to take photographs and a microphone to record audio the computer receives this information and converts it into data it can use namely a series of zeros and ones called binary which we'll dig into in the next video an output device is hardware that converts computer data into human readable form for example a screen displays text and images a printer provides a physical paper output for later use speakers offer audio feedback and your video game controller provides tactile feedback whenever it vibrates in your hand the computer only sees zeros and ones but it converts it back to information that humans can understand a storage device retains digital data for later use i briefly mentioned ram which serves as the primary memory of the computer however main memory is volatile which means it's lost when your computer is powered off for this reason we rely on secondary and tertiary storage to save information permanently secondary storage can refer to the hard drive that is often housed inside your device a flash drive that plugs directly into a usb port of your computer and even cd and dvd rom disks that are historically popular for distributing music movies and software tertiary storage is also known as cloud storage this means that the data is stored somewhere different from your physical location examples of cloud storage include google drive onedrive by microsoft icloud by apple and amazon web services or aws if you use any of these services you're saving data in the cloud i could go into a lot more detail about hardware however without software the hardware is pretty useless so let's talk about it software refers to the instructions and data that make the computer work such as system software which includes the operating system and device drivers this is the boring stuff that runs in the background think of it like this if your house is the hardware the system software would be the plumbing and electrical system sometimes you take it for granted but if it breaks down you go out of your way to get it fixed you may be more familiar with application software this includes the web browser you use to access treehouse content the word processor to write letters the spreadsheet application to manage your budget and the apps on your smartphone throughout your journey here you may learn how to design application software for use on your laptop favorite web browser and even your mobile phone in the next video we'll learn about bits bytes and the prefixes used for large amounts of data see you soon welcome in this video i will introduce you to the terms bit and byte we will then identify some common prefixes used for larger values and what they mean to you you may have a mobile phone or a digital camera that uses very small storage cards this is called a micro sd card and it's small enough to fit on your thumb ten years ago you can purchase one of these cards and you can take hundreds of high resolution photographs before running out of space today you can buy a thumb size card and take hundreds of thousands of photographs how is this possible to start let's get a better understanding of bits and bytes a bit is the smallest unit of data or information it is short for binary digit which means it is either one or zero you can think of this as a light switch in the on or off position or the answer to a yes no question as true or false a byte commonly consists of eight bits historically it was used to store a single character like the letter r or the number seven we usually refer to a file size in terms of bytes for example this python icon is 559 bytes my resume stored as a word processing file is 26 000 bytes the movie hidden figures stored on a blu-ray disc is more than 39 billion bytes there is a better way to refer to these large numbers by using different prefixes before the word bite for example kilo means 1000 or one followed by three zeros you may have heard of kilo before a kilogram means one thousand grams a kilometer four kilometer means one thousand meters so instead of 26 000 bytes i would say that my resume is 26 kilobytes mega means 1 million or one followed by six zeros my favorite song stored on a portable music player is 4.7 megabytes giga means one billion or one followed by nine zeros the dvd of hidden figures is 39.26 gigabytes there are more prefixes for even larger values the largest widely recognized prefix is yata a yatabyte is one septillion bytes or one followed by 24 zeros this is about 45 trillion blu-ray movie discs or 1 000 years of worldwide internet traffic to house one yatabyte of data you would need a data center roughly the size of the state of connecticut back to that micro sd card for your phone today you can buy a 256 gigabyte card for the same price you would have paid for a 256 megabyte card 10 years ago the difference is the card you buy today stores 1 000 times the amount of data in the next video we will discuss the different types of data you will use when writing computer programs stay tuned welcome in this video we will introduce you to several data types you may encounter in your programming journey consider the cabinets in your kitchen when i was growing up the cabinet next to our refrigerator was only for drinking glasses the one above the countertop was for canned foods the cabinet under the sink was for cleaning supplies now you would never think to store a drinking glass under the sink and i learned very quickly not to put the green beans in the cabinet next to the fridge think of these kitchen cabinets as data types each data type is designated to store one specific type of data if you break the rule well you may get in trouble some programming languages allow you to store data without first identifying its type like python some languages allow the data's type to change throughout the code such as javascript other languages force the programmer to identify the data's type before using it talking about you java there are so many different data types and each programming language has its own rules on how to use them regardless of the language you are likely to encounter one of these three data types the first is text it's a combination of letters numbers and symbols for example you can store my name richard my hometown roanoke virginia or a complete sentence i can be reached at 540 next is numeric data the advantage of numeric data is that i can perform mathematical operations i can store whole numbers the number of bones in the human body 206. population of a city 102 345. numbers with a decimal point pi rounded to four decimal places 3.1416 ounces of water in a liter 33.8 and even negative numbers strokes under par in a golf tournament negative 16. absolute zero in celsius negative 273.15 finally i can store boolean values a boolean represents the truth value stored as a bit remember that a bit can only be one of two values true or false one or zero one means true zero means false think of a light switch as on or off or the answer to a question as yes or no is the nile river the longest river in the world are you over 25 years of age is today friday as you write code you determine how to store and use data in your program don't worry that's the discussion for another time in the next video i give you a brief introduction to programming stay tuned welcome in this video we wrap up your computer science primer with an introduction to computer programming let me give you a few definitions first what is programming programming is the process of designing and writing computer programs to perform specific tasks what is a program a program is a set of instructions written in a specific programming language that a computer follows to complete a task what is a programming language a programming language is a special language used to write algorithms that a computer can understand each programming language has its own syntax rules and logic you can learn many different programming languages at treehouse like javascript and python i will explain syntax and algorithm in more detail syntax is the vocabulary and grammar of a programming language it is the special words commands and punctuation of a language as well as the rules for putting them together to create a program let me give you some example sentences in english seneca eats lunch at noon instagram is my favorite iphone app can casper cleave the coriander conspicuously each statement follows the rules of the english language to form a proper sentence even if you don't know all the words in that last example you probably recognize that i am asking a question about a person's ability to do something you might think i made up some of those words just to prove a point i promise i didn't but some of the words in that second sentence didn't even exist 20 years ago an algorithm is a set of well-defined instructions performed sequentially to complete a task an algorithm may be written in plain language or in pseudocode which is a mix between your spoken language and the code of a programming language be careful what may seem obvious to you might be harder to describe than you think here's a human example of an algorithm how would you explain the process of making a peanut butter and jelly sandwich to a five-year-old let me give it a shot one obtain two slices of bread one scoop of peanut butter one scoop of jelly two spread the peanut butter on one face of the first slice of bread three spread the jelly on one face of the second slice of bread four to create the sandwich combine the peanut butter face of the first bread to the jellyface of the second bread five slice the sandwich diagonally six finally bite your sandwich and enjoy you can make some minor adjustments to this algorithm for example you can swap steps two and three and still yield the same sandwich you can omit step 5 all together and still eat the sandwich you can replace peanut butter and jelly with other ingredients of course you'll end up with a different sandwich however you cannot completely mix up the steps otherwise you may end up with a sticky mess or no sandwich at all hopefully this was helpful as you begin your journey into a wonderful new field feel free to visit these videos again as a refresher if you have questions about anything covered in this workshop please reach out to other students in the community or the treehouse staff thanks and good luck