Feb 19

How to become a hacker

Tag: Life Stories,Linux,Makes you think ...erm @ 9:53 pm

I was reading How to become a hacker

It brought back a few memories.

Phrases like “I like Linux myself but there are other ways (and yes, you can run both Linux and Microsoft Windows on the same machine)” seemed to stir memories in me.

Actually now you can run Linux with Live CDs that aren’t even installed, test drive it and learn from it.

I love linux … a little too much. With each passing year I try to get away from windows, and it just doesn’t work. Mostly because of Flash, and .doc files. -yes I know about open office, but I have not figured out a way to automate the creation of .doc files for the company I work for that hasn’t figured creating those silly documents is like driving a semi to go to the grocery store to pick up a gallon of milk process wise. When a zip file with html would suffice for those pictures and descriptions, but I digress. They pay the bills I do it their way.

At one point in time installing a dual boot seemed so magical. Yet it’s not. I see newbies in ##php on irc.freenode.net all the time. Some of them have such difficulty understanding even the most basic of functions. $var = ‘value’; It’s really that simple.

You tell them the same thing over and over, but you swear they are perpetually stuck in “wow that’s so magical.”

The thing is I find myself in that mode a lot when dealing with other programing languages. It’s like you’re reaching for the name of something, it’s on the tip of your tongue, but you just can’t seem to think of the word. Only in this case -you don’t know it at all. This happens a lot to me when I’m dealing with xul, or should I say the javascript side of xul. The xml behind it is just as easy as an html form, and css.

The funny thing about xul.

Say for instance you set a variable in your page.

<script type="text/javascript"><!--
  my_var = "xyz";
  alert(window['my_var']); // shows xyz.
//-->
</script>
<div id="my_div_id">something inside a div</div>

Then with your xul javascript you do this.

  alert(content.window['my_var']); // does not get xyz
  alert(content.document.getElementById("my_div_id").innerHTML); // no problems here.

I know there’s a safe way of doing this, but I haven’t figured it out yet. Guess it’s time to go be captain-eddie-lamer in #xul on irc.mozilla.org 🙂

The point is when you’re at a point in your education where have that feeling of grasping, and asking yourself how do they do that … that’s a good place to be. You’re trying 🙂

Well enough navel gazing.

Have fun.

Leave a Reply

You must be logged in to post a comment.