A better Hello World: netcat.js
Published 2015-3-15What makes life beautiful.
At core, what you really want to do is make your mom proud of you.
The problem learning to program is that you can tell your mom that you did this cool thing and she won't understand.
The validation loop fails.
Bad. News. Bears.
Sadness.
It sounds like a joke, but it's true. Everyone wants to share their accomplishments with their mom. If you're doing something that neither Mom nor Dad understand, Mom is the one who's going to give you more validation - just because that's how moms are.
Moms love connecting and being in the loop. Moms can motivate.
with programming is that people want something they can show their mom.
Sharing with mom and grandma.
The best way to learn to program is to focus on the things that are going to allow you to share with your mom first.
Let's talk about that.
- Install node
- I wrote that!
You can write a message and have it print to the screen.
hello.js
:
// console is a "global" object that is used for writing to the screen
// "Hello World" is a "string" of characters.
console.log("Hello World");
node hello.js
How to share with Mom and Grams
If you're still living in Mom's basement, it won't be hard to show her.
If, on the other hand, you have left the nest already, you can still reasonably walk her through it over the phone.
Have her
- download and run node from the https://nodejs.org/ (not too hard)
- download your
hello.js
(goes to her downloads folder) - open
cmd.exe
(difficult, but doable) - type
node
and space (harder than it sounds) - drag and drop the
hello.js
into thecmd.exe
window - hit
enter
It's 6 steps, but if your mom really wants to know what you're working on, she can definitely do it.
What they think
Mom isn't going to understand why the words "Hello World" are on a black and green screen or what that has do to with why she should be proud of you - but don't worry, she'll pretend anyway.
Grandma is going to wonder why your mother didn't teach you proper grammar. It should be "Hello, World."
#FAIL
- I'm writing that!
Let's take it a step further.
How about we allow mom to type a message to herself?
By AJ ONeal
Did I make your day?
Buy me a coffee
(you can learn about the bigger picture I'm working towards on my patreon page )