The Java vs Ruby Programming Languages

INTRODUCTION

The main objective of this small article is to introduce the Java and Ruby programming languages, starting by a bit of history, the language characteristics, comparison between the two programming languages and to finish, a conclusion.

THE JAVA PROGRAMMING LANGUAGE

Java is a very similar language to C and C++, therefore with a huge difference: it was made to be platform independent (you may possibly heard of the slogan “write once, run anywhere”). The Java Technology project lead by James Gosling in the early 1990s, was a tech project which was looking to control electronic devices such as TV and cell phones. The first name was Oak, and after some years the name was changed to Green and afterward Java, the famous name which is kept until today. (Sanchez & Canton, 2002).

Computers just operate code inputs which are commands given to the machine to tell it what do do, so if you consider a machine just operate with codes, how does a computer operate? The answer is basically with programmed code, which is written in a specific language by a software developer or engineer. Java is a high-level programming language, which means it is closer to a natural language (such as English), different from the machine language which is noted with 0s and 1s, or if your prefer, the binary system. (Russell, J. P, 2001).

Some of the characteristics of the Java Programming Language are:

  • Platform-independent;

  • Object-oriented;

  • Multi-threaded;

  • It has no pointers;

  • Automatic memory management, also called Garbage Collector;

  • It doesn’t support multi-inheritance;

  • Exception handling.

THE RUBY PROGRAMMING LANGUAGE

Ruby is a multi-platform interpreted language, very similar to Pearl and Python. Its syntax at first sight may look like Pascal, and it is a pure object oriented language. The language was created by Yukihiro Matsumoto (a.k.a Matz), and it was first released in 1999 (Collingbourne, H., 2011).

Some of the characteristics of the Ruby Programming Language are:

  • Simple syntax;

  • Pure” Object-Oriented Language;

  • Operator overloading;

  • Exception handling;

  • Iterators and closures;

  • Garbage collection;

  • Multi-platform.

COMPARING JAVA VS RUBY

The table below show some of the features the Java Language has versus some of the features the Ruby language has. There it follows:

JAVA

RUBY

SIMPLE SINTAX

X

EXCEPTION HANLDING

X

X

MULTI-PLATFORM

X

X

COMPILED

X

GARBE COLLECTOR

X

X

STRONG TYPED

X

X

OPERATOR OVERLOADING

X

100% OBJECT ORIENTED

X

DYNAMIC TYPED

X

Table 1 Comparison of the Java and the Ruby Programming Languages.

CONCLUSION

I personally believe both Java and Ruby are both modern programming languages. In spite of Ruby appear to support more dynamic features and look simpler / modern, Java is still one of the most reliable technologies in terms of security, scalability and it widely known as a very robust technology. Today, billions of devices run Java though the Android platform and also millions of frameworks are available at the Java community in order to provide resources for developers to do not need to “reinvent the wheel”.

REFERENCES

SANCHEZ & CANTON, 2002. Java programming for engineers. 1st ed. Florida, USA: CRC Press LLC.

Russell, Joseph P., 2001. Java Programming for the absolute beginner. 1st ed. California, USA: Prima Tech.

Collingbourne, H, 2011. The book of Ruby : a hands-on guide for the adventurous. 1st ed. California, USA: Starch Press.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s