Archive for June, 2007

#!/usr/bin/perl -w joke

Thursday, June 21st, 2007

The following is a Perl (the programming language) joke. If you didn’t know what Perl was prior to the “the programming language” explanation, then don’t bother clicking. But if you do, this is funny! :D

http://www.qwantz.com/comics/guest6/guest_qwantz_aLp.jpg

Developing courage

Thursday, June 21st, 2007

If you want to develop courage, then simply act courageously when it’s called for. If you do something over and over again, you develop a habit. Some people develop the habit of courage. Some people develop the habit of non-courage.
– Brian Tracy

Being yourself

Wednesday, June 20th, 2007

As I hurriedly (only had 30 minutes to eat + change + pack my hockey gear) munched down the unhealthy fast-food (KFC’s Tuesday-special 2 leg and thigh, original, biscuit, and mashed potatoes) that I had gotten on the way home from work, I caught a glimpse of Kathy Griffin on some reality TV show, or some kind of interview, showing her typical day. It wasn’t E! True Hollywood Story, but it was something of that nature, but in her present, not her past.

I rarely watch TV to begin with, so for me to write about something I watched on TV is kind of huge, but I digress. So anyway, Kathy is an _AWESOME_ comedian, and I love her sense of humor (Kathy, if you’re reading this, may I get a ticket to your next show? :p) So it was odd to me, when I saw her fretting over some show she had to do at some big name show place in New York.

She put the pressure on her self, and clearly held herself to a very high standard. She said, “I don’t want anyone leaving the theater without having a good time”. Sometimes I feel that way, creating unnecessary pressure on myself, which is interestingly counter-intuitive, because it just screws me up even more.

Anyway, in that show, she then said, “.. at times like these, I can almost hear Oprah [Winfrey]‘s advice”. Oprah said, “Kathy, the audience didn’t come to the show to hear something anybody could have said on the street. They came to hear something only Kathy Griffin would say.” I made a mental note to remember that and write about it after my hockey class, I should get some points for the extra effort, but I digress again.

Hmm.. I don’t know much about producing comedy shows (and by that I meant, totally clueless), but what Oprah said was interesting to me and I then thought about how we judged a comedian. We measure a comedian by the quality of their jokes. And jokes, are somewhat like software. They’re not physical things you can touch and hold. They’re intellectual properties of their owners. Anyone can easily rip off someone else’s joke and call it theirs, just like pirates do with software. You can reuse software, but a told joke over and over by the same person is just worn out. We have IP laws designed to protect software owners, but last time I checked, you can’t patent a joke.

So comedians actually have it much harder than us software creating people! Anyway, I digress again. I’m thinking about the ways I can apply Oprah’s advice. For instance, this blog. It’s mine, and I think (I think, because I don’t have any solid data to back this up) that most people come here because they are interested in what I have to say. Odds are they didn’t come here to hear what anybody on the street could have said. Which is one of the reasons why I try not to re-hash the same shit that has been going around the Web. If someone suddenly discovered that the world is flat, we really don’t need every single blogger on the planet each writing a blog post that says “OMG, did you know the world is flat?”

This, (in my opinion anyway) is branding. You’re branding yourself. You’re differentiating yourself or your product, from everybody else. If you are doing what everyone is doing, then you’re just like everybody else. Points of differentiation is important, if you are going to compete in a free market — something I learned him my product management class taught by Rod Whitson, President of Townsend, Inc.

Besides, you have to be yourself to be happy. If you try to be somebody you’re not, for external reasons, and if you’re unhappy doing it, then you’ll be miserable (no shit). What’s the saying again, you can’t love another unless you first love yourself, because nobody will love you more than you yourself?

That’s right, Scott. I’m going to be myself, and write whatever I damn well please on this blog. Ha!

Confirm pop-up before HTML form submission

Tuesday, June 19th, 2007

I was messing around with some Javascript today, for use on a HTML form I was building. Here’s a simple code to present the user with a pop-up dialog box when they click a HTML form’s submit button, asking them “are you sure?”

<script type="text/javascript">
function confirmSubmit(){
  var r=confirm("are you sure?");
    if(r)
	  return true;
    return false;
    }
</script>

<form action="" onsubmit="return confirmSubmit()">
</form>

The Javascript confirm() function returns a boolean value, so test that value before proceeding to return true (proceed with form submittion) or false (halt the submission).

Update: I just got back from ice hockey practice, and over at practice, my hockey team member Scott asked what the purpose is of this blog post. The answer is, because this was what I did at work today. I was searching for a way to prompt a user after he/she hits the submit button on a HTML form. I don’t have a lot of code samples on my blog, although when I first started, I had thought of writing lots of technical howto’s with code samples. So I’ll try to write more of these types of blog posts. It’s mostly a matter of time, really. And oh, only the things that I _can_ reveal, such that it wouldn’t compromise my company, the Websense Security Labs. Or in any way infer what we are doing. We like to keep our labs a black box. Keep wondering :p

The world is full of dreamers and thinkers, but the doers are the ones who succeed

Sunday, June 17th, 2007

Readers will notice that I’m on a blog post roll today! 3 posts in a day? Yes, it’s because I’m taking my own advice on building momentum, and my war against all forms of procrastination in my life today! So without further ado, here’s my quickly cobbled together blog post, I don’t care if you like it, because I do! :p

Just wanted to share a related post I read a little while back from CenterNetworks:

You’re in the game to win, so play like it. Bust your butt to get your work done, even if it means skipping out on the finer things in life for a while. The world is full of dreamers and thinkers, but the doers are the ones who succeed. Even if you have to force yourself to work, do it.

I’ve met countless software and web developers with big dreams. When I ask these people what steps they’ve taken to achieve their goals and dreams, often times I hear a sob story, or a “someone elses fault” story. That proverbial “some day” is today. If you don’t have the motivation to move on an idea now, then you probably never will and this lifestyle may not be for you.