Learning Java Through Poetry

After reading so many informative posts this morning (strokes, Sudoku, knitting, computer animation, shorthand, and many more), I thought I’d write my own. I’ll start with a poem:

Roses are red
Violets are blue
Java is awesome
And so are you!

I learnt Java through Kathy Sierra’s Head First Java:

The reason why I loved it so much was because of the poetry scattered throughout:

FullSizeRender

And another one:

FullSizeRender(1)

Of course, I never realized this at the time. They were mere snippets of the book that really resonated with me (Wow, look at all this poetry, it is so cool, awesomeness). I would write all my own verses to match the ones I’d read.

So here’s a quick tutorial on a first Java program.

The following steps are how to get started with coding.

Install Java on any computer. And then follow the steps:

1. Create and save MyFirstApp.java (included below). For beginner purposes this can be done in a notepad and not an IDE. In fact, we never had the luxury of IDEs when I studied “so long ago”. In the days before Google.

2. Compile to create a class file (MyFirstApp.class) (google it if you need details)
javac MyFirstApp.java

3. Run the app from the console

And here is how a sample .java file looks like:

public class MyFirstApp {

public static void main(String[] args) {
System.out.println(“I Rule!”);
System.out.println(“The World”);
}
}

It’s been suggested I never go into teaching, so I’ll write poetry instead:

Roses are red
Violets are blue
I love coding
How about you?

https://dailypost.wordpress.com/dp_prompt/daily-prompt-2/

Venom

Smoky Air

Your words wrap around my heart
As your promises haunt my mind
Your deceit hangs like smoky air
Polluting my life with poisonous lies

Depth of Sorrow

image

image

The taking of the native child

My child is mine
Fruit from my womb
Ripped from his home
My son is gone

I will not live
I can not laugh
Give back my child
Stolen from me

The white man came
The white man took
Stealing my child
My love from me

https://dailypost.wordpress.com/dp_photo_challenge/depth/

No, Thanks

image

I like the earth
I like it just fine
Please don’t fly me
To the moon so high

https://dailypost.wordpress.com/dp_prompt/no-thanks/

Apple in my Bag

image

I broke the law of another land
A fresh apple was in my bag
Apple was green, it belonged to me
And no customs had been signed

I had no cash, I could not pay
The fine that was handed to me
I promised to pay, they said okay
Allowed me on my way

Time to leave, I paid the fine
But not within the week
The plane was there, I caught a glimpse
But my passport had been blocked

Do not allow, she must not leave
We will not let her go
I had to wait, I could not pass
Fresh apple had tied me down

Seconds passed and minutes too
My heart near skipped it’s beat
I had to sit, I had to wait
Until told that I could leave

https://dailypost.wordpress.com/dp_prompt/breaking-the-law/

Broken Rule

image

I broke a rule when I was ten
The world – it stopped it’s spin
Dad flew into such a rage for
His child doing such a sin

And ever since in every way
I try my best to live within
The rules that have been set-
I clench my teeth and grin

https://dailypost.wordpress.com/dp_prompt/breaking-the-law/

One Word Photo Challenge: Strawberry

image

image

Roses are red
Violets are blue
Strawberries are strawberry
And can be eaten too

One Word Photo Challenge: Strawberry

I’ve Got Mail

image

If I had to choose
Between your words or writing
I would choose reading

To receive letters
Or to write is no hard choice –
Because I love mail!

https://dailypost.wordpress.com/dp_prompt/mortons-fork/

I Love You

back view of lovely young couple hugging in winter

I love you
When you hold me tight
I love you
Through each day and night
I love you
For how you make me feel
I love you
For being so very real
I love you
For kindness in your voice
I love you
Will always be my choice
I love you
For your love and grace
I love you
For your warm embrace

Sister Sheila

image

https://dailypost.wordpress.com/dp_prompt/teachers-pet/

I had a teacher
Her name was Sister S
She taught me math
It was quite a success

She taught me to drive
So I could drive my own car
With my math and my driving
I could get very far

She taught us about rights
And to leave all the wrongs
And taught us about life
And to sing many songs

My informative years
She was able to guide
Showing compassion and love
And any faults she would hide

I had the freedom
To become the woman I am
Sister Sheila was tough
Answer with only – “Yes ma’am”

But she cared for me
As she now cares for my niece –
Thank you for all you have done
I give you my peace

http://www.stcatherines.co.za