Code to make my day!

January 19th, 2008 by Brad Heap

I am currently working on a complex website that requires two different companies on two different domains to share the same website. I have just mananged to create a piece of php code to analyse the domain name typed in and redirect to the correct section of the site for that company. Awesome!

$url = $_SERVER['HTTP_HOST'];
if(strpos( strtolower($url), “site2″ )!=FALSE) {
header(’location:site2/index.php’);
} else {
header(’location:site1/index.php’);
}

It is not often that code makes me happy.

Hotel Conman Granted Bail - Violent Youth Also Granted Bail

January 19th, 2008 by Brad Heap

A man charged over the theft of items from a Canadian family staying at an Auckland hotel has been granted bail.Peter Malcolm Black, 42, who has the same surname as the Canadian family, was bailed to a South Auckland address when he appeared in the Auckland District Court yesterday.

http://www.nzherald.co.nz/section/1/story.cfm?c_id=1&objectid=10487658

This move seriously weakens my trust in the New Zealand justice system. Earlier in the week we have 6 Police Officers turn up to stop a parent from flicking his son on the ear once. But, on the other hand, we have a serious fraudster who brought disgrace to this country being bailed.

This isn’t the only serious criminal granted bail yesterday.

http://www.nzherald.co.nz/section/1/story.cfm?c_id=1&objectid=10487665

The 16-year-old appeared in the Youth Court and was granted bail.

A 16 year old who was a part of a gang of four who violently beat 4 adults is also granted bail. What is this country coming to? Do you have to be a violent offender in order to be free? Are the police to afraid to deal with serious crime? Something needs to be done here.

Man charged with drunk driving a lawnmower

January 19th, 2008 by Brad Heap

A Dargaville man has been charged with driving a ride-on lawnmower while drunk.The 52-year-old was seen by police driving through the Northland town at 9.30pm yesterday.He was stopped and asked to get the mower off the road. The police officer then discovered the man was a disqualified driver who had been drinking.

Northland police communications officer Sarah Kennett said the man recorded a breath test of more than twice the legal limit.

The lawnmower was impounded for 28 days and the man is to appear in Dargaville District Court this week facing charges of careless driving, driving while disqualified and driving with excess breath alcohol.

You have to love our police force. Impounding a lawn mower. In no way to I condone Drink Driving but charging someone for driving a lawn mower is pretty funny. Who is he going to mow down? The grass?

http://www.nzherald.co.nz/section/1/story.cfm?c_id=1&objectid=10486979

Father warned for flicking son on ear

January 19th, 2008 by Brad Heap

Okay I haven’t blogged in a while, but got three news related blogs to do this morning. Firstly.

http://www.nzherald.co.nz/section/1/story.cfm?c_id=1&objectid=10486718

A father police warned for reprimanding his son by a flick to the ear wants the warning removed from his record.

Professional musician Jimmy Mason flicked his three-year-old son Seth after a biking accident involving his two-year-old son Zach who had injured his eye.

“Seth just wanted to go on riding. He didn’t realise the seriousness of it with the youngest one slipping in and out of consciousness,” Mr Mason told The Press newspaper.

“So I turned to Seth and flicked him on the ear and told him to shut up while we fixed up the young one.”

Police were called by an off-duty police officer.

It was “pretty bizarre” being surrounded by six police officers trying to ascertain whether it was safe for the children to go home with him, Mr Mason said.

He took his sons biking daily and they needed to obey his instructions to stay safe.

“When I say ’stop’ to the kids they have got to stop.” he said.

He was not charged but told that a warning would go on his record.

“It needs to be on record that I disciplined him for something he deserved, not that I’m a child beater.”

He was considering legal action to get the warning removed, Mr Mason said.

Inspector Rick Jury told the paper police had some discretion in deciding whether to prosecute.

One of the law’s clauses allowed parents to use some force for the purpose of minimising harm.

It was only a matter of time before this happened. A warning for flicking someone across the ear, who was acting in a dangerous manner? 6 cops to speak to a harmless parent, being a good parent? The police should be focusing on serious crime such as serious assults, drugs, burglaries and gangs, not taking cheap shots at parents being good parents.

The only positive that I got out of this was from a discussion I was having with some friends. They said the police may have deliberately sent so many cops to overreact to demonstrate how bad the law is. Cops trying to bring down the rule of law, who would of thought?

Young Voters

January 6th, 2008 by Brad Heap

The New Zealand Herald has an article today about first time voters this year.

http://www.nzherald.co.nz/section/1/story.cfm?c_id=1&objectid=10485396&pnum=0 

The article is mainly focused around one person, and comes from a very left wing point of view. Parts of the article are very good, other parts leave a lot to be desired. Some particular comments:

On May 12, she’ll turn 18 and become one of the 190,000-195,000 New Zealanders who, by September 30, will have come of voting age since the 2005 general election. This year, roughly one in 15 (6 per cent) of eligible voters will be first-timers.

This is a large number, and has potential to (if they vote wisely) affect the election.

What do they care about? What will sway them? Will they bother to vote?

Maddy’s mind is already made up. “I’ll vote Green. I don’t know that much, but I just like the ideas. Freedom of speech… I think most kids from here will vote for them because they think it’ll mean legalising weed.”

This is a sad comment, although, it is probably quite true, a sad reflection of today’s youth. People should know who they are really voting for rather then just voting for a party because they are “cool”.

Bradford’s bill, passed into law last winter, reinforced Maddy’s Green leaning. So did the party’s campaign to raise (ideally abolish) minimum youth rates. At $13.50 an hour gross, Maddy knows she’s on good pay for her age, but she struggles to save. She’s reconciled to a student loan for the four-year bachelor of design course at Unitec she begins in March. Her parents, whose earnings disqualify her from a student allowance, will help but with fees of $5700 a year plus living expenses, Maddy expects to rack up around $40,000 of debt.

I believe that this will be one of the reasons that many young people will vote for left leaning parties. This is the culture that the youth of today are being brought up in.

“I don’t stress out about it. I do want to go overseas after, and you get interest when you go overseas, but I don’t want to hang around here until I pay it off.”

This is another issue. When people are becoming qualified they are immediately leaving. See wiping interest did not do much for keeping people in New Zealand, what is needed is a cultural shift. We need a culture that values and respects workers. I doubt that many people today would be strongly proud of their country, except on the rugby pitch.

But she knows of others who’ve been put off tertiary studies because of student loans.

I know of a few as well, but not many. I don’t think that the true figure will be very high.

Young people are often maligned as apolitical and apathetic, but Maddy says political engagement is more to do with parental role models.

Lessons on MMP at school (she wasn’t taught about the system), a free gig carrying political messages, and ads on the radio could reach more youth. Teenagers with parents who don’t care, she predicts, “will grow up and not care either; not because they’re teenagers but because they’ve never really talked about it, nobody’s shown them how it affects them directly. They can’t see how it changes things for you.”

Absolutely agree, unless politics is made “cool” and relevant todays youth few will be interested. 6% of the population maybe newly able to vote, but how many will vote? The youth could really turn this election on its head.

New Year, New Website

January 6th, 2008 by Brad Heap

I have just rolled out a complete overhaul of my website.

The changes in summary:

New:

  • Blog comments are back - provided I don’t get too much spam they will stay.
  • Java Web Start for software section
  • Text versions of many articles

Updated:

  • About me page
  • Articles portfolio
  • Website portfolio
  • Software portfolio
  • Photos

Deleted:

  • Homepage - Replaced with blog
  • Outdoor Activities
  • Links - Blogroll will be its replacement
  • Other stuff I can’t remember

Not Selling Out

January 2nd, 2008 by Brad Heap

Except from TobyMac - Lose My Soul.

It is amazing what you notice in lyrics when you are webdesigning.

Father God, I am clay in your hands,
Help me to stay that way through all life’s demands,
‘Cause they chip and they nag and they pull at me,
And every little thing I make up my mind to be,
Like I’m gonna be a daddy whose in the mix,
And I’m gonna be a husband who stays legit,
And I pray that I’m an artist who rises above,
The road that is wide and filled with self love,
Everything that I see draws me,
Though it’s only in You that I can truly see that its a feast for the eyes- a low blow to purpose.
And I’m a little kid at a three ring circus.

I don’t want to gain the whole world, and lose my soul,
Don’t wanna walk away, let me hear the people say.
I don’t want to gain the whole world, and lose my soul,
Don’t wanna walk away, let me hear the people say.

The paparazzi flashes, and that they think that it’s you,
But they don’t know that who you are is not what you do,
True, we get it twisted when we peak at the charts,
Yo before we part from the start,
Where’s your heart?
You a pimp, hustler?
Tell me what’s your title,
America has no more stars, now we call them idols,
You sit idle, While we teach prosperity,
The first thing to prosper should be inside of me.

We’re free…
Not because of 22’s on the range,
But Christ came in range, we said yes now we changed,

Not the same, even though I made a fall,
Since I got that call, no more Saul, now I’m Paul.

I don’t want to gain the whole world, and lose my soul,
Don’t wanna walk away, let me hear the people say.
I don’t want to gain the whole world, and lose my soul,
Don’t wanna walk away, let me hear the people say.
Don’t wanna walk away,
Don’t wanna walk away

How do I sense the tide that’s rising?
De-sensitizing me from living in light of eternity,
How do I sense the tide that’s rising?
It’s hypnotizing me from living in light of eternity,
How do I sense the tide that’s rising?
De-sensitizing me from living in light of eternity.

I don’t want to gain the whole world, and lose my soul,
Don’t wanna walk away, let me hear the people say.
(Don’t let me lose my soul, my soul.)
I don’t want to gain the whole world, and lose my soul,
(This is my honesty, Father, won’t you cover me.)
I don’t want to gain the whole world, and lose my soul,
(Don’t wanna walk away, and all those people say)
I don’t want to gain the whole world, and lose my soul,
(Don’t wanna lose, I don’t wanna lose my soul.)

Lord forgive us when we get consumed by the things of this world,
That fight for our love, and our passion,
As our eyes are open wide and on you.
Grant us the privilege of your world view,
And may your kingdom be, what wakes us up, and lays us down.

2008 Goals

January 1st, 2008 by Brad Heap

These goals have only been written up quickly, they are based on my 2007 goals, and I will add to them in the coming days.

  • Lead the ASA with professionalism
  • Get a real job or do Post-Grad
  • Live everyday for God
    • Continue to build and grow relationship with God
    • Regularly attend church
    • Read the Bible regularly
  • Keep time for personal space
  • Get Fit
    • Go tramping/outdoors at least six times
    • Go to the gym at least twice a week
  • Take over the world
  • Live life with a foundation of honesty, trust and integrity