Hello_Galaxy program

You've seen Hello World!

What punctuation mark would you suggest for the Hello Galaxy program's greeting? Yes! A question mark - perfect!

Does the greeting use a space, tab, a comma space, underline? OMG! so many choices... Kinda makes a caveman wish for simplier times.


I am envisioning a App - a very simple application, that does some what like the Hello, World! app but instead of introducing a new dev to the language, Hello Galaxy does a few orders of managitude more. I hope there is a small subset of all the programming idioms and phrases that would introduce the experienced devs to all new languages. Much like Hello, World! is designed to quickly introduce you to a running program in the target language. A target Hello, Galaxy? program would help you understand the basic usage of many more of the common features of a programming language.

A first order approximation is of course Hello, World! But what is the next locical step up!


A GitHub Repo of Hello, Galaxy?

Let's Review...

We think that the first Hello, World! program was written in C - most likely by K&R in 1972.

#include <stdio.h>

int main(void)

{

printf("Hello, World!\n");

return 0;

}

It has been reprised by a number of people over the years. Here it is in my current favorite language Swift.

import SwiftUI

struct ContentView: View {

var body: some View {

Text("Hello, World!")

}

}

This is a bit of a huge cheet... as there are a few other files in a simple Hello, World! project; but this gives you the feel of the Swift language and the SwiftUI framework.

I suggest taking a romp through time in Sylvain Saurel's article 70 Years Of “Hello, World!” With 50 Programming Languages -- I love that he's included the date of each language. Or browse the article I tried “Hello World” in 28 languages by Michael Vinh Xuan Thanh who rates each language on a 1-10 scale and has interesting commentary on the arcane syntax of languages. Spoilers his top picks are: Python (10/10), Groovy (10/10), R (10/10), Lua (10/10).



Show me the Requirements

At first I thought I should just write some ATDD style tests that could result in the program I want in many different languages... but that has me surveying around looking for a good Acceptance Testing framework... Then chatting with Derek who said he'd had a similar idea years back (in the dark ages) and he had a book draft for the concept... but he said ... here, just take a programming book off the shelve and look at the table of contents... that's your basic list of features for Hello, Galaxy?

Basic Feature List of Hello, Galaxy?

  1. Language Syntax

  2. Language Comments

  3. Primitive Data Types (numbers, strings, booleans,)

  4. Variables (var vs constants vs literals

  5. Simple Data Types (Arrays, Tuple

  6. A List Data Type

  7. Using a List in the typically ways

  8. Using Loops

  9. Flow of Control Statements (If then else; do while)

  10. A Dictionary Data Type

  11. Iterators or Looping over the Dictionary

  12. User Input

  13. Functions/Methods

  14. Positional Parameters to functions

  15. Classes / Objects

  16. Inheritance


  1. Local vs Global Scope of Access

  2. Access Control Restrictions

  3. Exception Handling


  1. Modules

  2. Packages

  3. Dependency Management

  4. Deployment

The System Metaphore

A program that is designed to teach a language needs to have a simple richness about it... what would that be... it should be fun to learn the application domain as well as use the domain to explore the basic structure of the language, it's awesomness and maybe it's rather seedy and sketchy side. What is this application domain. Some suggestions:

  • A rolodex program... maybe your to young to know a card catalogue system when you see one... but the rolodex was one of the first must have programs.

  • A rolodex of the stars in the Milky Way... yeah... now we are talking useful.

  • Maybe a visible calculating sheet of rows & columns...

  • A simple note taking/storage solution where the notes could stick to anything.

  • A water delivery and disposal station - with both hot & cold water.

Xcode 13 Beta...

Did you notice that Apple took notice of my little article and upgraded the Hello World App in Xcode 13? The default App now has a world icon, and a much richer SwiftUI starting code base.


The origins of Hello World!

Hello, World!

Date: 1972 or earlier

The phrase that has introduced generations to code

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

When you sit down to learn a new programming language, the first thing the tutorial has you do is get the computer to display the phrase “Hello, world!” Perhaps the most famous early example comes from a Bell Laboratories memorandum called “Programming in C—A Tutorial,” written in 1974, though it was also found in a 1972 manual for another language, B, and may go back even earlier than that.

Hello, World! is a beautiful bit of pedagogy. It’s a small, achievable task that offers an early sense of accomplishment. It’s a standard, so it helps illustrate the differences between different programming languages. It’s also a quick and easy way for advanced programmers to make sure everything is working correctly after installing a new environment. (Sometimes programmers use “time to ‘hello world’ ” as a speed test to compare languages and environments.) Perhaps most importantly, “Hello, world!” is doe-eyed, friendly, and helps convey the scale at which the new programmer’s code can have an effect. That is, the world. —Chris Noessel, A.I. design lead at IBM. Read Clive Thompson on the power of “Hello, World!”

See: The Lines of Code That Changed Everything Apollo 11, the JPEG, the first pop-up ad, and 33 other bits of software that have transformed our world.