Podcast 035Revision #4, 1/6/2009 3:24 PMUser: "transcribed starting at 1:02:45" Tags: (None) Previous Next |
Podcast 035Revision #7, 1/27/2009 5:11 PMUser: "bolded names and removed some errant lines." Tags: (None) Previous Next |
---|---|
Atwood: Hi, Joel. Spolsky: Hey, Jeff. Atwood: Hey sorry I was a little slow to answer the phone there. Atwood: Yeah, I see that. Spolsky: I was just running out of things to do. Atwood: Yeah, are you actually at the office now? Atwood: It's pretty dead there, I would hope. 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. Atwood: I know. That's the joke. It's really hilarious. Atwood: Atwood: Atwood: 1:02:45 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". 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. 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. Atwood:
| Atwood: Hi, Joel. Spolsky: Hey, Jeff. Atwood: Hey sorry I was a little slow to answer the phone there. Atwood: Yeah, I see that. Spolsky: I was just running out of things to do. Atwood: Yeah, are you actually at the office now? Atwood: It's pretty dead there, I would hope. 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. Atwood: I know. That's the joke. It's really hilarious. Atwood: Atwood: Atwood: 27:24: Spolsky: Any other major StackOverflow news or should we move on to some generally interesting things? Atwood: Well, there is one thing I have to talk about, so... One thing that we've been really stalled on for a long time, with regards to developing the site, is the editor. So, the actual box where you enter your post and, it accepts markdown, and does all the fancy JavaScript. Spolsky: Mmm hmm. Atwood: That control. It has an unfortunate name, it's called the WMD control. Spolsky: Yes. Atwood: But it's a great control and it's worked really well for us. However, there are some bug in it that I want to fix. And what's been keeping me from doing that is we don't have unobfuscated source for that. We have the minified JavaScript, like the version that's tiny so it's faster to download by your browser... 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: So, what this is, is a version of Markdown that runs in JavaScript. Atwood: A version of Markdown that runs in JavaScript and gives you a realtime preview, which is essential. I mean, to me, that was one of the major features of the site that as you type, you can sort of see what the effects are without clicking a preview button or something stupid. Spolsky: So there are several, I mean, there are several markdown implementations, just not in JavaScript, right? Atwood: Yeah. 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. Spolsky: Because then you can use GWT to translate it to JavaScript. 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... Spolsky: I would line-to-line translate it to JavaScript. Atwood: That's an insane answer... Spolsky: Really? Atwood: Well because... Spolsky: Why? 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. Atwood: Well, yeah, but..anyway. I didn't want to make this a giant topic, I wanted to just mention it and move on. But we are, because we haven't been able to reach John, we've been doing the painful process of reverse engineering these JavaScript files. So, if anyone wants to help, I'll put the address in the show notes. We're using Git, which is like that crazy new distributed source control system. And, we're using GitHub.com. And, Chris "Jester" Young, one of the very very earliest StackOverflow users, has been helping us with this and has been started on some of the reverse engineering. So, it doesn't look like we're going to hear from John, because cuz it's been out there for a few days, and I emailed John again and haven't heard anything. So, we need to start on this in earnest so we can fix some of these bugs that we've been running into with WMD. An example of one of these bugs that we've been running into that's really annoying to me personally, is I use Firefox 3, usually, for the most part, although I use Chrome as well, and IE sometimes. Um...when you click on a post, you'll notice...on a normal webpage you can hit space to advance the page. And you can use the arrow keys to scroll. That does not work in Firefox 3 for us. 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. 1:02:45 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". 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. 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. Atwood:
|