Sunday, March 4, 2012

C#

With the introduction of the .NET framework, Microsoft included a new language called C# (pronounced C Sharp). C# is designed to be a simple, modern, general-purpose, object-oriented programming language, borrowing key concepts from several other languages, most notably Java.


// A "Hello World!" program in C#
class Hello
{
   static void Main()
   {
      System.Console.WriteLine("Hello World!");
   }
}

C# programs generally use the input/output services provided by run-time library of the .NET Framework. The statement:
          System.Console.WriteLine("Hello World!");
uses the WriteLine method, one of the output methods of the Console class in the run-time library. It displays its string parameter on the standard output stream followed by a new line.

Saturday, February 25, 2012

Java

Java is one of the most popular programming languages in use today.  It was originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation).  Originally called OAK, it was designed for handheld devices and set-top boxes.  Because OAK was unsuccessful, in 1995, Sun changed the name to Java, modified it to take advantage of the burgeoning World Wide Web, and released it as both a language and a platform.

The Java language is general-purpose, concurrent, class-based, and object-oriented.  It derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java is network-savvy, reasonably robust, fairly secure, portable, architecture neutral, multithreaded, and generally high-performance .  Its applications are typically compiled to bytecode that is intepreted, at runtime, by a Java Virtual Machine (JVM) into machine code for the particular CPU the application is running on.   End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications, or a web browser for Java applets.

One variant of the "Hello World" code snippet for Java is shown below:

class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}

A "Hello World" Java applet might look something like:

// Hello.java
import javax.swing.JApplet;
import java.awt.Graphics;

public class Hello extends JApplet {
    public void paintComponent(final Graphics g) {
        g.drawString("Hello, world!", 65, 95);
    }
}


Tuesday, February 21, 2012

TIOBE Programming Community Index

The TIOBE Programming Community Index is an indicator of the popularity of programming languages. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. The popular search engines Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings.  Note that he TIOBE index is not about the best programming language or the language in which most lines of code have been written.


In order to count as a programming language for the TIOBE index, there are two criteria:
  • The language should have an own entry on Wikipedia and it should clearly state that it concerns a programming language.
  • The programming language should be Turing complete.  In practice, this is typically satisfied by having, at a minimum, conditional branching (e.g., an "if" and "goto" statement) and the ability to change arbitrary memory locations (e.g., having variables).  


The top 100 programming languages (and numerical index result for first 50) for February, 2012, are listed below:

1.   Java     (17.050%)
2.   C     (16.523%)
3.   C#     (8.653%)
4.   C++  (7.853%)
5.   Objective-C  (7.062%)
6.   PHP  (5.641%)
7. (Visual) Basic  (4.315%)
8. Python  (3.148%)
9. Perl  (2.931%)
10. JavaScript  (2.465%)
11. Delphi/Object Pascal  (1.964%)
12. Ruby  (1.558%)
13. Lisp  (0.905%)
14. Transact-SQL  (0.846%)
15. Pascal  (0.813%)
16. Visual Basic .NET  (0.796%)
17. PL/SQL  (0.792%)
18. Logo  (0.677%)
19. Ada  (0.632%)
20. R  (0.623%)
21.  Lua     (0.527%)
22.  Fortran     (0.524%)
23.  NXT-G     (0.522%)
24.  Assembly     (0.520%)
25.  C shell     (0.512%)
26.  MATLAB     (0.493%)
27.  Scheme     (0.432%)
28.  Groovy     (0.414%)
29.  RPG (OS/400)     (0.405%)
30.  Prolog     (0.391%)
31.  Erlang     (0.367%)
32.  ActionScript     (0.365%)
33.  F#     (0.359%)
34.  COBOL     (0.355%)
35.  Scratch     (0.354%)
36.  ABAP     (0.335%)
37.  Forth     (0.318%)
38.  cg     (0.316%)
39.  PL/I     (0.314%)
40.  D     (0.302%)
41.  ML     (0.297%)
42.  Haskell     (0.293%)
43.  Standard ML     (0.280%)
44.  CFML     (0.278%)
45.  Go     (0.277%)
46.  OpenEdge ABL     (0.270%)
47.  APL     (0.269%)
48.  Smalltalk     (0.267%)
49.  Q     (0.260%)
50.  Tcl     (0.254%)
51.  (Visual) FoxPro
52.  ABC
53.  Algol
54.  Alice
55.  Awk
56.  Bash
57.  bc
58.  BETA
59.  BlitzMax
60.  Boo
61.  Bourne shell
62.  C++/CLI
63.  CL (OS/400)
64.  Clean
65.  Clojure
66.  cT
67.  Dart
68.  Dylan
69.  Eiffel
70.  Euphoria
71.  Factor
72.  Icon
73.  Inform
74.  Io
75.  J
76.  JScript.NET
77.  Korn shell
78.  LabVIEW
79.  LabWindows/CVI
80.  Ladder Logic
81.  Lingo
82.  Max/MSP
83.  Modula-2
84.  MUMPS
85.  NATURAL
86.  Oberon
87.  Occam
88.  OpenCL
89.  Oz
90.  PILOT
91.  PowerShell
92.  Revolution
93.  REXX
94.  S
95.  S-PLUS
96.  SAS
97.  Scala
98.  VBScript
99.  VHDL
100. Z shell