Atwood: Hi, Joel.
Spolsky: Hey, Jeff.
Atwood: Hey sorry I was a little slow to answer the phone there.Spolsky:
That's okay, I was a little bit early today.
Atwood: Yeah, I see that.Spolsky:
By one minute. Spolsky:
I was just running out of things to do.
Atwood: Yeah, are you actually at the office now? Spolsky:
I am, yeah.
Atwood: It's pretty dead there, I would hope. Spolsky:
Uh, it's about half. I think we're about half staffed right now.
Atwood: Yeah, well my boss is kind of a jerk. He doesn't always give me time off, and often I have to come into the office at odd hours. Spolsky:
You don't have a boss.
Atwood: I know. That's the joke. It's really hilarious. Spolsky:
Ha ha ha. You were working on servers there, over the, uh, Christian holiday.
Spolsky: Any other major StackOverflow news or should we move on to some generally interesting things?
Spolsky: Mmm hmm.
Atwood: That control. It has an unfortunate name, it's called the WMD control.
Spolsky: You still don't have that?
Atwood: We still don't have that. I've been emailing... something happened... Okay, so, John Fraser the author, super nice guy. Super helpful, in the beginning. Kinda just fell off the planet. Like...
Spolsky: Maybe he did.
Atwood: ...almost literally. I don't know what happened.
Spolsky: Gravity doesn't apply in his neck of the woods.
Atwood: If anyone hearing this knows John Fraser, or knows how to contact John Fraser, please do so on our behalf, and I will thank you forever, but I can't get him to respond to me anymore. Which is weird, because he was very responsive in the beginning.
Spolsky: I thought this was, wait. I'm confused. I thought this was a Google thing? No, that was the code coloring, that was a Google...
Atwood: That's the code colorization, which is different. This is the actual GUI control.
Spolsky: Is there a Java Markdown? Is there a Java version or Markdown?
Atwood: Well, there are sever-side editions of Markdown as well. We have one in C#.
Spolsky: Is there one written in Java?
Atwood: I'm sure there is.
Atwood: [sigh], [laugh] Yes that wouldn't be weird...Rube Goldberg contraption that we're buiiding. Anyway long story short...
Spolsky: It's not the world's most complicated thing, Markdown. Maybe it is.
Atwood: No, it's not. It's just I...
Spolsky: Yeah, why rewrite it.
Atwood: It's painful to reverse engineer stuff. It's just really painful to deminify and deobfuscate.
Spolsky: No, I mean, I, I, I, before I started deminifying and deobfuscating, I would take the source code from another language and I would just line-to-line translate it.
Atwood: But it's Java, it's not going to run on the client. I mean, it's...
Atwood: That's an insane answer...
Atwood: Well because...
Atwood: It's the DOM. It's manipulating the browser's DOM. Java doesn't know anything about Internet Explorer's DOM.
Spolsky: I'm confused here.
Atwood: That's part of the magic of the control. I'm just going to ignore that suggestion for now. [laughs] Cuz it's crazy.
Spolsky: [laughs] There's no DOM, there's no DOM here. All you do is you take, and I'm sure this is what this minified WMD thing is doing. You've got Markdown, and Markdown just takes a string, and returns a string, right? It takes a string in Markdown and returns a string that's in HTML. That's what Markdown does. It goes through and replaces the double-dashes with em-dashes, and all that kind of stuff, whatever it does. Um...
Atwood: Well, actually, it's the preview that's the hard part, Joel. It's the actual [unintelligible]...
Spolsky: No, the preview is just setting the... You get the HTML, and you just set the InnerHTML of some <DIV> to that.
Atwood: Right, but there's still a lot of browser-based manipulation you have to do to make that happen. You have toolbar buttons that have to be clickable in the browser.
Spolsky: Yeah, that's like, two weeks of work in that stuff.
Spolsky: um hmm...
Atwood: Because the WMD control, for some reason, and this is exclusive to Firefox 3, absorbs those keystrokes. These are the kind of bugs we want to fix once we have the source code that's actually maintainable and editable.
Spolsky: Okay, so I've been looking here, at...here might be another approach. I'm looking at, uh, Aaron Swartz has this website called JotIt.com.
Atwood: Yep, we know Jottit.
Spolsky: It has one of those. It has the uh, it has uh, it has [mumble] the preview thing, with the uh... I don't know if it's using WMD, because Aaron Swartz was one of the original writers of Markdown, so I think, he probably might have just written his... So, maybe he can give you some code.
Atwood: Uh, its possible. I do want to continue down the WMD path for now, because we've been really quite happy with WMD. I mean, it does everything that we want. And, we spent a lot of time researching this decision early on. And, I think the confusing part is we had such a good dialogue with John at the beginning. I had no idea it was going to be "Fall of the face of the planet," was a possible outcome to this relationship, um, so I had no way of knowing this would ultimately happen. But, anyway. I just want to mention that. That's another thing that we're embarking upon and...
Spolsky: Okay, just send an email to Aaron Swartz because he may just have the code and give it to you.
Atwood: Yeah, I'll try that.
Spolsky: There we go. Eventually, I have to say it three times, and Jeff will listen to me. [laughs].
Atwood: Well, eventually I just tell you what you want to hear so we can move onto the next topic.
Atwood: Let's go a little bit... Let's go like ten minutes long this time because I do want to do a Stackoverflow question because I have a really good one. So we'll be a little bit long, but I think it's OK because we didn't have a show last week. Um. So the one I want to talk about is "Array's, What's the Point". Spolsky:
Oh, yeah, that was a good... that was surprisingly good.
Atwood: 392397 is the number. I'll obviously link in the show notes. The funny thing about his one is that I actually read about it through a third party. Like I didn't even actually find it on the Stackoverflow site. Spolsky:
'inaudible ' on Reddit I think. Or Hackernews.
Atwood: It might have been on Reddit. I saw it because Damian Katz blogged about it and, uh, I was just surprised to see him reference a Stackoverflow question. And and his point was, and I tend to agree, is that, arrays, it's interesting, but arrays really have kind of lost a lot of their significance in , sort of, modern programming languages. That, uh, you know, a lot of time we use data structures that kind of abstract away the fact that underneath they might be using arrays, or they might not be, it doesn't really matter. But very little of the time are you going, you know like, a sub one or a sub two. It's just not a very super-common activity. And, that was his initial reaction was "how could people not understand arrays, that's incredible, that's ridiculous, we're not teaching our students" and then his second reaction was "wait a minute, there's something to this. Like, maybe arrays.. We've kind of moved away from arrays as, like, a fundamental data structure because, you know, they're too low level ultimately." Like pointers. Like the whole argument would be for pointers. Spolsky: