The Programming World

From Color Infection Wiki
Jump to: navigation, search

With the fast and big progresses happened in the past decades, computer programming has become a mature science. Although programming is not that fashion as years ago, but there are still many unexplored and immature spaces for creative ideas and innovations in the software development field. And it has also become a basic and essential skill to help you explore other fields.

This article is just to provide some keywords for you to explore the programming world.

Operating System (OS)

OS is most used software nowadays. It is the deck for all kinds of other softwares. Windows and Mac are the most popular for desktop usage. They really have many advantages for general users, such as rich art making applications and better hardware support. They are also good for developers of some areas, such as large 3D game development. But to be a professional programmer, it is best to be also familiar with some open source OSes, such as Linux and BSD Unix (the 2 are the most popular ones), especial Linux. Because most open source projects are developed under these open source OSes only. These projects use many tools and tool chains only work on the open source OSes. To learn from these projects, it is best to be familiar these tools and tool chains also.

In fact, you can experience these different OSes with one computer at the same time. There are many mature virtual machine (VM) softwares to help desktop users install other guest OSes in the host OS. For example, you can install any number of Windows, Linux, BSD and Mac in a Windows/Mac/Linux/BSD environment.. You can share files between the host OS and guest OSes. Popular VM softwares include Virtual Box (open sourced), VMware Player (freeware) and Hyper-V (commercial).

Unlike the commercial OSes, open source OSs have many different distributions with different configurations. BSD has FreeBSD, NetBSD, OpenBSD and some other distributions. For Linux, there are at least hundreds. Popular ones include Debian, Ubuntu, RedHat, CentOS, Fedora, SuseLinux, Arch Linux and Gentoo, etc. But these distributions are common in the basic usage, so if you are familiar with one, it is easy to be familiar with others soon. BSD is variant of Unix. People often mention Linux and Unix as *nix. FreeBSD has the largest fan base in BSD families and Ubuntu, which is based on Debian, is the one in Linux families. Someone think LinuxMint, which is based on Ubuntu, is a good choice for new Linux users. Personally, I like Debian.

(There are more OSes in the world. DistroWatch maintains a database for open source OSes)

Install Soft packages On Open Source OSes

Unlike the commercial OSes, open source OSes often maintain a soft package repository. For Debian based Linux, such Ubuntu and LinuxMint, apt-get command is used to install compiled binary packages from the pacakge repository. Redhat, CentOS, Fedora and SuseLinux use yum command to do this thing.

You can also use dpkg command to install .deb packages on Debian based Linux. (More on debian package management)

Some package developers also provide executable binary file to install package directly. This is almost the exclusive method on Windows, but it is very rare on open source OSes.

You can also install packages by compiling the source code directly. The GNU tool chain is used popularly in doing this job. This method applies for both Linux and BSD OSes. Specially, FreeBSD community maintains a port system, which is a large collection of many source packages. Though the port system, you can easily find a package then compile and install it.

Basic Programming Knowledge

You need learn a programming language] to program. You also need be familiar with some development tools. The most important tool is compiler.

Programming Languages

  • Assembly, program directly with the machine codes (basic CPU commands). Not recommended, except some special occasions. Because the machine codes are different for different CPUs. And the machine codes are hard to read and remember.
  • C, a real programmer should at least master C. C language is the language most close to Assembly language, which means it is very fast, but keep a good readability. Almost all cores of popular OSes are written with C. C is very popular. Almost all hardware drivers are written with C. The code libraries are very rich. The only field C is not suitable is the web development field, either front end of back end. As a C programmer, you must care about the memory by yourself. The pointer in C is very powerful but also will be dangerous and harmful if the it is used carelessly. (Modern OSes have almost decreased the dangerousness to zero.)
  • C++, it is an extension of C by adding the Object-Orient concept. It is also fast. C++ is the most popular language in large 3D game industry. Many desktop applications are also written with C++ (and C).
  • Java, which is not only a language, but also a huge ecosystem with the ambition to include any aspects of the programming world. It aims to provide inherent memory management and avoid using pointers. Java really decreases the dangerous caused by carelessness, but one cost is java language is not capable of doing the jobs related with hardware directly, another cost is the performance of java programs is much worse than C/C++ (but still better than the following script languages). The performance decrease is bad for desktop applications but it is not a problem for many server end jobs, such as bank and finance related fields and website servers.
  • Python, doesn't like above languages, it is a script language. The source code of a script language program will be compiled and interpret at the run time. For C/C++/Java, you need compile the source code to the executable program then run the executable program. So a script language would be much slower than binary type language. But script languages are more flexible. Like Java, most script languages also provide inherent memory management and avoid using pointers. Python is very popular on writing small scripts and on developing website back end applications.
  • Perl, another popular script language.
  • PHP, this is a script language almost exclusively for developing website back end applications. But many people don't like it for its over-flexibility.
  • JavaScript, it is a script language almost exclusively for enhance website front end experiences. (It has almost nothing with Java language.) Javascript+HTML+CSS is the front end web standard. Recently, a soft Node.js brought JavaScript to the website back end development.
  • ActionScript, this is a language much like JavaScript. It is the programming language of Adobe Flash/Flex products.
  • Lua, this is a special script language with a very small code base. It is most used as an embed language for games.

Some new popular programming languages: Golang, Rust, Nimrod, Julia. (more)

(There are more languages. Nowadays, creating a programming language is much easier with LLVM.)

Programming Tools

Data Structures & Algorithms

Usual Application Types

From the application appearance view, there are some usual types:

  • daemon application, which run as a background process. Daemon applications has no appearances, including many OS system kernel processes, all kind of servers and your own cron jobs.
  • Command line application, many scientific calculation programs, shell commands/scripts and many of possible your simple programs belong to this type.
  • Desktop GUI application, most applications you interact with every day belong to this type. Mouse is very important for applications of this type on PC, Finger is important on mobile devices.
    • Game application, this is a special desktop GUI application type.
  • Website application
    • the front end is another special desktop GUI application type. It is loaded in a browser.
    • the back end is a special daemon or a command line application to interact with the front end.

Tutorials & Books

Popular Applications & Code Libraries

A software is either a application or a code library.

About Software Licenses

  • commercial licenses. Two points in principle: 1. you must pay to use. 2. you can't sell the copies.
  • open source licenses
    • GNU General Public License (GPL), if your software uses other GPLed source code, then your sotware must be also set GPLed.
    • GNU Lesser General Public License (LGPL), looser than GPL, you can use LGPLed library as dynamic library without being forced to release your software under a certain license.
    • MIT, BSD, Apahce, zlib: these licenses are very free. You can use softwares under these licenses in your commercial products. But pleas note some of them need you to mention the copyrights of the corresponding softwares in your product distributions.
  • more ...

Popular Game Development Related Open Source Code Libraries

Famous Applications

Famous Programmers

Code Hosting Services

  • GitHub, support git. Free for open source projects.
  • BitBucket. support hg and git. Free for both personal private and open source projects.
  • Source Forge, or support cvs, svn, hg and git. Only open source projects are allowed.
  • Google Code, support svn, hg and git. Only open source projects are allowed.
  • Gitorious, support git. Only open source projects are allowed.
  • Microsoft CodePlex, support svn, hg, git and vss. Only open source projects are allowed.
  • LaunchPad. support bzr. Only open source projects are allowed.