Pages

.

Really Down Today

I am so depressed today. I got my meds back but I have to give them time to kink in again since I was without them for a while. I need to work because I need the money but I cannot concentrate on writing. I am having a hard time writing this post but I thought maybe I would feel better if I got this off of my chest. I hate feeling this way.

I am also depressed because I am trying to find a different job that doesn't require writing web content. I am sick of writing web content and it is harder to do when you have a hard time concentrating. I am looking for data entry work or something similar and I am not having any luck. I signed up with some freelance sites and applied for a few but haven't heard back. I guess it will take a while and, like most things, I shouldn't expect too much right away. That really sucks though.

The weather isn't helping my mood either. It is really dreary outside and reminds me that summer is almost over. I didn't get to do anything this summer at all. I stayed home because I couldn't afford to and I don't have a car. It sucks not having a car and having to bum a ride every time you need to go somewhere.

Well, that's it for now. I hope these meds kick in soon so I can get out of this brain fog I am in.
reade more... Résuméabuiyad

Mozilla Jetpack Update

The Mozilla Labs crew continues to put a surprising amount of muscle behind Jetpack. I note with interest that Mozilla is looking to hire an engineer (http://3.ly/ic3) and a PM (http://3.ly/4Uf) specifically to work on Jetpack. The fact that Mozilla is creating two new positions (in this economy, especially) tells me they're committed to the Jetpack project. It's not just a (forgive me) "fly by night" affair.

In addition, I think it's interesting that Mozilla Labs recently announced a Jetpack Liftoff code contest, which ends October 15, 2009.
The grand prize winner will receive an ASUS Eee PC 1000HE Black Netbook computer (ARV: $399). The runner-up prize winner will receive stickers and a t-shirt (ARV: $100).

Version 0.5 of Jetpack is set to hit tomorrow night, with a Labs blog about it the following morning.

More exciting to me personally is the fact that the API has expanded significantly. I won't run through any of the new methods here (even though I know you're dying to hear about them in excruciating detail right this minute), but you can sneak a peek at the doc here.

It will be interesting to see what comes out of the contest. Jetpack is at a pivotal point in its career right now. It badly needs a Killer App. It's kill or be killed, in the browser world, and frankly the world doesn't want for APIs at this point. So it behooves MozLabs to slam-dunk this one. If it were me, I would have upped the ante and made the grand prize for the code contest a little grander: a real jetpack. It doesn't say much to give away a $400 netbook, IMHO. (At the very least, give away a fully tricked-out Powerbook. And maybe a claw hammer signed by IceT.)

But then, what do I know about running a contest? I barely know which end of the claw hammer to pound the keyboard with.
reade more... Résuméabuiyad

IceT disassembles a Powerbook


When I first started to watch this video, I was filled with a sense of revulsion and apprehension. By the end of it, I had tears of laughter streaming down my face. That may say more about me than about the video, but so be it. This is performance art at its best. What can I say? I laughed, I cried, it became a part of me.
reade more... Résuméabuiyad

Bad day

I got my meds today and since I have been without them for so long I am having a hard time getting work done. I can't concentrate, I can't get my self to write an article and I just can't do anything. I hate having these mental conditions. It's not fair that I have to live like this.

I thought when I got my meds back that I would feel better, wrong. I feel just as bad if not worse. I have to get used to them all over again and it may take a while. IN the meantime, how am I going to accomplish anything? This is so not fair at all. Right now I feel like zombie and I just want to crawl in a hole somewhere and hide and never come out.

I just had to get that off my chest. I pray I feel better soon.
reade more... Résuméabuiyad

Back from Hiatus

Yes, I'm back from Hiatus, which is a small island nestled between Anomie and Ennui in the southern Doldrums. Actually, I decided to take a break from JavaScript hackery and other forms of bitbanging for a while in order to do a little painting (linseed-oil therapy).

But I'm back now, so I'll be posting updates here more regularly as the summer winds down. Which it's doing all too quickly, I fear.
reade more... Résuméabuiyad

Yesterday Depressed, Today a Manic Episode!

Yesterday was a horrible day for me. I drug my butt around all day trying to get things done. The result, I did dishes, and wrote two blog posts and two articles. Not a very productive day to say the least. I also felt very worthless and was even having suicidal thoughts. It was a long and bad day and I couldn't wait for it to be over.

So today I woke up feeling energized and really good about myself. I couldn't figure out why I was feeling so different than yesterday. Then it hit me, I am having a manic episode. I am on a manic high right now! The reason for these mood swings is because I am Bipolar and I ran out of my medicine and although they are due now and I took them right, I can't get a ride to the pharmacy to get them until Thursday. So I have two more days of not knowing how I am going to feel when I wake up. I hate it!

On the bright side of all of this, I wrote two articles for Associated Content and three articles for Demand Studios today. Plus I just finished one blog post on my main blog and am writing this one now. Plus I am going to write on another one of my blogs. I am a writing fool today and even though I love the energy, I do not like how I got it. I hate Bipolar disorder.

So now I can't stop writing, which is a good thing. And I need to use up all of this energy before it runs out. I hope I get some sleep tonight.
reade more... Résuméabuiyad

Learning to Love Jetpack, Part 2

Mozilla Jetpack is an interesting beast, sitting (as it does) at the crossroads of Spidermonkey and XPCOM. It brings JavaScript programmers within a stone's throw of the imressive XPCOM API with its 1450 interfaces and 890 components, plus it unlocks a world of cross-platform AJAX capabilities and local data persistence. Mind you, Jetpack does not actually hand you the keys to the entire XPCOM universe; that may come later. Right now you just get access to certain wrapped objects. But there's more than enough power under the hood to give Greasemonkey a run for the money.

If you're already familiar with Greasemonkey, you'll grok the basics of Jetpack instantly. A fundamental pattern is firing a script when a page loads in Firefox (except, you have to start thinking in terms of "tabs," not pages). So for example,
   jetpack.tabs.onReady( callback );

function callback( doc ) {
// do something
}
This is a pretty common pattern. Your callback function is triggered when the target document's DOMContentLoaded event is fired. You can manipulate the DOM in your callback before the page actually renders in the browser window. So for example, you might want to filter nodes in some way, rearrange the page, make AJAX calls, attach your own event handlers to page objects, or wreak any manner of other havoc, before the page is actually displayed to the user. This is a standard Greasemonkey paradigm.

The "We're not in Kansas any more, Toto" feeling starts to hit you when you realize that your script can walk the entire list of open tabs and vulture any or all DOMs and/or window objects, for all frames in all tabs; something you can't do in Greasemonkey, since GM is scoped to the current window.

Also, you have access to jQuery. So if you want to see how many links a page contains, you can do:
   var linkCount = $('a').length;
and that's that. If you're not already a jQuery user, you'll want to vault that learning curve right away in order to get max value out of the Jetpack experience. It's not a requirement, but you're shortchanging yourself if you don't do it.

Developing for Jetpack takes a little getting used to. First, of course, you have to install the Jetpack extension. The direct download link, at the moment, is here, but it could go stale by the time you read this. If so, go straight to https://jetpack.mozillalabs.com/.

To get to the development environment, you have to type "about:jetpack" in Firefox's address bar and hit Enter. When you do that, you'll see something like this:



There are several links across the top of the page (Welcome, Develop, etc.). It's not obvious that they are links, because they are not in the usual shade of blue and aren't underlined. Nevertheless, to do any actual code development in the embedded Bespin editor, you have to click the word "Develop" (which I've circled in red above). This brings up a page where, if you scroll down, you'll see a black-background text editor console.



NOTE: Not visible in this screenshot are the final two lines of code:

var ONCE_A_MINUTE = 1000*60;
setInterval( getTweet, ONCE_A_MINUTE );

Note that right under the console, you'll find the words "try out this code." (See red arrow.) They are not highlighted by default and thus show no evidence of being clickable. But if you roll your mouse over the words, they get a grey highlight as shown here.

Note: If you make an edit to your code and click "try out this code" a second time, you may find that nothing happens until you refresh the entire page in the browser. Fortunately, you don't lose your work. But it feels scary nonetheless to refresh the page immediately after making a code echange.

I find it really odd that Jetpack has these obvious user-interface design gaffes. These aren't bugs but straight-out poor UI design decisions. What makes it so odd is that some world-class UI experts (such as Aza Raskin) are involved with Jetpack. Guys. Come on. I mean, really.

Maybe I'll do a code runthrough (for something a little more interesting than the above code) next time. For now, note that the code shown above makes use of Jetpack's built-in Twitter library (which wraps Twitter API functions and simplifies some of the AJAX calls, although I don't know why I should have to learn Jetpack's own Twitter API now). The code shown above simply checks Twitter every 60 seconds for any updates created by a particular user (me, in this case). If a new update is found, the relevant tweet is shown in a toaster notification in the bottom righthand corner of the desktop:



So far so good. But what if you want to give your script to a friend? How does your friend install it? Surely not by using the Bespin console?

Well, assuming your friend has installed the Jetpack add-on already, you can give him or her the script in a text file called something like myscript.jetpack.js. Or better yet, put that script online somewhere. Then you also need to have a page somewhere that contains this line in the HTML (in the head portion):

<link rel="jetpack" href="myscript.jetpack.js" name="TabList">

When your friend opens the page that contains this line, a warning-strip will appear at the top of the Firefox window saying that the page contains a script; do you want to install it? Answer yes, and you get a big scary red page that, if you scroll to the bottom, has these buttons:



Obviously, you need to click the button on the right. At that point, the script will be installed and "live."

There's a lot more to Jetpack development than what I've described here, but this should be enough to get you started. Next time I'll present a (marginally) more meaningful code example so you can get yet another taste of what Jetpack has to offer. Then I'll get back to blogging about more important things, like the hazards of chewing gum while programming, or the high cost of not doing adequate usability testing.

Or maybe I'll just sit back, put my feet up, and tweet.
reade more... Résuméabuiyad