I'm Moving.
Not physically, but digitally. I’ve decided to recompartmentalize my blogging around a cornerstone of readability, and I’ve decided (like many of you) that this means one site is not big enough.
Partly it stems from my own, deep-seated organizational problems. The tagging method of categorization supported by most weblog-authoring software sometimes just doesn’t seem good enough, and I despair of accurately labeling everything (I am impossible to satisfy in this regard). But this is also about the observation that geeks of the Olin variety can have an extremely mixed audience, many of whom (myself included) have never gotten 100% comfortable with newsfeed-reading software and still tend to rely on their trusty web browser–wherein they are more likely to bear at least part of the mental burden of searching out pertinent and intelligible content.
Mom reads this site. Hi, mom! And I think that’s great, and really love the way blogging can bring me closer to folks back home. I can even share with my family the things which I, as a geek, care about deeply but might otherwise have difficulty getting across, because of the technical points. In that way, web authoring becomes not only a window to the world but (in the spirit of “citizen journalism”) a potential training ground for effective technical communication.
But I’ve noticed a trend that makes me uncomfortable. Rather than effectively combating the insularity that is a nearly inevitable result of four years housed on-campus at an engineering college, I find that I’m using this blog as a thoughtpad for what is very often extremely technical content. Is knowledge of the progress of the JavaScript language relevant to my mother’s lifestyle as an internet user? No. And that’s a very good thing. Technology is, almost by definition, meant to improve our lives without imposing on them unnecessarily. The best technology is essentially invisible, its only trace the lingering question “how the hell did they do that?” in the user’s mind.
But it’s crucial to the success of technology that some people do ask that question, and become so preoccupied by it that they are left with no choice but to work in the technology, to shape it in their hands. The rise of the Internet as a two-way communication and publication medium has facilitated this, and has led to intense, almost excruciating exposure of the electrical engineering and programming professions. It presents us with an incredible opportunity for recruitment, discourse, and moral and ethical indoctrination. Into that doorway I step, wide eyed and idealistic, and more than a little disoriented.
To reach either of these two distinct groups effectively, I need a clearer divide between the technical down-and-dirty and the high-level, worldview type stuff that will be of interest outside of my Facebook friends list. I think doing so will increase both the reach of my technical work and the incentive to be literary and effective in communications, regardless of topic. I could and eventually probably will have an entire separate project for housing artwork and literature too, but have realized it’s not currently where I am placing my attention. Best to go with the flow of concentration when you’re as easily distracted as I am, and try to collect the immense output in a more legible form. So, for starters, I’m forking an educational site about web development. A storehouse for coherent, useful thought on one of the most confusing and counterintuitive programming and design environments since assembly language went out of fashion; aimed at an audience of age yet to be determined.
It has a name, too: JavaScript Kids.
JavaScript insanity, part 537710
The more things heat up at work, the more I get this warm, funny feeling that makes me wonder–when you truly grok ECMAScript, does it show?
And no, I don’t mean in the terrifying “oh, that’s easy, I know a 750-character RegEx that’ll parse that Shakespeare play for you” sense. I think we’ve thus far managed pretty well at avoiding the lousy coding style I used to associate with JavaScript. Joe’s code is nearly Java-esque in its consistency (but still quite readable), while I’m still perfecting a mixture of prior influences (Java, Pythonic, MATLAB, Scheme), internal MathWorks conventions, and the pragmatic necessities of feature detection, framework libraries and non-standard syntax that come with web programming.
What I mean is: does having absorbed all this make a hacker more mystical, or just more insane? For truly, hacking the client-side is Deep Magic, although I really couldn’t say whether said Magic is good or evil. Either way, one likes to think that one’s hours spent studying the Mozilla developer pages weren’t in vain. So it’s easy to lose perspective when you finally perfect a new technique for, say, dynamically adding content. It’s an elegant solution to a sticky problem. But then consider that you could have spent all that time doing other things, things more immediate to the user, if only XHTML/JavaScript didn’t suck so bad. I am still coming to grips with this.
That being said, one does occasionally uncover happy surprises that make the whole unsightly venture more tenable. I know a lot of framework libraries do some fancy footwork when operating on user scripts, but my experiments in that area are usually specific to the problem of getting foreign scripts onto the page from a location pointed to by the src attribute.
Most recently, I had to teach myself how to use RFC 2397 hyperlinks, and have been thinking about potential uses (#1 on the list: re-implement jsMath or ASCIIMath with JSON or AJAX transport and data: sprites in place of the buggier CSS sprites. The current implementation definitely does not yield optimal bang-per-buck). This has me thinking a little further out of the box, wondering what else you can do to web syntax if you can automatically find and typeset LaTeX, which isn’t a part of any web standard.
Therefore, consider the following code:
var foo = "foo";
alert(foo);
foo += "bar";
storeValue(foo);
pauseScript(500);
alert(retrieveValue());
foo += "baz";
storeValue(foo);
pauseScript(500);
alert(retrieveValue());
foo += "qux";
storeValue(foo);
pauseScript(500);
alert(retrieveValue());
foo += "quux";
storeValue(foo);
pauseScript(500);
alert(retrieveValue());
It does some extraneous crud; whatever. My point is: the sequence of operations being performed is fairly trivial in most languages, but JavaScript has no literal equivalent for it. Why? JavaScript lacks a true pause function. When your web application starts to use such features of the language, you very quickly find yourself playing by a new set of rules–weird rules, dictated in partly the category of functional programming languages to which JS belongs, partly by the browser’s single-threaded scripting and rendering model, and partly by the use of JavaScript function closures and callbacks to get around the languages’s other shortcomings.
Well, I’ve had enough of that. So I changed the rules.
It’s been said that JavaScript’s oddball high-level syntax gives it the power to emulate anything. Okay, so why not emulate a less retarded programming environment? The proof-of-concept that I’ve drawn up allows for the creation of privileged top-level routines that can make asynchronous calls in sequence. If you’ve ever tried to write a bookmarklet or used YAHOO_CONFIG, that is a beautiful thing. Right now it uses id attributes to facilitate the process, but a logical next step is to remove that entirely, and instead use a custom XHTML tag to contain the user scripts (which must be embedded rather than linked in). This makes sense anyway in that you don’t want to have to mangle the source every time you run a script (Dojo and Prototype certainly don’t have to do this).
By itself it’s a neat gimmick, but it won’t really be useful until there’s a bit more functionality layered on top of it. The next step for me is to integrate this with the JSON tag library I’m working on (if you look in the source, you’ll see some of the hooks are in place), along with a couple other items in the umbrella category of “agnostic data services” (portable abstractions for things like cross-domain AJAX), and see where that puts me. I know personally the problem with JavaScript callbacks has never been the lack of a proper “return” statement, it’s the pause and resume bit, so I’m pretty excited to see where I can take it once there’s a couple server-side goodies wired in.
Successful Commute, Unsuccessful Commutativity
Monday October 15th 2007, 1:27 am
Filed under:
Yours Truly
That’s gotta be like the 2 dozenth or something… for posterity it might have been nice to keep track, but whatever. I live my life pretty moment-to-moment in terms of documentation. My biographer will just have to deal. Anyway, props to Sevendust, The Who and Filter for staving off highway hypnosis while Starbucks kept me conscious for the ride back to Boston. Good times.
On the downside, I was briefly caught in a moment of perspective on the way home that has me feeling a little off-put. Y’see, I chose between writing and engineering when I came to college. And when I decided on engineering it was largely because I believed Olin would be a great place to mingle my interests, ultimately leaving the door open for a follow-up education in technical communication. And in those four years, something happened. Something simultaneously wonderful and not wonderful. I went from nerd to geek, simultaneously becoming a lot more sociable, a lot more technical, a lot more right-minded and a lot less communicatively in touch with the rest of the universe. I gained a sword and lost a gauntlet to wield it with.
As a result, I found myself getting into a lot more quibbles and instances of disconnect with my SCOPE management team than I like to think about. And now, I find myself wondering how on Earth I’m going to live up to the image I cast for myself with senior AHS projects. Especially when I’m holding down what amounts to a day job and still hacking avocationally in the evenings.
I need a project to bring me back to my literary roots. Haven’t come up with anything solid yet, but patience is a virtue and whatnot.
Adium equals Crazy, CoCa blows my mind–again.
Item the first: Qwantz.com theme for the Mac OS X chat client Adium. Mel: I was referring to an episode of XKCD I thought you’d appreciate. I’m pretty sure it was Pix Plz, although it may as well have been 28-hour day.
Item the second is Coheed and Cambria, incidentally slated to release a new record on 10/23. I was listening to the Good Apollo CD today in the car, and after losing the beat on the title track for the umpteen-millionth time I figured out what it is they’re doing. It reminds me a little of that crazy jazz piece I helped Tesch perform in the spring, but the irregularity is subtler and simpler. Into the basic 8/8 time signature of the verse, they sneak a 9/8 at regular intervals, masked by a sudden switch in emphasis from the downbeat to the upbeat. Your mind doesn’t register this, and gets ahead for the next three measures. The more attention you pay to this, the more you can feel yourself slipping from on-beat to syncopated. The result is an aesthetically appropriate, but aurally confusing, extra beat of windup before each chorus.
That’s right kids, even in the modern rock scene you do occasionally find technically nuanced composition.
Of Comment Threads and Dirty Hippie Jurists
If you watch as little TV news as I do, and didn’t happen to pay close attention to the past few days’ news on yro.slashdot.org, you may have missed out on a recent federal court ruling that’s just restored a portion of my faith in the courts of post-9/11 America. Not, mind you, in the Executive, but I can sleep a little more soundly between now and January 2009 just knowing that there’s someone in a position of power willing to tell the Executive to shut the hell up.
The case, if you’re clueless, is Mayfield v. United States, in essence a wrongful arrest case where the plaintiff had been held as a material witness in connection with the Madrid train bombings. When he settled with the government–$2M in payment for the invasion of his family’s privacy and, presumably, damage to his reputation as a legit Muslim lawyer–he retained the right to challenge the statutes under which his home and offices had been bugged and repeatedly searched.
If you’re up for some light legal reading I would strongly encourage you to skim Judge Ann Aiken’s opinion in that challenge for yourself. It weighs in at a modest 44 pages that go by surprisingly quickly, and is a marvel of layperson-legible reprimand. While not nearly as entertaining as the New Hampshire jurist who rhymed his opinion on a case in the fashion of Dr. Seuss, it’s kind of nice to hear judges confirming that vague tingling sensation you’ve had in your gut all this time that the whole warrantless business is an un-American travesty.
The case, decided in Mayfield’s home state of Oregon at the federal district level, may yet be appealed to the supreme court. But a close reading of Aiken’s arguments suggests the current justices would be rather unlikely to overrule her. Moreover, her ruling (at long last) supersedes In re Sealed Case, the 2002 judicial fiasco in which the shadowy FISA Court ruled its own submission procedures to be unlawful as amended by the USA PATRIOT Act, and was thereafter overruled by its even shadowier cousin the FISA Court of Review. This calls for a definitive toast, people. Your civil liberties threat level has just descended a notch from Indigo(?) to Beige(?!).
Not everyone feels this way, of course. The Gonzales-era Justice Department has its zealous supporters, and to my mild distress commentary on some of the blog press for Mayfield confirmed this. I’m not sure how much attention to pay, really–should I care half a grain of sand’s worth, or only a quarter?–especially now that I’m remembering that even in forums you’d expect to be frequented by intelligent persons, comment opinions can still be scummy, naive or simply uninformed. The person who called Mayfield “a liberal ass” for fighting back is perhaps not entirely unlike those who say Star Simpson “deserves jail time” for not choosing a life of post-9/11 paranoia and all that goes with it, or those Slashdotters who believe Olin’s brand of education is less connected to real-world engineering than MIT’s because the NYT article chose to emphasize President Miller’s focus on professional courage.
While it would have been nice to think the citizen journalism era was going to reduce the noise level in such cases, that was never the point, and in fact the opposite is frequently what happens. Don’t get mad. Some of these people are probably reasonable Americans and just don’t have their personal bullshit filters cranked up high enough. But you don’t have to make the same mistake. I know I’ve got my bullshit filter all tuned up and ready to go for ‘08.
P.S. And lest I forget, filesharers can also rejoice at this time–Motley Fool says the RIAA blanket lawsuits are almost over.