Hello World

in #programming7 years ago (edited)

A little preface...

'hello, world'


First introduced in 1974 by Brian Kernighan (one of the fathers of the Unix operating system) in a book about the programming language C [1], it refers to the practice of writing a minimalist application that simply prints out the words 'hello world' in order to get a first impression of the syntax and working environment of the used programming language. Since then it has become an iconic phrase and there exist uncountable lists on the internet giving examples of 'hello world' programs in more or less every programming language imaginable. For an example have a look at the nifty collection gathered on the Hello World Collection website [2].

//Hello World in ISO C++
#include <iostream>
main() {    std::cout << "Hello World!" << std::endl;    return 0; }


So, what better way is there to introduce my blog than to proclaim 'Hello World!' as well. I do not intend to have a specific topic for this blog, but rather present to you projects and ideas I personally find interesting and worth sharing. Expect to see some nerdy stuff revolving around programming, digital technologies and games. I might also spice things up with some cooking recipes as well as some insights into my adventures of making my own gin and bitters... Hence forth the name I have given this endeavour: The Code-Alchemist (I know, I know... it's terribly cheesy).

As I am a scientist in real life, I really hope that at least some of the content I upload will spark some fruitful discussions in the comment sections. Talking about your ideas and hypotheses is one of the most important motors of science and research. I do not claim to be an expert on any of these topics, so hopefully we can all learn something new at the end of the day.


[1] Kernighan, Brian. "Programming in C: A Tutorial" (web)

[2] The Hello World Collection (web)

Sort:  

The version of Hello World you've shown is from the older pre-ISO version of C++, this is evident by the .h on the end of iostream and the lack of the std namespace.

The ISO version of Hello World in ISO C++ from the Hello World Collection site again is:

// Hello World in ISO C++

#include <iostream>

int main()
{
    std::cout << "Hello World!" << std::endl;
}

When I used to program in C++ we'd do the following to deal with the std namespace in a different way, but it may not be considered good practice:

// Hello World 

#include <iostream>
using namespace std;

int main()
{
    cout <<  "Hello World!" <<  endl;
}

Good spot, sir! I am still trying to get used to the editor... there seem to be a couple things that got erased when I removed blank lines. Also... C++ is not my language of choice in real life... otherwise things might have dawned on me earlier.

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.028
BTC 58679.85
ETH 2304.42
USDT 1.00
SBD 2.45