Thursday, August 21, 2008

To be intellectually uncomfortable

From one of Uncertain Principles' link dumps comes this piece from Inside Higher Ed: Tolerant Faculty, Intolerant Students. Apparently, despite the myth of the politically stubborn professor forcing his views on poor openminded students, the truth is more like students haranguing each other and professors doing fairly well at not inappropriately expressing political views. (Well, at least in Georgia. The study might have turned out differently if done on CRAZY CALIFORNIAN COLLEGES!!!!1!11!one.)

(I should note that I have only been in actual political discourse once all year, and it was with a student on my hall who fervently supported Ron Paul. Perfectly friendly, civil discussion; I didn't enjoy it because I don't enjoy political discourse, period. I haven't seen any politics in classes, probably because I haven't taken any classes where it's even marginally relevant. Coulomb's Law? Politicize that, bitches.)

The thing that really struck me about this article, though, was one particular quote: universities are a place to go to feel uncomfortable intellectually. Obviously, the article means this with regard to one's political beliefs -- but it's applicable in a much larger sense.

When I encounter something I can't understand, something really confusing, I get anxious and upset. This happens a lot because I'm at a difficult school, and it's to be expected that I will encounter confusing things. But why should I get upset? This is an artifact of tying understanding to Success and Achievement (TM), rather than understanding for its own sake. Even though I went to one of those hippie elementary schools where there are no grades, I suppose I still have kind of a hang-up about 'succeeding' versus being way outside of my comfort zone.

I really admire people who respond to confusing things by first feeling humble, and then feeling happy that they have another puzzle to solve. People who get suspicious if it looks like they understand everything. It's not that I think such people never get frustrated, but that seems like a highly useful mindset for a scientist or intellectual, much more so than getting upset and frustrated. (Certainly, given the complexity of the real world, if you think you understand everything about X, you're almost certainly wrong.) This mindset should also make for a happier person overall. Apart from that, it feels like the right thing to do -- it appeals to the idealist in me.

Universities are a place to go to feel uncomfortable intellectually.

The world is a place to go to feel uncomfortable intellectually!

I'm going to try and embrace this mindset, embrace this mantra. A form of "intellectual asceticism, perhaps?" Hopefully I can change my knee-jerk reaction to the difficult and the confusing.

Friday, August 15, 2008

New Look & Feel!

So I changed the blog template.

The main thing that bothered me about the old template was that the main text column, the most important part, was of fixed width. Which is annoying if you have a wide monitor. With this new template, go ahead and change the width of your browser window, and the Dendritic Arbor will change right along with you. We strive to provide a customizable reader experience. We strive to be adaptable, plastic, and dynamic, like actual dendritic arbors.

(It also bothered me that approximately 80,000,000,000 other people are using the old template. Then again, this is Blogger, what was I expecting, hmm?)

I chose this particular theme via the complex and deliberate heuristic of seeing which one looked the most like the one Larry Moran picked for Sandwalk. I've been reading his series on protein structure and admiring Sandwalk's look-and-feel. I guess this is the exact same theme as Sandwalk has, just with different colors.

By the way, the protein structure series is excellent and here are links to all its items. There isn't really a 'best' order to read them in, but I've put them in an order that sort of makes sense.

Evolution and Variation in Folded Proteins
Levels of Protein Structure
The Alpha Helix
Beta Strands and Beta Sheets
Loops and Turns
Examples of Protein Structure

Tuesday, August 12, 2008

Why I am a hard agnostic

I believe that the nature of deity is both unknown and unknowable (by humans).

As I understand it, "the nature of deity is unknown (and may or may not be knowable)" equals 'soft' or 'weak' agnosticism, and my position is 'hard' or 'strong' agnosticism. I was a soft agnostic up until relatively recently.

(Quick aside: that terminology bothers me because it's possible to be a strong weak agnostic -- i.e. you believe very strongly in the soft-agnostic position -- or a hard soft agnostic, or also a soft hard agnostic ("I'm pretty sure the nature of deity is unknowable as well as unknown"). Not sure what would be good alternative terms, though. Also, hard agnosticsim != militant atheism.)

I've been fairly sure for many years that the nature of deity is unknown, what with implausible theologies and the power of science, etc etc, blah blah woof woof -- this argument has been made, and people have responded to it, a million times.

There are two possible arguments, I think, for why we cannot know the nature of deity (as opposed to merely "we don't know it, but we might figure it out"). One is the "perverse liar god" argument, and it's sort of tongue-in-cheek. If there's an omnipotent deity, then it could make itself unknowable, never mind why it would want to. It could even put on an understandable mask while leaving its true nature hidden.

The other possible argument is "fundamental limits of human understanding". The human brain may be the most amazingly complex awesome thing in the universe, capable of conceiving arbitrarily complex and abstract ideas... but is it capable of understanding something omnipotent, omnipresent, omni-everything, possibly vaster than the universe? I highly doubt it, given how hard it is to truly grasp (say) the sheer size of a galaxy. (And I do mean truly grasp. Saying "oh, it's so many frillion light years across" does not count.) A galaxy has got to be a lot smaller than an omni-deity.

You'll note I said "fundamental limits of human understanding", not "fundamental limits of any understanding". I don't doubt that an omnipotent deity could understand itself perfectly well. It's perfectly possible that there are forms of understanding out there that are orders of magnitude more powerful than our piddling little thoughts, or maybe even have a completely different basis -- call them "super-understanding". But given that humans are limited to human understanding, can we understand super-understanding? I doubt it.

(For a very readable, math-flavored analogy to the topic of super-understanding, see Scott Aaronson's fabulous essay Who Can Name the Bigger Number?, which you should read anyway. He discusses Turing machines and Super-(Super-Super-...)Turing machines, among many other fascinating topics.)

And by the way, I have high standards for what I'm willing to call understanding deity. I'm not willing to settle for a grammatical string of English words, or a bunch of math, or whatever, that describes deity perfectly. I am perfectly capable of 'understanding' (sneer quotes!) a sentence like "God is a spirit, infinite, eternal and unchangeable, in His being, wisdom, power, holiness, justice, goodness, and truth", in that I know what all its words mean and I can parse the sentence, because that is perfectly fine English. But can I fully appreciate the impact of a spirit, infinite, eternal and unchangeable, in its being, wisdom, power, etc? Can my body generate a sufficiently large visceral/emotional reaction to the import of that idea, or will it run out of neurotransmitters first? Can my humble heart and mind contain the infinite? I think not.

Now, since I'm feeling a bit Hofstadterian, try this one on for size: "God is a spirit, infinite, eternal and unchangeable, in His being, wisdom, power, holiness, justice, goodness, truth, abstraction, recursion, subtlety, and inscrutability." Can this new, improved sentence give us a true, visceral understanding of an omni-deity? It's certainly an improvement.

(God-sentence is from Chapter 7 of Anne of Green Gables. I love that book.)

Monday, August 11, 2008

The Right Way to Respond to Getting Hacked / Cracked

Wired: Boston Subway Officials Sue to Stop DefCon Talk on Fare Card Hacks

Three MIT students have figured out how to hack the fare card system used on the Boston-area public transit ("the T"), to ride for free, add money to a stored-value card, and other such things. They cracked both the RFID card and the magnetic-stripe card. Here is a PDF of their presentation.

They were planning to give a talk on their discoveries at DefCon, the big annual hacker/cracker convention. The Massachusetts Bay Transit Authority (MBTA), which runs the T, sued them to prevent them from giving the talk. The talk will not be given. The students' faculty advisor, Dr. Ron Rivest, is being given a hard time.

The MBTA are going about this exactly the wrong way! (Although their response is understandable.)

Security systems are only trustable if they are thoroughly tested in actual use -- including normal users, hackers, and crackers. No matter how hard the MBTA try to hush up their security flaw, it will not make their security flaw magically go away. They should fix the flaw. Yes, it will cost money, but my sympathy is limited.

It is basically a given that many people will hear about this security flaw, whether or not there is a DefCon talk about it. Hello, Internet. But if people hear about this flaw only through underground/unofficial channels, what impression does that give them of the MBTA? It gives the impression that they either don't know about the flaw, or know about it and aren't doing anything about it. It gives the impression that the people who run all of Boston's public transit are a bunch of incompetents.

Moreover, by stage-whispering "Shh! Don't tell anyone about this!", they're also saying "Hey, this is significant! And leaves us very vulnerable!"

(By the way, if their goal is to decrease the number of people who hear about their security flaw, they have failed dramatically, because it's getting all over the news now. For example, I don't know anything about the presentations at DefCon, but now I know there's a security flaw in the subway system I use all the time, precisely because they're suing my classmates over it.)

What should the MBTA be doing? Shouting this as loudly as possible: "Yes, we have a security flaw! Thank you guys so much for pointing it out! We're working around the clock to fix it!" This would give the impression that the MBTA is run by intelligent people who can face reality instead of frantically trying to make it magically disappear. People would realize that the MBTA is serious about fare security.

The "Fare Security: SERIOUS BUSINESS" attitude would help decrease all kinds of subway sleaziness, including people who break fare security by the super-advanced hack of jumping over the fare gates. Not to mention things like littering, graffiti, and panhandling (none of which are huge problems on the T, I'm glad to say!). If I see someone fare-jumping, it makes me think the subway system is for shit anyway, so what does it matter if I stick gum to my seat?

And besides, the MBTA's anti-hacker attitude will just annoy crackers and make them more inclined to crack the T fares. Being realistic, and trumpeting increased security, will make crackers less inclined to attack the T.

Come on, MBTA. Have the grace to admit you've been hacked, instead of going into denial. Fix the vulnerability. Show us all you're serious about fare security. In fact, why don't you talk civilly to the people who hacked you? I'm sure they could help you build a better system.

...And, because I need some levity, here's a related episode in the adventures of Domo-kun. Hooray, cute pictures.

Sunday, August 10, 2008

Some programming resource reviews

Since I've been teaching myself, and especially since I've been flirting with several different sources rather than settling into a steady relationship with any particular one, I thought I'd share my impressions.

So you know where I'm coming from: I took AP Computer Science AB (Java) in junior year of high school. Then in senior year we had a semi-experimental Scheme class based on the classic SICP (see below), but nowhere near as hardcore. Because Java and Scheme are so different, and because I forgot a lot of Java over the intervening summer, this amounted to me learning to program two separate times with very little cross-contamination.

After that, I didn't write so much as a line of code for my whole first year at MIT. (Yeah, I know -- how could I?!?, etc.) But somehow a lot of vague programming ideas seem to have stuck in my brain, making it much easier to (1) learn a new language, and (2) re-learn programming in general. So I'm somewhere between 'rank beginner' and 'person who wants to pick up a second language after their first CS class'. This will affect my assessment of resources.

>> Learning Python, Mark Lutz & David Ascher

...Comprehensive, I suppose. It's the O'Reilly book, which gives it lots of reputation points. It goes into a lot of detail about basically everything (I'm reading it online, but the dead-tree edition is quite hefty). Tables of built-in integer and string functions, that sort of thing. Even -- get this -- more than one chapter on getting Python to run on your system, choice of IDE, and how to run programs you write from a variety of situations. This makes it surprisingly useful as a reference, for a book with the word "Learning" in its title.

The thing that bothers me about this book is that it can't seem to decide where it's aiming. It's definitely a programming book, not a computer science book; but it's in between "dense comprehensive tutorial/reference for people who already know what they're doing" and "learn programming from scratch using Python". For example, it explains the ideas of iteration and recursion, gives very basic examples, and discusses the general sort of situation in which you might want to use them -- and then a minute later it hits you with a lot of jargon and dense stuff. Curious approach.

Perhaps some of the confusion is because the authors are trying to take a "quick survey first, then dig into the details" approach on each section, and their definition of "section" is too short, leading to a confusing rapid alternation between the high view and the details.

I'm only up to the section on classes and OOP so far, because I've started to run into stuff I never learned or have forgotten; so I can't comment on the GUI section or anything like that, but I'm sure everything else is quite comprehensive.

>> Structure and Interpretation of Computer Programs, Abelson & Sussman

Ahh, the classics. Especially the classics that are available online, for free, in full, under Creative Commons, and not in a really irritating interface!

This is a hardcore nerdy book. It doesn't teach you computer science, it ties you down and throws computer science at you thick and fast, but in a totally awesome, non-evil way. It's really not a programming book, either -- the authors go out of their way to teach you the absolute bare minimum of Scheme syntax to handle the concepts they're presenting. This is kind of irritating if your goal is to be able to do practical things quickly (ha). But if your goal is to achieve nirvana, you could do a lot worse than this book.

Read the footnotes. They are snarky, and competently so, unlike the lame attempts at humor you see in most textbooks.

>> Teach Yourself Scheme in Fixnum Days, Dorai Sitaram

This is a straight-up no-frills tutorial for people who already know how to program, more or less. Reading this after having taken a SICP class was pretty interesting: I kept going "Hey! That piece of syntax makes it really easy to do X thing we were always beating our heads over in class, because SICP HATES SYNTAX OR SOMETHING." Hooray for actually doing things with Scheme. I'd gotten the (not entirely wrong) impression that Scheme was good for nothing but theoretical interest and formalism with a dash of AI.

I'm not sure whether to recommend reading this along with SICP. On the one hand, I tried it and got really confused. Part of the charm of SICP's syntax starvation is that it actually helps you figure out how to do things; they simply refrain from teaching you the four other ways to do it. On the other hand, Scheme can actually do stuff that's not all abstract and theoretical and weird, and this teaches you how to do that.

>> [pdf] How To Think Like A Computer Scientist: Learning with Python, Downey, Elkner, and Myers.

This, I think, would be a good book for a (dedicated) beginner. It starts right at the beginning with the very fundamentals, and keeps a great balance between new concepts and new syntax. I haven't gotten very far at all in this book, mostly because I've spent so much time on the O'Reilly Learning Python book, but I like it very much so far.

Plus, how can you say no to a book that's written in LaTeX? Seriously, now.

>> Project Euler

Oddly enough, none of the above books have enough exercises in them. Teach Yourself Scheme has none at all. Learning Python only has a few, once every five chapters or so, and they're all about catching tiny nitpicks that trip you up. SICP has plenty but they're geared toward teaching CS principles, not coding practice. How To Think Like A Computer Scientist has good ones but not many of them. I googled around but the only thing I found that wasn't too advanced was FizzBuzz, which wasn't enough.

Enter Project Euler. It's a site full of math puzzles, varying in difficulty from "ludicrously easy" to "frackin' impossible", and set up such that you basically have to solve them by programming. Things like "find the ten-thousandth prime number", too big to be solved by hand. Excellent!

The site is obviously run by people who know what they're doing -- all the problems are very unambiguously stated, with examples, and the site keeps your score for you. Once you've solved a problem, you can look at the discussion thread where other people post their code and discuss alternative methods. The other people, by the way, are brilliant, and come up with all these elegant methods and neat optimizations for you to imitate.

Saturday, August 9, 2008

Look Mom, Tags! And a Coding Trance!

[Before I start, let me admit that I am still very much a programming n00b. Everything that excites me is probably old hat to the majority of the coding population.]

I like tags very much. They are a million times better than folders. 'nuff said.

I've been writing a tagging system. It's nothing special -- just something that pairs up items and tags, and can do some of the same kinds of lookup that the tagging systems on blogs can do. Have been wanting to do this for quite some time, so now I feel all accomplished :D

I haven't finished testing the thing yet, so there are probably a lot more mistakes hiding in there, but most of the ones I've caught so far have been pretty similar. I tend to confuse the actual tag object with the tag's name, and refer to one when I should refer to the other -- kinda like confusing the phrase "scientists are people too" with the tool that lets you do this. Same thing with confusing tagged items and the objects they contain. These are pretty easy to fix.

There are a couple more functions I want to write -- eg, I haven't got a thing that lets you organize the tags in order of frequency of usage (as they are in the sidebar). But I've got the majority of what I wanted. (And no, that doesn't include a GUI. This is strictly text-based, Python-command-line stuff.)

I guess I'm kind of excited because, back when I was thinking about teaching myself to program again, a tagging system seemed like kind of a big challenge -- one I could do relatively quickly, but a challenge nonetheless. And now I'm about 90% of the way there. It's astonishing how fast you can learn to program when you've already learned to program twice before! ^^

This is also the longest block of sitting-and-writing-code time that I've spent in quite a while. I seemed to fall into a sort of trance -- very focused, very losing-track-of-time. This is an interesting mindstate (not to mention a very productive one!), and I'd like to get into it more often. (It helped that some people over on the XKCD forum turned me on to the streaming lyricless music from Blue Mars, which bills itself as "music for space travelers". Despite the word "mars" in their title, I think they really mean "music for headspace travelers". I find it quite relaxing and focusing.)