E=mc²-volution

January 8th, 2008

Here’s a poem I wrote in school. I wrote quite a few. I will post the others at a later stage.

E=mc²-volution

Like savage animals they were: impure.
Hairy hunters that strived to survive.
Minds darkenened by the thought to endure,
until one day a flame sparked it alive -
shadows shifted…

Like scared children some were: immature.
Fear faltered thinking - the world was flat;
sailors scared stiff of some sea creature;
where only unwise were scared of the cat.
sands slipped…

Like active ants people were: acceleration.
Electricity, out of nowhere, ignited a fuse -
chained cataclysms caused creation,
which opened the way for abuse…
clocks counted…

Like savage animals we are: destruction.
Wars across the earth - millions of lives wasted.
Typhoons of total termination, radiation.
What’s the next phase of evolution… getting cremated?
countdown commencing

Escaping HTML tags in command prompt

January 7th, 2008

I needed to construct a dynamic HTML document using Transact-SQL the other day. I googled a bit and found that the easiest way to write to a text file in Transact-SQL is to call the command prompt echo command. The problem, though, was that it’s not possible to echo the ‘<’ and ‘>’ characters with the echo command. Well, that’s not 100% true. To be more precise, it’s not possible to do something like the following:

echo <b>Hello World</b> > hello.html

Command prompt doesn’t like you using the ‘<’ and ‘>’ characters, because it uses these characters to redirect the standard input and output to other sources (like our hello.html file in the example, above).

This is how to make it work:

echo ^<b^>Hello World^</b^> > hello.html

Wasn’t that easy? Just use the ‘^’ escape character in front of the ‘<’ and ‘>’ characters when echoing in the command prompt. Obviously, we don’t want to escape the last ‘>’ character, because we want to send our string, outputted by echo, to hello.html.

And this is how it’ll look in Transact-SQL:

exec master..xp_cmdshell 'echo ^<b^>Hello World^</b^> > hello.html'

Easy.

As a final note, the ‘^’ escape character only works in the command prompt of the Windows NT family of operating systems.

Why Religious Ethics Made Me Think

January 6th, 2008

Philosophy HeadI dug around on my hard drive a bit and found all my old essays and projects I did during university. I have decided to post them all here on my blog. Not all at once, but maybe one a day or week or so. This will provide me with a good place to back them up and hopefully the information they provide will be helpful to others as well.

The first essay I will be posting, entitled ‘Why Religious Ethics Made Me Think’, was written for my ICT Ethics class in my Honours year. We had to choose one ethical principal that made us think the most and write about why it made us think the most. I chose religious ethics. Or more specifically, religious ethics in the Christian faith.

Read on for the essay…

Read more »

ASUS Eee

January 5th, 2008

Asus Eee White Now isn’t this a cute gadget? It’s the ASUS Eee - a ’sub-notebook’ designed by ASUS.

This is a great little machine. It’s very small and thus is perfect for travelling. I will be going overseas in a month or two and I’m really considering buying this. It’s perfect for on the move web access.

It comes loaded with Xandros (a Linux distribution), but some people have been loading Ubuntu on theirs.

Here’s what the Eee has to offer:

  • 7″ 800×480 TFT LCD Screen
  • 900 MHz Intel Celeron CPU
  • 512 MB of RAM
  • 2 -8 GB of solid state drive flash
  • Built in microphone
  • Built in webcam (non-surf models)

I’m such a sucker for anything that can run Ubuntu :) Want!

More info:

Finally!

January 5th, 2008

I wanted to do this for a while now. Finally I have my own personal blog to post my own personal thoughts and projects.

Hopefully some of my posts will be useful to someone out there. Otherwise, this blog will just serve as a good way to build up and showcase my portfolio. Whenever I work on my own personal projects, I will post it on this blog.

And that’s my first post. Hopefully, the first of many.