OPS145 Introduction Newversion: Difference between revisions

From Littlesvr Wiki
Jump to navigation Jump to search
Line 58: Line 58:
* You need to come to class to do both '''tests'''.
* You need to come to class to do both '''tests'''.
* '''Quizzes''' will be done on Blackboard. I don't do surprises, they'll be announced in advance.
* '''Quizzes''' will be done on Blackboard. I don't do surprises, they'll be announced in advance.
* The '''labs''' will be submitted over the internet using commands from your computer. Labs submitted after the deadline will get a zero.
* The '''labs''' will be submitted over the internet using commands from your computer. Labs submitted after the deadline will get a zero. Labs is where you'll get most of your learning, so while it's not mandatory: I suggest you do them in class and ask for help when the help is available right there.
* I haven't completely decided yet, but I expect the '''review labs''' will have to be done in class.
* I haven't completely decided yet, but I expect the '''review labs''' will have to be done in class.



Revision as of 02:39, 2 January 2024

Welcome to OPS145, the beginning of the OPS stream. This course (if you take it seriously) can be the start of a great career: both challenging and rewarding.

Professor

Unless someone else is using these materials (which they're welcome to do): my name is Andrew, and you can find my schedule here. Typically my labs aren't full, so you're welcome to come to any of them. If you're planning to come to a lab for another course: you might want to check in advance to make sure I don't have a test and that that class isn't cancelled.

Other than the labs and the hallways between them: the only way to get in touch with me is via email. I'm reasonably good at replying to email, especially if I understand what you're asking, and what you've done to try and figure out the answer yourself.

I like people who work hard, and dedicate themselves to whatever they chose to take on. If that's you, or if that's who you strive to become: we're going to get along well, and I'll do my best to help you succeed.

If you just want a passing grade: that's your business, I have some minimal requirements for passing the course you'll want to review. And when I say "minimal" I mean minimal, not negotiable.

Course materials

There is no textbook for this course. The materials you need to start with are on this wiki website. When working without my help you'll often find yourself using a search engine to find other useful websites. Feel free to use them. That's what you'll do when you start working in this industry.

You do need some hardware:

  1. A PC powerful enough to run VirtualBox, with a couple virtual machines at the same time. In practical terms that means any modern PC with at least 16GB of RAM. It can be running Windows or Linux (any version of Windows or Linux is the same for our purposes). A Chromebook or tablet will not be powerful enough. If you insist on using an Apple computer: you may, but you'll have to figure out yourself how to get virtualization to work on it. If you really, really, really can't afford a computer and you want to use a lab machine at school: you may, but be prepared for all sorts of unforseen problems which you'll have no control over.
  2. A portable SSD drive with a USB3 (type A) connection. This is useful if you're using your own machine in case your computer breaks, you can plug in your work into another computer. It is required if you're using the lab machines, since no data you create will be preserved on those machines. You're also likely to need a portable drive for other courses, which is fine as long as it has enough space.

Prerequisite skills

In first semester I'll assume that you know nothing of Linux, you've never seen a terminal before, and you barely understand what a computer is. That's fine, but you'll have to stay alert and absorb as many fundamentals as you can, especially during your first year.

I'll also assume (based on past experience) that you don't know how to learn, how to think, how to communicate, or how to work hard - because you never had to before. That's something you'll have to find the motivation to fix yourself. I encourage you to do your best to find that motivation. It's not too late, and the potential difference in the quality of the rest of your life will be enormous.

If you're trying to go through this full time program while you're working full time (or even part time): good luck to you, but there is very little chance you'll more than a rubber stamp to show for your years of education. There much more to learn than there are hours available in a day/month/year. So unless you're taking a break because your brain is about to crash from overload: you're cheating yourself of the opportunity to get ahead of your peers.

Path to success

Nothing in life is free. The fees you're (maybe) paying as a student are insignificant compared to the benefits of a successful career.

Success comes to those who are consistently smart, tough, and hard working.

In the coutext of this course and this stream that means: learn, learn, and then learn some more.

  • Learn about the technologies, their history, their uses, their abuses, their features and bugs.
  • Ask questions about things you don't understand, and ask for feedback often. I'm happy to help you, but I won't if I don't know that you want help.
  • Learn how to deal with people.
    • Every professor is different. Some of them you'll like and most of them you won't. That's exactly what your professional life will be - whether you're working for a boss, or you're your own boss working for clients. Find your own ways to put up with the nonsense and make the best out of every relationship.
    • Your peers are just as random as your professors. Once you're comfortably at home in the school: try to interact with them too. Every one of them will be interesting in some different way. No matter who it is: an average person, an asshole, a know-it-all, a party person, a boring fart, an idiot, a genius: you'll have to deal with all of those in your professional life. The sooner you start interacting with the different personalities: the better prepared you will be for the inevitable interaction with them later.
    • The "everything is online now" thing doesn't make communication easier or less important - it does the reverse. More than ever now you have to put effort into understanding what people want, and communicating that you've got it. Or else noone will even know that you exist.
  • Learn how to manage your time. There's never enough of it, but you'll never have more flexibility with your time than you do now as a student.
    • Balance and sort priorities.
    • Discover that the best time to do anything is right now. The only reason not to do something now is that you're doing something else which is more important.
  • Learn your limits.
    • You're never going to know everything. Accept that, and instead of giving up: use it as motivation to keep learning for the rest of your life.
    • Find your breaking point (commonly called burn out). That way in the future you'll sense the signs that you're about to run out of juice again, and use that to balance and sort your priorities.

You're building your life now, and building your life is your responsibility, noone else's. That was the case since at least high school, but now noone will even pretend to be responsible for your development outcomes. It's all on you. Accept it, and make the best of it.

Course structure

You have four hours of class per week in this course. Generally speaking I'll spend two of those hours talking, and the other two hours helping you get your work done.

I encourage you to resist the temptation to skip class. I don't keep track of attendance (except on test days), but you will get more out of the course if you make yourself go to lectures to listen to me, and force yourself to go to the labs even if you don't have any questions to ask nor any friends to hang out with.

One day I might decide to record videos of my lectures, but that's not a priority for me right now.

Graded work

  • You need to come to class to do both tests.
  • Quizzes will be done on Blackboard. I don't do surprises, they'll be announced in advance.
  • The labs will be submitted over the internet using commands from your computer. Labs submitted after the deadline will get a zero. Labs is where you'll get most of your learning, so while it's not mandatory: I suggest you do them in class and ask for help when the help is available right there.
  • I haven't completely decided yet, but I expect the review labs will have to be done in class.

The rest of your program

Presumably you're in this program because you're hoping to build a career with systems and networks administration. That is a very vague statement, which you'll need to start clarify to yourself over the first couple of semesters.

Generally speaking after you finish your program you can become:

  • a system administrator (Linux or Windows, not likely both),
  • a network administrator (Linux or Windows or Cisco),
  • a technical support representative,
  • the IT guy on a team of developers,
  • some custom software specialist, or
  • a DevOps guy (currently the most lucrative job in this field)

There is no direct communication between professors for different courses, or even different sections of the same course. There are many reasons for this, including the fact that there are too many of us. I have no way of knowing what you're learning in other courses, therefore I will likely repeat things you've heard (or will hear) someone else. That's not such a bad thing actually - you're more likely to remember it.

Keep your interests broad until you're quite sure you've picked your path. For me that happened by the middle of the second year. But even after you do: remember that there is more in common than is apparent between different technologies. So don't ignore the stuff that's not obviously in your career path.

Hello computers

Computers are everywhere now, but the number of people who understand them hasn't increased that much (if at all) over the last few decades. Everyone knows how to poke their finger at a touchscreen, but that is not any closer to IT knowledge than switching TV channels is to electronics.

Hopefully you've picked this program because you already know you're interested in computers, and you've learned things you friends/parents/randompeople don't know. If not: now is the time to start.

The body of knowledge related to computers is incomprehensibly enormous. I don't think anyone has even tried to quantify it. I've picked some basics for this week based on my experience, but every interesting piece of information you choose to pursue will take for ever to fully understand. You'll never know it all, but you can learn enough that everyone around you will think that you do.

Digital electronics

Digital electronics are actually a specific use case of analog electronics, but we're not going to spend any time on that.

With digital ecelctronics fundamentally the only two values available are zero and one. Everything else is an interpretation of long streams of 0s and 1s. That includes every form of storage and data transmission.

Let's have a look at some basic examples of how binary data is converted into human-comprehensible data.

Binary to decimal conversion

Most of the time binary data is organized in bytes. One byte is made of eight bits. One bit is a binary unit, which is either a 0 or a 1. As with decimal numbers (the types of numbers you've used all your life), in binary the least significant digit (the smallest in meaning) is on the right.

The following example shows how the binary 11001001 is the same as the decimal 201.

Convert-bin-decimal.png

This doesn't mean that every sequence of 11001001 has the meaning 201. Those two are only equivalent if you choose to interpret that particular sequence of binary bits as a decimal number. You can choose to interpret those bits as someting else, for example a character.

Converting from decimal to binary is a little harder to do, but in this course you won't care about binary numbers larger than decimal 7.

Binary to text conversion

You might have thought in the past that computers can store text. They cannot. They store zeroes and ones. If you decide that a specific sequence of 8 bits (a byte) represents an ASCII character (instead of a decimal number), you can look up the mapping between that number and a character in an ASCII table.

For human readability purposes this table doesn't have binary bits in it. But for example to find the meaning of the byte 01000001 as a character you would convert that to decimal first (getting 64), and look that up in an ASCII table, finding that binary 01000001 is the same as the uppercase letter A.

ManAscii.png

Does that mean that binary 01000000 is not decimal 128? No: it can be 128, or A, or whatever else you choose to interpret it as.

Pictures

When you get home find a magnifying glass and look closely at your computer screen. You'll find that the picture you're seeing is made of hundreds of thousands (maybe millions, depending on your resolution) of tiny little square dots. Each of those dots is called a pixel, and each pixel has exactly one colour at one time.

Your video memory, just like everything else in your computer is filled with binary numbers. But in this case the meaning of those numbers is interpreted as a colour (rather than a number or an english character).

A common way to represent a colour is RGB (red, green, blue). If you have one byte for red, one byte for green, and one byte for blue: that's 24 bits, which can hold over sixteen million distinct values. In this case that's sixteen million different colours.

So for example the binary sequence 00101100 10111101 00110001 can be interpreted (for your benefit) as decimal 44, decimal 189, and decimal 49. That's a dull red, mixed with a bright green, mixed with a dull blue: giving you the green colour in the ASCII screenshot above.

Then you can have a sequence of as many pixel values as you need to fill a window or a screen.

Other types of data

Now that you see how binary can be interpreted as numbers, text, or images: perhaps you will more readily believe that every other type of data in computers is the same. Anything you can think of on a computer (videos, sound, game AI, websites, applications, etc.) is ultimately just a lot of zeroes and ones.

You don't often need to think about this, but it's a good piece of fundamental computer knowledge to start your learning journey with.

Large numbers of bytes

While a byte (or even a bit) is important, modern computers work with such mind-boggling amounts of data that there are prefixes used to describe multiples of a byte. Here are the ones you'll hear most often:

Short form Is pronounced Multiple Storage example Which probably means
K kilo 1000 2KB two thousand bytes
M mega 1000000 5MB five million bytes
G giga 1000000000 256GB two hundred and fifty six billion bytes
T tera 1000000000000 1TB one trillion bytes

Parts of a computer

If you have a desktop computer: I encourage you to take its case off, and have a look at what's inside. If you've done that before: consider building your own computer next time you need a new one. If you've done that too: this section is going to be no news to you.

A computer has thousands of discrete components, but if you only look at the removable parts: there aren't so many of them. Here are the most important ones:

CPU

This is the brain of your computer. It does nearly all the calculations required for the computer to do anything useful. It runs software instructions, manipulates data in RAM, and sends data to other components (like your hard drive or your network card).

For a consumer-grade computer its processing speed is measured in GHz (billions of operations per second). There are other factors that affect its observable performance though like the number of cores and the cache size.

The CPU is the most power-hungry component in your computer (unless you're a serious gamer). In desktop computers they are always covered with a large heat sink which is covered by a fan. Those literally prevent the CPU from melting.

Small but powerful CPU and large heat sink (image from LegitReviews)

PCs have either AMD or Intel CPUs. These are compatible in terms of the software they can run, and their performance has been comparable for decades.

RAM

Short for Random Access Memory. This is the working memory of your computer, and the data in it is volatile (it will disappear if the power is turned off) which is different from your computer's permanent storage.

One stick of RAM. Photo from AnandTech.

RAM is very fast (it can be read and written to very quickly), and all the operations the CPU executes work on instructions and data stored in RAM.

That means an application installed on your hard drive will be loaded into RAM before it can be executed. A file from your hard drive will need to be loaded into RAM before it can be processed and displayed.

RAM is much more expensive than persistant storage, because it's much faster. A decent modern PC will typically have 16GB (16 billion bytes) of it. When you run out of RAM: you will notice that your machine slows down to a crawl. That's because at that point the CPU needs to swap data from RAM to the hard drive and back, and that swapping speed is limited by the speed of the hard drive, which is at least 10 times slower tham moving data around in RAM.

There's faster and slower RAM, but mostly you get whatever you can afford for size, of wahtever type is compatible with your motherboard.

Motherboard

This is the big board that connects all the other components to each other. The only critical thing about a motherboard is what type of CPU it will accept. Usually a current motherboard will accept most current AMD CPUs or most current Intel CPUs. A motherboard made for AMD CPUs will not have a socket that will fit an Intel CPU, and vice-versa.

Other than that you pick your motherboard based on the number of connections it has for SSDs, SATA drives, PCI Express cards, and USB ports. Almost all motherboards these days come with built-in network and sound cards, but most do not have built-in video cards.

A typical desktop PC motherboard

Everything else

You know: the power supply with its tangle of cables, the video card with a range of possible output ports, the cables for your LEDs and buttons, the fans: you'll figure all that out in time.

Things that don't look like computers but are

Some decades ago most electronics were analog. Around the turn of the century most electronics became digital. Now most electronics are not only digital, they are actually full computers.

For example a smartphone has essentially all the same components as a desktop computer. A motherboard, CPU, RAM, persistent storage. The components are miniature and they use much less power, therefore they are slower, but the architecture of the hardware is nearly identical.

If you still have one of those idiot boxes called a TV: those are now also computers, with all the same components.

And other things that look nothing like a computer such as the thermostat in your home, or the fridge, or your car's ECUs also contain even more miniaturized computers. They have a motherboard, a CPU, a bit of RAM, and persistent storage. It's been found that using a standard architecture and simplifying it for a given use case is cheaper than building a fully custom piece of digital hardware from scratch.

This is not immediately relevant to the program you're taking now, but understanding that everything is essentially the same type of thing will allow you to take on challenges you wouldn't even consider otherwise.

Software

Software starts as text instructions written in a programming language by people, and is more-or-less readable by a human being, at least one experienced with that programming language. But it's not comprehensible to a CPU, which is what executes the software.

Turning human-readable code into computer-executable binaries is called compiling. Most software you use has been pre-compiled. You start it and it runs.

Some software is not pre-compiled, and instead is interpreted at runtime. This includes scripts, and most web applications. Such software still needs to be turned into binary instructions before the CPU can execute it, and this on-the-fly compiling makes interpreted software slower (often much slower) than pre-compiled software. But it's easier to modify, because the programmer doesn't need to recompile it after making changes to it.

Open source software

At the beginning of time all software souce code was open, available for anyone interested to look at, and modify. Then for a couple of decades most software source code was closed, because that allowed the vendor to control who can and who cannot make changes to their software.

In the 80s and 90s Richard Stallman GNU project and Linus Torvalds' Linux project have reintroduced the concept of open source to the world. Such software is often licenced under the GNU GPL (General Public Licence). The licence explicitly allows anyone to look at the source code, modify it, and distribute the modified versions without asking the original author.

The ecosystem of open source projects has grown so much that in some fields open source is the dominant type of software used. Many large companies you've heard of (e.g. Google, Facebook, even Apple to some degree) could not have been created if open source software wasn't available for them to use.

There are now two major open source operating systems (Linux and BSD), and tens of thousands of libraries, system software, server software, and applications available to anyone to use for free, without pirating anything. You are going to be using such software in the OPS stream of courses.

Operating systems

For the purpose of this topic: the first piece of software that starts when your computer boots is the operating system kernel.

That's just a piece of software, but it's special because it's the only piece of software which has direct access to the hardware in your computer. Device drivers are softwhare which are extensions of the kernel.

Since the kernel controls access to the hardware: all software that runs on top of that kernel must speak the same language as that kernel. That's why software which is built for Windows doesn't work on OSX or Linux.

What people typically call an operating system includes much more than the kernel though, but several layers of complexity-removing software which allows someone to write a program to solve a problem, while having no understanding whatsoever about how the hardware works, how the data is stored on a hard drive, or how packets are sent from one computer to another half way across the world.

OPS145

In this course you'll start to use directly an operating system which you've used indirectly for your entire life: Linux. You'll get enough basic skills in the first semester so that in the second semester you can start administering a Linux system.

You'll spend a lot of time using something called the command-line. That's a more direct way to send instructions to the operating system, without the limitations of a graphical user interface.

You'll learn how to compose commands to inspect the state of a system, and to instruct the system to do stuff. No less importantly: you'll learn how to read the output from the commands you're running, and interpret that.

It's going to be hard. But if everyone could do it: then your career expecations would be grim.