mbehr.org

Sun, 20 May 2007

Insert title here

Since I have a blag, I really should use it, so I've decided to dump random thoughts here. I make no guarantees that they'll be of any interest at all, though I'll try not to be completely inane.

I'm writing this in Blosxom, and becoming a bit annoyed with it. With no plugins, you have to write the HTML yourself. I don't mind that at all, except for the <p> tags. And I guess having to type &lt; and its brethren to escape significant characters. (I just had to edit this post because I always type &rt; instead of &gt; when I'm using it as an angle bracket and not the mathematical symbol.) It's better than CPU-munching WYSIWYGs, but I want to work on the abstraction level of the content, not its format.

There is something to be said for writing in raw HTML. If nothing else, it helps you learn about HTML itself. I'm reminded of a blog post (I think it was by Steve Yegge) I read once that talked about the importance of knowing different levels of abstraction in a job as a programmer. He mostly talked about data structures and algorithms, raising the question of whether a programmer neeeds to know about the implementation of, say, a hash table (I don't remember the exact example he used), or if it's enough to know how it works.

As an example of the latter view, he mentioned Java, which of course immediately led me to favor the other view. But my conclusions weren't exactly the same as his. As far as I can remember, he said that it was important to understand the abstraction in case it leaks, in case all your values go into the same hash bucket (again, he might have used a different example) and suddenly your lookups aren't O(1) anymore. That argument doesn't quite work for me. I can't learn the exact workings of every abstraction I use - I wouldn't have any time left to use them! To write this, I'm typing into VIM (unfortunately; more on that later). Except that that's actually going through an SSH layer. And I'm communicating with SSH through a terminal emulator. The terminal emulator itself goes through a windowing system (Aqua, sadly... but I'm not going to rant about that now), which appears on top of a bunch of other stuff inside the OS. Also, the information I'm entering into the computer, then to the kernel, then to the terminal emulator, then to my SSH client, then across the Internet, then to VIM, then back across the Internet through SSH again, to my terminal emulator, to my screen - that information doesn't originate in the computer. I have to send it in through the keyboard. It gets there through my fingers, which use muscles to move, which activate with signals from a chain of neurons from my brain to my fingers. How it comes from my brain could be the subject of many books.

And it's not alone. You could write books on the workings of neurons, muscles, keyboards, operating system kernels, windowing systems, IP, or other things I haven't even mentioned. But to write this, I don't have to think about the structure of the packets that fly from my laptop, or how my computer knows when I press a key on my keyboard, or even, since I have a bit of training in touch typing, the locations of the keys on my keyboard. I can focus on the words I'm typing. Or rather, I could if it weren't for those annoying HTML tags. And that's one of the beauties of abstraction, or at least its utility - you don't have to think about the lower levels of abstraction. To achieve that, an abstraction of course shouldn't leak, and if it does, it's its own fault.

Of course, sometimes an abstraction will leak, and telling it that it wasn't supposed to leak isn't going to do much good. If my network connection becomes weak, I'm going to have trouble getting this post up. If that happens, I could see if something's blocking the signal, or if there's just somewhere else in my house with a better connection, among other things. But my network connection is fine now - why should I worry about it now? I want to plan for the most likely case, which means that I don't write a signal strength detector and run around my house charting signal strength. To do otherwise would be premature optimization.

So I don't think it's necessary to spend the time to know the implementation of all the abstractions you're using. Does that put me on the side of the hated Java? Well, not exactly. To me, as long as you know how your data structures work, you can write programs that use them without being hindered much by that - as long as you're working on a high enough abstraction level. If you need to write or change the implementations to focus on efficiency of whatever kind, then you should obviously know how they work, but with higher-level programming, you shouldn't need to. But it seems to me that a skilled hacker should know these things.

Why? If a hacker doesn't need this knowledge, why should she, well, need to have it? In my view, it's because of the personality that makes a great hacker. A hacker needs to be inquisitive and curious. Without a need to poke around things and see how they work, a hacker just isn't a hacker. So a hacker isn't going to need this knowledge, but practically any hacker is going to want it, and so will obtain it.

But didn't I just say that nobody can understand every abstraction they use? What's so special about this abstraction? Why must a hacker want to learn this and not, say, the exact levels of neurotransmitter you need to activate a neuron? I can see three reasons: It's big, it's there, and it's interesting.

First of all, it's big. And now I'm having trouble coming up with examples of what I mean, which leads me to think that I might have just thought it up so I could have a nice list of three. But I'll try to salvage this paragraph anyway. Data structures have a huge influence. Practically any complex program you use is going to make use of some complex data structure. But this alone isn't enough to justify spending time learning it - neurons are firing all the time in the brain of everyone, everywhere, based on whether or not they get a certain level of neurotransmitter, and that ends up causing everything we do to happen - but I don't really care what that level is.

Secondly, it's there. A hacker, experienced in programming, is going to be interested in programming. I'm much more likely to read an article on the Internet about programming than I am about say, carpentry. There's nothing wrong with carpentry, but I don't find it anywhere near as interesting as programming. Still, this isn't enough. I use neurons all the time in programming, but I still don't care about neurotransmitter levels. Or to use another example, since that one seems sort of weak here, I don't care about how a web framework stores its data in a database. It's just not interesting enough.

Which is the third reason I mentioned, and, I believe, the most important one. Data structures and algorithms are really interesting. It's really interesting to think about how you can use certain tricks to do things more quickly than you could otherwise, all on a very conceptual level. It's hard to say exactly what I find interesting about it, but I have a feeling that many hackers far better than I am would agree.

To conclude with something irrelevant to that but relevant to what I was saying at the beginning of the article, the other reason I'm annoyed with Blosxom is also an annoyance with Emacs - TRAMP moves at the speed of molasses. Which means that I have to go over SSH and either use VIM or use an Emacs without my customizations - and endure Emacs's startup for what I thought would be a short blog post. Oh well.

posted at 01:09 | path: /blag/ramblings | permanent link to this entry

Wed, 28 Mar 2007

An Open Letter to the MBTA

To Whom it may Concern,

Tonight (March 27), at around 8:00, a few of my friends and I arrived at the Copley Square T station. We found that despite being barely a minute late, our Student Passes no longer worked. We were then each forced to pay for our fare despite already having paid for the pass, but one of us did not have enough money. We explained to the agent that she did not have enough money to get through, but he refused to let her through, knowing that he was stranding her overnight until her card worked again. We were then able to find some money to pay for her fare, but when she put it on her friend's Charlie Card (she did not have one, only a Student Pass), the machine would not let her through, because the card had already been used. We explained this to the agent, and he still refused her entry, even though he had seen her pay for the trip. Eventually we found still more money and she was able to go through, but the whole experience was very discouraging.

The worst part was not that the agent forced us to pay for the trip three times, but that he was willing to knowingly perform the almost inhuman act of stranding a mere high school freshman girl in Boston for an entire night over a matter of one minute. I hope I don't need to spell out all the dangers this would leave her in. The agent acted extremely rudely and insensitively throughout the entire exchange.

At the very least, my friend deserves an apology. Please reply to this with some sort of explanation, and by then I will be able to give you contact information for my friend. In the long term, however, I'd like to see the MBTA give higher regard to students. As it is, we're treated as though we were criminals, even in cases when the MBTA is solely at fault, such as when we were issued non-functional Student Passes this January. The agents acted as though we were intentionally creating jams and refused to help us. And when passes arrived late one month, an agent said, and I quote, "Oh, I know they arrived late... my daughter had the same problem. You need to pay." We are paying customers, not criminals, and it is unacceptable for us to be treated in this way.

I have already informed some of my other friends about this exchange, and will continue to do so. We currently take the T to and from school every day, but if we are forced to worry about being stranded in the middle of the night, we may have to seek out other means of transportation.

Again, if you need to identify the agent, he was working in Copley Square at 8:00 PM on March 27.

Thank you for your time in looking into this matter.

Michael Behr

posted at 05:17 | path: /blag/rants | permanent link to this entry

Mon, 05 Feb 2007

Requiem

I've decided to rewrite the Requiem text to better fit Pastafarianism. I'll be using Fauré's text, because I like Fauré's requiem and because it doesn't have so much of the violent stuff that Christianity has but Pastafarianism doesn't. I can't rewrite the Kyrie because it's Greek, but here is the /(Introit|Requiem Aeternam)/:

Requiem aeternam dona eis, Epula
esca perpetua nutriat eis.
Te decet embamma, Pasta laudanda
et piritatibus alebis tu in saeculum:
conserve res collyrarum meas,
ad te omnis cibus veniet.

posted at 03:22 | path: /blag/atheism/pasta-requiem | permanent link to this entry