Origin of Hello World

When we start learning some programming languages or watching some tutorials, the very first code example we will come across is displaying a greeting message. Most probably message will be

“Hello World” or “Hello World!”

* ignore the case

If we can see this two words in our output, we believe that we achieve something and everything loads, or works as expected. It’s a test, signifying a start to a program. Over the past several decades, it’s grown to become a time-honored tradition. Once the Hello World is displayed in the Output window, internally in our mind we appreciate ourselves like Yeah! we did it. (beginner stage of programmer life; of course, someone still has the enthusiasm after years & years of experience).

The following is my first hello world program I have used in my attempt at learning programming like everyone else

#include <stdio.h>
main()
{
        printf("hello, world\n");
}

Where did it come from?

The tradition of using the phrase “Hello world!” as a test message was influenced by an example program in the seminal book The C Programming Language. The example program from that book prints “hello, world” (without capital letters or exclamation mark), and was inherited from a 1974 Bell Laboratories internal memorandum by Brian Kernighan, Programming in C: A Tutorial, which contains the first known version:

 main() {
        printf("hello, world");
 }

The first known instance of the usage of the words “hello” and “world” together in computer literature occurred earlier, in Kernighan’s 1972 Tutorial Introduction to the Language, with the following code:

main( ) {
  extrn a, b, c;
  putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';

 

After that people started using the same greeting message in books, demos, and tutorials for lots of programming language like Java, C#, etc.

That’s it.

So, Hello World!

Happy Coding!

 

Random Quotes Machine

 

“The things should work; the way we expect them to work; without surprises”

– EfficientUser

I’ve created a quote machine as a part of my course in freeCodeCamp. I’m always interested to read books and famous quotes which has some deep meaning, intellectual thoughts and sometimes some random ones.

This task is really interesting,  the user stories are very simple.

  • I can use whichever libraries or APIs I need. And I have some personal style.
  • When I click a button it should show me a random quote.
  • When I click a share button it should tweet the quote.

To complete this task, I’ve searched on the internet whether any free APIs are already there to give me a random quote. And I have got a bunch of links. I have picked an API from the top list and started adding into my code.

The API documentation provides sample request to query the API. It’s a getJSON sample which uses jQuery to run. So I have imported jQuery CDN in my HTML code.

Then I have created the button to trigger the API call to get Quotes. And created a tweet button with the help twitter official documentation. For some personal styling, I have added material CSS CDN to my code.

Earlier I have displayed the quotes in the normal div, then I have replaced it with material CSS cards.

That’s it! Quote Machine Ready 🙂

You can find the quote machine I have created below,

And also I have recorded the vlog when doing the quote machine coding task.

You find that below:

Check it out, and let me know thoughts in comment section.

Happy coding 🙂