The Wayback Machine - https://web.archive.org/web/20090113082132/http://blog.stackoverflow.com:80/

In Server Hosting — Rent vs. Buy? I solicited opinions on whether it made more sense to continue renting our Stack Overflow servers, or to buy them. Thanks for everyone’s feedback on that!

Now the die is cast — check out these sexy glamour shots of the two (soon to be three) new Stack Overflow servers:

stackoverflow-lenovo-servers-overview

Feast your eyes on that hot, sweet server hardware!

We plan to have three servers for now, but we did secure a half rack at our hosting provider for future expansion, as necessary. Here’s what we’ll be shipping to them initially:

The 1U web tier servers are modest:

lenovo-rs110-overview

1 Lenovo ThinkServer RS110 barebones $630
4 2 GB RAM 240-pin DDR2 800 $70
2 eBay drive brackets $50
2 500 GB datacenter hard drives, mirrored $160
1 Intel Xeon X3360 2.83 GHz quad-core CPU $350

Grand total of $1,260. Plus another 10 percent for tax, shipping, and so forth.

The 2U database tier server is considerably beefier:

lenovo-rd120-overview

lenovo-rd120-drive-bays

1 Lenovo ThinkServer RD120 barebones $1,490
12 2 GB RAM 240-pin DDR2 667 FB-DIMM $600
6 eBay drive brackets $150
6 500 GB datacenter hard drives, RAID 10 $480
2 Intel Xeon E520 2.5 GHz quad-core CPU $700
1 aftermarket IBM heatsink for 2nd proc $90

Grand total of $3,510. Plus another 10 percent for tax, shipping, and so forth.

I can sell the low-end Xeons and dinky amounts of (incorrectly sized) memory that I pulled out and replaced in every server, to defray the costs a tiny bit.

So, in a nutshell, for around $6,000 we’ll end up with the following:

Web Tier Database Tier
two servers one server
4 cores, 2.83 Ghz 8 cores, 2.5 Ghz
8 GB RAM 24 GB RAM
500 GB RAID 1 mirror array
(cold-swap)
500 GB RAID 10 array
(hot-swap, up to 2 drives at once)
dual redundant power supplies

(I am taking to heart the comment advice I got in my previous blog entry; we’ll be shipping multiple spare hard drives down to the hosting provider, and I added that second 1U server just as a backup in case anything weird happens. We technically didn’t need two web tier servers, yet.)

Sure, $6,000 sounds like a lot. But if you take a typical $800 per month hosting bill for renting dedicated servers this powerful, and then cut it in half because you’re no longer paying every month for servers — we save $4,800 per year, every single year! This one-time investment in server hardware pays for itself in a year and a half.

Compared to our current two identical dedicated servers, which aren’t exactly chopped liver, this gives us:

  • 1.5x the overall speed (faster CPUs, faster memory bus, more L2 cache)
  • 2x the memory on web; 8x the memory on database
  • larger and faster storage with bigger drives and RAID 10 option

What this means to you is a faster Stack Overflow! As far as I’m concerned performance is a core feature; we can never be fast enough, and I’m constantly on the lookout for ways to make pages load faster.

Having these new servers in place (hopefully sometime in early-ish February) also enables us to expand, which I’ll be blogging about in more detail tomorrow.

I was amused to see this pop up on the Stack Overflow home page a few days ago:

stackoverflow-badges-alan-kay

If you don’t know who Alan Kay is, first of all, shame on you — he’s one of the most important figures in modern computing:

Kay is one of the fathers of the idea of object-oriented programming, which he named, along with some colleagues at PARC and predecessors at the Norwegian Computing Center. He conceived the Dynabook concept which defined the conceptual basics for laptop and tablet computers and E-books, and is the architect of the modern overlapping windowing graphical user interface (GUI). Because the Dynabook was conceived as an educational platform, Kay is considered to be one of the first researchers into mobile learning, and indeed, many features of the Dynabook concept have been adopted in the design of the One Laptop Per Child educational platform, with which Kay is actively involved.

I had previously remarked on Twitter that, while browsing Stack Overflow, I noticed that Alan Kay responded to a question about him. It looks like a few people took that opportunity to vote his response up. So did I.

Now, it’s likely that Alan was just responding to an automated web search alert for pages containing his name; I have these set up too and I do the same thing from time to time. (Although I desperately try to avoid being an internet-era Beetlejuice who appears in a magical puff of smoke whenever his name is invoked three times.) It’s likely, in my opinion at least, to be the real Alan Kay. He has been known to reply in blog comments in the past.

So, if you’ve ever wondered if there are famous developers using Stack Overflow, indeed there are! Short of Knuth himself posting, Alan Kay gets my vote for being the most famous participant so far.

Thanks for stopping by, Alan — and as always, it’s encouraging to see someone of your stature still actively engaging with the community. Oh, and enjoy that silver Good Answer badge. I’d say you definitely earned it.

Update: Alan posted a followup question: Significant new inventions in computing since 1980.

Remember that WMD reverse engineering project we reluctantly undertook? Check out the current state of the Git repository:

git-wmd-reverse-engineering-timeline

This is a major milestone — we’ve essentially de-obfuscated the WMD code, which was my #1 goal!

A few thanks are in order:

  1. Chris Jester-Young for getting the ball rolling, doing quite a bit of de-obfuscation, and setting up the initial repository.
  2. Shawn for contributing versions and setting up a stack overflow “question” on this topic.
  3. Dana for doing the lion’s share of the de-obfuscation work and getting us to that magical 1.0, completely de-obfuscated milestone.

Also, cbguder, dbr, and zacherates — we appreciate you jumping in early as well. Hopefully you’ll keep going and help us on the 1.0 stuff!

It turns out Dana is a huge fan of fake plastic rock, just like me, so I was happy to reward him for his work with one of my customized Les Paul guitars:

blood-voodoo-red-metallic-guitar

(ok, it’s not exactly this one, but it’s very similar — silver metallic instead of red metallic faceplate!)

Now that we’ve gotten the painful de-obfuscation / un-minification out of the way, it’s time to begin improving our WMD editor:

  1. Arrow keys don’t work in Firefox 3 on questions/answer pages
  2. Make ctrl-delete work like a normal text editor (WMD keyboard shortcuts should be configurable and/or disable-able)
  3. Several Problems with international keyboards — all related to keyboard shortcuts
  4. General WMD performance concerns. We believe WMD could do with some optimization, particularly for the “idle” case.
  5. I’d like to see us use CSS image sprites for the toolbar buttons rather than downloading 6-8 individual button graphics in 6-8 HTTP requests.

Anyway, if you have JavaScript chops and want to dive in, I encourage you to grab Dana’s 1.0 branch and go for it!

Update: the first version of the updated, reverse engineered WMD control was deployed 01-11 at about 3 AM PST. This includes the top 3 UV fixes listed above. I’ve updated the uservoice bugs page. Let us know on UserVoice if you see anything unusual!

Joel and Jeff, with special guest Eric Sink of SourceGear, discuss source control present and future, why writing a compiler is an important rite of passage for programmers, and how budding software engineers should be educated.

  • I was convinced Eric was going to agree with me on whether or not software developers should know C. Unfortunately for me, he agrees with Joel. Doh!
  • Eric’s Source Control HOWTO should be required reading for every software developer. Eric literally wrote the book on this, and in fact this series is being converted into a book. Deservedly so; it’s fantastic. The best person to explain source control is someone like Eric who literally wrote a source control system from scratch — SourceGear Vault.
  • An extended discussion of the evolution of source control systems, into distributed version control (DVCS) such as Git, Mercurial, Darcs, and BitKeeper. Eric feels Linus Torvalds’ video “evangelizing” Git does the opposite for many. He’s also uneasy about branching and merging becoming easy, common operations, which is much of the promise of DVCS.
  • Eric feels DVCS solves certain edge conditions very well, but those edge conditions should only be explored when you feel the need, not promoted as broad feature bullets to the average developer. “The harder you try to explain DVCS, the worse it gets, so stop!”
  • Eric points to Eric Raymond’s evolving Understanding Version-Control Systems as a pretty good survey of today’s source control landscape.
  • Often, features aren’t the point — discoverability is. I was amused to find that Eric discovered how convenient background compilation is in Eclipse. This is something that Visual Basic developers have had for 8 years! Java and C# developers don’t appreciate what they’re missing because it hasn’t been surfaced in the product, until now.
  • Eric and Joel note that, at some level, source control is about putting obstacles (let’s call them safety barriers) in front of developers — and the question is, how many does your shop need? Do you remember working without version control at all? It’s incredibly fast, until stuff gets overwritten or lost, of course.
  • Joel and Eric maintain that writing a compiler is an important rite of passage for a programmer. There’s an enormous class of programming problems where writing a lexer, parser, recursive descent, and parse trees will help you. Once you understand how easy it is to set up a state machine, you’ll never try to use a regular expression inappropriately ever again.
  • Eric also wrote a web browser. It’s interesting to contrast the experience of writing a compiler, which is typically extremely strict and will fail to compile if a single character is out of place, versus writing a web browser, which accepts all kinds of malformed and downright incorrect HTML and JavaScript. Eric and Joel think this was categorically a huge mistake; I’m not so sure.
  • On Postel’s robustness principle: “be conservative in what you send, liberal in what you accept.” This becomes a painful war of attrition at some level; everybody is vying to accept just a little bit liberally than the next guy, so isn’t there an implied element of mutually assured destruction at the end?
  • Eric: “Computer Science degrees do not teach programming; they teach how to learn”. And he’s OK with that. We all agree that it’s hugely important to complement your computer science curriculum with either hobby projects, internships in the so-called “real world” — or both!
  • Congratulations to our new UserVoice community moderators — Joel Coehoorn and Sean Massa. Do participate on the Stack Overflow UserVoice feedback site, we check it every day, and we read all the feedback we get!

Our favorite Stack Overflow questions this week are:

  • Eric: What is the single most effective thing you did to improve your programming skills? Eric says it was when he wrote a compiler. “You’ll write the crappiest compiler ever, but you will learn so much.”
  • Jeff: What’s your most controversial programming opinion? This question is almost a textbook example of what we don’t want on Stack Overflow, in that it’s an unanswerable and probably contentious discussion. And yet it’s an extraordinarily high quality question! This is a testament to the quality of the participants, another example of the Stack Overflow community defining what they want to see and setting a positive example for other programmers to follow.

We answered one listener question on this podcast:

  1. Espen Grindhaug: “In many universities and colleges, they don’t teach the ‘new’ technologies. Can you list some books to get up to speed on the new technologies?”

If you’d like to submit a question to be answered in our next episode, record an audio file (90 seconds or less) and mail it to podcast@stackoverflow.com. You can record a question using nothing but a telephone and a web browser. We also have a dedicated phone number you can call to leave audio questions at 646-826-3879.

The transcript wiki for this episode is available for public editing.

 
icon for podpress  Episode 36 [01:06:12m]: Play Now | Play in Popup | Download

Have you ever wondered why you can’t accept your own answer on Stack Overflow? If so, you’re not alone.

As they say, a picture is worth a thousand words; here’s what I just did to one of my own questions:

Before:


accept-own-answer-before

After:


accept-own-answer-after

Hey, look at that, I just accepted my own answer!

Now, there are some special rules around owner-accepted answers, to prevent gaming:

  1. Wait 48 hours. You must wait 2 days from the time you originally asked your question before you can accept your own answer. This gives other users a chance to answer the question in good faith, and earn the accepted answer.
  2. No change in sort order. Normally, accepted answers are “docked” under the question. This is not true for owner accepted answers; they stay in standard sort order like any other answer.
  3. No reputation is earned. Normally, accepted answers confer +15 rep to the answerer and +2 to the owner. Owner accepted answers do not earn rep (or badges) for anyone.

I was initially very much against this, but several commenters in the Why Can’t I Accept My Own Answer? post convinced me that, with a few rule tweaks, it could work. As you can see on a question I myself asked, sometimes you really have no other option than to close the loop yourself, and it’s nice to be able to do so by accepting your own answer.

Enjoy! Oh, and you can thank Jarrod for implementing this one so quickly on his first day on the job. Kudos.