Fiddlerelf

July 30, 2007

Pownce

Filed under: Kevin Rose, Leah Culver, Pownce, Social Networking Sites — Ryan @ 9:20 pm

PownceA former coworker recently sent me an invite to a new social networking site (for lack of a better genre-ism) called Pownce. Typically I am not a fan of social networking sites; I have never used MySpace or Twitter, and although I do have a Facebook account, I opened it as a joke. After reading up on the (short) history of Pownce though, I created an account to check it out.

The site has been developed mostly by Leah Culver, and has the backing of Digg creator Kevin Rose. As an aside, every time I see mention of Kevin Rose, or somebody like him — someone who has trumped technology in some way — there is always a wunder-adjective in the sentence. Wunderkind, wunderhacker, etc. The next time I see one of these words used I will figure out a way to transform the entire phrase into a human, and punch it in the face. Seriously.

With regard to the Pownce feature-set, I assume the basics apply to most other sites in this genre — i.e. you have your profile, settings, friends, and various options that go with all of that. The hook is that you can send different types of files to friends and groups of friends. That is a simplification, but nonetheless, that’s what you get.

One of the things that interested me the most is that the whole site is done using Django, a Python-based web application framework. Although the web development I do is in PHP, I’ve dabbled in Python from time to time, and in general am a fan of moving between languages. I’ve been meaning to start playing around with Ruby on Rails, and during my brief, late night research sessions, Django has come up several times as an alternative to RoR; there is an ongoing pissing contest between the two camps. From reading one of Leah’s posts, she doesn’t seem like much of a Rails fan.

The fluidity of the site, which makes heavy but subtle (tasteful) use of Javascript, is appealing and pleasing. It is served as XHTML 1.0 strict, but with a MIME type/subtype of text/html, and doesn’t validate. But that’s okay.

In the future, as I interact more with Pownce, I’ll post some updates.

July 21, 2007

Google and the future of wireless

Filed under: Google, Wireless — Ryan @ 12:56 pm

GoogleThe most spectacular thing about Google: it is a billion dollar company whose decisions almost always benefit itself AND consumers (Nash bargaining solution, anybody?)

The following is a quote from Blair Levin, an analyst at Stifel Nicolaus & Company and former FCC official:

When you go to Best Buy to buy a TV, they don’t ask whether you have cable or satellite. When you buy a computer, they don’t ask what kind of Internet service you have, and the computer can run any application or service. That doesn’t exist in the wireless world. That’s where Google wants to go with this auction.

Hammer, meet head of nail. The full NY Times article explains more.

It makes so much sense, it’s almost blindingly obvious — the kind of thing we’ll look back on in fifteen years wondering how it could have possibly been any other way.

It’s like, “Ohhh, the water goes INTO the glass. I get it. Much better, thanks.”

Steriods, lies, and an image of reality

Filed under: Chris Benoit, Moronathon, Steriods — Ryan @ 7:50 am

I’m not going to get all into this, but with regard to the story of Chris Benoit, the wrestler who killed his wife, child and then himself in a fit of roid-rage, why was there ever any speculation about steriod usage? And even now that the toxicology reports have been released, which show that Benoit’s testosterone level had been fifteen times what is considered “normal” during the tragic incident, we have a reported statement from Dr. Kris Sperry, chief medical examiner for the Georgia Bureau of Investigation:

There’s no reliable scientific data that says elevated levels of testosterone lead to psychotic rage.

[...]

The only thing we can ascertain is that this level of testosterone indicates that he had been using testosterone at least in some reasonably short period of time before he died. It could be an indication he was being treated for testicular insufficiency.

Oh come on. This guy? ↓

benoit

Yeah, I guess it’s pretty likely that this guy ↑ was taking steriods for some other reason than to build those gigantic, unnatural muscles.

That statement, under these circumstances, is analogous to finding an overdosed heroin addict with high levels of “an opiate” in his system and noting that he might have been taking morphine for headaches.

July 15, 2007

From XHTML 1.0 to HTML 5, and on and on

Filed under: HTML5, Web, XHTML — Ryan @ 8:11 pm

HTML 5I’ve migrated (probably better put, I am migrating) from XHTML 1.0 to HTML 5. Over the past few months now I’ve read several discussions on the pros and cons of XHTML vs HTML 5, and basically I agree with more of the points for HTML 5 than for XHTML. Sure, HTML 5 and XHTML are not mutually exclusive; I’m speaking practically about the specification of XHTML 1.0. And yes, I was serving my XHTML as text/html because I am not completely insane, only partially.

I believe that markup should be handled by a forgiving beast. I don’t buy the “if it’s invalid it shouldn’t be on the web” argument, because it’s practically all invalid. (hyperbole? maybe. but maybe not.) I am perfectly capable of validating markup that I create, and am willing to do so of course, but that doesn’t change the fact that it may at some point be possible for invalid markup to get in there, and in such a case I’d much rather see something a little off than, “Error, this page is broken. Fuck you.”

Not to mention the fact that I don’t think regular old Joe Schmo should have to read the specification just to put up a web page for his mom that actually, umm, works. Not everybody who posts content to the web should have to be a programmer, or even have any idea about programming. The whole point is an interconnected community, not an interconnected community (for programmers). </rant>

One of the minor gripes I have at this point is with the conformance checker, which is of course beta so it’s very gripe-able. First, I have no idea what it’s telling me about my use of the <span> element: Error: Element span from namespace http://www.w3.org/1999/xhtml not allowed in this context.

And second, it doesn’t actually show the offending text, and for whatever reason, the line numbers/characters it provides me are not always the same as when I view source in Firefox (which as far as I can tell, they should be).

Anyone know about this span issue with the conformance checker/my markup?

July 9, 2007

Mystery House

Filed under: Hackers, Jawbreaker, Myster House — Ryan @ 8:28 pm

Mystery HouseLately I’ve been reading Hackers: Heroes of the Computer Revolution. A quick digression: I took a new job not long ago so I’ve been busy the past few weeks, more so than usual; the reading is going — albeit pleasantly, on and off of a train — slowly.

OK, back. As is almost always the case, in an “even though I am acutely aware of it, it sneaks up on my anyway” kind of way, my favorite part of the book, which is divided into three main parts, is the part I assumed I would like the least. Game Hackers.

This comes as quite a shock to me since I do not play games. But, like all children of the early-to-mid-eighties whose fathers had caught the computer bug, I did play games. And I distinctly remember that although I did some minor programming in Basic, my favorite activity on our TI-99/4A was gaming. Donkey Kong, Qubert, Parsec, others.

In the book, the game Mystery House is discussed. While it is possible that I played this game at some point in grade school during computer class — we had computer class once a week in a room with several Apple ][e's, I believe -- I have no distinct recollection of doing so.

Reading about the history of this game, though, what it accomplished, how it was done, led me to the brink of a pool of intrigue. All it would take would be one more nudge and I'd be swimming.

And then, I was swimming.

When I was young, I constantly played this game that was set to a haunting rendition of Mozart's Turkish March. It was about candy, and for at least a decade of my life I had no idea that the music I had heard was Mozart, but the tune stayed in my head the entire time and always had some sort of candy-coating -- which is impossible to explain. That the timbre of the music and the texture of candy are very closely related in my cognitive schema, is about the best I can put it.

As I was reading along about Game Hackers I started a section about how a young John Harris had copied Pac-Man and hacked it up for the Atari 800, but was forced to make changes to the interface because it was too much like Pac-Man. My eyes caught the words candy cane down a bit on the page, and I started to hear that beautiful candy-coated sound of the Turkish March. A slight shiver shot up and down my back and I quickly scanned the page looking for... that word... Jawbreaker!

I had been reading the history of the future that had happened in the past, to me, and I didn't even realize it. My train ride ended almost exactly at that moment of realization, and I walked to work, half-mystified, sat down, and started hacking.

[Incidentally this is a crazy rendition of that Mozart piece I found while looking up the music for this post. After I listened to this I told my wife, who also listened, that it was like my ears had an orgasm. She told me to put my headphones on.]

June 17, 2007

Open sources, a little perspective

Filed under: Books, GNU, Open Source — Ryan @ 9:28 am

Open SourcesI’ve been reading through the many essays of Open Sources: Voices from the Open Source Revolution, a compilation of writings from different sources dealing with subjects pertinent to the Open Source Initiative. Though I haven’t read them all yet, I have read Appendix A, which is an email thread on the comp.os.minix newsgroup from early 1992; this is the famous (infamous?) debate between Linux Torvalds and Andrew Tanenbaum on microkernel VS monolithic kernel.

It has been difficult for me to have perspective on the GNU project in terms of how it was viewed in the early 90’s. I was in eighth grade in 1992 — the year of the aforementioned debate — and the only exposure I had had to computers and programming at that point was minimal experience with programming in TI Basic when I was younger — maybe, six to eight years old. My father, a pharmacist, had been an amateur programmer at that time and had introduced me to the magic of typing on keys and then having the screen do what you typed. I had written programs to print my name in big letters and change the colors on the screen in some rhythmic pattern, a small feat for the languages of today but in 1985, that had been a big deal for me.

But I digress. It was during this time period, and shortly afterward that GNU really started to become a powerhouse. But I didn’t know that then, I didn’t know anything about it then because I was a kid. And later I drifted away from programming and computers altogether, not to pick it up again until more than a decade later, much after the monumental failure of the GNU HURD.

Tom JonesSo it is with this mindset that I view Linux, GNU, FSF, and Open Source today. It’s similar to when some woman looks at Tom Jones and swoons, and I look at Tom Jones and see a fat guy in a purple suit, sweating like a pig. She remembers Tom Jones from way back when, and I have no frame of reference other than the present.

While reading Appendix A, which is an actual historical email thread and not just a someone’s account of it, I started to realize how the GNU OS was viewed at the time. This is something I probably never would have realized without this type of historical document, and it encourages me to seek out more of this type of thing to gain an even better perspective.

I decided to pull out a bunch of references to GNU from the text and include them here. I recommend reading the whole thread in its entirety; the references here are obviously taken out of context, but my intention is to include as much of the surrounding context as I think necessary to convey the idea of the passage without totally fucking it up. So here goes.

Andy Tannenbaum:

Don’t get me wrong, I am not unhappy with LINUX. It will get all the people
who want to turn MINIX in BSD UNIX off my back. But in all honesty, I would
suggest that people who want a **MODERN** “free” OS look around for a
microkernel-based, portable OS, like maybe GNU or something like that.

Linus Torvalds:

True, linux is monolithic, and I agree that microkernels are nicer. With
a less argumentative subject, I’d probably have agreed with most of what
you said. From a theoretical (and aesthetical) standpoint linux looses.
If the GNU kernel had been ready last spring, I’d not have bothered to
even start my project: the fact is that it wasn’t and still isn’t. Linux
wins heavily on points of being available now.

Andy Tannenbaum:

Making software free, but only for folks with enough money
to buy first class hardware is an interesting concept.
Of course 5 years from now that will be different, but 5 years from now
everyone will be running free GNU on their 200 MIPS, 64M SPARCstation-5.

Randy Burns:

My own sense is that even if Linux is simply a stopgap
measure to let us all run GNU software, it is still worthwhile to have a
a finely tuned kernel for the most numerous architecture presently in
existance.

Ricard Tobin:

You’ll be rid of most of us when BSD-detox or GNU
comes out, which should happen in the next few months (yeah, right).

Doug Graham:

Well, there are no other choices that I’m aware of at the moment. But
when GNU OS comes out, I’ll very likely jump ship again.

Charles Hedrick:

It’s possible that Linux will be overtaken by Gnu or a free BSD.

Theodore Ts’o:

I am aware of the benefits of a micro kernel approach. However, the
fact remains that Linux is here, and GNU isn’t — and people have been
working on Hurd for a lot longer than Linus has been working on Linux.

June 13, 2007

Free as in Freedom

Filed under: Books, Free Software, Free as in Freedom, Open Source — Ryan @ 9:10 pm

Free as in FreedomFree as in Freedom: Richard Stallman’s Crusade for Free Software is the biography of Richard Stallman, as told by Sam Williams. The book is very interesting portrayal of Stallman, especially — in my own personal opinion — of his later years during the birth of Linux and pending failure of the GNU HURD project. I won’t pretend to have any ability to, or for that matter, desire to, write a book report; I will say that I recommend it.

I will also say that I read this critique by Eric Raymond before I began the book. It helped me to have some perspective for the first few chapters, so I recommend that as well.

June 11, 2007

Why Richard Stallman is wrong

Filed under: Free Software, Open Source, Richard Stallman — Ryan @ 9:08 pm

GNU/Linux

Richard Stallman

Richard Stallman has continuously disputed the use of “Linux” to describe what is commonly known as the “Linux Operating System”. Some of his reasons are sound, but there are also flaws. Stallman claims that since the Linux kernel alone does nothing by itself, and since most of the other important pieces that provide actual functionality are GNU – powerful pieces of the unfinished GNU system such as the GNU C compiler – a working system should be called the “GNU/Linux Operating System”.

One obvious flaw in this argument is that Stallman never explicitly defines what an operating system is. Although the definition of an operating system is debatable, depending on who you ask, the academic definition of an operating system is exactly the definition for a kernel. Nothing in the classic definition of an operating system is predicated on the fact that a user has any specific interaction, or that programs do in fact exist, only that the operating system can allocate resources appropriately if asked by other programs.

To be fair, when most people think of an operating system these days, they think of a system that they can actually use. And really, the “Operating System” and “OS” terms in “Windows Operating System” and “Mac OS X” respectively refer the the entire system that is installed, which includes a kernel, compiler (possibly), browsers, shells, mail programs, etc. So Stallman is not wrong, per se, he just isn’t right.

On the other hand when Linux Torvalds says “operating system”, he means it in the classical, academic sense, and therefore when he says that he wrote the Linux operating system, he is correct.

Another flaw in Stallman’s argument is that he trivializes the importance of the kernel, both in its importance to the system and in its value as an engineering achievement. To put the former into perspective, in terms of a system, without a kernel, you have nothing. With it, you at least have something. This cannot be said for any piece of GNU software, or even the entire collection of GNU software (included in Linux) taken as a whole. To put the latter into perspective, the intent of the GNU Project itself was to include its own kernel, which is currently known as the GNU Hurd. This kernel was put into development before the Linux kernel, and yet as of today – over fifteen years later – it is still not complete. This is typically attributed (by Stallman and other free software advocates) to the complex design pattern chosen for the GNU Hurd, that of a microkernel, but most others simply give credit to Linus for an excellent design and his mastery of programming.

Why does the name matter? It matters to Stallman, not (as argued by some) because he himself wants credit, but because in his view, to not associate GNU with the most widely used free operating system, which indeed utilizes many GNU contributions, is to miss the entire point of the GNU Project and the Free Software Foundation (FSF): freedom.

Open Source

The principles of the FSF boil down to this: freedom for the sake of freedom. Stallman believes that the freedoms provided by the GPL and free software are more important than the software itself, and therefore it is not as important to actually have and use the Linux system as it is to understand how and why it exists in the first place.

But this view has evolved away from the original purpose of the movement, that of free software. The software part is important; after all, it isn’t called the “Free Foundation”. Like the kernel in the GNU/Linux argument, without the software you have nothing. Without the freedom, well, at least you might have some software.

If the community emphasizes freedom over software, and the software produced is shitty, does it serve the community just as well? No, it can’t, because shitty software serves nobody. If someone writes “hello world” and releases it under the GPL while someone else releases a robust, open 3D graphics driver under the same license, are the contributions equal? According to Stallman’s “freedom over all else” motto, yes, they are both free and therefore equal. Is that practical?

The Open Source Initiative doesn’t think so. And the founders are right. We need software and we need freedom. Without the software the freedom is just academic.

June 3, 2007

HOWTO attach HTML DOM events to specific javascript objects

Filed under: HOWTO, Javascript, Programming — Ryan @ 10:18 am

In order to create javascript objects which encapsulate all of their logic and create a direct bridge to the HTML DOM event model without helper functions, you can attach events using function closures which, when executed, are executed on a specific instance of an instantiated object. I touched on this same approach when discussing how to use setTimeout() for object specific methods.

Let’s have a look at some example code. The following basically will associate the onClick() event of the AlertFoo object with the click event of an HTML element.


function AlertFoo(id) {
	this.htmlRoot = document.getElementById(id);
	this.onClick = function(e){
		alert(this.htmlRoot.getAttribute("id"));
	};
	var _self = this;
	normAddEvent(this.htmlRoot, "click", function(e){
		_self.onClick(e);
	});
}

function load() {
	var alertFoo1 = new AlertFoo("alertId1");
	var alertFoo2 = new AlertFoo("alertId2");
}

function normAddEvent(el, evName, evFx) {
	if (el.addEventListener) {
		el.addEventListener (evName, evFx, false);
	}
	else if (el.attachEvent) {
		var modifiedName = "on" + evName;
		el.attachEvent (modifiedName, evFx);
	}
	else {
		//bleh
	}
}

What we want to create is a wrapper object that takes an HTML element and adds functionality to it through the HTML DOM event model. What we don’t want is to have any code outside of the class (besides derivative extensions) to perform the functionality. That means, no functions just hanging around explicitly calling events on wrapper objects. Therefore, when DOM events fire, in this case the click event, the event of the particular instance of the object that wraps the target HTML element of the event should fire.

The first thing to do is declare AlertFoo.onClick(e). In this case, this event will simply issue an alert with the id name of the element wrapped by this instance of AlertFoo.


function AlertFoo(id) {
	this.htmlRoot = document.getElementById(id);
	this.onClick = function(e){
		alert(this.htmlRoot.getAttribute("id"));
	};
	var _self = this;
	normAddEvent(this.htmlRoot, "click", function(e){
		_self.onClick(e);
	});
}

Next, declare the local variable _self and set it to be a reference to this instance.


function AlertFoo(id) {
	this.htmlRoot = document.getElementById(id);
	this.onClick = function(e){
		alert(this.htmlRoot.getAttribute("id"));
	};
	var _self = this;
	normAddEvent(this.htmlRoot, "click", function(e){
		_self.onClick(e);
	});
}

Finally, declare and attach a function to the click event. Note, I’m using a function called normAddEvent() to do this, just for cross-browser support.


function AlertFoo(id) {
	this.htmlRoot = document.getElementById(id);
	this.onClick = function(e){
		alert(this.htmlRoot.getAttribute("id"));
	};
	var _self = this;
	normAddEvent(this.htmlRoot, "click", function(e){
		_self.onClick(e);
	});
}

The key to this is _self.onClick(el). What will happen when the code is run is that when the click HTML event fires it will execute the function that was attached, which, because _self is defined in the scope of the function to be an instance of an object, _self.onClick(e) will be the equivalent to this:


var alertFoo1 = new AlertFoo("alertId1");
alertFoo1.onClick(e);
}

I’ve whipped up a quick example of this in action.

June 1, 2007

Finally

Filed under: Basketball, Lebron James, Sports — Ryan @ 6:58 am

Lebron JamesFinally, Lebron James is living up to the one comparison that isn’t fair to make of any player. Forget about the hype, forget about the money, the phenom stories, forget all of that. There is one stick with which to measure any basketball player of this era, one that nobody has yet to really measure up to, and that’s the Michael Jordan stick. And everybody knows it.

Last night, in the Cavaliers 2nd overtime victory to take game 5 from the Pistons and go up 3-2 in the conference finals, in Detriot, as he rallied to score the last 29 of the Cavs’ 30 points and hit the game winning shot, James showed us all something that only Michael Jordan has shown us in the past 20 years. You can’t really put a name to it, other than maybe “wow”. These words of Piston’s guard Chauncey Billups should really sum it up, though, and are not far from words Isaiah Thomas has uttered at least once during the Bulls-Pistons rivalry:

“We threw everything we had at him,” Billups said. “We just couldn’t stop him.”

Older Posts »

Blog at WordPress.com.