Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a better language-introduction preview than "Hello World"? [closed]

Many programming languages introduce themselves with a simple "Hello World" program.

As a programmer, I must admit that this does not give very good insight into the strenghts and capabilities of the language.

What kind of problem would you suggest to use when providing a demo of a programming language?

like image 993
mbp Avatar asked Mar 13 '09 07:03

mbp


People also ask

What is the best introductory programming language?

Python. Python is always recommended if you're looking for an easy and even fun programming language to learn first. Rather than having to jump into strict syntax rules, Python reads like English and is simple to understand for someone who's new to programming.

Which is the most user friendly language?

Python. Python is perhaps the most user-friendly programming language of any on this list. It's often said that Python's syntax is clear, intuitive, and almost English-like, which, like Java, makes it a popular choice for beginners.

Why do hackers use Hello World?

Hackers also use Hello World “as proof of concept that arbitrary code can be executed through an exploit where the system designers did not intend code to be executed,” according to programming consultants at Cunningham & Cunningham (C2).

Which front end language should I learn first?

Programming languages like CSS, HTML, and JavaScript are among the simpler languages to learn for front-end development. Coding can be challenging, but if you start with one that's easy to learn and geared toward your career goals, it may further your aspirations.


1 Answers

I think the "Hello World" program has its uses. It says a lot if you can run that program:

  • You have your IDE/Tools setup correctly
  • You can write a class and or main method in that language
  • You can call a function in that language to print
  • You can edit a file and format it correctly for that language
  • Your compiler is working and you know how to use it.

So, for those reasons I don't find any better alternative to "Hello World."

However, in terms of a good intro to languages in general, I'm a big fan of coding challenges like Python Challenge. You are given a set of challenges/puzzles you have to complete with the language. They start out extremely basic (the first one is easier than writing a hello world).

They quickly progress into more difficult and advanced tasks, and usually are tasks that are intended to show off a particular aspect of the language.

I only wish every language had such a fun programming challenge. I think a LISP, Haskell, C++, C, Java, etc Challenge would be a fun introduction to the languages for people. They could be tailored to the languages.

The C++ challenge could quickly start having challenges involving pointers and other commonly misunderstood aspects to help drive home those difficult bits while the LISP/Haskell challenges could start to ask some questions that are more tailored to functional languages.

like image 85
mmcdole Avatar answered Sep 28 '22 06:09

mmcdole