Monday, February 15, 2016

Standard Ouput | STDOUT | Files | Hello, Rosetta!

Rosetta Team. Last month, we promised that we would start compiling and chronicle some common programming tasks in various popular modern languages. This week, we are providing the most fundamental program that any computing student has learned. This is the "Hello!" program. The goal of writing a "Hello!" is testing the most basic of computing functions, output. In every computing environment, output streams exits. A program might be supplying output and places it in numerous locations: text files, data bases, the screen, and etc. The most common of these is the screen. Most frequently, the screen is the "standard" location for all program printing commands. As such, this stream of data flow is called standard output and abbreviated as stdout.

It is worth mentioning at this time that stdout is treated like a file although the output appears on the screen. As with text files, one can place information in stdout and redirect another output stream so it fills the stdout file with data. In fact, all of the data sources and sinks on a computing device are treated like files for programming purposes. For the most part, they can all be opened, closed, read, and written.

This week we are supplying a classic "Hello!" program in a few different common modern programming languages: JAVA, C#, The LAMP Trio (PERL, PHP, and Python), plus Ruby.

The Hello, Rosetta! programs require that one has the proper compilers, interpreters, and run-time engines installed on one's computer. Otherwise, they will not function.

JAVA source file
JAVA class file
PHP source file
PERL source file
Python source file
Ruby source file
C# source file

Note: All of these languages are interpreted except for JAVA which is first compiled producing *.class files that are then interpreted by the java run-time engine and C# which produces the Microsoft Common Language Invariant (CLI) or a binary *.exe file depending upon the application.

Most of our JAVA programs will be created in NetBeans or Eclipse. The C# programs will be created with Visual Studio. The PHP, PERL, Python, and Ruby programs will be scripted in a text editor.

This Code Rosetta is not necessarily a programming tutorial, but could be possibly used as such. Its ultimate goal is providing professional engineers with samples of logically equivalent programs in various languages. This will promote polyglot programming and the porting of valuable computing solutions. The first few months of examples should be fundamental and simple.

Happy Coding!



No comments:

Post a Comment