View  Info

Podcast 068

Intro and ads


Atwood:    My Lymph nodes are swollen, my throat is really sore, but I have like no cold symptoms at all. And I've been talking a little bit about this on Twitter, I try not to make Twitter like my personal "let me report how I feel" mechanism [laughs]

Spolsky:    No, but you can use it as your primary care physician, that's different [laughs]

Atwood:    Yes, well doctor-

Spolsky:    Doctor, uh, Lazy Internet, Lazywebz

Atwood:    Yeah. Well I-

[Joel's computer sounds]

Atwood:    I think if I go the-

Spolsky:    Sorry

Atwood:    Give me-

[Joel's computer sounds]

Spolsky:    Oh my God, I'm sorry.

Atwood:    What is going on over there?

Spolsky:    [Laughs] I just plugged in my iPhone to recharge

[Atwood and Spolsky laugh]

Spolsky:    That's all I did.

Atwood:    Wow.

Spolsky:    Insanity. Okay.

Atwood:    So, but I'm feeling okay now, so I think we'll be good. Now did you have anything you wanted to start with? I have some items if you don't.

Spolsky:    Uh, nope, fire away. I've got some listener questions all queued up.

Atwood:    I did want to mention – being a huge fan of the fake plastic rock – that the Beatles Rock Band was released last week.

Spolsky:    Oh yeah. And does it have a lot of songs?

Atwood:    It has 45 songs. But the Beatles' catalogue is so big and so good and so deep that like, you're gonna be disappointed invariably.

Spolsky:    Does it have A Day in the Life?

Atwood:    It does not.

Spolsky:    Oh come ON.

Atwood:    It's got 45 tracks, you can look at the tracklist online. It does have some good stuff for sure. And it also has some stuff that makes me wonder why they included it [laughs]

Spolsky:    Mm-hmm, mm-hmm.

Atwood:    But generally it's great, and it's a really fun way to experience the Beatles if you're a fan at all, and even if you're not a fan it will kind of introduce you to new music and it's a very, very respectful, deeply respectful game in terms of the experience and how they present it and-

Spolsky:    Oh, really?

Atwood:    It's kinda like a love letter to the band-

Spolsky:    Aww

Atwood:    - that you can sort of experience and play. I mean that to me is the big attraction, is that I love music, I've always loved music, and-

Spolsky:    [interrupts] What's your favourite-

Atwood:    And this is one step up- well this is one step up from, you know, listening to it on your iPod is one thing, but then you're in a group, you're experiencing music, you're actually sort of playing along, you can hear the bass line, hear the drum line, and the subtleties of some of the singing, and guitars. But the big innovation here is the vocal harmonies, so you can have up to 3 people singing.

Spolsky:    Mm-hmm

Atwood:    And there's actually 3 – depending on the song, there's 1 to 3 different tracks, because the Beatles did harmonise a tonne, which I didn't even appreciate until this game came out [laughs]. But like they're constantly singing, there's background vocals, there's vocals in times when they're singing together and apart, it's really cool. It teaches you something about the music, more so than just passively receiving it. Which is why I'm a big fan, but I recommend it. So my favourite song to play?

Spolsky:    Yeah.

Atwood:    Uh, I like the White Album type stuff-

Spolsky:    Really? Do they have Helter Skelter?

Atwood:    They have Helter Skelter-

Spolsky:    They do? Oh my God, and does it have like Charles Manson.. uh, oh my God.

Atwood:    [laughing] No, no, no, it doesn't go with- this is a family game, Joel.

Spolsky:    [laughs] Okay, I was just wondering what the videos were of.

Atwood:    Yeah, but one of my favourite tracks to play alone at the moment is Back in the USSR, I love that song and that's really, really fun to play in the game, it's a real blast. So. Yeah, that's the Fake Plastic Rock front, just wanted to mention that because I'm such a huge fan. The other thing I wanted to talk about that we actually did change based on actual problems we were having was we have changed DNS providers.

Spolsky:    Wait, wait, okay, first of all it's an excellent thing to talk about, but I would like to point out that that was a segue. We are no longer talking about Beatles Rock Band. Thank you.

[Atwood laughs]

Spolsky:    [laughing] I just had to announce that.

Atwood:    Good, well how would we have known that unless you had pointed that out?

[Spolsky laughs]

Spolsky:    I was confused for a minute there, I thought maybe some of our listeners were too. Uh, here's the.. DNS.

Atwood:    Well what if our DNS servers were named you know, John, Paul, Ringo and George? Would that-?

Spolsky:    Okay, here's something I don't understand about DNS. Because I – maybe I'm wrong – and I definitely am with you on the philosophy of there's no reasons to do things in-house that we can outsource that are not our core competency. Totally agree. But. But, maybe I'm old-skool, but there's a little program called named and it comes free with Linux and you give it your DNS file and you run it and it serves up your DNS file.

Atwood:    Right.

Spolsky:    And it never fails to serve things and it just works perfectly.

Atwood:    Yeah. No you can certainly run your own DNS. I mean, to me the value add of having somebody in a company that they specialise in DNS in doing this, is that a) they have a global network. I mean they have like 10 datacentres like, all over the globe.

Spolsky:    So what, the Internet has distributed.

Atwood:    Well it is, but that first DNS lookup isn't. I mean it does actually have to look it up. So that's what gets confusing about DNS is that it's so heavily cached, right. So [laughs], uh, but-

Spolsky:    Exactly, exactly, if somebody goes to Stack Overflow in India, chances are that his ISP knows where Stack Overflow is.

Atwood:    Uh-

Spolsky:    Assuming that he's using his ISP's DNS server. So it doesn't go to us or them anyway.

Atwood:    But you'd assume there's some lookup interval, say an hour or– eventually that stuff expires out the cache, right? I mean-

Spolsky:    Okay, so once an hour somebody has to come all the way to us.

Atwood:    Right. So that one person will pay that one penalty which can be surprisingly large. I was actually looking it up, somebody had done some benchmarks – this wasn't a corporate sponsored thing, this was an actual guy researching this and he was actually graphing, showing the difference with his ISP's DNS vs. another DNS provider that was a professional DNS provider and was actually substantially lower in terms of resolve time. Now, where this gets muddy is because the whole caching thing, which is incredibly complicated, it's about one of the weirdest things about DNS. But I do believe there's some value – it's debatable like how muchdollar value you wanna put on that, I don't know – but there's some value to me in having a worldwide set of datacentres where they specialise in this stuff, because when people can't get-

Spolsky:    Snake oil, I say this is snake oil.

Atwood:    No, no, no, let me go back though. Because our registrar is Go Daddy. And so we were using Go Daddy's name servers, so here's what would happen-

Spolsky:    Well that's terrible, those are bad name servers because they're overloaded because everybody's using them and Go Daddy doesn't care.

Atwood:    Well, that's probably true.

Spolsky:    Yeah, but you run your own name server..

Atwood:    Right. Well, one thing we thought about– well, you're taking me on a tangent so let me tell the story.

[Spolsky laughs]

Atwood:    But yes we could, we could run a name server with us and with you and then we'd have a coast-to-coast name server.

Spolsky:    You don't even need the coast, that's done by the caching inside the Internet already. So you only need one name server as long as you don't have multiple datacentres because if your name server goes down, it's because your datacentre's down. Well, maybe not, maybe you need a secondary name server, but you don't need a secondary datacentre.

Atwood:    Well I think it's a resolve time issue. I mean you geographically map-

Spolsky:    Yeah.. I don't buy it. Don't buy it. Not buying it.

Atwood:    Well it's not a question about buying it, it's a question about how much value you put on that service. You would put a very low value – like a dollar. Right?

Spolsky:    Yeah, that's true, that's a good– well, yeah. Yeah. Exactly. No, actually, no, because I would think that a DNS server should probably be on its own box, certainly as long as we're trying to distribute things. Although if it could probably be on a utilities box, it's probably trying to do a bunch of other stuff, like your email.

Atwood:    Right. Well it's just a question of what dollar value you put on the service. I think it does have some value – it's debatable how much value that is.

So let me go back and explain the problem. So the problem was on Go Daddy, the DNS was actually reliable, but what we found was that if we went in and changed a setting in DNS, some unrelated like – for example, the other day we went in and changed the IP of our mail server. This was like an internal thing for us, it doesn't really matter but we changed IP.

Spolsky:    Yeah, yeah.

Atwood:    And that somehow broke DNS for us. Like we would constantly have this problem of we would go in and change something in the Control Panel and in Go Daddy's DNS thing, and then other unrelated things would just totally disappear, for some people in the world.

Spolsky:    Because they have written some bad and hacky and cludgy code to probably take a bunch of settings that you put on the web and write a named.conf file, which is, you know, the standard DNS text file. I'm guessing that there's some bug in there or something. Something wonky or clonky there.

Atwood:    And in addition to that, so theres that problem. That made like, every time we changed something we dreaded it. Because we knew that if we change something, even if it doesn't relate at all to anything else in the system, the potential of breaking something is high.

Spolsky:    But when you're running your own DNS, this doesn't happen.

Atwood:    You could run your own DNS, absolutely.

Spolsky:    Yeah.

Atwood:    The other problem we ran into is that occasionally, people from – even without any changes, DNS would just mysteriously kinda, burp.

Spolsky:    Mm-hmm.

Atwood:    And people couldn't get to the sites, and I mean DNS is kinda important-

Spolsky:    Yeah.

Atwood:    -because if people can't get to your domain name, then you're down. From their perspective. Even if you're totally up.

Spolsky:    Maybe I just had a weird experience, but the experience I've had is that the hardest part is writing a good file – a named.conf file – because there's certain things you eventually have to learn, like for example, in a typical DNS file there's a serial number. And when you make a change you have to make a higher serial number. You can't just edit the file and save it. You actually have to edit the file and go change the serial number to a higher number. And it's so easy to forget doing that, and then you're like "Why is this not distributing to people? Why are their caches not invalidating?" and then you're like "Oh, shoot! I forgot I made that change and didn't change the serial number".

Atwood:    Well-

Spolsky:    So there's stuff like that, that if you're actually writing your own text file, you do kinda have to learn. And if the DNS provider that you're hiring, you know if a part of their service is that they give you a consultant or kind of a DNS expert to make sure that you do that stuff right, that would be some sort of value added I guess. It's just that so many of them are just running a Linux box with named on it and they're charging you for that. And that's just one of those things that, you know, when you still have to give them the same text file.

Atwood:    Mm-hmm.

Spolsky:    And I just don't get how that's a business. It's just bizarre to me, it's almost like– but, but I guess it is, so..

Atwood:    Well, like hosting bug tracking? That's a business?

Spolsky:    [laughing] No, stop!

[Spolsky and Atwood laugh]

Atwood:    That's a value add, Joel!

Spolsky:    [laughing] We have some software there.

Atwood:    I know, I know. No, DNS is not a glamorous service, I totally agree with you, and I think everybody on the team was like, well DNS is just ridiculously simple. But to me – and again, it's debatable how much dollar value you wanna put on that – I do believe there is some dollar value – in my opinion – to having this DNS distributed across the world.

Spolsky:    Well, a lot of people agree with you, so I'm just the crazy one.

Atwood:    I just– I will tell you that it was much more expensive than I thought it should be. I did have a little bit of a shock after– obviously this is something that was negotiated and I can't go into all the details but [laughs] we came out with something we were happy with, but I will tell you that it was not cheap. [laughs]

Spolsky:    Because it's a sucker service, they only sell to suckers and they might as well charge as much money as they can.

Atwood:    Well I get the impression that it's kind of enterprisey. And at the level that we're at, and one thing they'll ask you is how many DNS queries do you do per second. And we had no idea. I mean, how do you even measure that?

Spolsky:    Ermm.. How do you measure that?

Atwood:    So the service we actually ended up using does have a graph that shows us. And I think we ended up using – I wanna say, 12? queries per second..? That was on a weekend. I think our interval was set artificially low to start with, we set it to 1 hour so that everything would propagate really fast. So I think we're gonna turn that back up to 1 day or something like that. But once you start looking at the 12-20 queries per second for like a major website-

Spolsky:    So each of those queries is basically 1 TCP/IP packet – uh it's UDP – but it's just 1 packet.

Atwood:    But that's one of the central ways that they sort of discriminate the enterprisey.

Spolsky:    Oh right, they price discrimate. Yeah.

Atwood:    Yeah. Yeah, that's one way that they look at it.

Spolsky:    I guess they're like "Oh you guys are huge because you're all over the Internet", but then again just because you're huge, that just means there are more likely to be cache hits out there on the edge of the Internet.

Atwood:    Right, right. No, caching is obviously a big part of this.

Spolsky:    But it's kinda bizarre because if you were this really unique and rare website, like some kind of a coding.. horrific code or something like that, then the average, you know, your just Joe dial-up ISP in Hyderabad, India, the chances are you've only got one customer going there and you're gonna have to do the full– the DNS is going to have to go the full way back home-

Atwood:    Right

Spolsky:    -because it's not cached anywhere. Which with Stack Overflow, there's somebody visiting Stack Overflow just about pretty much everywhere.

Atwood:    Mm-hmm

Spolsky:    And so because of that popularity it probably gets a lot more cache hits, actually.


Atwood:    Mm-hmm. Well, one thing that Yahoo found, you've probably seen this, but Yahoo did a really ground-breaking set of experiments around how many people come to a website for the first time with an empty cache, basically comparing cached performance vs. uncached performance, and what they found there was that the uncached performance – in other words people were coming to the site totally naked like they'd never been there before – was way higher than they thought it was gonna be, I wanna say like 60% – some ridiculously large number.

Spolsky:    In other words the cache wasn't helping that much?

Atwood:    Well that's what I'm getting at–

Spolsky:    You're talking about like your web browser cache?

Atwood:    The browser cache. So my point is that, I dunno I think we tend to overestimate how powerful– I mean caching is great, don't get me wrong. But there's something to be said for having a fast core service when the cache isn't there.

Spolsky:    Mm-hmm, mm-hmm.

Atwood:    And again, that's where I start to add a dollar value to the service. Now some other things you can do with DNS that we aren't doing but some service providers offer is they'll also detect if a server is down and switch the DNS automatically – in other words they do some kind of monitoring, this is a value add service.

Spolsky:    Well it's nice that they provide it, because that's something that would be fairly trivial to do if you were running your own DNS.

Atwood:    Right. But that's something they can do.

Spolsky:    But it doesn't help if they have any cache at all.

Atwood:    Right. And they can also do some kind of load-balancing as well.

Spolsky:    The trivial thing in a named.conf file is to have something they call Round robin, which has always been implemented, where you give a list of IP addresses instead of 1 IP address.

Atwood:    And then the DNS server just magically picks one?

Spolsky:    I think the DNS server, yeah, gives out a different one every time in order in sort of a round robin fashion which is sort of, you know, it's not load balancing exactly.

Atwood:    Well it's balancing at a different level. Like the way we're doing it now with HAProxy, the request comes to HAProxy and then we balance it, which is in a very simplistic way, but–

Spolsky:    Which is better because then you can have a machine go down and I mean it's just better than any way of trying to do it in DNS.

Atwood:    Well they actually monitor as well. It's paired with some monitoring. They do some kind of server ping and then if they see that a server goes down they'll switch your DNS. I'm not, I'm just throwing it out there as a value add, this is the way they–

Spolsky:    This is good, I like having things like little debates like this [laughing] on our podcast.

Atwood:    [laughs] Well DNS is really important, I think also you've got to realise–

Spolsky:    It is, let me tell you, what I think the hard part of DNS is, is that 2 of the 3 hours of learning that it takes you to get your named file correct to learn about what those different timeouts mean because there are several timeout values in there and to learn about what an MX record is and how to do backup DNS and Master-slave and DNS transfers, you know, with the slave is like "Oh, I lost my Master data and-" you know, there's definitely some stuff there to learn and if you were to provide a service that were to make it that you didn't have to learn that stuff, that would be a valuable service, and it would really have to be the kind of thing where you got some consulting help, because just making a web form where you type in all the same information that's gonna go in the named.conf file and in the DNS records is not very helpful unless you provide some helpful advice about how it should be done.

Atwood:    And part of this too is my reaction to– I was so fed up, I mean we had people on Meta that would hard-code the values for all the sites because there was so much irregularity going on.

Spolsky:    Oh. Weird.

Atwood:    It was pretty traumatic and actually when I posted this on the Blog people were like "oh thank you for finally doing something about this", you know, because nothing was really wrong per se, but it just sucked that every so often for an hour you couldn't get to the site and you would have no idea why. I mean this is kind of a negative quality of life for the users that, you know, drive the site. You know, [laughs] to me that has a dollar value.

Spolsky:    Cool

Atwood:    So, yeah anyway, so we–

Spolsky:    Did you ever try the– we should do something value added for our users, did you ever go to

Atwood:    Uh, I think I've been there.

Spolsky:    So this is a website where you put in– I mean it's full of all kinds of fantastically useful utilities, for when you're running your own DNS server. And, if you're having DNS trouble, which we did when I tried to write the named.conf files myself [Atwood laughs] this is sort of like lint basically for your DNS and it tells you all kinds of interesting things like "oh look you don't have a mail record" or "this is in the wrong format" or "this is a comma and it should be here–"

Atwood:    Oh, cool.

Spolsky:    So, for example I just ran it on and I got 3 warnings. Hmm, interesting–

Atwood:    Ooh, warnings.

Spolsky:    –view example DNS report.. Of course you've got to pay. But there's also stuff on–

Atwood:    PAY? Pay? What is this pay talk?

Spolsky:    [laughs] Well basically, yeah it–

Atwood:    That's not worth it, Joel, that's crap!

Spolsky:    There is probably something free [Atwood laughs] but it's not really running your DNS server for you, it's figuring out what your DNS records should be.

Alright we've talked about DNS for too long. I hereby decree the subject over!

Atwood:    No, but that was a good addition, the DNS stuff, as far as–

Spolsky:    Yeah And it has a great WHOIS lookup, basically IP information which is always like if some nasty user has connected from a certain IP, I always use DNSstuff is what I always use to trace it back to where that IP comes from and what ISP owns it and where is it located. And you can get that all for free on DNSstuff.

Atwood:    Well, DNS is an important topic, I mean without DNS we'd all be typing in IP addresses [laughs] and that wouldn't be a whole lot of fun.

Spolsky:    That would be those whole black telephones with the dial that you had to dial phone numbers–

Atwood:    A rotary, like it would be rotary as well [laughs] Yes, typing in an IP is the rotary phone of the Internet.

Spolsky:    Exactly.

[Spolsky and Atwood laugh]

Atwood:    That's great. So we–

Spolsky:    Do you know people's phone numbers?

Atwood:    What do you mean?

Spolsky:    Do you know anybody's phone number?

Atwood:    I barely know my own phone number.

Spolsky:    Yeah.

Atwood:    So no. The answer's no to that.

Spolsky:    Yeah, me neither.

Atwood:    So another server-related thing we've been messing with is we did set up HAProxy and that's working brilliantly by the way and I actually donated some money to HAProxy because we like it so much. And actually the author has been commenting on our blog and actually he's been super helpful, Willy, so thank you Willy. And we realised retroactively, remember how we're always talking on Stack Overflow or Server Fault, you'll ask a question and people will come in and question the premise of your question

[Spolsky laughs]

Atwood:    as in "why are you asking this? This doesn't even make sense" you know, "You shouldn't even be doing this", right?

Spolsky:    If you use Linux, all these problems go away.

Atwood:    And the fact that you have to ask this question is indicating that the whole thing is wrong. Well we actually had that experience, and we didn't realise it. So on our servers, the way we set up HAProxy, we set up 2 default gateways. And it turns out, having 2 default gateways is just a really bad idea.

Spolsky:    Can I ask a question?

Atwood:    Yes.

Spolsky:    Okay, number 1) HAProxy, is this on a Linux box? Or do you–

Atwood:    Yes, it's on a Linux virtual machine.

Spolsky:    Oh, you have a Linux virtual machine you're running on a Windows..

Atwood:    Yes.

Spolsky:    Really. You using VMWare?

Atwood:    No, we're using Hyper-V which is the built-in stuff in Windows Server, which works really well. Hyper-V is great.

Spolsky:    I keep hearing that Hyper-V is several years behind VMWare.

Atwood:    Well.. In what regard?

Spolsky:    Just like, Microsoft is about 3 years behind in feature sets and all that kinda stuff.

Atwood:    But a lot of the high end features I just don't care about though. I just want it to work and be reasonably fast.

Spolsky:    Right.

Atwood:    And I'm pretty sure Hyper-V works to that.

Now, rule of thumb for virtual machines is that– virtual machines surprisingly– I did a tonne of research on this back in the day and I don't think the conclusions have changed. A virtual machine offers surprisingly similar performance to native boxes. The part that you fall down on is disk performance, hugely. If you're doing anything that has to do disk work, it's gonna be brutal in a VM.

Spolsky:    Well, there's a workaround which is you put in additional disks and you give the virtual machine–

Atwood:    Right, there's ways to work around that and you have to really think about that. But think about what HAProxy is doing. It's doing network routing, basically, pretty much all in memory, and it's really tight code, it's probably C – your favourite language.

Spolsky:    Mm.

Atwood:    And, I mean, it doesn't really have any disk dependency, so it's all memory and networking and that stuff is like 90 plus percent of the speed of a full machine, and we actually have a Cacti monitor set up for the HAProxy box and I don't think it ever goes above 3% CPU usage [laughs]

Spolsky:    Wow.

Atwood:    Yeah, so my point is that virtual machine appliances – I think – are totally viable.

Spolsky:    Yeah, now that the chips that Intel is making support it kind of natively, I mean they used to be emulators..

Atwood:    Yeah, that's true, AMD was kind of ahead of the game on this. Intel finally caught up. There are some special instructions, I don't remember the details, I actually posted something on my blog, there are some certain instructions that are really impossible to virtualise, because they're crazy. And they had to introduce like new instruction sets to get rid of these crazy – workarounds basically for these other instructions that are really hard to virtualise. It's really an artefact of the crazy x86 architecture.

Spolsky:    What else is on that box – why is it virtual? What else is on the physical box?

Atwood:    Gosh, a bunch of stuff. It runs our Cacti monitoring, it runs our mail server, which is also–

Spolsky:    You're running your own mail server?! [laughs] and you outsourced the DNS server [laughing]

Atwood:    Uh, well, we kind of have to, because if you send a lot of mail, I dunno, it just gets really weird. So mail server–

Spolsky:    That's one of the classic things to outsource, but okay.

Atwood:    But this is only for outgoing mail, it's just for notifications and stuff.

Spolsky:    Mm-hmm.

Atwood:    This is not– I think you're thinking of this the wrong way, this is for us to send notifications to users. It's not a mail server like I wouldn't log in and get my mail off the server.

Spolsky:    Mm-hmm.

Atwood:    So it's just an outgoing mail relay basically. Um, what else are we running on there? Uh, ad server stuff which is on another virtual machine, uh, Meta is running on there. And even with all that junk running on the machine, it rarely gets above – I want to say, 10% CPU usage. I mean it's a quad-core, it's a standard server config.

Spolsky:    Cool.

Atwood:    But yeah, you can do a tonne of utility work, I mean we have 5 servers now, so really the only risk is you know, if something bad happens to that server, we've got to be able to move the virtual machines or have copies of them.

Spolsky:    One of the nice things you can do with virtual machines, especially if they like have a checkpoint restore kind of thing, is get it working– especially if it's a utility, if it's not storing any state, it's just you know, like your proxy server's probably in this category, where once you've got it set up, if you went back to that state, it'd be fine. And you've got a VM set up perfectly, and if it ever gets hacked or anything like that, you just hit the restore previous checkpoint button, roll back all the crap, and ta-da, you've got your machine back when it was pristeen and in a perfect condition.

Atwood:    Absolutely. I mean virtual machines are fantastic. I'm really sucky at the Linux stuff, but Geoff [Dalgas], one of our other team members is pretty good at it. So it's nice to have him on board so we can actually, you know, get the best of both worlds. I don't think we have to use everything in the Microsoft stack, I mean I just want to use whatever works. And having virtual machines makes that so much more viable than it used to be. I mean vs like I've got to roll another server into the datacentre, and install Linux and all that stuff, vs just spinning up a VM. I think it's a big, big win in terms of flexibility and toolset.

Spolsky:    Mm-hmm.


Atwood:    So. But let me come back around to what I started this with which was – and I'll post a link to this in the show notes – we asked a question on Server Fault about our crazy network configuration and because we have two gateways, occasionally Windows will decide that one of the gateways sort of randomly is the right gateway. [laughs] This is a problem because outgoing web requests, like say you want to log in with OpenID

Spolsky:    Yeah

Atwood:    It's gonna go to the bit bucket, instead of to Google or Yahoo or wherever it's supposed to go, so– and this doesn't last long, this usually lasts like 10 minutes and then it figures out "okay, that's the wrong gateway"

Spolsky:    Ooh, yeah.

Atwood:    But it's intermittent, which is even more annoying.

Spolsky:    Oh, let me tell you how I spent the week of my life once.

Atwood:    [laughs] Go ahead.

Spolsky:    Or am I– you go ahead and finish.

Atwood:    No, that's pretty much it – don't have two gateways, it's just not a sane network configuration.

Spolsky:    So almost every server you can buy comes with 2 ethernet ports

Atwood:    Right

Spolsky:    And typically you can use it to make a router, some people will use it to have like a utility network, and another live network so maybe your web server has one connection to the outside world, and one connection to the SQL server that it's gonna be talking to and those can just get more bandwidth because they're on separate networks, or subnets as they say

Atwood:    Right.

Spolsky:    So there's a lot of usefulness to having these two ethernet jacks, but sometimes you're only using one of them, and in that case if you put Windows Server on there, the default is to use DHCP, and that's a reasonable default for a network port to just use DHCP to try to get an IP address. And what it will do if it fails to reach a DHCP server, is it will generate a random IP address in hopes of minimising IP conflicts–

Atwood:    Oh yeah

Spolsky:    Starting with a couple of numbers, I don't remember where they are, I think it's 192.168, but it's something that are characteristic of an IP address that's not actually going anywhere, because there was no DHCP server.

Atwood:    Right.

Spolsky:    And I don't know why it does this, but it's annoying. So the next thing that you often do on a Windows network is you have DNS – that's awesome – and then you have DHCP, and you set up the DHCP and the DNS to talk to each other so that you can actually type the names of a server, have it look it up in DNS and find whatever IP address was recently handed out to that server or that box by DHCP.

Atwood:    Mm-hmm.

Spolsky:    So what happens is that you have a box, and it has 2 IP addresses – one is real, and the other one goes nowhere. And Windows will register both of those in DNS. And now 50% of your DNS queries will go to an IP address that's not  actually there, and the other 50% will go to the IP address that is there.

Atwood:    Right.

Spolsky:    Which – like I say – took a week off my life [Atwood laughs] as I tried to figure out why on Earth this was happening.

Atwood:    Yes. Yeah, no it can be frustrating figuring these things out, and that's why it was nice to have Willy – the author of HAProxy – commenting. And another issue he also commented, that basically what we're doing doesn't really make sense [Atwood and Spolsky laugh] which could be the source of our problems, what we're doing doesn't make sense, that's why you're having problems.

Spolsky:    Yeah.

Atwood:    And now the way we have it configured actually is all the traffic– HAProxy is basically a router, so there's only one default gateway which is the HAProxy box, which means we have to route like remote desktop and stuff through. But it can do that, so.. You have to get rid of the problem by, you know, it's the classic case of "don't do that", like don't have two default gateways [laughs]. And hopefully, that'll be the end of it.

Spolsky:    Yeah.

Atwood:    And in fact I need to answer our own question and basically say our premise was wrong [laughs] and indicate our new network configuration. Close the loop on that.

Spolsky:    Cool.

Atwood:    So do we have any user submitted questions?

Spolsky:    Yes, we do. Oh this is gonna be one of those "where's the question?" things isn't it?

Atwood:    [laughs] everybody fill that out on your bingo sheet

Spolsky:    Uh, I have a couple. They're sort of on different subjects.

Atwood:    Okay, well you're the–

Spolsky:    Okay well here's a question by Steve from Louisville kind of about Meta which I kinda don't really wanna talk about but anyway.


Steve:        Hey, guys, this is Steve from Louisville, Kentucky, or  "Louis-ville" if you're from an English speaking nation. I had a question for you about etiquette and Meta. Coming from Stack Overflow initially, where there's fairly firm guidelines that, you know, politeness is greatly appreciated, and rudeness isn't very well accepted, moving into Meta, I was a little bit shocked when I found out that, you know, basically the norm on Meta is to downvote without any kind of reasons if you don't like something and just leave it at that. Thinking about it, I'm curious, I guess primarily, if you've given any thought towards trying to, I guess clean up the etiquette on Meta, make it a little bit more polite for people who may even be just asking stupid things about Stack Overflow, which I'll admit my questions were, but for the sake of Stack Exchange, trying to find out a way to kind of rescue a Stack Overflow driven site from kind of that rude mentality which could potentially sink a future Stack Exchange site. Thanks so much.


Atwood:    Well I will say, that with regards to Meta, it's definitely a looser environment, because it's kinda like the back room. This is for people that are fairly invested in Stack Overflow or one of the other Trilogy sites, and they wanna talk about how the site runs. So it's more discussiony, number 1). So there's really two things. 1) is that it is more acceptable to do fun and silly things on Meta. Because it's, I mean, we're not really answering questions there.

Spolsky:    Mm-hmm.

Atwood:    The goal is just discussion, and part of discussion is to be enjoyable, and have fun, within reason, obviously. If it gets ridiculous, I will go in and delete if there are huge comment threads that are just pointless, there is a moderator function to delete all the comments and I have actually done that today in fact. [laughs] So we do want people to stay on topic, and the topic is the Stack Overflow Trilogy, right? Anything about the sites. So that's what gets enforced, is be on topic. Talk about Stack Overflow in some way.

Spolsky:    Mm-hmm.

Atwood:    There's more of a threshold of fun, it's more discussiony. So I think within those parameters, I feel like Meta does stay reasonably civil, like I haven't seen major problems – there have been flare ups, which we deal with in a variety of different ways. Now as far as applying that to Stack Exchange, I think the central rule is, you know, how discussiony are you going to be? How tight is your topic? [laughs]

Spolsky:    Mm-hmm, mm-hmm.

Atwood:    The more broad your topic, the more unanswerable the questions, the more you're gonna have this problem, so that would be the key piece of advice. If you're thinking of starting a Stack Exchange site, like have a really, not really narrow, but a reasonably narrow topic. That can be answered.

Spolsky:    The narrowness, I think, that really worked for us was it has to be a question that has an answer. It can't be subjective, it can't be "What's your favourite programming language?"

[Atwood laughs]

Spolsky:    You know, that doesn't have an answer and that's what leads to religious wars, whereas asking, you know, how do I do x with.. y...

Atwood:    Right. Like I mean even on Meta, let me give you some examples. You might have a question about like why on Stack Overflow when I click this do I get this specific behaviour.

Spolsky:    Right.

Atwood:    Is that by design, is that a bug? I mean that's pretty narrow and specific. But we also have to allow things like "What constitutes spam?" Like how do you define spam? I mean there's no real good, perfect answer to that.

Spolsky:    Right.

Atwood:    There's a certain element of discussioniness to that.

Spolsky:    Right, right.

Atwood:    So I think there's aspects of both. So I think you're right, Steve, to look at Meta and think about Stack Exchange, in terms of how you define your topic.

Spolsky:    I think the problem with Meta a little bit to me is if it's gonna be the back room for advanced users, that's awesome, but if it's also the place where the newbies go because they're confused, that's sort of where you run into trouble. So it's almost like you go to the bar and it's a biker bar [Atwood laughs] and there's all kind of nasty, Harly guys and stuff like that, and they're throwing beer on each other and they're screaming and they're getting into fights and stuff like that. And you're a newbie and you're like "What the hell's going on in here? This is scary" So the first thing you do is you go down to the basement [laughing] where there's a poker game going on and a bunch of guys with guns who play poker there permanently.

Atwood:    Mm-hmm.

Spolsky:    So that's kinda the wrong newbie move, right. You were already in, over your depth, so you went in deeper [laughs]

Atwood:    Right. Well I think you have to like adventure, I think you have to be the kind of user– [Spolsky laughs] Stack Overflow is really designed for– you shouldn't have to care about any of this crap to use Stack Overflow.

Spolsky:    People should be nice! I'm sorry, people should be nice, and people should be nice on Meta, and people that aren't nice on Meta should just be banned.

Atwood:    Well I really don't agree that people haven't necessarily been nice, I think people don't like being downvoted, I think there's different attitudes to what downvoting means–

Spolsky:    Yeah.

Atwood:    –and how people react to it.

Spolsky:    True, true. And you may not believe that there are people who are just not nice.

Atwood:    Yes.

Spolsky:    And they're just mean, and they're not being mean funny, you know, they're not even funny mean. And those people know who they are, and we've told them, we've sent them email, and I will find them, and I will come to their house, and I will kill them.

Atwood:    [laughs] No, we don't tolerate incivility or meanness.

Spolsky:    Yeah.

Atwood:    I mean if you're just being mean to someone, that's obviously out of bounds and we do enforce that. But there's a lot of poking fun. There's a lot of just silliness that goes on, and I don't have a problem with silliness. As long as, as I said, it doesn't overwhelm the question. Like if there's [laughs] and again, to give a specific example, there's like 20 comments which are all just like variations on a meme, you know, how does this really contribute, this is just noise. I'm just gonna go and delete it all [laughs]

Spolsky:    Mm-hmm.

Atwood:    You know, there's no content there.

Spolsky:    Mm-hmm, mm-hmm.

Atwood:    It's just a bunch of people goofing off in the comments. So that – to me – is the bar. As long as there's some signal there that's relatively easy to pull out, I'll tolerate a certain amount of fun on Meta.

Spolsky:    Alright.

Atwood:    But I'm not gonna let it overwhelm the site.


Spolsky:    Alright. Alright, thank you Steve from Louisville for that question.  Here's Brian McCay from Tampa. We've had a question from him before haven't we?

Atwood:    I can't recall.

Spolsky:    We're down to like four or five people who listen to this podcast


[Atwood laughs]

Spolsky:    And a couple of them still call in.

Brian:        Hey guys, this is Brian McCay in Tampa. My question is, with technology, things have been changing so fast, they've been changing for so long, it has occurred to me that there aren't that many guys out there – like Joel – who have been at this for so many years–

Spolsky:    COBOL programmers.

Brian:        You know, most developers do burn out in under 15[?] years I would say. And I wonder what happens, with things just growing taller and taller and wider and wider, even with all the abstractions that are levelled on top, and what happens in 20 years when those guys kind of start to retire? Because I don't know very many developers who still know the low-level building blocks of– most of us work at a much higher level these days, so that's my question, keep up the great work guys!

Spolsky:    That is kinda weird, I'm always surprised, like an intern will come here and know something they've never had to use [laughs] because it's technology that's too primitive for their age. You know? [laughs] Like they must have been doing computer archaeology to have learnt these things. Like pointers.

Atwood:    Mm.

Spolsky:    Well we do sort of expect them to know pointers. But they'll actually go back, and I'll hear an intern say "Well, you know, it's in the EAX register, that's gotta be the return value, it's about to return" and you're like "What? How do you know about registers? How do you even know what a register is?" [laughs] "Why do you know that?" It's true, they still have registers–

Atwood:    They still teach some of that stuff

Spolsky:    They still teach it, that's right. And I think what helps is that the computer science departments haven't changed a single thing in 25 years [laughs]

[Atwood and Spolsky laugh]

Spolsky:    So they're still blithely teaching people about, you know, how to compact things so that they're really, really small.

Atwood:    So, what's the heart of this question though?

Spolsky:    I'm not really sure – [muses] what's it like to be an old guy? What's it like to be a new guy?

No, I think his question is about the layers of abstractions, which is that it's sorta like my problem with the Java schools is that if you were to come in today, and let's say that you're working at an application level, so an application level means you're in an insurance company working on that claim form, for a particular insurance company, for a particular business unit. And, I dunno, you go to Microsoft – I don't know how you do this, you go to call up Scott Hanselman personally – and you say "What development tools should I use? I'm new, I'm fresh. I don't know anything about anything. Nothing. Zero. Tell me what development tools to use."

Atwood:    Mm.

Spolsky:    And they'll say, you know, the latest, you know, Shizzle-thingimajiggy whatever the coolest, neatest, awesomest thing is.. I dunno what they'd say, they keep changing their mind, but let's go with, I dunno, [said almost as if air-quoting] Silverlight, with an, I dunno, ASP.NET MVC backend. And some kind of data-minding.. I dunno. Anyway, you do something like this and for a while they start doing, what I call the "one-handed programming" where you sit on your left hand and you use your right hand with the mouse and you click and you drag things on, and you click and you drag things on, and you associate various controls that you dragged on to your surface with various fields in a database that someone smarter than you put there and, low and behold, it starts working sort of kind of.

Atwood:    Mm-hmm.

Spolsky:    And then, at some point, it doesn't work. Something doesn't work. So, for example, there's something that you can't do with a point and a click and a drag and maybe it's a form with a subform that does a spellchecker, I dunno, but there's something and you're looking at all the properties and the behaviours and all the various things and you just can't do it whilst sitting on your left hand anymore. So you pull out your left hand and your keyboard again and you're like "Oh my God, now I have to write some code". Now at this point, you're smacking up against this massive wall. Because the number of things you have to learn to write those 3 lines of code is just absolutely insane. You have to learn kinda everything.

Atwood:    Mm-hmm.

Spolsky:    Because you've been dealing with these abstractions that have been awesome and have been allowing you to build your database-driven claim forms application really, really easily, and now suddenly you want to do something that's a little bit exceptional, that's a little bit different, and you have to know how to do everything that's in the stack, kind of, you have to learn how to do it yourself. So now you've basically gone from being a library user to a librarywriter, all of a sudden. And I think that's a pretty strong problem, because when you look at, you know, what it takes to be a good developer these days, I feel like you kind of have to know that stuff. For example, even though there's no technical reason why – let's say it's ASP.NET Web Forms – there's no technical reason why you'd even have to know HTML to use that, right? You could just stay in Design Mode in Visual Studio all day long.

Atwood:    Well I like your distinction of library users vs library writers, that's a really interesting way to look at it.

Spolsky:    Yeah. It's sorta that– I don't want to say there's a steep learning curve, there's a nice shallow learning curve but then you hit a wall where it gets like– you hit a cliff, and I hit that: just to give you a classic example, literally I hit that cliff last night. The problem never really goes away and I'll tell you the story. I wanted to write a little simulation – for complicated reasons – I wanted a simulation of keys typing at a command line prompt. So I actually wanted to make a little video basically that shows letters appearing line-by-line in a command prompt.

Atwood:    Mm-hmm.

Spolsky:    As if you were at a 300-baud modem and they were appearing slowly – anyway I wanted the simulation, and I can write a little BASH script, and the little BASH script was able to do echo, but I really wanted to echo one character at a time and sleep between each character, so it would be "tk-tk-tk-tk" like that, without the sound.

Atwood:    Mm-hmm.

Spolsky:    I mean there's a million Java applets that will do this but I just wanted it in Terminal on a Macintosh, that's just what I wanted. And I'd never learnt BASH programming, because I used to use C Shell and I've forgotten it all, [Atwood laughs] so I don't really know UNIX shell orgramming because there's almost no reason to. And now suddenly I had to do a loop, and I had to get a single character out of a string and echo it without the newline and increment a pointer, and there was all this stuff that I suddenly had to know how to do using the BASH shell. And it would have taken me an hour to look up all that stuff and learn all that stuff, and luckily I just found somebody who had that exact snippet of code and I was able to cut and paste.

[Atwood laughs]

Spolsky:    But it's sort of a classic example, as soon as I'm trying to do something that I don't actually know how to do, I need to learn 27 things to do that thing, and I'm just sorta stuck.

Atwood:    Right. There's just too much background that you're missing.

Spolsky:    Yeah. And you know what, I don't know if other people feel this way, but I sort of feel like no matter what – if I'm programming – the chances that I actually know what I have to do [laughs] are just becoming slimmer and slimmer and slimmer the more time goes on. It's not because I'm getting stupider, it's because there's larger and larger amounts of technology that one would have to know. So, whereas my first internship at Microsoft all I had to know to do my job was basically K&R C – and that was it.

Atwood:    Mm-hmm.

Spolsky:    And by the time I was back at Microsoft I had to learn some Windows programming, and that was already an API that was hundreds of times larger and there were chapters and chapters and chapters you had to learn just to allocate memory in the original Windows programming, because you had to allocate it and then you had to lock it and then you had to unlock it and you had these handles and pointers.

Atwood:    Don't you think as a result there's gonna be more specialisation then in software development?

Spolsky:    Uh, I mean that would theoretically solve it, right? You could say "Okay I'm totally specialised", but somehow you always seem to wind up working on something that's not your specialty [laughs]

Atwood:    Well I think there's algorithmic stuff that's universal.

Spolsky:    Sure.

Atwood:    Even for web apps.

Spolsky:    We write 1 algorithm a year.

[Atwood laughs]

Spolsky:    I was just asking people that at lunch the other day – "When was the last time you wrote code that had an algorithm in it?" There's algorithms in search and he's got a bunch of algorithms up on the board. But an actual algorithm like that is built into your libraries, it's like what are those algorithms? I mean..

Atwood:    Well I guess largely you're just making decisions, I mean flow control.

Spolsky:    Yeah.

Atwood:    It's not really– I wouldn't call it an algorithm [laughs] it's not that fancy, it's just flow control. You do tonnes and tonnes of flow control. I mean loops, and you know–

Spolsky:    Yeah.

Atwood:    If-thens.

Spolsky:    And the interesting thing is that that stuff is getting simpler and simpler because we're making abstractions for that too. Like in a programming language like Python you hardly ever write a loop any more. Because usally you're just– well you could make a loop but you don't really have to because what you're almost always doing is they have these list comprehensions in Python where you say "Do something to every item in the list and give me the list that consists of doing this thing to every item in that list". And it turns that most of the time you're creating a loop is a loop is a mechanism for iterating over a collection and if your language has a better mechanism for every collection just use that. So loops kinda go away.

Atwood:    Right. Well I rarely write a classical for– the K&R loop. I do a tonne of foreach. I mean I'm doing foreach all the time.

Spolsky:    Foreach, Exactly. Right, right. But even that is a, yeah.

Atwood:    That's a little bit of an abstraction, because I don't wanna deal with a counter. You're saying "for each item in a collection do this thing".

Spolsky:    Mm-hmm.

Atwood:    But I can certainly see that becoming even more abstract, you know, which is what you're describing, so, yeah.

Spolsky:    I'm not really worried about this field because it is still the case that the people here at Fog Creek, you know, who are young, who have just graduated or haven't graduated yet and are interns, do seem to really know how to do stuff. Even the basic stuff, even, sorry, the core stuff that was at the heart of the 80s.

Atwood:    Well we've kind of touched on this before, but I have a bit of a minority opinion, and I think that if you're really fascinated by this stuff, you will actually dig as deep as you need to go to solve the problem that you have. I mean certainly, with Stack Overflow as an example, I mean this networking stuff, we had to go really deep in stuff that we didn't know anything about. But we enjoy digging into these problems, I mean it's fun, even though we're horribly inefficient, right? I mean we're starting from scratch and we don't know what we're doing. But we figure it out, because we– I mean part of it  is just honestly, dogged persistence. I mean, honestly, [laughs] it doesn't come down to how smart you are, it's how much time you're willing to invest in these problems–

Spolsky:    Before you give up.

Atwood:    Yeah, because you know, Jarrod [Dixon], Geoff [Dalgas] and I are all, you know, addicted to computers. We love this crap. And we would spend all day doing nothing but figuring out these stupid problems, because we're fascinated by this crap. You know, and it's– I guess what I'm trying to say is it's surprising how often tenacity a substitute for inherent smartness [laughs]. And it's a surprisingly big, like, coefficient of how productive you are. It's just how much time you're willing to invest in that stuff.

Spolsky:    Yup.

Atwood:    And that gets into people who, you know, "What was your first computer?" and whether computing is a lifestyle for you or is it just a job, and that's why that question becomes so relevant. Because those are the people that will expend the effort necessary to solve these really hard problems.


Spolsky:    Cool. Um, see now that just sounded like I wasn't listening to you and I was just spacing out.

Atwood:    That's fine.

Spolsky:    Playing Solitaire–

Atwood:    Having a little bit of a rant, so..

Spolsky:    Um.. You know what we didn't do last week? We should take some questions from the family of sites, the Trilogy.

Atwood:    Okay. Well I kinda mentioned one on Server Fault already.

Spolsky:    Oh okay. So I'll do one, let's see what I got on here.. What's our site called? Stack... Over-flow [muses to self] clearing cookies, no I don't want that one, I don't want that one. Okay let's go down here to my favourites.

Atwood:    [laughs] Well I kinda go–

Spolsky:    Where are they?!

Atwood:    [laughing] Wait, wait, can I talk about this, and this is funny.

Spolsky:    Yeah.

Atwood:    So on Super User I was just going to the Monthly tab and just seeing what's on there, and one of the top monthly questions – "How can I explain to non-Techie friends they're the victim of a hoax?" [laughs]

Spolsky:    [laughs] Oh.

[Atwood and Spolsky laugh]

Atwood:    Which I think the standard answer is like Snopes, right? Although Snopes has this weird thing–

Spolsky:    Well you know the thing about Snopes, right?

Atwood:    Yeah, I think we might have talked about that. But Snopes itself is a little weird, and I think XKCD has a cartoon about it as well. But that's a great Super User question, that's not a question I would have thought of as a valid question for Super User but it really totally is, right? I mean–

Spolsky:    If you're a Super User..

Atwood:    Well part of your job as being a superuser or a skilled user is gently tending to people who aren't superusers [laughs], right? Because how do you help them help themselves?

Spolsky:    Oh, God.

Atwood:    It's not easy..

Spolsky:    Sometimes it's not just a hoax, you know? I have my sister-in-law – or whatever the correct term is – who has a computer that's 3–3 and a half years old. And every single operation she tries to do with it takes about 45 minutes [laughs], you know? Like bring up the web browser, 45 minutes elapse and then you click on something and 45 minutes go on, and you click on something else and then it crashes. And so she brought over her laptop for me to fix it and I spent– basically I ran down the battery because she hadn't brought the power adapter with her, I ran down the battery doing as much as I could do, and I got rid of 1 or 2 incorrect error messages she got every time she rebooted.

Atwood:    Mm-hmm.

Spolsky:    But I couldn't do anything to fix it. And I was like you're at the point now where, you know, I'm kind of an expert, I've spent about 3 hours on this, if you had to pay me what an expert would charge for this, that would be about 300 bucks right there, uh, you probably need a new hard drive, you definitely need more memory for this computer, your keyboard is missing some keys, that don't work when you press them and your screen is starting to dim. Just go buy a new computer [laughs], at this point, throw the hell thing away.

Atwood:    Yeah.

Spolsky:    So this is the problem that we all face, of like trying to gently tell our loved ones that their computer is obsolete, and next time they'd better get a Mac because they're going to the Genius Bar.

Atwood:    Yes. Although I will say that, you know, one thing that really surprised me about Windows 7 is that I actually have UAC, the User Account protection, the "sudo UNIX don't run as admin" thing?

Spolsky:    Mm-hmm.

Atwood:    I actually have that on, still.

Spolsky:    Yeah.

Atwood:    This is the first time that I've ever had that on. And it really doesn't bug you now, it's great. Like it rarely bugs me. It's awesome.

Spolsky:    Yeah, it's letting you do it's sudo whenever it wants.

Atwood:    So I'll actually go on a limb here and say for users whose systems get totally corrupted and have all these viruses, I will say tentatively that Windows 7 might actually work for them.

Spolsky:    You mean it might eliminate a lot of these viruses?

Atwood:    Potentially. I mean this is known as the Dancing Bunny problem which is that users will do whatever it takes to click on the dancing bunnies, you know, type in their password, you know, give you all their credentials, um, I dunno how you protect a user like that from themselves. But if you have a user who is at least cognisent of "Okay when you get this alert that comes up, that says 'Hey, this is a really serious thing', you're actually gonna read it" [Atwood and Spolsky laugh] "... and pay attention to it", then potentially that could save you. So. I will say that. So did you find a question?

Spolsky:    Yeah I got a good question, it's my favourite. "What is the worst real world macro/preprocessor abuse you've ever come across?" (652788).

Atwood:    There's one that's really scary in there, I've seen that one.

Spolsky:    I know, it's hilarious. It's the define– it's the one voted up second to most. [muses] Wait, how does that even work?

[Atwood laughs]

Spolsky:    Um, [laughs] okay, sorry. This one just made me laugh out loud:

    #define InterlockedIncrement(x) (x)++

[Spolsky laughs]

Atwood:    Nice. So, these – for those of us who don't speak the C language – what we're doing here is redefining text in the file. So any time we see this string–

Spolsky:    Interlocked Increment. Yes. Now InterlockedIncrement() is the guaranteed safe increment operator that's guaranteed to be atomic, because in order to increment a variable, you have to read it, to see what it was, then you have to add 1 and then write it back. And if you do that in a non-atomic way, then there's the possibility that you read it, somebody else reads it, you increment it, they increment it, you write it out, they write it out. And now it should have gone up by 2 but it only went up by 1. Get it? So InterlockedIncrement() is a Windows API that guarantees that those two instructions – the read, the increment, and the write, basically there's 3 – those low-level operations happen atomically without the processor switching to another process. And without InterlockedIncrement() and InterlockedDecrement() similarly, it is impossible to ever write thread-safe code. You're gonna have problems that only show up whenever the processor happens to interrupt your process in between the reading and the writing. So it creates these kind of bugs that are once in a lifetime terrible, terrible bugs, that don't make any kind of sense, if you just increment instead of using InterlockedIncrement() and InterlockedDecrement(). And this is the most hilarious pre-processor definition because it basically removes that protection from your code, for some reason.

Atwood:    Well what I find crazy is that people– why would this even be allowed? [laughs] I mean this is part of the whole argument that C is just kind of dangerous, that you can randomly redefine keywords in the language to some other completely different keyword.

Spolsky:    Well yeah.

Atwood:    That seems a little dangerous [laughs]

Spolsky:    Quite probably. I mean C is a car, it's very dangerous – it doesn't have seatbelts, but it's very powerful because it goes very fast. In fact, I'd go so far as to say, unless some people are gonna punch me about this one, but you cannot write multi-threaded code in the C programming language. You just can't. Although technically all the capabilities are there, it is beyond the capability of mortal humans – and I know, some of you out there are very smart and you think that you have the capability of writing multi-threaded code in the C programming language, because you're hot shit. Well, let me tell you, it is beyond the capability of humans on this planet, for their brains are just not adequate to the task of writing multi-threaded code in most languages, least of all low-level languages like C. It's just not gonna work, it's just not gonna make you happy. So there.

Atwood:    Hey, you actually answered this question. This is cheating.

Spolsky:    I did not, I commented on it. Oh yeah I did answer it, I didn't see that one.

[Atwood laughs]

Atwood:    You defined "ever" so it says "for ever { }" [laughs]

Spolsky:    Yeah I got 35 points for that.

Atwood:    Well it's a Community Wiki. Actually no, it's not. Wow. Yeah, you did get a lot of points for that [laughs]. How did– I'm gonna make this Wiki, that's weird.

Spolsky:    What?! [laughs]

Atwood:    I think what happened is that it slipped through. It didn't get switched over.

Spolsky:    What slipped through? It is Community, the question's Community Wiki, the answer's not?

Atwood:    Yeah, there are ways that can happen.

Spolsky:    What about the answers– the winning answer? Those aren't Community.

Atwood:    Well they are now. I just changed them. Just a little blip.

[Spolsky laughs]

Atwood:    But yeah, you were getting a lot of rep for that.

Spolsky:    What, you made all the answers Community Wiki? Oh is that a–

Atwood:    Yeah, it's a moderator function. You actually have it. Um, this is almost as bad as the LOGO question, I shall to point that out – the "moving the turtle" question. Just a travesty of questions.

[Spolsky laughs]

Spolsky:    For those who don't know, in the question he says no contrived IOCCC answers. That is the International Obfuscated C Coding Contest or something, I might have that wrong. But it was this contest where different people submitted code that by almost using the pre-processor created the most obfuscated possible code. And they were usually things that looked like this big, gigantic ASCII art, heart or Snoopy or something, and it was actually code that actually ran. And I don't know what the status of that contest was, but it's some pretty awesome stuff, as you're sort of learning the C programming language, because it's sort of fun to parse those and see what the hell is going on.

Atwood:    So I have a funny Twitter message that I wanna read to you. This is from Rick Strahl who you may know from the web, but his Twitter message was "Oh man C++ is like a watching an old movie you remembered fondly and then finding out that it really sucked. #LifesTooShort". That's my obligatory C jab.

Atwood:    Did we have 3 questions submitted? Audio questions?

Spolsky:    No, we only had 2. Sorry.

Atwood:    Only 2. So no news on DevDays? That's coming up pretty soon.

Spolsky:    I don't have that much. There might be a few seats left in Seattle because we opened up another hundred seats when we moved into this Benaroya Concert Hall which is gonna be awesome.

Atwood:    Oh cool.

Spolsky:    We still have room I think in LA and Austin, a couple other seats because people cancel occasionally and so something frees up, but if you didn't get in the city you wanted to be in, you know, keep trying, and there's always a waiting list that you can join, and you'll get notified if a couple of seats open up. But in most of these cases, we're just like literally filling a concert hall, and so there's literally no flexibility, I mean we can't make more seats or do standing room only.

Atwood:    The fire marshal will come by and shut the whole thing down.

Spolsky:    Exactly.

Atwood:    We can't have that.

Spolsky:    Its– yeah a Stack Overflow overflow.

Atwood:    [laughs] We should have a separate room for that.

Spolsky:    Uh-huh.

Atwood:    This is the Stack Overflow overflow room.

Spolsky:    Um, why don't you do the announcements.

Atwood:    Oh, the final trail-out?

Spolsky:    Yeah.

Atwood:    Okay. Well I wasn't ready. You can't jump the gun on me here.

Spolsky:    [laughs] I'm not the only one who doesn't know the phone number for the Stack Overflow podcast hotline.

Atwood:    That's right. So we answered 2 questions today, we'll try to answer two more tomorrow. We have a dedicated phone number you can call, to leave audio questions at 646-826-3879 or you can record your own audio, 90 seconds or less please and mail it to podcast (at) We also have a Transcript Wiki for people who can't listen to the podcast, can't benefit from our jibba-jabba, that will be linked in the show notes. And anything else I'm forgetting, Joel?

Spolsky:    Nope. is the show notes with electronic hyperlinks to things that we've mentioned on today's episode.

Atwood:    Yup.

Spolsky:    Now I'm starting to come down with whatever it is that you have.

Atwood:    [laughs] I don't think it's contagious over Skype.

Spolsky:    Skype is really good, I heard that Skype is.. It's not eBay any more.

Atwood:    [laughs] It's not good enough to transmit viruses. They're still working on that.

Spolsky:    Alright, see ya next week!

Atwood:    See you next week.


Outro, ads

[58:10 end]

Last Modified: 10/26/2009 8:53 AM

You can subscribe to this wiki article using an RSS feed reader.