Index


PC programming information page

    Programming information

      Useful general skills

        Regular expressions

        A regular expression is a specially formatted pattern that can be used to find instances of one string in another. Several programming languages including Visual Basic, Perl, JavaScript and PHP support regular expressions, Regular expressions are a very powerful way of matching patterns in text. Regular expressions are generally usually used as find-replace tools. Regular expressions are similar to some find-replace operation in popular text edixtors, only better. Think of a regular expression as an extremely advanced find-replace tool that saves us the pain of having to write custom data validation routines to check e-mail addresses, make sure phone numbers are in the correct format, etc. Regular expressions ("regex's" for short) itself are sets of symbols and syntactic elements used to match patterns of text. Regular expressions figure into all kinds of text-manipulation tasks. Searching and search-and-replace are among the more common uses, but regular expressions can also be used to test for certain conditions in a text file or data stream. Unfortunately regular expressions are quite hard to understand at first.Regular expressions are one of those quirky features that popup in a variety of programming languages, but because they seem to be a difficult concept to grasp, many developers push them away into the corner, forgetting that they even exist.

      Script languages

      Scripting languages are very useful for making small tool program.

        UNIX shell programming

        The UNIX shell is most people's main access to the UNIX operating system.Whenever you login to a Unix system you are placed in a program called the shell. he shell acts as a command interpreter; it takes each command and passes it to the operating system kernel to be acted upon. It then displays the results of this operation on your screen. You can make shell scripts by placing a series of shell commands to a file which you then execure with aid of the the shell. Shell programming with scripts is very useful to automate repetitive tasks such as system administration, regression test, and rapid prototyping. The language syntax of conventional Unix shells such as Bourne shell, C shell, and Korn shell are somewhat awkward.Therefore, shell scripts written in Unix shell programming languages are usually hard to read and difficult to change and maintain. There are different versions of shells used in UNIX systems,Bourne, Korn, and C presents the three shells that are typically available on a UNIX system. There are many basic things which work in quite same way in many shells, but there are lots of differences in the more advanced operations in those different shells. In the near beginning there was the Bourne shell /bin/sh (written byS. R. Bourne). It had (and still does) a very strong powerfulsyntactical language built into it, with all the features that arecommonly considered to produce structured programs; it hasparticularly strong provisions for controlling input and output and inits expression matching facilities. Along came the people from UCB and the C-shell /bin/csh was born. Intothis shell they put several concepts which were new, (the majority ofthese being job control and aliasing) and managed to produce a shellthat was much better for interactive use. The new shell input language used in C-shell was to resemble C, the language in which UNIX itself was written. C-shell had problems(like bugs etc.) so new versions were developed.In came command lineediting, TENEX-style completion and several other features. Out wentmost of the bugs, but did the various UNIX operating systemmanufacturers start shipping tcsh instead of csh. Generally people have used Bourne shell for scriptingand the C shell for interactive use. Shell compatition is still going on. The Korn shell, a commercial implementation of "improved Bourne",has long been a part of System V. POSIX specified more orless the System V Bourne shell as shell standard.bash (the Bourne again shell) by GNU was born to be a POSIX compatiblefree shell. Rc is a small, simple and in most peoples opinion a much cleaner shellthan some other counterparts.The tcsh is an enhanced version of the C shell. It allows command line editing and filename completion.The search for the perfect shell still goes on and the latest entryinto this arena is zsh. It is based roughly on the bourne shell (although thereare some minor but important differences) and has so many additionalfeatures.

        Rexx

        REXX is a programming language designed by Michael Cowlishaw of IBM UK Laboratories. Rexx is an acronym which stands for "Restructured Extended Executor Language". In Mike's own words: "REXX is a procedural language that allows programs and algorithms to be written in a clear and structured way." What makes REXX different from most other languages is that it is also designed to be used as a macro language by arbitrary application programs. The idea is that application developers don't have to design their own macro languages and interpreters. Instead they use REXX as the macro language and support the REXX programming interface. If a REXX macro comes across an expression or function call that it cannot resolve, it can ask the application to handle it instead. The application only has to support the features that are specific to it, freeing the developer from handling the mundane (and time-consuming) task of writing a language interpreter. Rexx language is standarddized.The American National Standard (ANSI Standard) for Rexx is called "Programming Language - REXX", and its number is X3.274-1996 The REXX language itself is independent of a specific operating system. But there always exists functions and services specific for a single operating system. The REXX Product family runs on host systems, such as VM/ESA, VSE/ESA, and MVS/ESA, and workstation environments, such as AIX, OS/2, Linux, and Windows.

        NetRexx

        NetRexx is a human-oriented programming language which makes writing and using Java classes quicker and easier than writing in Java. NetRexx is a programming and scripting language which has been designed to be a simple, effective, and complete alternative to the Java language. With NetRexx, you can create applications and applets for the Java environment faster and more easily than by programming in Java - and you can compile or interpret them, as appropriate. The new -prompt option allows very fast (usually sub-second) compilation or interpretation of most classes. Inspired by two very different programming languages, Rexx and Java, NetRexx blends the easy-to-learn syntax of Rexx with the robustness and portability of the Java environment. The result is a language which is tuned for both scripting and application development, and is therefore truly general-purpose.

        TCL

        Tcl (Tool Command Language) is easy to learn and you can create a useful program in minutes! You are free to use it however you wish, even in commercial applications. Tcl (Tool Command Language) is used by over half a million developers worldwide and has become a critical component in thousands of corporations. It has a simple and programmable syntax and can be either used as a standalone application or embedded in application programs. Best of all, Tcl is open source so it's completely free. Tk is a graphical user interface toolkit that makes it possible to create powerful GUIs incredibly quickly. It proved so popular that it now ships with all distributions of Tcl. Tcl and Tk were created and developed by John Ousterhout. Developers all over the world followed his example and built their own Tcl extensions. Today, there are hundreds of Tcl extensions for all manner of applications.

        Python

        Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems. Python is also usable as an extension language for applications that need a programmable interface. The Python implementation is portable: it runs on many brands of UNIX, Windows, DOS, OS/2, Mac, Amiga, etc. Python is copyrighted but freely usable and distributable, even for commercial use, and of course the download is FREE.

        PHP

        PHP is a server-side, cross-platform, HTML embedded scripting language. PHP is a simple scripting language to implement server side fuctionalityto web servers which support that scripting language.PHP, which stands for PHP Hypertext Preprocessor, is a server-side embedded scripting language. In non-technical terms: a PHP processor is run on the server (Windows, or a flavor of UNIX). When a page is requested that contains PHP, the processor translates and executes all the commands in the page, and then outputs the result to the browser as regular HTML. Because this translation occurs on the server, a page written with PHP is viewable with any browser, on any operation system.PHP can be embedded directly into HTML. PHP code is separated from HTML by Start and End entities. When a document is parsed, the PHP processor only interprets the demarked areas, and outputs the results in the same position. PHP also includes the ability to almost completely separate code from HTML.

        PHP is intended for and excels at processing text, a range of math functions, and interaction with databases, with a limited amount of fuss on the part of the coder. It also is a natural for building web pages requiring the coder to do nothing special to get their output to the browser.

      C

      The 'C' programming language was originally developed for and implemented on the UNIX operating system, on a DEC PDP-11 by Dennis Ritchie. One of the best features of C is that it is not tied to any particular hardware or system. This makes it easy for a user to write programs that will run without any changes on practically all machines. C is often called a middle-level computer language as it combines the elements of high-level languages with the functionalism of assembly language. C allows the manipulation of bits, bytes and addresses- the basic elements with which the computer functions. Another good point about C is its portability which makes it possible to adapt software written for one type of computer to another. C offers the speed of assembly language (or quite near to it) and the extensibility of FORTH, but few of the restrictions of Pascal and Modula-2. At the time that C appeared many languages were in use (many still are).There was a demand for a truly transportable language that would run on all platforms. C was in may ways "good enough" for this. Originally C was described by itsauthors as "portable assembly language" in that it was small, simple,close to the hardware, and without very much in the way of behind-the-scenes magic. C was originally designed to produce very easy conversion (translation) toPDP-11 machine code which would compete well with hand-writtenassembly. The principal reason for major OSs being written in C nowadays appears to be thatthe software manufacturers already have their own libraries of C routinesthat they want to reuse simply because they don't want to pay out to getthem in a different format. They now hold copyright over what they have,and are not going to relinquish it. Thus there is a demand for Cprogrammers.The reason that they put any time, money and effort at all intoproducing the libraries in the first place was that C was being touted as"the way to go" because of its so-called transportability betweenplatforms. This portability is not such tha tyou can just take any C program and compile it in a new system.Many programs and libraries had turned to be more or less platform specific, unless pecifically written for portability in mind in the first place. The C source is usually"mostly" compatible between compilers at best - and that is when only themost rudimentary routines are being written. Very many C programs in real life have more or less platform specific features in them, so porting takes almost always lots of time. In C programming language world there is one book more known and referenced that anything else. The name of this wondrous tome is "The C Programming Language, Second Edition", and it was written by the twopeople to whom the entire world owes a debt of gratitude for the veryexistence of the language: Brian W. Kernighan, and Dennis M. Ritchie.Practically every C book, tutorial, pamphlet, website, or college course everpublished/taught by anyone with even the slightest amount of competencewill eventually refer you back to "K&R", as this book is commonly known.Short of going to the ANSI/IEEE standard, there is no more definitivework on the language, and no more authoritative information source thanthe very creators of the language you're trying to learn.If you want to learn C well, get a copy of this book C Programming Language, Second edition by by Brian W. Kernighan and Dennis M. Ritchie. The book is published by Prentice Hall of Englewood Cliffs, NJ, it wears an ISBN number of 0-13-110362-8. The C programming language simply cannot be learned even halfway effectively without it. C is like a surgeon's scalpel: just a handle and an edge. It can cutpractically anything and in the right hands it can perform miracles.However, use it carelessly and you'll cut your own hands off.

        GCC information

        GCC (GNU Compiler Collection) GCC development is a part of the GNU Project, aiming to improve the compiler used in the GNU system including the GNU/Linux variant. Currently GCC contains front ends for C, C++, Objective C, Chill, Fortran, and Java as well as libraries for these languages (libstdc++, libgcj,...).

        C checkers

        • Checker - Checker is a tool which finds memory errors at runtime. Its primary function is to emit a warning when the program reads an uninitialized variable or memory area, or when the program accesses an unallocated memory area. The Malloc library of Checker is very robust, though a bit slower than the usual GNU Malloc.    Rate this link
        • LCLint - LCLint is a tool for statically checking C programs. With minimal effort, LCLint can be used as a better lint.    Rate this link

      C++

      C++ is an enhanced version of the C language. C++ includes everything that is part of C and adds support for object-oriented programming (OOP). In addition, C++ also contains many improvements and features that make it a "better C", independent of object oriented programming. C++ is actually an extendible language since we can define new types in such a way that they act just like the predefined types which are part of the standard language.

      C# (C sharp)

      C# is a modern, object-oriented language introduced in Microsoft .NET development environment.C# is designed to bring rapid development to the C/C++ programmer, so that the people whi know those languages shoudl be able to easily adapt to C# programming.C# is designed for architecting a wide range of components-from high-level business objects to system-level applications.C# includes built-in support to turn any component into an XML Web service that can be invoked over the Internet-from any application running on any platform.This is what Microsoft proposes as a good Internet programming tool for applications which involve XML and Web Services. C# includes versioning support in the language.

      Ada

      Ada is an internationally standardized object-oriented language. It was originally designed in the early '80s and updated in the mid '90s.It was designed for programming large, long-lived systems, especially those with stringent reliability requirements. Ada was specifically intended to meet the needs of embedded and real-time applications, which must be reliable as well as efficient. Typical examples are aircraft avionics, command and control, and transportation systems. Ada can be used as a procedural programming language with built-in support for multitasking and hardware control and as an object-oriented programming language.Ada is a strongly typed language with a Pascal-like syntax. Ada offers structured control statements; procedures and functions; data type-definition facilities; pointers to dynamically allocated objects, declared objects, and subprograms; block structure; exception handling; and a set of standard libraries. Ada has a traditional run-time data model comprising static storage, stack space for local variables and formal parameters, and a heap for dynamically allocated objects. Ada does not have garbage collection, but does include several mechanisms by which the programmer can prevent memory leaks. Ada's secure underpinnings (strong typing, and so on) as well as specialized functionality, such as mechanisms to promote traceability between source and object code, make the language applicable to systems that must be certified against safety standards such as DO-178B. The Ada 95 standard contains features for interfacing with native (non-Ada) code and data: An Ada program can import subprograms or global data from other languages.

      Pascal

      The programming language Pascal was originally designed by Professor Niklaus Wirth, and named after a French 17th mathematician and philosopher Blaise Pascal widely admired for the clear and direct nature of his ideas. Wirth set out two principal aims for the design of Pascal: that it should be systematic and coherent, so far as possible avoiding arbitrary restrictions, and that it should be suitable for efficient implementation on the currently available machines. The Pascal language was originally designed to be a a teaching language that highlights concepts common to all computer languages and standardizes the language in such a way that it makes programs easy to write. Pascal has strict programming rules, because it is thought that strict rules make it difficult for the programmer to write bad code!

      Pascal has also been standardized. Closely-related but not identical standards were published in 1983 by ISO (originally a BSI standard) and ANSI. The standards were ISO 7185:1983 & ANSI/IEEE 770X3.97-1983, which were in effect identical in most respects, but did contain some differences. The former was revised in 1990 as ISO 7185:1990, and this version was adopted by ANSI in 1993.

      Turbo Pascal is very well known and widely used Pascal compiler for DOS. Turbo Pascal has somewhat less strict rules than original Pascal and added some special additions to the language. Turbo Pascal made the Pascal language a good programming tool for making DOS programs. Turbo Pascal was easy to program and very quick to compile.Inprise has issued free versions of several Borland C and Pascal compilers.You can download Turbo Pascal 1.0, 3.02, and 5.5 and Turbo C 1.01 and 2.01 from the Borland Community Museum if you first register as Borland Community members.

      The modern use of Pascal language is the Borland Delphi development environment for Windows.

        Other Pascal compilers

        • Free Pascal - Free Pascal (aka FPK Pascal) is a 32 bit pascal compiler. It is available for different processors (i386+ and 680x0) and operating systems (Linux, FreeBSD, DOS, Win32, OS/2, AmigaOS). The packages comes under a modified GNU Public License to allow the use of static libraries when creating applications. The sources are available, the complete compiler is written in Pascal    Rate this link
        • Free Pascal - Free Pascal (aka FPK Pascal) is a 32 bit pascal compiler. It is available for different processors (Intel 80386 and compatibles and Motorola 680x0) and operating systems (Linux, FreeBSD, DOS, Win32, OS/2, BeOS and Classic Amiga. The language syntax is semanticly compatible with TP 7.0, some extensions used by Delphi (classes, rtti, exceptions, ansistrings) are also supported. Furthermore Free Pascal supports function overloading and other such features.    Rate this link
        • Free Pascal Compilers, Free Delphi Compilers - Listed on this page are free Delphi and Pascal compilers for a number of platforms.    Rate this link
        • The Pascal Compilers Page - information about many pascal compilers which are also freely downloadable    Rate this link
        • Turbo Pascal Lex/Yacc - This is a compiler generator toolset that supports all recent flavours of Turbo and Borland Pascal, including Delphi, and the Free Pascal Compiler (fpc).    Rate this link

      Lisp

      LISP is understood as the model of a functional programming language today. For many programmers Lisp really is different form what they have been used to. When you consider that the Lisp language has almost no syntax, and only a couple of dozen primitive language elements (called special forms), then Lisp starts to look like a very small language. Lisp has a long, rich history dating back more than forty years. It has survived all of the programming "revolutions" that have rendered lesser langauges obsolete. Despite its being taught as a curiosity, new generations of programmers continue to seek out Lisp as a tool to solve some of the most difficult problems in the world of computing. You will find Lisp in products that must reason about and control complex systems and processes, where the ability to reliably arrive at useful conclusions based upon complex relationships among multiple sources and kinds of data is more important than lightning-fast numerical calculations or spiffy graphics. Lisp gets used for big projects that have to be tackled by one or a few programmers, usually for tasks that are not well defined, or that require some experimentation to find the proper solution. As it turns out, artificial intelligence meets all of these criteria. Lisp is also used as an extension language because of its simple, consistent syntax and the ability for system designers to add new functions to Lisp without writing an entire new language. The Emacs editor and the AutoCAD drafting program are two of the best examples of this use of Lisp.

      There are many variations of Lisp in use. The most standardized Lisp version is called "Common Lisp" that is defined by ANSI Standard X3.226: Programming Language Common Lisp standard. Elisp (emacs lisp) is the language used to extend emacs, the customizable text editor of choice.

      Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language invented by Guy Lewis Steele Jr. and Gerald Jay Sussman. It was designed to have an exceptionally clear and simple semantics and few different ways to form expressions. A wide variety of programming paradigms, including imperative, functional, and message passing styles, find convenient expression in Scheme. Scheme was one of the first programming languages to incorporate first class procedures as in the lambda calculus, thereby proving the usefulness of static scope rules and block structure in a dynamically typed language. Scheme was the first major dialect of Lisp to distinguish procedures from lambda expressions and symbols, to use a single lexical environment for all variables, and to evaluate the operator position of a procedure call in the same way as an operand position.

      ML

      ML (which stands for Meta-Language) is a family of advanced programming languages with [usually] functional control structures, strict semantics, a strict polymorphic type system, and parametrized modules. It includes Standard ML, Lazy ML, CAML, CAML Light, and various research languages. Implementations are available on many platforms, including PCs, mainframes, most models of workstation, multi-processors and supercomputers. ML has many thousands of users, is taught at many universities (and is the first programming language taught at some).

      Structured Query Language (SQL)

      SQL is a tool for organizing, managing, and retrieving data from a computer database. The SQL language is essentially a programming language for relational databases. SQL is independent of the underlying database structure and many vendors offer SQL implementations for their database systems. SQL is often cited as being the lingua franca of relational database management systems. Certainly no other database language has found such wide acceptance among such a broad range of products. SQL is also an ANSI standard language (ANSI SQL-92) for accessing databases. According to ANSI (the only legitimate arbiter here), it SQL stands for S-Q-L and nothing more. Structured Query Language (also known as SQL) allows users to access data in relational database management systems, such as Oracle, Sybase, Informix, Microsoft SQL Server, Access, and others, by allowing users to describe the data the user wishes to see. SQL also allows users to define the data in a database, and manipulate that data. SQL is not, however, a complete programming language. First, it lacks conditional tests (IF) and flow control (GOTO, DO, and FOR) statements. Some database vendors may offer extensions to the SQL language to accomplish these functions, but they are not part of the SQL92 standard. SQL can however be integrated into other programming languages. SQL allows users to access data in relational database management systems, such as Oracle, Sybase, Informix, Microsoft SQL Server, Access, and others, by allowing users to describe the data the user wishes to see. SQL also allows users to define the data in a database, and manipulate that data. A relational model is strongly liked to SQL. In the relational model, data is separated from application programs. Relational model deals exclusively with how data was seen from the user's point of view.In the relational model, a relation is represented as a table of information. It has one or more attributes, which correspond to the columns of the table, and zero or more instances of data with those attributes (called n-tuples or simply tuples), which correspond to the rows. Thanks to the World Wide Web, databases of all kinds have found themselves in the spotlight as the technology emerges as quite an effective means for storing and managing data.

    Debugging

    A debugger is a program that runs other programs, allowing the user to exercise control over these programs, and to examine variables whenproblems arise. The most popular debugger for UNIX systems is GDB, the GNU debugger.


<[email protected]>

Back to ePanorama main page ??