Javascript Inheritance Diagrams with GraphViz and Base.js

At my office we’re using XULRunner to deploy a large-scale application platform which requires a hefty Javascript class hierarchy. Due to Javascript’s lack of “true” class inheritance, we were forced to make use of one of the many Javascript OO libraries available. When I stumbled upon Dean Edwards’ Base.js, I was in heaven. It makes Javascript inheritance quite painless and ultimately does what you tell it to:


var Vegetable = Base.extend({
	constructor: function() {
		// constructor
	}
});
var Kale = Vegetable.extend({
	constructor: function() {
		this.base(); // run vegetable constructor
		// ... kale constructor
	}
});  ...

However, as any programmer would, I wanted more. We were evolving a substantially complex class hierarchy and documenting this would prove to be cumbersome. I sought a means of creating inheritance diagrams painlessly. My first thought was code interpretation, but I realized that given my timeframe (I wanted to do it in less than an hour), it simply wasn’t an option. That was when I dug into the Base.js code and made a few modifications…

[Read]

Free as in Skool

Last night, ABC Cafe hosted a benefit concert and information session for Ithaca Freeskool, a new local collective aiming to start an anarchist learning initiative in Ithaca.

I first heard of this type of collective learning initiative when I found Anarchist Free University in Toronto in a post on Boing Boing. Their website is complete with curricula for each course, including ones on obscure topics like Current Indigenous Movements in the Context of What is Known as Canada and Secret History Of The World. Members are invited to teach anything they have to offer, but courses run as rigid as a normal institution: There are summer, winter, and fall sessions that run for ten weeks each.

The Ithaca Freeskool is loosely modeling itself after Free Skool Santa Cruz. Its website sums up its mission quite succinctly:

Free Skool Santa Cruz is an interactive, decentralized model for learning-without the limitations of hierarchy and the sterile institutional environment of a University or formal school. It is an attempt to de-school ourselves and to learn from one another the skills necessary to transform society and challenge oppressive systems.

I am currently considering teaching a course at Ithaca Freeskool, but am unsure of a topic which is aligned with their mission. Here are a few ideas I’ve been kicking around; maybe you can help me decide:

  • Choose Your Own Text Adventure — Learn how to create your own text adventure computer game using the Ruby programming language. Examine the language from the bottom up and have a lot of fun developing a storyline as well.
  • 21st Century Ethics — A discussion group about ethical issues facing Generation Next. Topics will include the open source software initiative, intellectual property laws, and environmental responsibility.
  • What the F@&K is Ontology? — A discussion group surveying the branch of philosophy known as ontology, the study of being.

For more information on Ithaca Freeskool (including a link to their mailing list), please visit this post from Ithaca Underground.

Your environment, your wallet: Seven tips to save money and reduce your ecological footprint.

Far too many people equate environmentalism with expensive goods like organic foods and hybrid cars. While these things are important in the green movement, there are ways you can make a lasting difference. Here are a few I’ve tried:





[Read]

Film Review: Our Daily Bread

Last weekend, Cornell Cinema showed Our Daily Bread (German: Unser täglich Brot) (2005), a German documentary by Nikolaus Geyrhalter. The film examines the modern food industry, specifically its use of mechanized production to maximize efficiency and profit. I expected, as I was walking in to the theater, to see a Michael-Moore-Super-Size-Me-style documentary, complete with director commentary and ambush journalism. Instead, I found myself immersed in a Koyaanisqatsi-meets-The-Jungle film experience, more effective than any politically-driven film endeavor could have hoped to be.
[Read]

Like the White Rabbit, with less fat around the edges.

Welcome to the next reincarnation of the White Rabbit, now teejayvanslyke.com. All of my posts from the old site are still archived on this site, but my focus will change slightly from the topics of yesteryear.

I would also like to start doing more non-blog publishing; specifically, my recent fiction endeavors.  I am considering turning my current fiction project, a short novel entitled Self-Immolation of an American Monk, into a chapter-by-chapter series, published to this site incrementally.

The topic of sustainability has also moved to the forefront of “things worth speaking of.”  I am currently working out a proposal to do some sustainable development work in Kerala, India, with the aid of a Fulbright grant.  I am also doing research on the issue of local food distribution, specifically with regard to use of web technologies to automate the logistics of distribution, ordering, and inventory.  Expect updates on these projects as they progress.

It’s great to be back.

I am Jack’s Blue Screen of Death.

One article in particular caught my eye today on Slashdot. It seems that some tech workers in Silicon Valley have started their own boxing clubs, inspired by the 1999 film Fight Club. The fact that this article surfaced only hours after I finished watching Fight Club and researching nihilism is uncanny. Their version of Fight Club is unlikely to start a nationwide revolution causing a prolietariat uprising and the erasure of our debt record (although it would be nice); however, it goes to show that self destruction is in.

Nihilism is a topic that has intrigued me for some time. I have always understood the sense behind disbelief in truth and morality, but could never (and still cannot) accept it. Perhaps it is our inherent need for something intangible to hold on to, whether it be our job, our country, our church, or our marriage. These things are never permanent; they are always fleeting or fading. Yet, there is no denying that a life free of attachments sounds attractive. After all: What you own ends up owning you.

Fall in love.

When you fall in love, the distinctions and priorities that once clouded your mind no longer matter. Being with that person as much as possible becomes a dream, an obsession. The word ‘obsession’ often has an ill connotation, as if passion and desire are ideals which should be avoided at all costs. But then what is there to live for? If being with someone can pull your heartstrings to the point of no return, if being apart from them can propel you into a state of disarray—not unbearable, but oh-so-treacherous—why shouldn’t we cherish it, fight for it, and claim it as ours? That is not to say that love can ever be one-sided; rather, it is to say that all there truly is to live for—to die for—is each other.

But what about “the big picture?” You know, the bills, the boss, the job, church, Wall Street, the Internet, politics? Unravel every one of these to its core and find the answer for yourself. We occupy our cubicles so that one day we will acheive some “pie-in-the-sky” eternal greatness that we cannot yet fathom. We invest in a system of stocks and bonds that promises to yield returns for our retirement. We fill our brains with nuggets of information that will somehow bring us satisfaction. Yet somehow, no matter how hard we work, no matter how much we invest, and no matter how much we know, we are no more fulfilled. What if we ceased our preparations for the future and acted for the moment? Acted for each other, rather than for some faceless abstraction, be it our job, our stocks, or our facts?

That is not to say that we should quit our jobs or stop working altogether. After all, we must provide for our survival. However, in our modern age there is a distinct focus on the intangible. We often find ourselves hanging on to the mental constructions we have fabricated for ourselves, forgetting that everything of significance can be felt in a lover’s touch. Money is the eternal scale by which we evaluate the worth of everything (and often everyone), but those with an overabundance of it are often less fulfilled than those living paycheck to paycheck.

So fall in love. Kisses are cheaper than cars.

Newspeak, here we come.

The U.S. Senate voted yesterday by an overwhelming majority to make English the United States’ national language. While proponents of a national language may point out obvious merits in the legislation of a national language, it represents further homogenization of our world culture and a step closer to the horrific notion of a language that speaks for its state, akin to the Newspeak language in George Orwell’s Nineteen Eighty-Four.

Now, do not think I am suggesting that this is another conspiracy concocted by Big Brother himself to gain more control over all of us puny commoners. There are distinct economic and diplomatic advantages to language homogenization. It allows us to better understand both our trade partners and avoid misrepresentation within our communities. However, we must acknowledge the consequences of such legislation. While language is a conduit of thought, it also emphasizes a culture’s world view and heritage. It is this diversity that creates culture itself. Likewise, we must evaluate the original intentions and motivations of the English language. English evolved from a predominantly Christian society with a particular metaphysics and understanding of the world. Words like ‘goodbye’ in English have their roots in these religious doctrines. Other cultures do not admit such polar concepts into their everyday vocabulary.

English has also skewed the meaning of several of its “borrowed” words. Take the word ‘karma,’ as borrowed from Sanskrit and Hindu and Buddhist traditions. Many English speakers use ‘karma’ incorrectly. According to its original definition, karma roughly translates to ‘deed’ or ‘destiny.’ How many times have you heard a fellow English speaker say “that’s not good for your karma” or “this will increase my karma” as if karma is some kind of commodity that has a quantifyable value? It is our Western understanding of the world that prevents us from properly conceptualizing such terms.

Perhaps the most dangerous consequence of language homogenization is the degree of control it places in the hands of those in power. Ask an average American what communists believe and you’re bound to get an answer that strays distant from the truth. Likewise, ask an average American to identify their notion of Islam and they will almost undoubtedly include terrorism in their response. These examples do not suggest Americans are ignorant (okay, maybe a bit), but it does show the effect the generalization of these concepts has had on our world view. However, ask a dedicated Marxist their notion of communism or a Muslim their notion of their faith and culture and you will receive quite a contrary response. Language is an instrument of control that states will use to their advantage if given the opportunity.

There’s some goodthink for you.

Giving Rails its own GUI

Ruby on Rails is an amazing framework for building web applications, but that doesn’t quite help us in the world of the desktop. Yesterday I sought to do away with this limitation and create a self-contained application that starts WEBrick, creates its own “browser” window, and knows how to terminate itself as well. Allow me to enlighten you…

[Read]

It’s summertime.

Spring 2006 ended with an abrupt halt, as if a well-lit brick wall at the end of a tunnel of doubt, curiousity and triumph.  I am currently unemployed, and that is more of a relief than anything could ever be.

I picked up a book of Bertrand Russell’s essays and have found myself greatly admiring his work; in particular, The World As It Could Be tickles my socialist fancy.  Some of the truths of the perils of capitalism Russell brings out are both astonishing and inspiring.  However, the ideal world he presents seems tantamount to a utopian dream.  Someday though, we will have Russell’s perfect society.  Until then, we can remain in our McWalMart subservience as our parents tell us is proper.

Is our fate as a corporate oligarchy inevitable, or is it a self-fulfilling prophecy that can be untangled given the time and effort?  Personally, I don’t think we’re far from a revolution.  It has to happen sometime… at least that’s what history tells us.  And boy, history hasn’t lied yet.  Who knows… Iran might be Bush’s Poland.

On a not-so-political note, this summer has also shown me the beauty of frugality.  Not being employed at the moment has left me without the affordances of past, but has had not a mark on my happiness.  The world is beautiful when viewed through the eyes of the poor and powerless.  If there is nothing left to lose, there’s nothing left to fear.

Now go play in the sun.