The tao of programming

  toucheatout  2006-03-26 04:12  Programming  

Presentation of different types of programming concepts

Choosing a language somehow formats the way one codes. But also does concepts that define ways of programming (and often qualify a language).
Most common now is the object-oriented paradigm, as featured in java, php, c++ etc... As well exist programs that have a different approach, as functional, logical or constraint programming.

Imperative programming
Object-oriented programming
Functional programming
Logical programming
Component or agent based programming

Presentation of different types of programming languages

Scripting with php

PHP (PHP = PHP: Hypertext Preprocessor, yet another recursive acronym) is by far the most popular scripting language for building web dynamic content (such as this site). It has a good reputation for its behavior with databases (mysql being the most famous).

This is an interpreted language, giving much power in terms of flexibility and code readability, but pays the price with execution (eaccelerator and other caching mechanisms make it faster). Usually for the simple processing tasks it has to deal with, combined with nowadays cheap machine resources doesn't make it overwhelmingly uncomfortable.

Programming with java

Java's main advantage also is one of its drawbacks: it is an (semi-)interpreted language. It needs a java virtual machine to execute the java bytecode. That is to say you have to compile it then interpret the resulting code on a virtual machine. The advantage is that bytecode does not need to be recompiled to run on another platform. Instead of compiling N programs on X architectures (N*X operations and an inconvenience on every platform), you compile it once and then have to get X virtual machines (that is N+X operations). Deployment is greatly facilitated.
But hence, even if not a fully interpreted language (as perl or php can be), the overhead to run the virtual machine and then have it interpret into low-level instructions makes java programs execute rather slowly compared to interpreted languages.

Good starting points for programming in java can be found at java.sun.com, and for feature-rich IDEs netbeans or eclipse.

In another site's article, those interested in GUI building will find some practical code samples and explanations using swing.

Programming in C

This is one language that is one of the most low-level by nature and henceforth one of the fastest to run. It is compiled into assembly code, readable by the processor directly. However, the speed comes with drawbacks as well (harder to debug, very dry APIs, more code to write for the same result, details do matter alot). The cycle of coding-compiling-running is also longer than just coding-running as for interpreted languages.

tutorials and stuff at www.cprogramming.com.

Other programming languages

There are a big lot of programming languages around, especially for interpreted and compiled languages. The most widely used (in my eye's view)

Other scripting languages of interest

Perl
Around for a long time, used in system administration and cgi scripts. It has the particularity to be hard to decipher, as it allows for very short syntax.
Python
All the rage actually. Clean code whose blocks are determined by indentation, it is the actual choice for many linux installers, can be used as a module for building web content, and enjoys great popularity amongst developers.
Smalltalk
A great object-oriented language, mainly used for introduction to object-oriented programming. Mind-boggling pure 100% objects.
Actionscript (flash)
This is by many ways one of the dirtiest language found. Yet its presentation power (vectorial images, great support for all kind of medias, design process (loosely) shadows movie editing, ...). Previously a macromedia possession, that has been rebought by adobe.
To develop or manipulate actionscript on the opensource side, without any of the macromedia's tools, grab flare, flasm and MTASC. They are decompiler/compilers/disassembers of actionscript (I for flasm, flare and II for MTASC). More tools and excellent opensource resources on flash on OSFlash.

Other compiled languages of interest

Caml
Functional language (that is, you only define functions) is very interesting and people usually happen to hate or love it. It has an object-oriented brother, O'Caml.
C++
Object-oriented version of C
Pascal
Used mainly for introduction to programming, it is clean. There is a good IDE based on turbo pascal, with a lot of ready-to-use components that allows for RAD (rapid application development), and is user-friendly: Delphi. Yet programmers tend to consider pascal a child's toy. I don't use it but you have to face that it produces an executables (.exe, ...) without much pain.
Check out lazarus.freepascal.org for tools. Should they be linux or windows.
 
Informatics


yro.slashdot.org - Your Rights online


nytimes.com New York Times - International


Informatic headlines