Archive for 746

What is the difference between a compiler and an interpreter?

A compiler, in general, reads higher level language computer code and converts it to either p-code or native machine code. // interpreted by software

An interpreter runs directly from p-code or an interpreted code such as Basic or Lisp. Typically, compled code runs much faster, is more compact and has already found all of the syntax errors and many of the illegal reference errors.

Interpreted code only finds such errors after the application attempts to interpret the affected code. Interpreted code is often good for simple applications that will only be used once or at most a couple times, or maybe even for prototyping.

Compiled code is better for serious applications.

http://en.wikipedia.org/wiki/P-code_machine

Some programing languages:

Duck_typing: http://en.wikipedia.org/wiki/Duck_typing

Script: http://en.wikipedia.org/wiki/Script

Leave a Comment

Concurrent Versions System

Source:http://en.wikipedia.org/wiki/Concurrent_Versions_System

The Concurrent Versions System (CVS), also known as the Concurrent Versioning System, is an open-source version control system that keeps track of all work and all changes in a set of files, typically the implementation of a software project, and allows several (potentially widely-separated) developers to collaborate. It was invented and developed by Dick Grune in the 1980s. CVS has become popular in the open source software world and is released under the GNU General Public License.

  1. Features:
    CVS uses client-server architecture:

    • a server stores the current version(s) of the project and its history
    • clients connect to the server in order to check out a complete copy of the project, work on this copy and then later check in their changes.
    • client and server connect over a LAN or over the Internet, but client and server may both run on the same machine if CVS has the task of keeping track of the version history of a project with only local developers.
    • The server software normally runs on Unix (although at least the CVSNT server supports various flavors of Windows and Unix), while CVS clients may run on any major operating-system platform.
    • Several developers may work on the same project concurrently, each one editing files within their own working copy of the project, and sending (or checking in) their modifications to the server. To avoid the possibility of people stepping on each other’s toes, the server will only accept changes made to the most recent version of a file. Developers are therefore expected to keep their working copy up-to-date by incorporating other people’s changes on a regular basis. This task is mostly handled automatically by the CVS client, requiring manual intervention only when a conflict arises between a checked-in modification and the yet-unchecked local version of a file.
      If the check-in operation succeeds, then the version numbers of all files involved automatically increment, and the CVS server writes a user-supplied description line, the date and the author’s name to its log files //file log will up to date all versions to avoid conflict
    • .CVS can also run external, user-specified log processing scripts following each commit. These scripts are installed by an entry in CVS’s loginfo file, which can trigger email notification or convert the log data into a Web-based format.
    • Clients can also compare versions, request a complete history of changes, or check out a historical snapshot of the project as of a given date or as of a revision number. Many open-source projects allow “anonymous read access”, a feature that was pioneered by OpenBSD. This means that clients may check out and compare versions with either a blank or simple published password (e.g., “anoncvs”); only the check-in of changes requires a personal account and password in these scenarios. Clients can also use the “update” command in order to bring their local copies up-to-date with the newest version on the server. This eliminates the need for repeated downloading of the whole project.
    • CVS can also maintain different “branches” of a project. For instance, a released version of the software project may form one branch, used for bug fixes, while a version under current development, with major changes and new features, forms a separate branch.
    •  CVS uses delta compression for efficient storage of different versions of the same file. The implementation favors files with many lines (usually text files) – in extreme cases individual copies of each version are stored rather than a delta.
  2. Terminology
    A single project (set of related files) managed by CVS is called a module. A CVS server stores the modules it manages in its repository. Acquiring a copy of a module is called checking out. The checked out files serve as a working copy. One’s changes to the working copy will be reflected in the repository by committing them. To update is to acquire the latest changes from the repository in the working copy.
  3. History
    I created CVS to be able to cooperate with my students Erik Baalbergen and Maarten Waage on the ACK (Amsterdam Compiler Kit) C compiler. The three of us had vastly different schedules (one student was a steady 9-5 worker, the other was irregular, and I could work on the project only in the evenings). Their project ran from July 1984 to August 1985. CVS was initially called cmt, for the obvious reason that it allowed us to commit versions independently.– Dick Grune
  4. Limitations:
    For each commonly listed limitation of CVS there is also a commonly listed reason:

    • Moving or renaming of files and directories are not versioned. It was implemented this way because in the past Refactoring was avoided in development processes. More recently the thinking has changed and refactoring can be managed by an administrator (by moving the RCS file) as it is required. If you develop in Oracle Forms, Cobol, Fortran or even C++ then the CVS reasoning is quite commonly accepted; if you develop with Java then the CVS reasoning may seem counterintuitive.
  • No versioning of symbolic links. Symbolic links stored in a version control system can be a security risk – someone can create a symbolic link index.htm to /etc/passwd and then store it in the repository; when the “code” is exported to a Web server the Web site now has a copy of the system security file available for public inspection. A developer may prefer the convenience and accept the responsibility to decide what is safe to version and what is not; a project manager or auditor may prefer to reduce the risk by using build scripts that require certain privileges and conscious intervention to execute.
  • Limited support for Unicode text files and non-ASCII filenames. Unix systems run in UTF-8 and so CVS on Unix handles UTF-8 filenames and files natively. If you only work on Unix systems then this response seems reasonable; however when you work on AS/400 and Windows it may not.
  • No atomic commit.

Over time, developers have wanted to change the CVS code significantly to add new features, refactor the code and improve developer productivity. This has led to the phrase YACC: “Yet Another CVS Clone” (itself a play on the Unix command named, “yacc“, which stands for “yet another compiler compiler”). CVS replacement projects include CVSNT (first released 1998), OpenCVS (not released as of 16 October 2007) and Subversion (first released 2004).

Useful tool to work in a team :D  

Leave a Comment