Showing posts with label Knowledge is power. Show all posts
Showing posts with label Knowledge is power. Show all posts

Thursday, May 29, 2008

Computer programming

Computer programming (often shortened to programming or coding) is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language. The code may be a modification of an existing source or something completely new. The purpose of programming is to create a program that exhibits a certain desired behavior (customization). The process of writing source codes requires expertise in many different subjects, including knowledge of the application domain, specialized algorithms and formal logic.

Programming languages

Different programming languages support different styles of programming (called programming paradigms). The choice of language used is subject to many considerations, such as company policy, suitability to task, availability of third-party packages, or individual preference. Ideally, the programming language best suited for the task at hand will be selected. Trade-offs from this ideal involve finding enough programmers who know the language to build a team, the availability of compilers for that language, and the efficiency with which programs written in a given language execute.

Allen Downey, in his book How To Think Like A Computer Scientist, writes:

The details look different in different languages, but a few basic instructions appear in just about every language: input: Get data from the keyboard, a file, or some other device. output: Display data on the screen or send data to a file or other device. math: Perform basic mathematical operations like addition and multiplication. conditional execution: Check for certain conditions and execute the appropriate sequence of statements. repetition: Perform some action repeatedly, usually with some variation.

Many computer languages provide a mechanism to call functions provided by libraries. Provided the functions in a library follow the appropriate runtime conventions (eg, method of passing arguments), then these functions may be written in any other language.

History of programming Wired plug board for an IBM 402 Accounting Machine.The earliest programmable machine (that is a machine whose behavior can be controlled by changes to a "program") was Al-Jazari's programmable humanoid robot in 1206. Al-Jazari's robot was originally a boat with four automatic musicians that floated on a lake to entertain guests at royal drinking parties. His mechanism had a programmable drum machine with pegs (cams) that bump into little levers that operate the percussion. The drummer could be made to play different rhythms and different drum patterns by moving the pegs to different locations.

The Jacquard Loom, developed in 1801, is often quoted as a source of prior art. The machine used a series of pasteboard cards with holes punched in them. The hole pattern represented the pattern that the loom had to follow in weaving cloth. The loom could produce entirely different weaves using different sets of cards. The use of punched cards was also adopted by Charles Babbage around 1830, to control his Analytical Engine.

This innovation was later refined by Herman Hollerith who, in 1896 founded the Tabulating Machine Company (which became IBM). He invented the Hollerith punched card, the card reader, and the key punch machine. These inventions were the foundation of the modern information processing industry. The addition of a plug-board to his 1906 Type I Tabulator allowed it to do different jobs without having to be rebuilt (the first step toward programming). By the late 1940s there were a variety of plug-board programmable machines, called unit record equipment, to perform data processing tasks (card reading). The early computers were also programmed using plug-boards.

A box of punch cards with several program decks.The invention of the Von Neumann architecture allowed computer programs to be stored in computer memory. Early programs had to be painstakingly crafted using the instructions of the particular machine, often in binary notation. Every model of computer would be likely to need different instructions to do the same task. Later assembly languages were developed that let the programmer specify each instruction in a text format, entering abbreviations for each operation code instead of a number and specifying addresses in symbolic form (e.g. ADD X, TOTAL). In 1954 Fortran, the first higher level programming language, was invented. This allowed programmers to specify calculations by entering a formula directly (e.g. Y = X*2 + 5*X + 9). The program text, or source, was converted into machine instructions using a special program called a compiler. Many other languages were developed, including ones for commercial programming, such as COBOL. Programs were mostly still entered using punch cards or paper tape. (See computer programming in the punch card era). By the late 1960s, data storage devices and computer terminals became inexpensive enough so programs could be created by typing directly into the computers. Text editors were developed that allowed changes and corrections to be made much more easily than with punch cards.

As time has progressed, computers have made giant leaps in the area of processing power. This has brought about newer programming languages that are more abstracted from the underlying hardware. Although these more abstracted languages require additional overhead, in most cases the huge increase in speed of modern computers has brought about little performance decrease compared to earlier counterparts. The benefits of these more abstracted languages is that they allow both an easier learning curve for people less familiar with the older lower-level programming languages, and they also allow a more experienced programmer to develop simple applications quickly. Despite these benefits, large complicated programs, and programs that are more dependent on speed still require the faster and relatively lower-level languages with today's hardware. (The same concerns were raised about the original Fortran language.)
Throughout the second half of the twentieth century, programming was an attractive career in most developed countries. Some forms of programming have been increasingly subject to offshore outsourcing (importing software and services from other countries, usually at a lower wage), making programming career decisions in developed countries more complicated, while increasing economic opportunities in less developed areas. It is unclear how far this trend will continue and how deeply it will impact programmer wages and opportunities.

Modern programming

Quality requirements

Whatever the approach to the software development may be, the program must finally satisfy some fundamental properties; bearing them in mind while programming reduces the costs in terms of time and/or money due to debugging, further development and user support. Although quality programming can be achieved in a number of ways, following five properties are among the most relevant:

  • Efficiency: it is referred to the system resource consumption (computer processor, memory, slow devices, networks and to some extent even user interaction) which must be the lowest possible.
  • Reliability: the results of the program must be correct, which not only implies a correct code implementation but also reduction of error propagation (e.g. resulting from data conversion) and prevention of typical errors (overflow, underflow or zero division).
  • Robustness: a program must anticipate situations of data type conflict and all other incompatibilities which result in run time errors and stop the program. The focus of this aspect is the interaction with the user and the handling of error messages. Portability: it should work as it is in any software and hardware environment, or at least without relevant reprogramming. Readability: the purpose of the main program and of each subroutine must be clearly defined with appropriate comments and self explanatory choice of symbolic names (constants, variables, function names, classes, methods, ...).

Algorithmic complexity

The academic field and the engineering practice of computer programming are both largely concerned with discovering and implementing the most efficient algorithms for a given class of problem. For this purpose, algorithms are classified into orders using so-called Big O notation, O(n), which expresses resource use, such as execution time or memory consumption, in terms of the size of an input. Expert programmers are familiar with a variety of well-established algorithms and their respective complexities and use this knowledge to choose algorithms that are best suited to the circumstances.

Methodologies

The first step in most formal software development projects is requirements analysis, followed by modeling, implementation, and failure elimination (debugging). There exist a lot of differing approaches for each of those tasks. One approach popular for requirements analysis is Use Case analysis.

Popular modeling techniques include Object-Oriented Analysis and Design (OOAD) and Model-Driven Architecture (MDA). The Unified Modeling Language (UML) is a notation used for both OOAD and MDA.

A similar technique used for database design is Entity-Relationship Modeling (ER Modeling).
Implementation techniques include imperative languages (object-oriented or procedural), functional languages, and logic languages.

Debugging is most often done with IDEs like Visual Studio, NetBeans, and Eclipse. Separate debuggers like gdb are also used.

Measuring language usage

It is very difficult to determine what are the most popular of modern programming languages. Some languages are very popular for particular kinds of applications (e.g., COBOL is still strong in the corporate data center, often on large mainframes, FORTRAN in engineering applications, and C in embedded applications), while some languages are regularly used to write many different kinds of applications.

Methods of measuring language popularity include: counting the number of job advertisements that mention the language[4], the number of books teaching the language that are sold (this overestimates the importance of newer languages), and estimates of the number of existing lines of code written in the language (this underestimates the number of users of business languages such as COBOL).

Debugging

Debugging is a very important task in the software development process, because an erroneous program can have significant consequences for its users. Some languages are more prone to some kinds of faults because their specification does not require compilers to perform as much checking as other languages. Use of a static analysis tool can help detect some possible problems.

References

  • Paul Graham (2003). "Hackers and Painters". Retrieved on 2006-08-22.
  • Kenneth E. Iverson, the originator of the APL programming language, believed that the Sapir–Whorf hypothesis applied to computer languages (without actually mentioning the hypothesis by name). His Turing award lecture, "Notation as a tool of thought", was devoted to this theme, arguing that more powerful notations aided thinking about computer algorithms. Iverson K.E.,"Notation as a tool of thought", Communications of the ACM, 23: 444-465 (August 1980).
  • A 13th Century Programmable Robot (University of Sheffield). Survey of Job advertisements mentioning a given language

taken from http://en.wikipedia.org/

Computer Software

Computer software is a general term used to describe a collection of computer programs, procedures and documentation that perform some tasks on a computer system.[1] The term includes application software such as word processors which perform productive tasks for users, system software such as operating systems, which interface with hardware to provide the necessary services for application software, and middleware which controls and co-ordinates distributed systems.

Relationship to computer hardware

Computer software is so called to distinguish it from computer hardware, which encompasses the physical interconnections and devices required to store and execute (or run) the software. In computers, software is loaded into RAM and executed in the central processing unit. At the lowest level, software consists of a machine language specific to an individual processor. A machine language consists of groups of binary values signifying processor instructions which change the state of the computer from its preceding state.

Software is an ordered sequence of instructions for changing the state of the computer hardware in a particular sequence. It is usually written in high-level programming languages that are easier and more efficient for humans to use (closer to natural language) than machine language. High-level languages are compiled or interpreted into machine language object code.

Software may also be written in an assembly language, essentially, a mnemonic representation of a machine language using a natural language alphabet. Assembly language must be assembled into object code via an assembler.

The term "software" was first used in this sense by John W. Tukey in 1958.
In computer science and software engineering, computer software is all computer programs. The theory that is the basis for most modern software was first proposed by Alan Turing in his 1935 essay Computable numbers with an application to the Entscheidungsproblem.

Types

Practical computer systems divide software systems into three major classes: system software, programming software and application software, although the distinction is arbitrary, and often blurred.

System software helps run the computer hardware and computer system. It includes operating systems, device drivers, diagnostic tools, servers, windowing systems, utilities and more. The purpose of systems software is to insulate the applications programmer as much as possible from the details of the particular computer complex being used, especially memory and other hardware features, and such as accessory devices as communications, printers, readers, displays, keyboards, etc.

Programming software usually provides tools to assist a programmer in writing computer programs and software using different programming languages in a more convenient way. The tools include text editors, compilers, interpreters, linkers, debuggers, and so on. An Integrated development environment (IDE) merges those tools into a software bundle, and a programmer may not need to type multiple commands for compiling, interpreting, debugging, tracing, and etc., because the IDE usually has an advanced graphical user interface, or GUI.

Application software allows end users to accomplish one or more specific (non-computer related) tasks. Typical applications include industrial automation, business software, educational software, medical software, databases, and computer games. Businesses are probably the biggest users of application software, but almost every field of human activity now uses some form of application software

Program and library

A program may not be sufficiently complete for execution by a computer. In particular, it may require additional software from a software library in order to be complete. Such a library may include software components used by stand-alone programs, but which cannot work on their own. Thus, programs may include standard routines that are common to many programs, extracted from these libraries. Libraries may also include 'stand-alone' programs which are activated by some computer event and/or perform some function (e.g., of computer 'housekeeping') but do not return data to their calling program. Libraries may be called by one to many other programs; programs may call zero to many other programs.

Three layers

Users often see things differently than programmers. People who use modern general purpose computers (as opposed to embedded systems, analog computers, supercomputers, etc.) usually see three layers of software performing a variety of tasks: platform, application, and user software.

Platform software

Platform includes the firmware, device drivers, an operating system, and typically a graphical user interface which, in total, allow a user to interact with the computer and its peripherals (associated equipment). Platform software often comes bundled with the computer. On a PC you will usually have the ability to change the platform software.

Application software

Application software or Applications are what most people think of when they think of software. Typical examples include office suites and video games. Application software is often purchased separately from computer hardware. Sometimes applications are bundled with the computer, but that does not change the fact that they run as independent applications. Applications are almost always independent programs from the operating system, though they are often tailored for specific platforms. Most users think of compilers, databases, and other "system software" as applications.

User-written software

User software tailors systems to meet the users specific needs. User software include spreadsheet templates, word processor macros, scientific simulations, and scripts for graphics and animations. Even email filters are a kind of user software. Users create this software themselves and often overlook how important it is. Depending on how competently the user-written software has been integrated into purchased application packages, many users may not be aware of the distinction between the purchased packages, and what has been added by fellow co-workers.

Creation

Computer software has to be "loaded" into the computer's storage (such as a hard drive, memory, or RAM). Once the software has loaded, the computer is able to execute the software. This involves passing instructions from the application software, through the system software, to the hardware which ultimately receives the instruction as machine code. Each instruction causes the computer to carry out an operation -- moving data, carrying out a computation, or altering the control flow of instructions.

Data movement is typically from one place in memory to another. Sometimes it involves moving data between memory and registers which enable high-speed data access in the CPU. Moving data, especially large amounts of it, can be costly. So, this is sometimes avoided by using "pointers" to data instead. Computations include simple operations such as incrementing the value of a variable data element. More complex computations may involve many operations and data elements together.

Instructions may be performed sequentially, conditionally, or iteratively. Sequential instructions are those operations that are performed one after another. Conditional instructions are performed such that different sets of instructions execute depending on the value(s) of some data. In some languages this is known as an "if" statement. Iterative instructions are performed repetitively and may depend on some data value. This is sometimes called a "loop." Often, one instruction may "call" another set of instructions that are defined in some other program or module. When more than one computer processor is used, instructions may be executed simultaneously.

A simple example of the way software operates is what happens when a user selects an entry such as "Copy" from a menu. In this case, a conditional instruction is executed to copy text from data in a 'document' area residing in memory, perhaps to an intermediate storage area known as a 'clipboard' data area. If a different menu entry such as "Paste" is chosen, the software may execute the instructions to copy the text from the clipboard data area to a specific location in the same or another document in memory.

Depending on the application, even the example above could become complicated. The field of software engineering endeavors to manage the complexity of how software operates. This is especially true for software that operates in the context of a large or powerful computer system.

Currently, almost the only limitations on the use of computer software in applications is the ingenuity of the designer/programmer. Consequently, large areas of activities (such as playing grand master level chess) formerly assumed to be incapable of software simulation are now routinely programmed. The only area that has so far proved reasonably secure from software simulation is the realm of human art— especially, pleasing music and literature.[citation needed]
Kinds of software by operation: computer program as executable, source code or script, configuration.

Quality and reliability

Software reliability considers the errors, faults, and failures related to the creation and operation of software.

LicenseSoftware

license gives the user the right to use the software in the licensed environment, some software comes with the license when purchased off the shelf, or an OEM license when bundled with hardware. Other software comes with a free software licence, granting the recipient the rights to modify and redistribute the software. Software can also be in the form of freeware or shareware.

Patents

The issue of software patents is controversial. Some believe that they hinder software development, while others argue that software patents provide an important incentive to spur software innovation. See software patent debate.

Ethics and rights for software users

Being a new part of society, the idea of what rights users of software should have is not very developed. Some, such as the free software community, believe that software users should be free to modify and redistribute the software they use. They argue that these rights are necessary so that each individual can control their computer, and so that everyone can cooperate, if they choose, to work together as a community and control the direction that software progresses in. Others believe that software authors should have the power to say what rights the user will get.

taken from http://en.wikipedia.org/

Wednesday, May 28, 2008

Personal Computer Hardware

OK, let's talk about the basic first, the hardware, this is for you noobs out there (if you think you're not a noob, pass this post, seriously)

Computer hardware is the physical part of a computer (that's it, make it simple guys). There're lots of harware that can be attached to computer nowadays (even part of your boddy!! is that make you a hardware too, dont ask me) so it won't gonna be enough if i write it all so i guess i only write about the part that majorly needed to make the computer on.


Typical PC hardware


A typical personal computer consists of a case or chassis in a tower shape (desktop) and the following parts:

Motherboard

Motherboard - the "body" or mainframe of the computer, through which all other components interface.

Central processing unit (CPU) - Performs most of the calculations which enable a computer to function, sometimes referred to as the "brain" of the computer.

Computer fan - Used to lower the temperature of the computer; a fan is almost always attached to the CPU, and the computer case will generally have several fans to maintain a constant airflow. Liquid cooling can also be used to cool a computer, though it focuses more on individual parts rather than the overall temperature inside the chassis.

Random Access Memory (RAM) - Fast-access memory that is cleared when the computer is powered-down. RAM attaches directly to the motherboard, and is used to store programs that are currently running.

Firmware is loaded from the Read only memory ROM run from the Basic Input-Output System (BIOS) or in newer systems Extensible Firmware Interface (EFI) compliant

Internal Buses - Connections to various internal components.

  • PCI
  • PCI-E
  • USB
  • HyperTransport
  • CSI (expected in 2008)
  • AGP (being phased out)
  • VLB (outdated)
  • External Bus Controllers - used to connect to external peripherals, such as printers and input devices. These ports may also be based upon expansion cards, attached to the internal buses.
  • parallel port (outdated)
    serial port (outdated)
  • USB
  • firewire
  • SCSI (On Servers and older machines)
  • PS/2 (For mice and keyboards, being phased out and replaced by USB.)
  • ISA (outdated)
  • EISA (outdated)
  • MCA (outdated)

Power supply

A case that holds a transformer, voltage control, and (usually) a cooling fan, and supplies power to run the rest of the computer, the most common types of power supplies are AT and BabyAT (old) but the standard for PC's actually are ATX and micro ATX. smps( Switch Mode Power Supply )

Storage controllers

Controllers for hard disk, CD-ROM and other drives like internal Zip and Jaz conventionally for a PC are IDE/ATA; the controllers sit directly on the motherboard (on-board) or on expansion cards, such as a Disk array controller. IDE is usually integrated, unlike SCSI which is found in most servers. The floppy drive interface is a legacy MFM interface which is now slowly disappearing. All these interfaces are gradually being phased out to be replaced by SATA and SAS.

Video display controller

Produces the output for the visual display unit. This will either be built into the motherboard or attached in its own separate slot (PCI, PCI-E, PCI-E 2.0, or AGP), in the form of a Graphics Card.

Removable media devices

  • CD - the most common type of removable media, inexpensive but has a short life-span.
  • CD-ROM Drive - a device used for reading data from a CD.
  • CD Writer - a device used for both reading and writing data to and from a CD.
  • DVD - a popular type of removable media that is the same dimensions as a CD but stores up to 6 times as much information. It is the most common way of transferring digital video.
  • DVD-ROM Drive - a device used for reading data from a DVD.
  • DVD Writer - a device used for both reading and writing data to and from a DVD.
  • DVD-RAM Drive - a device used for rapid writing and reading of data from a special type of DVD.
  • Blu-ray - a high-density optical disc format for the storage of digital information, including high-definition video.
  • BD-ROM Drive - a device used for reading data from a Blu-ray disc.
  • BD Writer - a device used for both reading and writing data to and from a Blu-ray disc.
  • HD DVD - a high-density optical disc format and successor to the standard DVD. It was a discontinued competitor to the Blu-ray format.
  • Floppy disk - an outdated storage device consisting of a thin disk of a flexible magnetic storage medium.
  • Zip drive - an outdated medium-capacity removable disk storage system, first introduced by Iomega in 1994.
  • USB flash drive - a flash memory data storage device integrated with a USB interface, typically small, lightweight, removable and rewritable.
  • Tape drive - a device that reads and writes data on a magnetic tape, usually used for long term storage.

Internal storage

Hardware that keeps data inside the computer for later use and remains persistent even when the computer has no power.

  • Hard disk - for medium-term storage of data.
  • Solid-state drive - a device similar to hard disk, but containing no moving parts.
  • Disk array controller - a device to manage several hard disks, to achieve performance or reliability improvement.

Sound card

Enables the computer to output sound to audio devices, as well as accept input from a microphone. Most modern computers have sound cards built-in to the motherboard, though it is common for a user to install a separate sound card as an upgrade.

Networking

Connects the computer to the Internet and/or other computers.

  • Modem - for dial-up connections.
  • Network card - for DSL/Cable internet, and/or connecting to other computers.
  • Direct Cable Connection - Use of a null modem, connecting two computers together using their serial ports or a Laplink Cable, connecting two computers together with their parallel ports.

Other peripherals

In addition, hardware devices can include external components of a computer system. The following are either standard or very common.

Includes various input and output devices, usually external to the computer system

Input

Text input devices

  • Keyboard - a device, to input text and characters by depressing buttons (referred to as keys), similar to a typewriter. The most common English-language key layout is the QWERTY layout.
    Pointing devices
  • Mouse - a pointing device that detects two dimensional motion relative to its supporting surface.
  • Trackball - a pointing device consisting of an exposed portruding ball housed in a socket that detects rotation about two axes.
  • Xbox 360 Controller - A controller used for Xbox 360, Which with the use of the application Switchblade(tm), can be used as an additional pointing device with the left or right thumbstick.
    Gaming devices
  • Joystick - a general control device that consists of a handheld stick that pivots around one end, to detect angles in two or three dimensions.
  • Gamepad - a general game controller held in the hand that relies on the digits (especially thumbs) to provide input.
  • Game controller - a specific type of controller specialized for certain gaming purposes.
    Image, Video input devices
  • Image scanner - a device that provides input by analyzing images, printed text, handwriting, or an object.
  • Webcam - a low resolution video camera used to provide visual input that can be easily transferred over the internet.

Audio input devices

  • Microphone - an acoustic sensor that provides input by converting sound into an electrical signals

Output

Image, Video output devices

  • Printer - a peripheral device that produces a hard (usually paper) copy of a document.
  • Monitor - device that displays a video signal, similar to a television, to provide the user with information and an interface with which to interact.

Audio output devices

  • Speakers - a device that converts analog audio signals into the equivalent air vibrations in order to make audible sound.
  • Headset - a device similar in functionality to computer speakers used mainly to not disturb others nearby.

fieeeww, that's a hell long post. I think that'll be enough for now. Next time, i'll write about it more. Now i need my coffee...

Good days,

Lukm@n

some part taken from http://en.wikipedia.org/