Programming

FAQ What's New

Table of Contents [show]

Copyright Information

1 Concepts

1.1 Programming Language Theory

Single dispatch vs multiple dispatch These two concepts talk about how we execute methods, or how we assign code segments to method calls at runtime. With single dispatch, we decide the code segment at compile-time. Given an object, a method name, and a list of arguments, we always call that specific segment of code. With multiple dispatch, however, this decision is made at runtime. Depending all the type of the arguments, we could be calling different code segments. This feature needs language support. ...[more]

1.2 Procedural Programming

object-oriented programming ...[more]

1.3 OOP

Object-Oriented Programming ...[more]

1.4 AOP

Programming ...[more]

1.5 SOP

1.6 Memory Management

Memory management is language-dependent. C In C, a program allocate two types of memories to variables: stack and heap. If memory is allocated from the stack, you don't have to worry about it, it will be automatically poped out once you are done. Examples include method calls, local atomic int/float variables, etc. Memory space allocated from the heap, however, needs to be explicitly freed or there will be memory leak. When your program exits, all memory allocated in your program, leaked or not, will be released. In that sense, if a program only runs for a short time and only uses a limited amount of memory, memory leak may be not that big a deal, however, for programs that run for an extended period of time, for example, server programs, memory leak can add ...[more]

2 Languages

2.1 C

C: C Programming Language C#: C Sharp C++: C Plus Plus ...[more]

2.2 ASP

ASP is short for active server pages. ASP is a server-side technology from Microsoft. In ASP, serverside jscripts or VB scripts are embeded into HTML to add more dynamism to webpages. ASP.NET ...[more]

2.3 C#

C: C Programming Language C#: C Sharp C++: C Plus Plus ...[more]

2.4 ColdFusion

ColdFusion is Macromedia's (and before that Allaire's) server-side scripting technology. Compared with Java, ASP, and PHP, ColdFusion has a very good learning curve, it also makes many commonly-used web-programming techniques such as database manipulation easier. ...[more]

2.5 Java

Introduction Java is an object-oriented programming (OOP) language. Similar to C++, Java was originated from the C programming language and it has C-style grammar. Different from C++, Java is a strict object-oriented programming language (not 100% though), while C++ is compatible with C and doesnot force OOP. When Java was invented in Sun Microsystems in 1990, the Green Project Team first called it oak. Java FAQ Ant BeanShell Groovy JAAS JavaBean JBoss JMX JSP Log4J Persistence Struts Tomcat C3P0 smack is a summary of conection pools Java reporting tools Misc ...[more]

2.6 JavaScript

The data necessary to complete this operation is not yet available Check Has your page finished loading yet? In my case, I restarted my browser, which solved the problem how to sort an array Why is opacity not working for me? Make sure you have a background color. For example, .splash{ background-color: #85BBEF; filter:alpha(opacity 60); -moz-opacity: 0.6; opacity: 0.6; position:absolute; top: 200px; width: 100%; z-index: 100; } javascript OOP? Javascrpt is not a pure OOP language: no keywords for inheritance, users have to get inheritance thru hacks like making parent class an explicit member of subclass n...[more]

2.7 PHP

Programming ...[more]

2.8 Perl

Introduction Perl is short for "Perfecf extraction and reporting language". Perl is cross platform because it's an interpretive language. You could run perl on any platform as long as you have a perl interpreter. Perl is not supported by all major operating systems including Windows, nix, and Macintosh. Perl is open-source free software and it is licensed under its artistic license, or the GPL license. Perl was created by Larry Wall and Perl 1.0 was released to usenet's alt.comp.sources in 1987. Why is perl so popular First and most importantly, Perl is an excellent programming language combining all the good stuff from C, awk, sed, sh, and BASIC. In its early years, tt made the life of unix system administrators a lot easier. Later on,...[more]

2.9 Python

Why Python? Compared with regular shells and awk, Python is a real programming language. Compared with C, python is a higher-level language. A simple operation in python may take you days to implement in C. Compared with perl, python features "there is only one way to do it" and "hide as little as possible". For example, in a python class you have to have a self parameter. This arguably avoids cryptic programs. Also Python has a better (or different?) OO support. Compared with Java, python is dynamically typed (Make no mistakes, Python is also a strong-typed). Why is python dynamically typed and strong-typed We say python use dynamic-typing because you just go ahead and use a variable instead of declaring it at compile. Python w...[more]

2.10 Objective-C

Introduction IPhone sdk uses objective-c as the development language. Xcode is the official development environment. Objective-C was invented by Brad Cox and Tom Love in the early 1980s. The company was called Stepstone. In 1988, Steve Jobs left Apple and formed company NeXT. NeXT licensed objective-c from Stepstone. After the acquisition of NeXT by Apple in 1996, objective-c has since become the programming language on Mac. Objective-C and Other Languages Objective-C is an strict superset of C, meaning any C programs can be compiled by a objective-c compiler. On the other hand, most recent gcc compilers has support for objective-C and should be able to compile objective-C code. Both being OO extension of C, C++ and objective-c are se...[more]

3 Tools

3.1 Make

How do I set up environment variables in Makefile? export LD_LIBRARY_PATH: /usr/lib/your-tool/lib How do I escape $ in makefile? Use $$ instead. If you are running a command, use $$ ...[more]

3.2 Perforce

I got this error: No files, what's wrong? Check your environment variable to make sure that you have set P4CONFIG to value .p4conf. How do I delete pending changelist? p4 revert -c //... How do I branch a file? Use p4 integrate, this way you get to keep all the history information How do I create a whole new branch? p4 branch new-branch-name In the branch desc, put the following in the view \depot\existing-branch\... \depot\new-branch-name\... p4 changelist Returns CL number xxxx P4 integrate -c xxxx -b new-branch-name Returns a CL number yyyy P4 submit -c yyyy How do merge changes from my branched file to original file? Use p4 integrate ...[more]

3.3 Bugzilla

bugzilla is an open source web-based debugging system from Mozilla foundation I just installed bugzilla 3.2.2, however, I saw repeated login, bugzilla forces me to log in again and again Try to clean up your cookies, and see if it helps. ...[more]

3.4 CVS

CVS in Programming CVS, or Concurrent Version System, is an open source version control system. CVS via SSH setup ssh tunneling setup the environment variable CVS_RSH, for example, in bash, use export "CVS_RSH ssh" If it doesnot not, try to replace ssh with the full path of your ssh client setup the CVSROOT environment variable export CVSROOT :ext:username@host.name.com:/path/to/repository use the cvs command to perform cvs operations CVS Versions How to find out version information about a file Use "cvs log" to view version information, for example, the following command shows the history of Foo.java: cvs log Foo.java Note that you might have to change to the directory of Foo.java...[more]

3.5 Git

How do I create a git repository? On remote server, run the following mkdir /home/git/myproj.git cd /home/git/myproj.git git init exit On local host, init repository mkdir ~/myproj cp /xxx/yyy/ccc ~/myproj cd ~/myproj git init git add git commit git push ssh://remote.server.com/home/git/myproj.git master On locall host cd ~/ rm -rf myproj git clone ssh://remote.server.com/home/git/myproj.git myproj This will init all necessary config file from repository. How do I remove a file? git rm abc.txt git commit git push origin How do I add a file? cat - > abc.txt git add abc.txt git commit git push origin unable to create temporary sha1 fi...[more]

3.6 Eclipse

Eclipse is a universal programming platform - an open extensible IDE for anything and nothing in particular. People write different plugins for eclipse so that they could be used for different purposes. For example, MyEclipse is a Java plugin for. How to set up eclipse to work with CVS Eclipse works with CVS. To setup CVS on linux, follow the following steps: Make sure you have set up the SSH Keys. Start eclipse, select Window->Preferences->Team->CVS. (Note that in most cases you only need to keep the default setup.) Open the "SSH Connection Method" sheet, check to make sure CVS_RSH is ssh, parameters are "{host} -l {user}", and CVS_SERVER is "cvs". Open the "SSH2 Connection" sheet, and check to make sure that ssh2 home is "$HOME/.ssh", and private ...[more]

3.7 Xcode

Related iPhone, Objective-C A HelloWorld example Here is for iPhone SDK 2.2. Here are the major steps toward your Hello World example: Start Xcode, create a new "Window-Based Application" named "HelloWorld" Download a picture from [www.iPhone-wallpapers.org], right-click "HelloWorld" at the top of your "Group&files" panel, and Add existing to add the background picture you just downloaded Double click Resources->MainWindows.xib, this brings up the IntefaceBuilder Make sure the Library tab is visible, if not, click tools -> Library to bring it up. Make sure the Inspector tab is visible, otherwise click tools -> Inspector to bring it up. Inspector panel has four tabs: inspector for changing UI object properties, connec...[more]

3.8 ReviewBoard

What path do I use when setting up review board with git? From comments in the following file, as of version 1.0.1, /usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-py2.4.egg/reviewboard/scmtools/git.py, """ You can only use this tool with a locally available git repository. The repository path should be to the .git directory (important if you do not have a bare repositry). """ I keep getting an import error? Check your it might be that your apache path doesn't have git directory in it. Note that your shell path var is not necessarily the same as your apache PATH variable. To make sure about that, you could update /usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-py2.4.egg/reviewboard/scmtools/git.py to pri...[more]

4 Software development process

4.1 Extreme programming

Extreme programming (XP) is a development methodology proposed by Kent Bech and Ward Cunningha. XP simplifies and at the same time desciplines the software development process by first developing smaller pieces and then bind them together like a jigsaw puzzle. The idea of composing smalling pieces into a software system is not new, but XP is revolutionary in that it recognizes the following four demensions of software development: communications, simplicity, feedback, and courage. XP works really well for dynamic projects which will change a lot after the project has already started, which is actually true to many software projects. ...[more]

4.2 Scrum

5 Links

5.1 Code Search Websites

  1. http://csourcesearch.net/
  2. http://www.koders.com/
  3. http://www.krugle.com/
  4. http://www.google.com/codesearch

Comments

English-Chinese