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

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

Consider starting by reading someone’s code. It’ll break a few times. You may need to fix a weird edge case. Maybe you’ll have to throw away half of your library. Could you write a simple wrapper around file I/O? 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 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. It may have been used in BCPL before (as below). (Hello, world, 2023) 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

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.

Kernighan himself introduced the C language version 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: (The Origins of “Hello, World!”, 2023)

main () {

external a, b, c;

putchar (a); putchar (b); putchar (c); putchar (‘! * n’);

}

‘hello ’;

b ‘o, w’;

c ‘country’;

The program also prints hello, world! in the terminal, which includes a new line character. Here, the phrase is split across several variables. In programming, a variable is like a container that stores a value, such as a word or a number. In the B language, each of these variables could only hold up to four ASCII characters. ASCII characters are the basic letter, number, and symbol codes that computers use to represent text, divided into many variables because in B, the character’s consistency is limited to four ASCII characters. An earlier example in the study printed “hello!” in the terminal, and the saying “hello, world!” was presented as a short greeting that required the resemblance of a few letters 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 in computer use; since the 1950s, it has been the catchy phrase of radio disc jockey William B. Williams. (Worden, 1974)

Hello world in some famous Programming Languages

Hello World in Bash :

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

echo “Hello, World!”

Hello World in C :

C is a widely used general-purpose programming language created in the 1970s. Its features reflect the capabilities of the targeted CPUs.e 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 particularly well-suited for numerical computations and scientific applications. IBM originally developed it in the 1950s for use in scientific and engineering fields.

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

Hello World in Java :

Java is a high-level, class-based, object-oriented programming language designed to minimize implementation dependencies.

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

JavaScript :

JavaScript, commonly known as JS, is a programming language that is fundamental to the World Wide Web, alongside HTML and CSS. More than 97% of websites utilize JavaScript on the client side to enhance web page interactions, often incorporating various 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. Still, 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 created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP Group now produces the PHP reference implementation.

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

Python :

Python is a high-level, general-purpose programming language. Its design philosophy prioritizes code readability through significant indentation. The language constructs and object-oriented approach are aimed at aiding programmers in writing clear, logical code for both small and large-scale projects.

print("Hello, World!")

Ruby :

Python is a high-level, general-purpose programming language. Its design philosophy prioritizes code readability through significant indentation. The language constructs and object-oriented approach are aimed at aiding programmers in writing clear, logical code for both small and large-scale projects.

puts "Hello, World!"

Source: wikipedia

Stay Updated With Me

Share this post:

Leave a Comment

Your email address will not be published. Required fields are marked *

*