Tuesday, March 9, 2010

hug_dispenser.java

Defining Diagram

Input Processing Output
answer prompts the user to input their answer to a question.
gets the answer.
dispenses a hug based on that answer.
a hug.

Solution Algorithm

hug_dispenser
     prompt user for answer to question “Would you like a hug?”
     get answer
     IF answer = yes THEN
          dispense hug
     ELSE
          do nothing
     ENDIF
END

Java Code



// Programmer: Heath Parkes
// File name: hug_dispenser.java
// Date: 9/3/10
/* Description:
A friendly hug dispenser.
*/

import javax.swing.*;
import java.util.*;
import java.io.*;

public class hug_dispenser
{
public static void main(String[] args)
{
Scanner scanner = new Scanner (System.in);
String answer;
char selection;
System.out.println("Hello! Would you like a hug? (y/n)");
answer = scanner.nextLine();
selection = answer.charAt(0);
if (selection == 'y')
{
System.out.println(" ");
System.out.println("(\\__/)");
System.out.println("(='.'=)");
System.out.println("(\")_(\")");
System.out.println(" ");
System.out.println("Have a hug!");
}
else
{
System.out.println("Fine! Be like that then!");
}
}
}

Monday, March 1, 2010

public static void main

I know it was a long time ago.

I was young, and naive. You weren't that old yourself, but you were sophisticated.

A friend of mine introduced me to you. Remember that day? Not a cloud in the sky - I looked out the window and checked...

You were my first. I've tried to love others but it never worked out. And now the time has come for me to re-evaluate our position. I've decided i'm going to make this work. Will you take me back?

Let's get together and make some sweet sweet code, Java.

I love you.

Sunday, January 3, 2010

Starting on the right foot, or the left lane.

So once again, there was a party at Danny's place. And once again, i completely forgot. As always, it was amazing. People talked to me like an old friend, girls came up to me and talked to me, and I got my shirt off (no bikini for me this year). For some reason, i entered in a good mood tonight, and people really responded to it well. I think because I knew what it was going to be like.

Anyway, the point of this blog was to tell you, the proverbial reader, a story.

On the way home, I stopped at that Shell petrol station at the intersection of where McDonald's is in the Bean Park Rail, to purchase a beverage for my journey home. As I was paying, a gentleman came in and asked if he was going the correct way to go up Mount Ousley. The guy behind the counter was giving him weird directions involving the round-a-bout at the other end of the Bean Park and Picton Road. He still seemed a little fuddled so i informed him that i was driving past the bottom of Mount Ousley, and that he could follow me if he wanted. We went outside and I informed him that when i waved my arm out the window, it meant he should get in the right lane and go right up Mount Ousley, and i would be going left to the northern suburbs. He seemed ok with that.

So we get to the bottom of Mount Ousley, and I waved my arm out the window, but he kept following me over the overpass. I stopped just before the Fairy Meadow exit and he pulled up behind me. I told him that he took the wrong turn, but if he followed me to the round-a-bout near Fairy Meadow McDonald's, he could follow that road back to the freeway. This time, as we drove past McDonald's, he turned left towards the freeway and I plodded along the highway home.

I don't know who the guy was, or why he was travelling to Liverpool at this time of night. I wished him luck as we were stopped after the overpass, and I hope he got there ok.

The End.

Sunday, November 1, 2009

The Circle of Life.

...I notice that there wasn't any music playing. It's kinda like my sense of smell. You breathe normally, and then notice when there is a foul smell. I can be sitting at home, and suddenly realise that i'm not listening to music.

I'm in the mood for some vinyl, so i lean over the fan to turn the turntable on the table on.

The fan i'm leaning over is taking up the power point where i usually have the turntable plugged. So i decide to move the fan to the computer power board.

I look over to the position where the fan would be positioned if it were to be plugged into the computer power board, and notice an empty packet of Arnott's Shapes, in my beloved "Savoury" flavour.

So i pick up the discarded Shapes box, and move to the bin to properly dispose of it. Low and behold, the bin is full and requires emptying. Not an overwhelming task by any means, just inconvenient that i will have to engage some pantaloons to do so.

So i walk to my room and don some duds. Happy that I am now able to leave the house without being accosted for being pantless, i turn my attentions back to whatever it was that i was doing...

... wait, what was i doing?

It's at this point, that I notice that there wasn't any music playing...

Wednesday, October 21, 2009

...and by cleaning out the trash, i of course meant...

ugh, fuck it.

I've been staring at this fucking blog update page for about an hour, the post is in my head, and it just wont spew forth onto my screen. So here it is in point form. If anyone enquires, I may go into more depth on the points.

* Thinking of culling my facebook friends list down to people that i like. If you don't make the cut, you'll probably notice a lack of updates from me. Also going to establish a list of guidelines for being on my friends list for social networking sites. The guidelines will pretty much be "I have to know you. If you're account gets hacked, then I don't want to have you on my friends list anymore."

* removing "bad influence material" from my friends lists on MSN and the such too. I want to surround myself with awesome friends. Not people i only talk to because i think i have a chance.

* I want to take my nan and pop to a recording of Spics and Specs, or to one of their live shows if they do any more.

* general pissing and moaning about my sexual and social inadequacies.

Saturday, October 17, 2009

The Old School.

Scotty and Keean came over last night. We shot the shit and played guitar hero. I swear I wasn't trying to show off :P We ordered pizza and let Scott rape our ear drums with terribly bad music. And i'm not exaggerating there - it wasn't music that i just didn't like, it was music that he had deliberately chosen for it's horridly screeching banshee singers. Oh, and Scott totally managed to sneak Khe Sahn onto my hard drive...

Keean teased that we should all go out in town and terrorise women. I really hope we go ahead with that, because i think it would be the kind of group that would help me with my approach anxiety. I would feel a lot more awesome amongst a group with that configuration.

I also bought a turntable yesterday. I tried to figure it out last night and managed to get it to play - albeit it with the stylus dragging on the vinyl (and me just cranking up the pitch to compensate for it slowing the playback). I actually READ the instructions today, put the counterbalance onto the pick-up arm, and corrected the anti-skate. No, i have no idea what any of that means, but I did it, and now i have Barry White cranking at the even level pitch (+-0). I played my Pulp Fiction vinyl earlier and notice it had a terrible hum, which i *think* was to do with the turntable being on table next to the stereo, and the reverberations creating feedback into the stylus, like a microphone in front of a speaker.

Note To Self: Find local places to buy Vinyl!

Monday, October 12, 2009

My greatest analogy ever.

So, rather unceremoniously, it was over.

I wanted to do something big. I wanted to shake some foundations, and maybe challenge perceptions. What made me think about it was something another deserting rat said. I was telling said rat about me and Phil sitting around on Monday mornings, eating Sausage Rolls. The rat, quite sadly told me that he had never experienced anything like that - pure unadulterated insubordinance. It made me feel bad for the group as a whole.

But then I wondered how far it would get me. Like fucking on the front lawn of a retirement home. It's not as if all these old people would suddenly remember how fun sex was and start sneaking into each others rooms at night or asking for viagra on the next medication review. The only vision I could forsee involved the police and me avoiding the old folks home for a few days until dimentia kicked in and I wasn't recognised anymore.

So I just smiled, returned false sentiments and secretly abused privileges. Fuck I hate being such a pacifist (read: pussy). Even after a short message about the multiple faces that had been shown in my absence, I just smiled as the Dick penetrated my anus for it's last desperate time.

I felt dissapointed more than I did sad. I vowed to not let it affect my new start.

Until the evening when I faced them once more, and I genuinely believed that someone was going to miss me. That's when, for a brief, unresolved, moment, I felt like I was going to cry. As quickly as it came, it passed, leaving me feeling ripped off again.

At the end of the day, it's thier loss. And their loss is my new beginning. Here's hoping i'm appreciated a bit more there.