Hello World

Hello world is probably the simplest, most famous and the best example you can ask for when you are trying to understand any new tool or technology. Just by understanding how Hello World example works completely, provides enough insight to understand the capabilities of the product to most extent. I would say that just learning the Hello World program of any new technology or tool completely is enough to understand more than 60% of the technology in total – since you can understand and correlate the new technology with what you are already familiar with (assuming that you are familiar with at least one technology of course :))

Let’s understand the basics of what will be exposed when looking at Hello World Examples. When I say Hello World Example, I mean to understand the following four stages of the program namely:

  1. Design
  2. Development
  3. Execution
  4. Conclusion

Design part of the Hello world process is more generic in nature and doesn’t change from one technology to another. Development, Executions and Conclusion are usually covered based on the technology you are trying to learn. To understand the design principles of Hello World, let’s take a look at it from two different perspectives – program consumer and program developer.

Program Consumer (Black box or Contract Perspective)

Hello World

Hello World Program from Contract Perspective

In this perspective, the program consumer tries to call the Hello World program by giving it an input like a name (input is usually a simple text). Based on the input provided, the program should revert back with a suitable greeting message – usually in the form of an appropriate greeting. For example, if the program takes name as an input like “ExpertzMe”, the output from the program will be “Hello ExpertzMe”.


Program Developer (White box or Implementation Perspective)

Hello World

Hello World Program Flow Chart

No matter which programming language you use to implement the Hello World example, the basic steps involved in the program will be to

1. Receive Input

Usually the input text provided as input to the process is stored into some sort of an input variable for the program to execute. Storing the value into a variable helps understand the type of data and easy access to the data for further processing. The structure of the input is usually left to be as simple as possible – since goal is to understand the over all behavior and not the complex data type handling.

2. Assign Greeting

This step involves appending a greeting to the name or text provided as input. For example, if the input to the program is text “ExpertzMe”, then the output from the program is initialized to the value of “Hello ExpertzMe” using some sort of assignment. In almost all technologies, this step is achieved by concatenating the static greeting prefix (like the string “Hello “) to the given input text.

3. Return Output

The output which has been initialized in the assign greeting step above will be sent back to the caller. This would involve using one of the features of the tool to send output to the caller of the program. No additional logic – except for returning the value back to the user – is applied in this step.

Note that the above steps are only pseudo steps for depicting the flow of the Hello World program. Based on the tool’s capability, you could combine assign greeting and return output steps into one as well.

Advantage of Hello World Program

Advantages of Hello World Program are:

  • Intent of the program is universally known – so you are already familiar with what you are expecting the program to do
  • You will learn at the end of the tutorial how you could implement a simple program end to end using the tool
  • You will have seen how the implementation of the program looks like and get a feel for different capabilities of the technology
  • Learning how the execution of the program happens – so that you can understand the infrastructure of the technology
  • Learn some of the basic debug or tracing skills provided by the tool or the platform

Share this:

About Chethan

I am the Founder and Director of Expertz.me! I am an Entrepreneur, Architect, Problem Solver & Techy - All rolled into one!!