C# lambda expression syntax (the =>) are about 4 years old now.
350 karma · joined January 9, 2011
Formerly I worked on Stack Overflow and Stack Exchange.
http://stackoverflow.com/users/80572/kevin-montrose
C# lambda expression syntax (the =>) are about 4 years old now.
Our best guess is lots of people taking vacations offsetting growth, on the 3 year graph you'll notice growth resumes sometime around September every year.
I honestly don't care* too much about it, we're in the business of quality questions and answers; traffic is a side effect, not a goal.
(Disclaimer, SE Inc. Employee etc. etc.)
*Provided it's high enough to pay the bills naturally, which isn't that hard to do.
I know that my skill set changed pretty radically on subsequent difficulty levels, the same tactics didn't work terribly well.
I really strongly believe that it's an either/or proposition, you either get discussion or you get quality answers to questions. Discussion "sucks the air out", so to speak.
And since there are already so many places for discussion on the internet, it's better for us to focus on Q&A.
http://www.microsoft.com/bizspark/about/Graduation.aspx
Through the grapevine I hear the "review" process (for more free licenses at graduation) is extraordinarily accommodating, though I'd guess if you're spinning up a box per customer or something insane you'd get denied.
Lots of people get this wrong, I'm surprised Microsoft hasn't carved this correction into a mountain somewhere...
*Stack Exchange is running 2 + failover ( http://blog.serverfault.com/2011/09/30/the-stack-exchange-ar... ), and was running on 1 not too terribly long ago.
At Stack Exchange, we use dotLESS just fine without having to recompile when we change our .less files. Something Ben Dumke cooked up, an IIS HTTP module I want to say (honestly haven't dug into it).
All that aside, tightening up the REPL is always worthwhile; something I'll through some time at. Maybe a file watcher approach, if I can get it working well cross-platform.
This is a fun personal project, I think it has some neat ideas and may be solid enough for actual use; so I wrote it up and open sourced it.
Sort of meta-discussion, but lots of the fancy stuff we used today started with someone creating a new tool to solve an already "solved" problem. I love the O'Reilly chart for demonstrating that http://oreilly.com/news/graphics/prog_lang_poster.pdf [pdf].
I laid down the first bits of this code a long time ago (first public commit 6 months ago https://github.com/kevin-montrose/More/commit/8392f0f4008fe7... ). Pretty hilarious to get bit by a subsequent April Fools.
Frankly, especially with what Oracle's been up to lately, I tire of this style of .NET fear-mongering.
Of course, if a better name presents itself I'll run with it.
Experimental was just left over from when it wasn't finished. Corrected the Github page.
I will fix bugs (I doubt it's bug free, it's young code after all), and future development is conditioned on a) my free time and b) interest from others than me.
If java arrays were something completely distinct from objects (like the primitive types are/were) that would have been interesting, which is what I was checking the super class for there.
http://en.wikipedia.org/wiki/Java_version_history#JDK_1.0_.2...
Java version naming is a bit confusing, especially retrospectively.
Starting with the release of JDK 1.2 (which was the third release, after 1.0.2 and 1.1) Sun started referring to everything as Java 2 (J2SE, J2EE, etc.). Presumably this means that there were two releases of Java 1, JDKs 1.0.2 and 1.1.
After JDK 1.4 (still Java 2) was Java 5.0, after that was Java 6 which dropped the Java 2 nomenclature (now different versions are just JSE, JEE, and so on).
Obviously it's not harming anything that they're not.
There's code in the linked answer showing how to get at it.
My go to example for this is Google, the largest site in the world. It's a) a joke name b) that almost no-one knows c) and if you know it, it's misspelled! But because it's was head and shoulders above its competitors that garbage name is now part of the vernacular ( http://www.merriam-webster.com/dictionary/google ).
Other pretty bad names (that we all accept as "good" now): Wikipedia (the hell's a wiki in 2001?), Twitter (what part of that conveys online SMS, or micro-blogging?), Flickr (no e, at least it's not .ly).
I think it's worth looking around for good names, but it's cut-throat out there in .com land, and if you're ever spending more time thinking up names than improving your product you're doing it wrong.
This is all completely ignoring the "search to find" user behavior that is (by my measurements anyway) really really common, even in pretty technical audiences.
It's certainly better than pure manual memory management, but it's not as painless (in terms of freeing a programmer from thinking about memory allocation) as a proper GC.
- rewarding with rep could convert answerers to closers
* answering produces useful stuff, closing is (often) just clerical
- over aggressive closing drives new users away
* blatant laziness shouldn't be rewarded, but subtle variations on a problem shouldn't be punished either
- some level of duplication is a good thing
* http://blog.stackoverflow.com/2010/11/dr-strangedupe-or-how-...
* in a nutshell, people ask the same conceptual question in different ways, it's good to have all those ways around to help Googlers
We've also improved finding duplicates in the close dialog since that meta post (it's a hard problem, so it's not a perfect suggesting system), so it's hardly like we've done nothing.
Also, as written that feature request is unworkable. Incentivize closing over asking, madness. Even incentivizing over editing (+2 up to 1k rep) is harmful IMO. I suppose we could just decline that post, but what'll probably happen is it'll be status-completed when we've come up with a better solution (which will be documented in an answer).
http://data.stackexchange.com/stackoverflow/query/65516/clos...
^ Based on the most recent data dump, somewhere around a 15 - 20% of closed questions (which are about 3-4% of all new questions). That sounds about right, honestly. I'm sure some stuff is slipping through, and we could make it easier to maintain these rates; but it doesn't seem like a pandemic of duplicates.
Oops, forgot the disclaimer: Stack Exchange Inc. employee, etc. etc.
I'll address your thoughts in order. A lot of this is theory sort of stuff.
- Badge/Reputation fragmentation is not only by-design, it's essential. It's non-obvious, but I've found little demotivates contributors quite like observing someone else being rewarded for the "wrong thing". Setting what's on-topic for a Stack Exchange is always a Big Deal™ to a site's community, for good reason.
We do grant a cross-site association bonus to kick people familiar with the Stack Exchange system over the "new user" line on new sites (http://blog.stackoverflow.com/2010/05/new-automatic-account-... , though the mechanism been refined a bit since that was written). This gets rid of the "having to earn your stripes" pain of moving to your second Stack Exchange.
The user divide is to a degree a historical accident (the multiple cookies at least, which we've alleviated a bit with auto login [http://blog.stackoverflow.com/2010/09/global-network-auto-lo...), but the act of saying "I am interested in this site" is also by-design. People don't like getting signed up for things they didn't ask for, and getting listed on (say) a Science Fiction (http://scifi.stackexchange.com/users) site that didn't even exist when they registered would be sort of evil. I don't think Reddit even has a user list page, so it's less of a concern there.
- I don't think the Reddit/Stack Exchange parallel really works in this argument. There are two big differences that I think matter in particular.
1. The unit of work is wildly different.
Subreddit's can survive on link submissions alone, which is pretty effortless. Comments and voting are gravy, certainly useful gravy, but not absolutely essential.
A Stack Exchange needs both question askers and answer posters in pretty non-trivial quantities on day one. Askers will get frustrated and leave if they aren't getting answers, and answerers will get bored and leave if there's nothing for them to do. Both units of work are also pretty large compared to link sharing. This is why the Area 51 process has a commitment phase, to help get enough of both types of users into the beta on day one.
2. Subreddits are basically aggregating content (link sharing and all), Stack Exchanges are creating it. Both are useful functions, but the failure cases are pretty different. A failed Subreddit has some links that go to maybe boring, maybe useless, but already existing content. A failed Stack Exchange has enough questions to give users some hope, but not enough answers to actually help them.
Basically, a dead Stack Exchange is much more likely to ensnare people and waste their time than a dead Subreddit which makes leaving them up sort of evil. This is a major reason for high-bars for site creation, and killing the failures that still slip through (http://blog.stackoverflow.com/2010/09/pruning-season/).
All that being said, we are constantly looking at the Area 51 process and keep making refinements. It's nowhere near a perfect, or even complete system yet. I'd be shocked if there weren't major changes in the future.
- This feature actually exists, it's just very much for power-users
http://stackexchange.com/filters/new - find questions across the Stack Exchange network based on site and tag combinations.
http://stackexchange.com/filters/favorite-tags - your favorited tags across all your accounts on the Stack Exchange network.
What we've found is that most people are active on a single site, typically their hobby or profession. Something they're passionate about, anyway. It's much rarer for people to be heavily active in more than one (non-meta/governmental) Stack Exchange. While we do build tools for those folks (like the above), I suspect that one or maybe two Stack Exchange per person is the natural state of things. The unit of work is again really different (and larger) when compared to Reddit, which is probably the root cause of such behavior.
---
So... I guess the TL;DR is that while there are some Reddit parallels in Stack Exchange, I really don't think most of these hold up. Mostly because Q&A is pretty different from link sharing.
I added the Facebook login option* to Stack Overflow, and I can assure you we don't really care which credential you use. We don't do anything different based on Facebook/non-Facebook creds.
Go look at your app settings and you'll see that the Stack Exchange/Stack Overflow app only accesses your Facebook account when you login. We don't do any subsequent queries, by design (we actually discard the auth token, but that's harder to prove).
The vast vast majority of the accounts on Stack Overflow use Google as a login provider. This has basically always been the case (http://meta.stackoverflow.com/q/31021/130213).
* We waited until they supported OAuth 2.0, as we weren't comfortable with the older Facebook Connect.
We use Linux for caching, load balancing, routing, monitoring, etc. The web tier and databases are Windows.
I would personally like to see `var` available in private and internal class members (properties, fields, and methods). There's a lot of pointless repetition that could be eliminated. (Obviously, you want to be explicit about the interface defined by a class' public members).
I also consider Tuple<> a missed opportunity, I'd like to see another whack taken at it that veers closer to structural typing. The existing tuple type is very unwieldy once you start returning or storing it, and I feel a pretty good alternative could be built on the principles of `var` and anonymous types.
Picturing something like:
static tuple SomeMethod(){
return new tuple { SomeNumber = 1, SomeString = "hello" };
}
static void Main(){
var t = SomeMethod();
Console.WriteLine(t.SomeNumber + " "+t.SomeString);
}
Whereas Tuple<> forces you to write that with ItemX scattered around.In C# you can use the unsafe keyword to get more or less back into the C/C++ world. While your new'd objects are still GC'd, you have the option of just grabbing an allocator and getting unmanaged memory if you feel like it.
It's worth noting that the .NET GC works quite well for typical cases, and only noticeably chokes on this one use case we have and only under load that most websites will never see (and most users don't notice even on SO, but we watch the logs religiously to make sure these things don't become noticeable). There are also some improvements coming in .NET 4.5's GC that may mitigate this, but we're naturally not willing to wait for it.
I worry people may be taking "don't use .NET, its GC sucks" away from this blog post, which really isn't the point (or accurate).
http://www.mono-project.com/FAQ:_ASP.NET
Seems to validate the IIS bit.
The equivalent to timely destruction in C# is a using statement combined with implementing IDisposable.
using(var stream = File.Open(somePath))
{
// use stream to do whatever
}
This is syntactic sugar for a try{ } finally { } (that also exists in Java) that calls Dispose() in finally. You do any cleanup you need to in Dispose(), things like releasing file handles. The only way to dodge that Dispose() is to tear the execution thread down, which generally means the process is gone with it.C# classes (but not structs) can also declare destructors, but their execution schedule isn't guaranteed; they're useful for making absolutely sure resources are released eventually, Dispose() is preferred for timing and performance.
Paging can occur as a consequence of copying a reference.
var p1 = *A // let p1 be a reference to A
// something in the interim
var p2 = p1 // create a new reference to A via p1
If A is no longer paged in incrementing its reference count (as a consequence of copying p1 into p2) can cause a page fault. There's are also gotchas with destroying references such as a collection having to effectively iterate over its contents to decrement each reference count, again possibly leading to additional paging.This assumes an object carries its reference count with it, which every reference counting system I'm aware of does. I suppose you could technically keep reference counts in a common space, though growing that would be a bit rough.
A GC isn't a magic bullet or anything, but they don't need to cause any paging as a result of reference changes until a sweep; and even then, they only need to page in the live set which is more likely to be resident in memory.
I'm... skeptical Apple's introduction of ARC is really performance oriented. Seems more like they tried and failed to build a workable GC for Objective-C with Tiger. Haven't worked with much Objective-C since 10.4 though, so I'm not completely settled either way.
I never claimed GC's solve all leaks either (they do a pretty good job with finalizer semantics honestly), but they're awfully awfully handy for solving very common (and sometimes tricky) ones.
I also did not mean to imply that our 40ms cut is a hard limit, it's a target average with a desire to minimize variability (Marc's work on which lead to this post); one that we're hitting pretty well. If you're working on a real-time system, you're right that you shouldn't be using these non-deterministic GCs.
So you still periods of high latency collections (in .NET only Gen2 collections are actually noticeable, not sure about other platforms). You also have the overhead of managing reference counts, which can be non-trivial; especially if you're paging as a result.
Of course, comparing GC performance between C# and Python or Ruby is sort of silly. If we were trying to hit our ~40ms Question/Show render targets on them we'd probably have lower hanging fruit than GC.
What happens if more than 1 server needs to GC at the same time (or overlapping times)? You definitely don't want to pull everything out of rotation, so you'll need some coordination, and how do you determine how many servers are allowed to be pulled out? We know we can limp along on about 1/3 of our servers, but it's not a stellar end user experience; at some point you're not solving the problem, you're spreading the pain.
There are some minor annoyance this would introduce too.
We use "server in/out of rotation" as an at a glance "things are getting ill" check, if a web server has been pulled (due to slow responses to requests) it's almost invariably something that needs fixing right now. We'd lose that if pulling servers out of rotation was normal operating procedure.
This would also be a royal pain in terms of local and dev tier testing, since you've basically made the load balancer and frequent GCs a pre-requisite for thorough testing.
Of course, this remains one of the options when dealing with GC stalls; just think what Marc went with here made more sense.
Community wiki posts can be outright edited by low rep users, and higher rep users can edit any post.
The idea that a wiki is better for rapidly changing content is... odd, to me; it seems it'd be a wash at best. Then again I'm an SE Inc. employee, so perhaps I just don't see the difference.