83 comments

[ 3.7 ms ] story [ 151 ms ] thread
Stackoverflow runs on Windows, really?
Thought this was well known. SO was founded by Joel Spolsky who was a long time MS employee.
I believe Joel was a short time MS employee. And I think the MS stack was chosen because that's what Jeff Atwood and the other early folks knew best at the time.
Yeah, relatively short. Spolsky was a Program Manager on the Microsoft Excel team between 1991 and 1994 (he drove Microsoft's Visual Basic for Applications strategy.)
People seem to get a premium on their perceived 'time' spent at MS for being earlier employees, which often correlates with how important a system they worked on.
I recently had an epiphany: operating systems are just operating systems. None are better than the others, they're just different. Having tried nearly all of them by now (MS-DOS, Windows *, Mac OS X, Linux), I regret having any loyalty to any of them.
That said, I tried out VS Express the other night, and I forgot just how neat it is after all these years (last one I used was VB6). Certainly starting to prefer it over Xcode. And I'm loving Windows 8's UI/UX innovation over OS X's lack thereof lately. But the tides will change, and one day I'll probably be writing software using some awesome tools in an OS that hasn't been invented yet, by a future startup-turned-monopoly.
How are comments ordered?

I thought it was the points you see, but this one has 4 points and [other] has 6 points (at time of writing), but [other] is below this one.

Is it based on absolute number of upvotes (without subtracting downvotes)?

[other]: https://news.ycombinator.com/item?id=7146156

As far as I can tell, it’s based on a combination of upvotes and time since posting. New comments start at the top of their tree and, as time passes, settle into where they would be if sorted by upvotes. So yours is above the other one because it’s more recent, but in a week, if the upvotes don’t change, the other one will be on top. It’s probably a similar algorithm to Reddit’s published “hot” algorithm (http://amix.dk/blog/post/19588).
OSes are complicated and gigantic engineering projects.

Some of them are most definitely better than others in some respects. Saying that they are all absolutely equal is like declaring every CPU ever designed completely equal.

It's true that most users will be well served by most OSes but that's more a statement about users than about OSes.

I think statements like this pay too much attention to implementation details. Their whole point of software is to serve the users, so when we (the users) are able to accomplish our tasks with it, it's good enough. And I don't see very many important tasks that one OS can accomplish better than another.
I'm right there with you when talking about web programming and the likes.

My main interests are system and games programming though so there might be a case of different points of views here.

I'm just imagining a situation where someone needs their OS to be realtime for example. They're not going to be swayed by the "All options are equal when seen from afar" argument.

Well, process and thread scheduling can make a very noticeable difference. Years ago, a few guys decided to revamp the Linux kernel's "good enough" thread scheduler into an actually nice one. The first iteration could handle creating and destroy 100,000 threads in 3 seconds on a box that used to take hours. Lately there have been benchmarks relating to interactivity of desktop programs, timing how long it takes for a program to respond to input. This varies dramatically depending on what priorities the kernel gives to various processes (when under load).

Implementation details can make a difference in how nice a system is to use.

True, but I'm under the impression that all major OSes are evening out in performance, and will continue to over the next decade until there's basically no noticeable difference.
A lot of the comments around here are digressing into details about user experience of the desktop versions of various operating systems. The original comment was about StackOverflow running on Windows, so the discussion should be more about server rather than desktop experiences. Some people may be surprised to hear that StackOverflow runs on Windows servers because they may have heard a lot of stories a decade ago about Windows servers performing unpredictably under load compared to Linux. I know I did. So I did hear of a server OS accomplishing things better than another server OS. Anecdotal, yes, but there have been improvements to Windows servers since then, and obviously SO is doing well running on them, and I'm sure some people would like to hear about that.
I'd love it if instead of down-voting this, we could actually discuss where you disagree. I've been known to be wrong about things, so enlighten me.
Operating systems are intrinsically different for many reasons.

I don't know first hand, but I'm guessing the scheduler would be largely different, as is the security methodology- heck I can't imagine much similar except 'code runs here, os makes sure code runs'

I remember my friend (a low level engineer at nokia) talking to be about windows 3.1 and how Microsoft put the GUI directly in the kernel because it was too slow otherwise, he went on to elude most of the security issues with windows were based on that.

also, when it comes to remote management and headless machines, the unix-like family rule the roost.

also, when it comes to remote management and headless machines, the unix-like family rule the roost.

Maybe. I bet remote management of desktops with Group Policy, and a whole slew of Microsoft and 3rd party management services, is more common in Windows-land.

In headless server terms, you've been able to install and run headless Windows Server for years now. It won't be as common because it hasn't been around as long, but it's certainly possible now.

And in remote management on the server side, Server Manager shows other servers in your organization (by default?) in Windows Server 2012, and PowerShell was designed with remoting support since its inception.

And WMI and Remote Desktop for server administration both should count as well, having being in Windows for many many years.

The most popular 'remote management' thing missing from Windows is SSH, which seems a bit of a deliberately biased way to look at things. If you work in a Windows environment, there are plenty of ways to remotely manage your servers/services.

I simply said it ruled the roost, you can't doubt the ubiquitousness of headless unix machines running ssh or simple config management programs (and /no/ means of direct remote management).

I don't doubt that such things are possible in windows land, I feel most programming these days is so far removed from the kernel and how it handles the hardware that it's much of a muchness to decide what you'll use.

the lack of licenses certainly help with linux things if you're not in need of support though.

As a web hosting devops engineer I'd disagree with your last assertion. Our Windows environments are managed remotely and just as easily as our unix stacks. You just need the right tools and in the past five or six years life has improved significantly when it comes to tooling.
> operating systems are just operating systems

There is zero information in your epiphany. You can say this about anything and it will have as little meaning. Cars are just cars. Movies are just movies. The only thing that has any value is the "different and not better" and that involves a subjective "better" which doesn't apply uniformly across people. Ultimately useful measures can be based on time and money, for example productivity, deploy speed, licensing expenses, etc.

Personally I hate the click and point everything UI in windows and prefer a sane bash like terminal with familiar unix tools, but that's entirely subjective.

> There is zero information in your epiphany. You can say this about anything and it will have as little meaning. Cars are just cars. Movies are just movies. The only thing that has any value is the "different and not better" and that involves a subjective "better" which doesn't apply uniformly across people. Ultimately useful measures can be based on time and money, for example productivity, deploy speed, licensing expenses, etc.

I thought my meaning was clear. Maybe it's not to you, but it sounds like you did understand it, and just don't agree with how I presented it. And that's fine.

> Personally I hate the click and point everything UI in windows and prefer a sane bash like terminal with familiar unix tools, but that's entirely subjective.

I went from Windows to Linux for the WMs, and stayed for the CLI. Then I went to Mac OS X and stayed for the trackpad. Then I went to emacs and stayed for the keyboard. Now I'm using Windows 8 and am considering staying for the beauty.

Honestly, I don't put much stock even in my own subjective opinions anymore, since they change by the month.

> Honestly, I don't put much stock even in my own subjective opinions anymore, since they change by the month.

Mine too. Weird how that works. Having a super strong opinion one day and experiencing a complete reversal sometime later.

There's about the same information in the parent comment, "StackOverflow runs on Windows, really?" - like the premise is absurd, but with no reasoning made.
For me, I live a sort of double life with respect to this issue.

For work, I feel most productive in Linux.

For home, I absolutely cannot stand using anything but Mac OS X.

If I worked for a company that used a Windows stack, I wouldn't have a problem working in Windows, but there's a huge difference in the end user experience depending on whether you're building a web stack or organizing a photo collection.

Well, on the server side Linux is better than Windows, price, speed, tunning, customization ... It'a a no match.
Not necessarily. Depends on who it is and what the project is. For someone who knows Windows better, the cost of MS software may outweigh the cost of hiring someone to do the same thing in Linux, or learning it themselves.
I think that might be an oversimplification, certainly when looking at all of the costs (labor, management tools, environment, etc.)

They're different operating systems, and they each have different strengths. I run both Windows and Linux servers, and there are some things that Windows handles better, and some that Linux does.

A decade ago, a database consultant told us a story of helping a bank who was seeing their 3 MS SQL Server databases (on Windows servers) go down every single day. He replaced their setup with Oracle and their problems went away. In telling us stories of why he preferred Linux he described how he had set up and managed databases on a hundred Linux servers for a major oil company and they were humming along without a problem, easy to manage, and in contrast he dreaded Windows servers due to memory leaks and whatnot. Anecdotal, I know, but I heard a lot of stories like that a decade ago. I've also heard a lot of stories since then about Windows servers getting better. And I've had to administer each a little bit here and there, and I have to agree with the other commenters that you can't generalize about which is better because it really depends on what you're doing with the servers. But some of those stories from many years ago scared away quite a few people from Windows servers and they'd probably appreciate hearing how Stack Overflow is succeeding with the current generation.
Agreed. Windows costs a fraction of a single admin's monthly salary - cheap at twice the price - and comes with a selection of fast to install powerful software with built in GUIs for customizing it.
(comment deleted)
People are still surprised that people write software that runs on Windows, really?
Moving on from Windows is taking longer than we thought, but will happen a lot sooner than you think.

Most new applications live in the browser (even MS Office and Intuit Quickbooks) or on your smartphone/tablet.

Shrug. No rush from my side of the room. I have found developing Windows application and web apps on the MVC .Net stack to be quite enjoyable.
Will the servers be running Mono instead of .Net, or are parts of the site being rewritten in a different language?

What about the databases?

I'm a unix fanboy, but I hear MSSQL is best in class, comparable with postgresql and maybe contending with oracle a little.
To say the new MS Office lives in the browser is a bit of an overstatement. There is some support in SkyDrive and SharePoint for opening Office documents in-browser, (in some cases, I think requiring Internet Explorer), but it's feature limited.

Office 2013 is very much a Windows Desktop program. And now a Windows RT App, too.

How about Office 365?
I don't know much about it. It appears to be a combination of hosted Exchange and SharePoint and Office Web Apps, and optionally Office desktop programs which you can launch from the cloud.

http://en.wikipedia.org/wiki/Microsoft_Office_365#Office_app...

The fact that some plans include the full desktop apps makes me think the web app versions are not intended as full featured replacements. Or at least are not that capable today.

And what wrong with that? The site is scaling extremely good and for a long time the whole application was running on only two servers.
SO / SE is one of the posterchild of C# / .Net.

However at the beginning they were really Windows only while now there's really a lot of Linux in there. HAProxy running on Linux, for example.

There was a recent post about the various technologies using by the entire stack and there have also been SO/SE employees detailing the stack here on HN.

So it depends what you mean by "runs on Windows". Certainly the scalability issues are handled, at least in part, by Linux.

Oh man!!!! How will you sleep tonight ;-?
Yep - it's incredibly performant. As I mentioned in the post, I was pleasantly surprised having been a die-hard python/mongo/os x/etc developer.
Good article. Always interesting to read how others approach learning new technologies.
Is it a Microsoft stack all the way down or are there parts of the codebase that are written in other languages? In my mind, when a company gets big enough you usually get different teams writing in different code bases if it fits into their problem domain better.
There are several codebases now, yes. The main Q&A and Careers sites are C#. We have other projects in Node and Go as well.

(We also rely on Redis, HAProxy and Elastic Search on non-MS platforms.)

That's cool, I never knew Stack Overflow was using Node in production.
(comment deleted)
How do you like working on a Mac on a Windows stack? I work on a Mac on a Linux stack and it's very straightforward. We have some Windows applications have have to rely on remote desktop.
It's not really that bad. I'm running a parallels VM running Windows 8. The major difference between that and running a straight Windows environment is that we switch off from Vagrant (running a VM within a VM is pretty rough)
That was my top question during my interview. I'm seriously amazed at how nice Parallels runs now a days (and on fast machines) though.
This might be a left over from my experience from older (slower) VMs, but I am curious why you went that route over Boot Camp. Looking at the stack it seems like you would spend almost all your time in Visual Studio or SQL Management Studio without much need for native OSX software. Why not get the speed boost of a non-virtualized environment in the OS you would be spending an overwhelming majority of your time in?
That's actually what I am doing (I'm an oddball, I prefer Apple hardware and Microsoft software). I have an iMac running windows 8.1 and an external Cinema Display. So far, everything works and runs great. I would suspect if I did anything graphically heavy, I would run into some problems though.
I'm wondering the same. Visual Studio can be quite demanding (especially with Demon installed and Resharper)
There are a few things in our stack like Elasticsearch and Redis that we specifically run on the Mac and simply have the VM point to the right ports. This basically requires that we have both running simultaneously.

However, going pure Windows on a Mac is not entirely a bad idea either. There's a mix of devs here that use Mac or Windows - it comes down to personal preference imo

On a newer Macbook Air, I can even game in a Windows 8 VM. They've come quite far, and with things like unity mode in VMWare Fusion (don't know what it's called in Parallels) you get your VMs applications like they are somewhat native OS X applications.

There isn't much of a speed penalty, and especially not in "simple" things like an IDE.

How you handle the different keyboard layouts? For me its always a pain to switch between coding on OSX/Windows because of the differences in copy/paste/selecting of text etc.
Parallels has gotten extremely good at handling this. Switching from Cmd -> Ctrl actually isn't an issue at all (you don't need to switch at all). It's really seamless - the only problem is having one window from OS X going over to the VM and vice-versa. In addition, some ports running weird when running Redis and Elasticsearch on the Mac but pointed to from the VM.
It seems hypocritical to me that Apple facilitate the running of other OSs on their machines but refuse to permit their OS to legally run on non Apple machines.
Not at all. Running other OSes increases the sales. Running OS X on non-Apple does the opposite. It's a corporation, not some OSS guys spreading the word, at the end of the day.
How is that not hypocritical?
It is hypocritical. It is also good business. Sometimes that's just how it is.
One of the reasons the MS stack gets a bad rap is that it has been adopted by a lot of enterprises and a lot of poor developers.

You can write something inefficient in any stack, but it seems like there's a larger proportion of unskilled to skilled developers working in the MS stack.

Edit: To clarify, I work in the MS stack 9-5.

This has not been my experience at all. In terms of the unskilled:skilled ratio alone (again, in my experience), the Microsoft stack has more highly skilled developers than PHP by at least an order of magnitude, but not quite as many as the more "academic" languages such as Haskell and the like.

I've seen a lot of hesitance on the part of unskilled developers to venture into the MS stack as it has historically been hard to set up and expensive to get the software and server(s).

I think your second point applies equally to skilled developers. The MS stack is hard to set up and use. Actually, it probably applies more to experienced developers who've seen the alternative.
I'm not sure if "MS stack is hard to set up and use" is the right way to characterize it. SQL Server is probably the easiest full-fledged RDBMS to get up and running, for instance, and Visual Studio is among the most friction free environments I've seen (for getting started at least).

However, I wholeheartedly agree that MS stack, mostly Windows, is hard to configure, monitor, and administer when you want to horizontally scale, primarily because of the GUI driven configuration mindset and proprietary nature.

I think the MS stack has a bad reputation because a lot of developpers come from an academic (undergrad) background, and not that many institutions use MS products (licence fees). When I got out of school I was young and arrogant (still kinda am), and since I only did Java at school in terms of OO languages, I immediately dismissed C# as not good enough.

Then theres the whole anti-MS movement out there that will simply bash MS stack because is it by MS.

I think that C# copied Java and did a better job.
Really.. have you met PHP and ColdFusion developers?
I think this is right. To answer some of the other comments, yes, c# has a better ratio than does PHP, but it has a much worse ratio than to Python, Ruby, Scala, Clojure, Go, and possibly even javascript.

All that is a shame, because I think C# is fantastic, as is SQL Server. The rest of the MS stack is mostly so-so.

I'm curious what the licensing costs are for their Microsoft stack. Stack Exchange was in BizSpark early on so they got a pretty good discount, but they can't be anymore since it's been more than 3 years.
The only thing that really hurts are the SQL Server licenses. Everything else (MSDN licenses for devs, OS licenses, etc.) are small percentages on the cost of hiring a dev or building a server. SQL Server pricing is a beast -- they know you're locked in, and it's carefully priced just under the "what if we just hired several people to do nothing but move us off of SQL Server" price point.

With that said, we're getting amazing performance out of SQL Server without having to shard, etc: all of Stack Overflow runs off a single server, and most of the rest of Stack Exchange runs off a second server.

"Stack Overflow runs off a single server" that is a cluster of how many physical servers with how many processors and how much ram?

  Three Dell R720xd database servers (two in New York City, one in Oregon, using SQL AlwaysOn Clustering) (Global "Sites" DB & Stack Overflow dedicated):

  - 2x Intel Xeon Processor E5-2680 @ 2.70 GHz
  - 384 GB RAM
  - 21 drives
  - Mirrored Pair for OS
  - 16+1 Intel 710 200GB SSD RAID10 for databases
  - SQL Server 2014 CTP2
  - 2x 10Gb network team
David means a single primary, there's a read-only replica for in DC failover and a read-only replica in our other DC for "New York is getting hit by another hurricane"-failover.

A few services hit the read replicas instead of the primary (our API, for example, moves what it can when it can), but the code for stackoverflow.com is almost entirely querying a single (quite beefy) box.

We can and do sometimes run without either replica in the AG, though we prefer not to except for scheduled maintenance.

I'm surprised. I thought everything was written in JavaScript nowadays.
Very interesting read, thanks for posting.

Out of curiosity, since you mentioned you're a self-taught programmer -- what did you major in at college?