Class 1 – Basic Computer Usage – Computers, Files and Folders

February 13th, 2010 § 1

This course assumes no previous knowledge of programming, and only minimal understanding of computers.  This is invariably a source of difficulty, since the course must accommodate everyone, including those with prior programming experience, as well as those students who have very little understanding of what a file is where it goes once it is “saved”.

We have virtually no time in class to go over basic computer usage and terminology, so here is a quick outline of the concepts which you must first familiarize yourself with immediately in order to be ready to learn web development.

Files

All the computers we are likely to deal with store data in files.  The word “file” is used because, conceptually, computer files are meant to be like files in a filing cabinet.  They are documents with something written inside of them.  It just so happens that they are stored virtually in the computer’s hard drive, rather than physically in a filing cabinet.

Folders

Again, we are intentionally using a filing cabinet metaphor when we speak of folders.  Folders (often called “directories”), just like in filing cabinets, are containers in which you put your files.  Since you can often have hundreds or thousands of files, keeping your files nicely organized inside of clearly labeled folders is an important aspect of working effectively as a developer.  Unlike in a legal office, developers do not usually have secretaries to do the filing for them.  For this reason, you must learn to organize your files into folders yourself in such a way that you can easily keep track of them.

Types of files

Different sorts of data are represented in different ways by a computer.  For our purposes, there are two fundamental kinds of files: text files and binary files.

Text files are exactly what they sound like, a bunch of text.  This text can be broken up onto several lines, or it can be all on one line.  The important thing is that the only things contained inside of the files are text and line-breaks.

Text files are the simplest kind of file.  We will be creating text files to store all of the source code we will write in this class.

Binary files are used to store more complicated types of data.  The term “binary” just refers to the fact that all data is fundamentally represented as a series of 1′s and 0′s.  In this class, we will not interested ourselves in exactly how binary data is represented and stored, so long as we understand that binary files contain more than just plain text.

Image files will be stored in a binary format since most images cannot be adequately represented as lines of text.  Image file formats usually contain a lot of more complex information, including the exact color of every pixel in the image, and the relative differences between one pixel and another.

Creating and editing files

Files for web development are usually created and edited on your personal computer.  Text files, including the source code you will write, are created and edited using a simple text editor, a program that deals exclusively with text files.

The software used to create or edit binary files depends on the sub-type of binary file:  we typically use software such as Adobe Photoshop when dealing with image files, which are the most common sort of binary file for a web developer to deal with.

File extensions

A file extension is simply a suffix attached to the name of a file.  For example, an image file named “monkey” may have an extension named “.jpg”.  So the complete file name, as far as the operating system is concerned, would be”monkey.jpg”. Some operating systems will hide the extension from you, so all you see is the name “monkey”.  But rest assured… the file extension is there.  UNIX, Windows, and Mac each use extensions.

The extension typically indicates the type of the file.  So image files typically have “.jpg”, “.gif”, or “.png” extensions, which indicate the sort of binary image format which was used to create the image file.  Text files written in HTML code typically have a “.html” or “.htm” file extension, and text files written in Java usually have a “.java” extension appended to their file name.

Operating systems

Operating systems define the ways in which you, the human, access the resources available on a computer.  Personal computers generally have one of three flavors of operating system: Mac OS X, Windows, or a variety of UNIX.  Each provides more or less the same functionality for our purposes, but do so in slightly different ways.

As web developers, you will have to deal, at some point, with each of these types of operating systems.  Most web servers, which are the computers where you store your websites, such as the computer which stores this site, run a variety of UNIX.  Most people who use the internet do so on personal computers running Microsoft Windows.  Apple Macs, which are generally more expensive than Windows PC’s, use the operating system OS X, and are used by a small but significant minority or internet users, including a large proportion of design professionals.

The computer you are using right now to view this document is, no doubt, a personal computer running Windows or OS X.

File transfer

As a web developer, you will need to create files that contain all of the data you want to show on your website.  This will typically include source code written in a variety of languages, and images.  You may also have video files, animations, PDF files, and a variety of other more specialized types of files.

Only you have access to edit and view these files on your personal computer.  Nobody else can view or access the files you have stored on your personal computer.  In order to publish a website then , you typically want your files to be accessible to anybody and everybody on the Internet.  This means moving copying the files you have created for your website from your personal computer to a computer that allows anybody to view its files.  Such a publicly accessible computer is known as a web server.

To publish your site on the web, you will copy these files from the computer where you created them (your personal Windows PC or Mac) to the web server where they will permanently live (our course will use a UNIX web server for this purpose.)   This copying process between two computers is known as file transfer.  There are software programs that we will use solely to handle this transferring process.

Clients and servers

Your personal computer, the one you use to browse the web, is often called a “client“.   This term is used to differentiate your personal computer from the web “servers” that permanently store the web pages you visit.  The software products you use to view web pages, such as Firefox, Safari, or Internet Explorer, are also sometimes referred to as clients.  Thus the term client can either refer to the computer you use to view the web, or the particular software product you use to do so, depending on the context of the conversation.   The point being that the client is the “thing” you use to access the web.

This website, like all other websites, consists of a bunch of files stored on a web server.  Servers are computers dedicated to hosting and serving web pages when they are requested by clients.  Thus the internet, at a high level, is composed of two types of computers: clients and servers.

In sum: servers “serve” web pages to clients.  Clients request a particular web page from the server, and the server responds with the contents of that page.

There are some computers, such as those involved in P2P file sharing, which act simultaneously as both client and server, but that is a topic beyond the scope of this course.  For most purposes, a computer will either act as a client, or as a server.

Browsing files

On your personal computers, you will often have to find the files you downloaded, created, or copied so that you can use them or edit them.  Finding files (and losing them) is a big problem for the typical person, even those who use computers every day.  But if you have organized your files into clearly labeled folders, and understand the structure of the computer’s file system, managing files will be a simple job.

Finding files is basically the same, whether you are using Windows or Mac OS X.  Windows Explorer is the tool you use on a Windows PC.  Mac Finder is the tool you use on a Mac OS X computer.

Files are stored on a computer hierarchically.  What this means is that files on the computer are organized in folders, and these folders can be put into other folders.  Mac Finder illustrates this nicely:

Mac Finder shows the hierarchy of folders

Mac Finder shows the hierarchy of folders

In this screenshot of Mac Finder, you can see that The “Macintosh HD” hard drive contains several sub-folders, including one called “Users”.  The “Users” folder contains several sub-folders of its own, including one called “amos”.  The folder, “amos”, contains another folder called “Music”, and so on.  Files can be stored within any folder, even if that folder also contains other sub-folders as well.

Windows Explorer looks very similar.  Instead of “Macintosh HD”, the hard drive on Windows is named “C:”, and all folders and files are nested inside this hard drive just as in the Mac.  Although it is less intuitive, the concept behind Windows Explorer is the same as with Mac Finder:  it allows you to navigate through folders within folders within folders…

Web browsers

A web browser is a piece of software that runs on the client.  It allows the user of the client machine (i.e. you) to browse files (i.e. web pages) that are stored on web servers connected to the Internet.  In this class, we will use primarily Firefox as our web browser, since it offers several features that make it especially useful to web developers.

Other popular web browsers include Microsoft Internet Explorer, Apple’s Safari, Opera, and Google Chrome.

The internet vs. the web

The internet and the web are two separate but related things.

The “internet” refers to the global network of interconnected computers.  It is the infrastructure that allows computers around the globe to communicate with each other.

The “web” refers to the vast number of interlinking hypertext documents that exist on the internet.  Thus the web generally refers to only those parts of the internet that are accessible via the HTTP protocol.

The web is just one usage of the internet, and HTTP is just one of many protocols supported by the internet.  Other technologies that rely upon the internet but are not directly related to the web include email (IMAP and POP protocols), file transfer (FTP and SSH protocols), VoIP, streaming media such as webcams and internet radio, and P2P file sharing (RTP protocol and other proprietary protocols), among others.

Related posts:

  1. Class 11 – HTTP Basic Authentication using .htaccess files
  2. Class 1 – Usage of the Most Common XHTML Elements

Tagged: , , , ,

§ One Response to “Class 1 – Basic Computer Usage – Computers, Files and Folders”

What's this?

You are currently reading Class 1 – Basic Computer Usage – Computers, Files and Folders at Web Development Intensive.

meta