Friday, 20 May 2011

Programming

omputer programming is the iterative process of writing or editing source code. Editing source code involves testing, analyzing, and refining, and sometimes coordinating with other programmers on a jointly developed program. A person who practices this skill is referred to as a computer programmer, software developer or coder. The sometimes lengthy process of computer programming is usually referred to as software development. The term software engineering is becoming popular as the process is seen as an engineering discipline.

Computer program

A computer program (also a software program, or just a program) is a sequence of instructions written to perform a specified task for a computer.A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute the instructions. The same program in its human-readable source code form, from which executable programs are derived (e.g., compiled), enables a programmer to study and develop its algorithms.
Computer source code is often written by professional computer programmers. Source code is written in a programming language that usually follows one of two main paradigms: imperative or declarative programming. Source code may be converted into an executable file (sometimes called an executable program or a binary) by a compiler and later executed by a central processing unit. Alternatively, computer programs may be executed with the aid of an interpreter, or may be embedded directly into hardware.
Computer programs may be categorized along functional lines: system software and application software. Many computer programs may run simultaneously on a single computer, a process known as multitasking

More About Disk Drives

Floppies – Although floppy drives are being phased out in some new computers, there are still millions of them out there and you should know something about them. The floppy drive has a little slot on the face of the computer cabinet, and into this slot you can slide a floppy diskette like the one shown here. One of the reasons floppy drives are still around is that it is very easy to take a floppy diskette from one system to another.
Inside the floppy diskette is a round flat disk coated with iron oxide on each side so that data can be stored on it magnetically. This disk is called a platter, and it spins underneath an electro-magnet called the write head that puts data onto the platter surface. There is another head called the read head that copies data from the platter.
Once the disk has made one complete revolution, data is written all the way around. That is called a track. The head then moves a bit and writes another circle of data to create a second track. Altogether, there are 80 tracks on each side, for a total of 160. Altogether, the floppy can hold 1.44 MB (megabytes) of data.
If we are looking for just a few bytes out of 1.44 million, it’s not enough to know which track it is in. To help narrow the search, the track is divided into 18 pieces, calledsectors, which look much like a slice of pie. Each sector holds 512 bytes of data, so if we know the track and sector number of the data we want it won’t be hard to find.
Hard Drives – On a hard drive, data is also organized into tracks and sectors. While each sector still holds 512 bytes, there can be many more tracks and sectors on a platter. There are also multiple platters, one on top of the other like a stack of pancakes. Hard drives can hold much more data than floppies, sometimes into the billions of bytes, calledgigabytes(GB).
Multiple platters require multiple read and write heads, all attached to the same arm so they move together. It’s called an actuator arm. When we are reading track number 10 on the top platter, the other heads are also positioned over track 10 of the other platters, and together all of these track 10s make up a cylinder. To specify the location of data on a hard drive it is necessary to say what cylinder, then the track and sector. Moving the heads from one cylinder to another is called a seek, and the amount of time this takes is the average seek time.
Although hard drives can hold much more data than floppies, the platters are sealed into a metal case that is fastened inside the computer cabinet, so it’s not an easy matter to move from one system to another like you can with floppies. A hard drive is sometimes called a fixed diskfor this reason.
Operating systems use a couple of different methods to keep track of what data is stored where on a drive. One common method uses a table called a File Allocation Tableor FAT, which is a section of the disk with pointers to data locations. There are two versions, calledFAT16 and FAT32. Windows NT, XP and 2000 use a similar method called NTFS.
There are two different interfaces commonly by hard drives to talk to the rest of the system. These are called IDE for Integrated Drive Electronics, and SCSI forSmallComputer System Interconnect. The technical differences are not important at this point, but you should know about the two types because they are not interchangeable.
Figuring out where the heads should go next and then moving them there is the job of some electronic circuitry called the disk controller. Every disk drive has its own controller, which may be on the motherboard or inside the drive itself, depending on the type of drive.
There are a few more things you should know about disk drives before we leave the subject. The first sector of Cylinder 0, Track 0 is called the boot sector, and it contains aMaster Boot Record (MBR) that shows whether the disk contains an operating system and the location of the code. If there is more than one operating system, the drive must be divided into multiple partitions. If not, then the whole drive will be a single partition. All of the disk space assigned to a partition is called a volume.
Another term you will encounter is a disk format. There is a high-level format, which creates a new file allocation table and is done with a FORMAT command. There is also alow-level format that creates a new pattern of sectors. A low-level format must be followed by an FDISK command to create a new Master Boot Record and partitions.
Last, we have the word media. This refers to the actual surface holding the data, which is the platter in the case of a disk drive. Because the floppy platter can be taken out of the drive, it is called removable media, while a hard drive is calledfixed media.
Other Drives – Most systems today, especially home systems, have additional storage drives that use CD or DVD discs. The technology for both is similar but DVDs hold much more data. These drives do not store data magnetically but use optical markings that are read with a laser. They are mostly used just to read data and not to write it. The full name for CD in fact is CD-ROM, which stands forCompact Disc - Read Only Memory. However, there are versions that can be used to write also, and these are called CD-RW and DVD-RW. Even so they are mostly used to write just once for permanent storage, and are not practical for constantly changing data.
Like hard drives, CD-ROM drives can use either an IDE or SCSI interface. The version of IDE for CD-ROM drives is called ATAPI, and for SCSI the CD-ROM version is ASPI.
Because the discs can be removed, CD-ROM and DVD are considered removable media. There are other types of removable media also that are not as common, such as tape drives and Zip disks, which are similar to floppies but with a storage capacity of 100 or 250 MB. Zip disks and tape drives also use the ATAPI interface.

More About Video

The monitor is a passive device that just displays the video output from the system. However, so much data is needed for the constantly changing screen display that special provisions are made for it.
The video card (or video circuitry on the motherboard) has its own RAM memory just to hold the display information, and its own ROM BIOS to control the output. Some motherboards even have a special high-speed connection between the CPU and the video. It’s called the AGP, or Accelerated Graphics Port.
The important numbers in evaluating a video display are how many distinct colors can be displayed and also the resolution, which is how many pixels the image contains across and from top to bottom. Each dot of color making up the image is one pixel. As video technology evolved there have been a number of standards, and each one has its own set of initials like EGA, CGA or VGA. A common one isSVGA, which stands for SuperVideo Graphics Array and has a resolution of 800x600 (that’s 800 pixels across and 600 down). Some high-performance monitors use SXGA (1280x1024) or even UXGA with a resolution of 1600x1200.

CMOS and RTC

There is other start-up information that normally stays the same but that we might want to change once in a while. This includes info about the various pieces of hardware connected to the system, which disk drive to check first for the operating system and that sort of thing. This data can’t be stored on the hard drive because we need it to boot up. It can’t be stored in RAM because it will be lost at power-off, and it can’t be stored in the BIOS because we might need to change it.
The problem is solved by a type of RAM chip that uses very low power, and it is connected to a battery. This type of low-power memory chip is called CMOS. It stands for the type of technology used in the chip, which is Complementary MetalOxideSubstrate. This is probably more than you need to know, but I’m a fanatic about defining things. By the way, since batteries don’t last forever, if you leave your computer unplugged for about 5 years you’ll find it needs a bit of trickery to get it to boot again, because the CMOS information will be gone.
There is another feature in the computer that has the same requirements as CMOS, and that is the date and time function. This obviously needs to change very minute, but we don’t want to lose track when the computer is turned off. The circuitry for this is called the RTC or Real Time Clock, and for convenience it is usually included in the same chip with the CMOS. A little trickle of juice from the CMOS battery keeps the clock running, and when you turn the computer on again it knows exactly what time and day it is. Convenient, isn’t it?

The BIOS

As we mentioned earlier, the computer knows what to do by taking instructions from programs stored in RAM. The main instructions come from a program called the operating system, and those instructions direct traffic for other programs called applications.
When the computer is turned off, all the instructions copied into the RAM are gone. When the system is turned on again, it needs to go out to the disk, get the operating system and load it into RAM, but there are no instructions in the RAM to tell it how to do this. The solution to this problem is a set of instructions that stay in memory and don’t get lost when the computer is turned off.
This set of instructions is called the BIOS, for Basic Input Output System. Since the instructions don’t need to change, they can be stored in a different kind of chip than we use for RAM. It’s called ROM, for Read Only Memory. We say that the instructions in the BIOS are hard-wired, and instead of software they are calledfirmware.
The computer goes through a process called booting up when it is first turned on. This involves executing the BIOS instructions, loading the operating system from disk into RAM, and then turning control of the computer over to the operating system after everything checks out OK. The term refers to somebody pulling themselves up by their own bootstraps (without outside help, in other words). Any computer term that includes ‘boot’ will have something to do with this start-up process.

DRAM can extend the life of your family computer

The average family computer has multiple users, myriad programs installed on it, relatively basic hardware and enough content on the hard drive to slow it down to a crawl.
There are many ways to improve the system's performance by organizing and managing files better, but anything short of a hardware upgrade is unlikely to pay dividends on a device used by so many people. Instead, consider upgrading your system's RAM, a simple and relatively inexpensive solution that requires minimal technical knowledge and can have a major impact on the system's performance.
In many ways, RAM is the most important computer component. While the processor is critical for analyzing data, and the hard drive is necessary to maintain data over an extended period, the RAM essentially acts as a bridge between all of the devices by storing data for a short period of time, allowing everything else to function at maximum capacity.
When the computer is in operation, commands to run a program, open a file or surf the web are all stored within the RAM. Furthermore, the necessary data to maintain the various tasks at hand is also kept in the RAM, where it can be stored while the processor, graphics card and other devices analyze it. As a result, family computers and other devices with a number of users often hog a significant amount of RAM because so many programs run simultaneously on the device. This brings performance down to a crawl because small amounts of RAM can struggle to efficiently contain all of the short-term data running on the machine.
By upgrading the system's RAM, you can equip your computer with the necessary tools to perform well when the system has a variety of applications, internet tabs and other items operating simultaneously. Since the upgraded memory can handle the various system tasks more easily, the other components within the device are also able to work at a higher capacity. Therefore, the relatively inexpensive RAM upgrade can improve the entire system.
When choosing new RAM for your computer, there are a few key considerations that you should keep in mind - your operating system and the type of computer you have.
Operating systems can have a significant impact on your computer's RAM needs because each OS will demand a certain portion of the system's memory. Windows XP, which is now more than 10 years old but is still popular, uses a very small amount of RAM during operation. As a result, an XP system may be capable of running well with 1GB of RAM or less, depending on the applications used. Windows Vista, on the other hand, quickly became notorious as a system hog because is uses a substantial amount of RAM, and will often demand more than 2GB of system memory to run effectively. Windows 7 provides a significant improvement over Vista, but because it is newer and is frequently used on machines running high-performance applications, 2GB of RAM is typically the norm.
The type of computer you have is another important attribute that impacts what kind of RAM you should use. Manufacturers use a variety of technologies that impact the variety of RAM you need to purchase in order for it to work effectively in your system. The key attributes that will tell you if RAM works in your system are its types, DDR1, 2 or 3, and the number of pins in the RAM socket, with 240-PIN RAM being the most common.