“Hello world” Mystery | Why do people write Hello world?

Why do people write hello world? To get an idea of what’s possible. And by “what’s possible” I mean “I could give a damn what you do after hello world.”

When a baby is born, the baby is like: Hello world, see I am here! You know we humans are weird. We want people & the world to recognize us. Maybe That’s Why People Write Hello World in their First ever program to tell the world, Look I’m in Too, Here is your Competition!

Hello World
Hello, World

Maybe you’ll start reading someone’s code. It’ll break a few times. Maybe you’ll have to fix some weird edge case. Maybe you’ll have to throw away half of your library. Maybe you’ll write a little wrapper around a simple file IO. Maybe you’ll write a command line to get some directories for an application and start playing around.

It’s going to take a while to get that first version out, and there’s going to be a lot of the most awesome code on the internet with that first version.

Do you know what’s even more awesome than a first version? A second version, third version, hundredth version, and beyond. I can’t think of a single case where it’s in a developer’s best interests to write an app/Program that breaks in five hundred times.

If you have a rule that you can’t start working on a project until it’s broken, then congratulations. You’re almost done coding your entire career.

Origin And History Of Hello World

Although small experimental programs exist from the development of compact computers, the tradition of using the phrase “Hello, World!” as the experimental message was influenced by the model program in the 1978 edition of The C Programming Language., but there is no evidence that ‘hello world’ appeared there, and may have been used in BCPL before (as below). An example program in that book prints “hello, world”, and was inherited from the 1974 Bell Laboratories internal memorandum by Brian Kernighan, Editing C: Lesson

Hello World Program by Brian Kernighan in 1978
Hello World Program by Brian Kernighan in 1978

main () {
printf (“Hello, world”);
}
In the example above, the main function () describes where the program should start. The task body consists of a single statement, a call to the printf function, representing “print format”. This function will cause the system to output anything transmitted to it as a parameter, in this case the character unit says hello, earth.

The C-language version was introduced by Kernighan himself in the 1972 Introduction to Language B Teaching, in which the first known version of the program was found in a model used for external dynamics:

main () {
external a, b, c;
putchar (a); putchar (b); putchar (c); putchar (‘! * n’);
}

‘hell’;
b ‘o, w’;
c ‘country’;
The program also prints hello, world! in the terminal, which includes a new character. The phrase is divided into many variables because in B, the character’s consistency is limited to four ASCII characters. An earlier example in the study printed it hello! in the terminal, and the saying hello, world! presented as a short greeting that required the resemblance of a few letters in order to be pronounced.

The Jargon File says “Hello, Earth!” instead it was established by BCPL (1967). The claim is said to be backed by archived notes by BCPL founders Christopher Strachey (CPL (editing language)) and Martin Richards in Cambridge. A term that has been rejected for more than a decade on computer use; since the 1950s, it has been the catchy phrase of radio disc jockey William B. Williams.

Hello world in some famous Programming Languages

Hello World in Bash :

Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been used as the default login shell for most Linux distributions.

echo "Hello, World!"

Hello World in C :

C is a general-purpose computer programming language. It was created in the 1970s and remains very widely used and influential. By design, C’s features cleanly reflect the capabilities of the targetted CPUs.

#include <stdio.h>

int main() 
{
  printf("Hello, World!\n");
  return 0;
}

Hello World in C++ :

C++ is a general-purpose programming language created by Bjarne Stroustrup as an extension of the C programming language, or “C with Classes”.

#include <iostream>

int main() 
{
  std::cout << "Hello, World!\n";
  return 0;
}

Hello World in C# :

C# is a general-purpose, multi-paradigm programming language. C# encompasses static typing, strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented, and component-oriented programming disciplines.

using System;

class Program
{
    void Main(string[] args)
    {
        Console.WriteLine("Hello, World!");
    }
}

Hello World in Fortran :

Fortran is a general-purpose, compiled imperative programming language that is especially suited to numeric computation and scientific computing. Fortran was originally developed by IBM in the 1950s for scientific and engineering applications.

program Hello
  print *, "Hello, World!"
end program Hello

Hello World in Java :

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.

public class Main {
 public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}

JavaScript :

JavaScript, often abbreviated JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. Over 97% of websites use JavaScript on the client side for web page behavior, often incorporating third-party libraries.

// For HTML Document
document.write("Hello, World!");

// For Browser Console
console.log("Hello, World!");

Kotlin :

Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin’s standard library depends on the Java Class Library, but type inference allows its syntax to be more concise.

fun main() {                        
    println("Hello, World!")        
}

PHP :

PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP reference implementation is now produced by The PHP Group.

<?php
  echo 'Hello, World!';
?>

Python :

Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small- and large-scale projects.

print("Hello, World!")

Ruby :

Ruby is an interpreted, high-level, general-purpose programming language which supports multiple programming paradigms. It was designed with an emphasis on programming productivity and simplicity. In Ruby, everything is an object, including primitive data types.

puts "Hello, World!"

Source : wikipedia

Stay Updated With Me