330
votes

Have a look at this Meta post for the current status of your swag!


It's easy to look at numbers; numbers tell us that many developers have been helped by what we built. That alone is very warming and makes us feel exceptionally great about what we're doing, wouldn't it be nice to take a little time on a Friday to share some stories that the numbers can't convey?

As I mentioned here, we're going to be running some special events here on Meta to celebrate hitting 10 million questions and reflect a bit on everything we've done together; this is the first of those events.

Your mission, if you choose to accept it, is to regale us with a tale of a Stack Overflow user going way above and beyond the call of duty in order to actually teach something to someone that wanted to learn, and anyone else that desired the knowledge going forward.

This could be written from several perspectives:

  • You just happened to be around when the answer was posted, and saw them continuously expand their answer to teach the subject more effectively.

  • You wrote one of these kinds of answers - don't be shy to share your own awesomeness. Talk about the experience a little, how did you feel when the person eventually 'got it'?

  • You asked a question and someone provided an answer that gave you more than some stuff you could try in your editor, they gave you the knowledge you needed to figure it out properly for yourself.

Examples of this don't need to be nearly as epic as explaining branch prediction like a boss - it could be as simple as an answer where someone finally grasped how memory is addressed, or why a regular expression did what it was doing, or the like. Let's pick some of our 10 million moments that we're the fondest of, and allow others to share in them.

Can you get to the part about the swag, now?

Why yes. The good news is, this isn't a contest, everyone that shares something here will receive:

  • 1 Stack Overflow T shirt (Men's or Women's)
  • 1 Stack Overflow mug
  • 1 Stack Overflow padfolio and aluminum pen with the logo, and some extra pens
  • 1 Stack Overflow 'Koozie' (it keeps canned beverages frosty)
  • 5 Stack Overflow stickers

In addition to this, we will contact the author of the answer that you mention and offer them the following:

  • 1 Stack Overflow T-shirt (Men's or Women's)
  • 1 Stack Overflow Ruled Notebook (acid free, high-quality paper, I'm not mentioning any brands because we have several and it depends on availability)
  • An autographed copy of "Smart & Gets Things Done" by Joel Spolsky.

Rules:

  • Answers must be at least two paragraphs and link to the answer on the main site you're talking about. You need to tell the story, with as much detail as you can. Put emphasis on what was learned, why it can be hard to teach, how someone could possibly have so much patience, etc.

  • If you're the author of the answer, you get both prizes.

  • Submission deadline is September 4, 2015

  • Allow 6 - 8 weeks for delivery after the submission deadline

88
  • 36
    Actually, I need a coaster to go with my SO mug. Do you guys happen to have any of those?
    – BoltClock Mod
    Commented Aug 21, 2015 at 14:45
  • 31
    If "teach" becomes a trigger word on Stack Overflow, we're screwed.
    – user50049
    Commented Aug 21, 2015 at 14:57
  • 14
    Has Mystical gotten swag for the branch prediction answer yet?
    – durron597
    Commented Aug 21, 2015 at 18:06
  • 40
    billions of developers Wait, really? That means at least 13% of all the people in the world are developers who have been helped by Stack Overflow. That doesn't seem correct Commented Aug 24, 2015 at 1:51
  • 13
    What do downvotes in this thread actually mean? Lousy answer or lousy story about the answer?
    – PM 77-1
    Commented Aug 27, 2015 at 17:57
  • 35
    Sept 5: wheres my email to fill out the form and get my SWAG? Commented Sep 5, 2015 at 18:21
  • 27
    Am I the only one who came here several times after 4th of Sept ? Commented Sep 7, 2015 at 12:19
  • 20
    are we supposed to recieve a email? :,(
    – CptEric
    Commented Sep 8, 2015 at 17:49
  • 23
    I'll be contacting the initial round (folks that wrote something here) tomorrow, and then those that you've nominated through writing about them near the middle of the week. Hang tight!
    – user50049
    Commented Sep 13, 2015 at 14:27
  • 32
    Just askin: who all (did not) get a mail (yet)? 1. me. Commented Sep 15, 2015 at 17:32
  • 11
    A mail with a confirmation will be nice. The suspense is killing me.
    – Haris
    Commented Sep 17, 2015 at 0:45
  • 23
    Sorry about that, something exploded while I was sitting on it. Mail going out on 9/18 for everyone that answered here, and on 9/22 - 9/25 for mail going to the folks that wrote the awesome answers you linked (it's a more manual process, hence a few days to get it together).
    – user50049
    Commented Sep 17, 2015 at 15:39
  • 11
    Emails sent! If you feel like you should have gotten one but didn't, let me know (after checking your spam folders, and connecting your computers directly to your modems after turning them off and on again).
    – user50049
    Commented Sep 18, 2015 at 15:25
  • 14
    @Tim your "Instructions for the locationally challenged" have made my day better, hilarious.
    – CubeJockey
    Commented Sep 18, 2015 at 15:28
  • 13
    @TimPost Just a suggestion (not to be interpreted as a complaint), but perhaps it is a good idea to update this thread/question with the current state of things. Commented Nov 16, 2015 at 12:47

237 Answers 237

1
2 3 4 5
8
213
votes

The day Stack Overflow made me understand open source

The Details
The Question: How to close a PST file in Java?
My Answer: https://stackoverflow.com/a/27164871/2422776

The Story behind them
This isn't an especially highly voted, or even a very popular question, nor is my answer, but it's a great experience I had with Stack Overflow, and I'd like to share it. I've been a software engineer for over fifteen years, and I've worked with open source software from pretty much the get-go. For the last three and a half years, I've actually been paid to work on open source. And yet, I didn't really get open source until I came across this question eight months ago.

The question itself was pretty mundane, to be completely frank - how can you close a PSTFile object? Despite never using that library, I thought, hey, Java is Java, I'll give it crack. I skimmed over the javadoc, confirmed the OP's fear that there's no good way of doing this, wrote down an answer, and was about to hit the "submit" button. And then it hit me - this is an open source library. Don't settle for the javadoc, read the code. A quick git clone and some nosing around later, I found an (ugly) hack way of doing this and added it to my answer.

Half a morning later, it really hit me. This is open source. It took me a couple of minutes to whip up a pull request to provide a sensible way of doing this, and a couple of days later it was merged by the project's maintainer.

I've been using open source for a decade and a half. I work on open source professionally. And it took a question on Stack Overflow about a library I don't even use to really make me understand what open source is all about.

Thank you for this experience.

3
  • 1
    Quite frankly, I had a simlilar experience. It wasn't a huge project, nor a huge contribution from my side. But seeing how it all got put together make me love Open source
    – neoaggelos
    Commented Sep 10, 2015 at 7:36
  • 2
    Me too stackoverflow.com/a/27143779
    – Zombo
    Commented Sep 13, 2015 at 17:27
  • 3
    I can feel the love for open source after seeing this post. <3
    – SMR
    Commented Oct 14, 2015 at 10:50
135
votes

Jon Skeet isn't an expert at everything.

I've always seen excellent answers from Jon Skeet. He is a legendary contributor to the site. His answers always strive to explain the why behind the problem, and for someone like myself who strives to collect as much knowledge about their profession as possible, these sorts of answers are awesome. When I post answers, I often try to make the same effort as was mentioned in an earlier answer here.

But... there's basically no overlap between my personal areas of interest and Jon Skeet's typical domain.

Then one fateful January day; Jon Skeet posted a answer. Someone pointed this out to me, and I thought "Oh cool! I'll go see what insight Jon Skeet has on Swift. Surely, I'll learn something reading this answer."

But I didn't. Don't get me wrong, Jon Skeet's answer was good and correct. But Jon Skeet's answer was an educated guess based on his experience with generics in the Java language. Having read his answer, I couldn't help but think... I have more to say on this topic. I could write a better answer...

And so I did.

I arrived late to the scene; Jon Skeet's answer was already marked as accepted. But every time I arrive on a question, I always think about how often I've come across questions in my own quest for solutions. The accepted answer isn't always the best answer. I know this and always keep it in mind. As such, I never hesitate to post what I consider to be a better, more complete answer whenever I can. Satisfying the asker is only a small piece of the puzzle. As of this posting, my answer there has 27 upvotes, and yet it was posted even after an answer was marked as accepted.

Not all of my answers are marked as accepted, but they're all written with the thought in mind that there are going to be several developers who have this exact same question in the future. I write my answers not for the visible asker, but for the numerous invisible askers.

Occasionally, that means earning the populist badge over a Jon Skeet accepted answer!

3
  • 9
    Nevertheless, it's Jon Skeet's avatar that appears first in the "And your efforts here matter" background. Commented Aug 23, 2015 at 14:59
  • 19
    @YehudaShapira Contributes by the tonne != knows everything :)
    – user50049
    Commented Aug 23, 2015 at 17:51
  • 16
    It's always very exciting to compete with Jon Skeet for the best answer. Once I stole an accept from Jon Skeet, though I arrived two hours later. Commented Aug 24, 2015 at 5:20
110
votes

The day I met someone famous on SO

The Question

Creagen's question: Saving and Remembering In-App Purchases

The Answer

My answer here: Saving and Remembering In-App Purchases

The Story

As a full time college student and part time app designer I really love to make games. On SO I stick to answer iOS questions and lookout for Game-Center and other game related questions.

A couple of weeks ago I came across this question, where someone was trying to integrate an IAP to remove Ads from their app. While creating my last app I integrated the exact same IAP into my app so I knew I could help.

While the question was put on hold for being too broad I was able to get in a quick answer and helped walk the asker through the intricacies of NSUserDefaults and how to keep track of if someone had removed the ads from their app.

With 78 comments on my answer and multiple hours walking him through the process nothing says thank you like this quote:

Thank you so much for your help. I don't know who you are, but you are awesome! Hopefully I can return the favor one day.

And who knew that this was the actor, Creagen Dow, who would become a fan of one of my games and tweet about it to his 33k followers.

I guess helping others does pay off sometimes!

1
  • 10
    Best answer I have read on this thread until now!
    – m4n0
    Commented Aug 24, 2015 at 17:20
69
votes

Why is variable1 += variable2 much faster than variable1 = variable1 + variable2?

Martijn Pieters is known for providing very high quality answers, especially in the tag. His answers are informative and high quality. I'd like to nominate his answer on this question, though, as one that was very helpful to both myself and others.

The post has had several revisions. The first starts as a very informative, short, answer. However, Martijn expands on this answer through several more versions before realizing what the real problem ultimately was. The short and informative post expands to be an excellent explanation of how += and + differ when concatenating two vs. three strings. It goes into behind the scenes details on what python is doing, while remaining accessible enough to be an easy read. Then it provides code samples demonstrating the difference clearly.

This answer was updated over the course of several months, proving new sources and new code showing improvements. Answers like this, that evolve and update to provide new and better information, are important to helping others not only understand their immediate problem but solve problems they haven't encountered yet. The user asked a simple question about why two seemingly equal statements performed so differently and got a great answer.

I've utilized this answer many times in code reviews at work. It's a practical question with a useful answer. It's also a problem that we've encountered at work and with an answer like this, it's easy to show others why something is happening instead of just saying "you should do it this way instead for better performance".

4
  • 38
    Before SO I always thought the only friendly ninjas were mutant teenagers.
    – CubeJockey
    Commented Aug 21, 2015 at 17:45
  • 7
    This guy is going to be more popular than Jon Skeet.
    – user3453226
    Commented Aug 22, 2015 at 13:34
  • 2
    @FrancescoMenzani In my opinion, he already is.
    – Joehot200
    Commented Aug 24, 2015 at 7:32
  • 2
    @FrancescoMenzani : Dont forget Gordon Linoff The DBA and one of the respected SQL Legend :) Commented Aug 24, 2015 at 11:33
35
votes

Is Storing Graphics objects a good idea?

Yes, I am definitely nominating this. Being a horrible Java programmer that has high hopes in building some awesome that never works, I was about to do something really stupid. Yes, really, really, really, realllllllly stupid.

I learned Java in my Grade 10 Computer Science course last year (I'm going into 11 now) but I had built a simple painting application, but I wanted to build on it and possibly release it. I had run into the simple action of undos/redos to fix drawing operations made by the end user.

Of course, I learned that the Graphics object in Java doesn't actually store anything, but only has ways of 'drawing' to the screen, or an object. HaraldK (the author of the answer) told me exactly (and concisely) what was wrong with my idea of doing this. It was remarkably simple to understand the flaws in my logic. The biggest issue (you can ask any of my friends) is that I think something is wrong, then I think it might work, and then I get horribly confused). You could probably find people in chat that would say the same about me.

He then noted the baseline of what I was attempting to do, and gave me three alternatives (yep, three) each explaining the pros and cons to each of them. He also provided me with a way to integrate it within my overall application. It was really helpful, and I managed to get from doing something that would forever be broken, to going to get something that works absolutely flawlessly. P.S. I did do the combination, holding two images in memory and the rest serialized to disk :)

We had a quick comment, and he immediately set me off to the correct docs on where to go. I'm forever glad :D

HaraldK really deserves some recognition: He really helped me and is probably the reason why my application is going to work. I'll tell you guys when I release it :)

3
  • 3
    I've basically never touched Java, and I remember reading this question and the answers just because of how interesting it was. Good nomination.
    – Jan
    Commented Aug 21, 2015 at 20:19
  • 1
    It is. I mean, it doesn't matter what capabilities whatever languages you're using has, at least parts of the suggested approaches would always be applicable. It's just an interesting concept. And not limited to images, could be applicable to any type of undo operations.
    – Jan
    Commented Aug 21, 2015 at 20:27
  • 2
    This is a fun entry. Its partially because its hilarious just how far you can get DoingItWrong(tm) because you just don't see the light yet (and lets be honest: because you haven't allowed yourself to see the light yet is usually closer to the truth). It ends up with people attempting to serialize network connections and send them to other computers. In the end, everyone laughs.
    – Gimby
    Commented Aug 26, 2015 at 12:55
35
votes

Self-answer Self-help

As a programmer, it can be incredibly easy to feel like you're just treading water while everyone else is writing code that you'll never be able to touch. I've watched many friends (and myself, several times) fall victim to impostor syndrome. The solution is as simple as it is difficult to get through one's thick programmer skull: Don't compare yourself to other programmers, compare your current self to your earlier self.

My earlier self was enthusiastic but had a lot to learn. At my first job (an internship, really), I was struggling with the asynchronous nature of JavaScript (coming from the straightforward Python & Java). As such, I asked this question. Sadly, it only attracted a few comments and no answer. Fortunately, I've learned an abso-flippin-loutely enormous amount from the gracious, generous, golden, gooey, graceful (and many other g adjectives) folks in the SO JS chat (they're the real heroes here).

Two years later, the chat room was pulling up terrible questions we'd asked (boy, were there some doozies). I found my previously-unanswered question. I said to myself: "Self, you know the answer now - you can answer this!".

So I did.

What started as a little goof on a dreary afternoon ended up going (semi) viral. Several users contacted me and said that my answer helped them make new connections about events in JavaScript, leading to a better understanding of frontend dev as a whole. Whenever I think I'm stuck in a rut, I look back on that Q/A and realize things aren't as bad as they seem.

What was learned

  • I learned that I'm learning.
  • JavaScript is "tyrannically asynchronous" and managing multiple events firing everywhere can be tricky. Newcomers often don't realize that an event can be fired before they're ready for it.
1
  • 3
    I'll upvote this post if you rename your question to something that people will find easily in google when they get that problem. 627 hits isn't (semi) viral Commented Aug 24, 2015 at 14:27
28
votes

I have a hard time picking out which answer I like the most but How does the clock work in Windows 7? is probably my favorite. It's a question with very low traffic (115 views in 5 months) but the answer basically exudes knowledge.

The thing that I like about Hans Passant's answers is that they are always on-point (I don't recall the last time I saw an answer of his not accepted), it's very high quality from the first revision and every sentence you read teaches you more than the previous one. Another example of such an answer is Testing for a float NaN results in a stack overflow. Another example would be Why doesn't NullReferenceException contain information about what is null? which really clarified to me what a NRE is behind the scenes. I once read a quote which said, paraphrased, "If you can't explain it in simple terms, you don't know it well enough". This is an answer of which I really feel that it shows just how much of an expert he is: the explanation is perfectly understandable yet teaches you about some quite advanced concepts of the inner workings. These three have to be my favorite answers on the site, and I've read a lot of them by now.

On a more personal note and with the risk of receiving a restraining order: seeing his answers time and time again have acted as an inspiration to become an expert in the .NET/Windows internals. It's still a far way off but if I can express my gratitude for his superb contributions to Stackoverflow by making sure he gets a T-Shirt, then it's my duty to write this post.

2
  • So wait... Your story was about HansPassant too? Mat's Mug and I both had a story about Hans too. I hope he's ready for a lifetime supply of coffee mugs.
    – RubberDuck
    Commented Aug 22, 2015 at 10:34
  • 7
    @RubberDuck actually he won't get a single mug until he posts something here. But he'll get a pile of T-shirts and a library full of Joel's book :) Commented Aug 22, 2015 at 12:14
28
votes

The answer that made a package to plot squirrels in a tree

SO is a great help to virtually everyone who's ever been here. Sometimes, with so many snarky and unimaginative answers and comments, it can be easy to forget that and take all this effort for granted. Then there are things that come along and are just delightful.

I had the pleasure to observe one of these occasions. Someone wanted to plot birfurcation diagrams of "squirrels" in a "tree". User @jbaums "over thought" the problem and went on to demonstrate at length how to do it, to much appreciation, and explain in comments how it worked. Great!

But this was not enough. @jbaums then decided this was evidently sub-par, and came back several days later demonstrating an R package, trees, which germinated trees, foliated them, and placed squirrels on them.

Chapeau monsieur! enter image description here

That was then updated due to new interest from this post to plot squirrel-squirrels, not just dot-squirrels!!! enter image description here

26
votes

Case-insensitive string comparison is tricky

Digging through my favorited posts, I found this question:

How do I do a case insensitive string comparison in Python?

The answer seems like it should be obvious and trivial. Several answers, including the "accepted" one, suggest doing case normalization using str.lower() or str.upper() on both strings.

But those answers are in fact wrong. Several users have pointed out that the popular approach fails to take diacritics, final-letter forms, and special cases such as ß/SS into account.

@Veedrac's answer, which suggests using either str.casefold() or unicodedata.normalize(), is, I believe, the only truly correct answer there. I'm awarding a bounty on that answer.

That answer illustrates the difference between a junior and a senior programmer: the naïve approach will appear to work, but the correct approach actually solves the problem correctly in all cases. And that is the value that Stack Overflow provides to me, a reasonably proficient programmer: there's always something new to learn!

2
  • 8
    it only scratches the surface. If you are interested; read about multi-level Unicode collation
    – jfs
    Commented Aug 22, 2015 at 16:35
  • 4
    @J.F.Sebastian: That's the 3rd level after Junior/Senior => Domain Expert :D Commented Aug 24, 2015 at 8:21
26
votes

Rubberduck uses SO as a rubberduck and gets some unexpected help.

How to create a read-only property exposed to COM?

I posted the question and the answer, but Hans Passant is the real hero here.

I was working on a COM library to be consumed by VBA. I'd never done anything like this before, so needless to say, I spent a good amount of time digging around the tag. Along the way, Hans kept answering my questions; questions that I never had to ask myself because someone else had already been down this road and had the same problems I was having now. Each step of the way, there was Hans, patiently explaining how and why COM acts the way it does.

I finally hit a wall. I kind of knew what I was doing, but I was having some trouble with something that didn't already have an answer. So, I set myself to writing an MCVE and by time I was done writing my question, I knew a way to solve my problem. StackOverflow had been my rubberduck. (Yes, I see the irony in Rubberduck using StackOverflow as a rubberduck.) Instead of discarding my draft, I thought someone else may benefit from what I had just learned, so I immediately wrote down my solution in an answer. It wasn't a good solution, but it worked well enough.

Before I had finished posting my answer, Hans had left a rather simple comment on my question nudging me in the right direction. There he was again. This guy had basically taught me everything I knew about COM programming and here he was again, not giving me an answer, but guiding me to figure it out for myself. After a very brief clarifying question and answer in the comments, it just clicked.

Ohhhhh. Genius! Thanks again @HansPassant!

Once it clicked, I went ahead and wrote the answer that he could have written himself, but I got so much more out of doing it all myself than I would have gotten from anyone else's answer. I couldn't have done it without that nudge though.

Every now and then that answer gets an upvote. I just smile to myself, knowing that someone else did end up benefitting from that answer and it makes me glad I wrote it. Not only did I learn something, but I know that somewhere out there, someone else just did too.

1
24
votes

When I started answering questions on SO (or at least, attempting to answer them) it was primarily a personal challenge to myself to improve and broaden my R skills. I was immediately introduced to an amazing community of R experts that have become significant role models for me.

One of the most generous contributors I've encountered here is Gavin Simpson. It is commonplace (and understandable) to frown on answering poor quality questions. What I have observed from Gavin on several occasions is the ability to take a terrible question and see in it something that can be molded into a remarkable contribution. The one that sticks in my head the most is his answer to How to apply a hierarchical or k-means cluster analysis using R?.

It is important to look at the edit history of that question, to grasp the magnitude of what he did there. The level of patience and selflessness on display there is, IMHO, truly remarkable.

I understand that many people may see a question like this and feel that the appropriate response is to simply get rid of it as quickly as possible. I have learned from Gavin that it is sometimes important to step outside that (entirely reasonable) impulse and think about whether you can make a positive contribution to a body of knowledge regardless of whether the question asker is putting in their fair share of the effort.

1
  • The edit history of that question surprised me, amazing story !! Commented Aug 26, 2015 at 16:27
23
votes

The question that changed Oracle

or at least, just a little

A younger version of myself thought it would be a good idea to use MySQL with ASP.NET MVC, and I did.. for a long time. Along the way I received so many bruising experiences that I eventually had to move away to the expected technology to pair with ASP.NET MVC; namely MSSQL.

This is one of my harrowing stories, and how a fellow user assisted me in changing a library published by Oracle. That user is none other than the epic slauma; if you are slauma, and are reading this, thanks for all the insights :D.

I was attempting to use a nested projection in Entity Framework to eager load an object graph, which seemed from all the documentation to be straightforward. And it worked at first, kind of, in the way that sometimes you turn off that light switch in your house that somehow was linked to the entire entertainment center or perhaps even your computer. Which is to say, it didn't exactly do what I expected it to do, and included a lot of duplicate data instead of properly formed data. How can I use Entity Framework on an object graph past a depth of 2 with MySQL Connector / NET?.

It was a massive conundrum. What made this worse was that every test other users ran came back working as expected! It just looked like I was doing something wrong and everyone else was just fine. Great, except that my computer would turn off every time I tried to turn off the hallway light.

What finally came to light was that the MySQL provider was malforming the SQL statements and causing the problems I encountered. Slauma had stuck with me the entire time trying to get this solved (even in comments on a second related question I asked), and a large part of getting this solved was comparing the actual composed MySQL I had with the composed SQL he had. There was a clear discrepancy.

I was stuck in a rock and a hard place here. What could I do? I mean, in all honesty manually changing the compiled library for MySQL Connector / NET wasn't really an option. But I had no choice, I reflected the whole thing and dove into its massive visitor pattern. That was more of a learning curve than I expected. Eventually though, I had a set of explicit places that were exhibiting the problem. It was time to file a bug report with Oracle. Malformed Query while eager loading with EF 4 due to multiple projections.

Down the bug report rabbit hole I went, hoping for the best, thinking it would be a simple fix for a team of engineers. Apparently it was a little complicated for them as well. After a month of working with Fernando Gonzalez Sanchez (one of their engineers on the project) we were able to both come to the same conclusion; there was indeed a bug present in the formation of the query statement. Seven months later, another of their engineers got back to me, Philip Olson, with the exciting news that the issue had been fixed and that the changelog had reflected the bug.

So thank you, Stack Overflow and Slauma. While this was only one (technically two) of the 10 million questions, it was significant to me. I had only been on the site at that point for 6 months, and had never interacted with another team as large as the MySQL Connector / NET through a reporting interface before. The experience of following this through led me to believe that I could make changes to even extremely large products, and that is a belief I still carry.

1
  • 2
    A big YES to this. I had the privilege to operate with Slauma for a couple of years in the Entity Framework tag. Although I clearly just started we always had collegial discussions and mutual respect. I regret the day he decided to stop contributing to Stack Overflow for reasons I don't know. Commented Aug 22, 2015 at 20:42
20
votes

Why does this string extension method not throw an exception?

And I thought I was decent with C#.

May 11, and I came across a problem while developing a chat server/client pair. It seemed that its solution required finding every index of a substring within a string. Of course, C#'s string.IndexOf method finds single instances of substrings, and I could have simply written a couple of lines that would recursively call IndexOf until no more indexes could be found. However, it was a problem that I recognized would come up more than once, so I thought it would be a good idea to code a new extension method into the string type.

I found my initial code in another StackOverflow answer, used it, and it worked perfectly (kudos to you, Matti Virkkunen). It sat there in my project, got used heavily, and never came up with a single problem. Until I wrote tests. When tested against null arguments, it failed to throw the exception I thought it would. Confused, I asked the title question.

Lucas Trzesniewski explained to me firstly why it didn't work, then the mechanism behind how it didn't work, and finally broke that mechanism down into the compiled version of my method. Not only did this solve my problem, but also taught me about iterators in C# and how, essentially, they defer execution until a different method is called. The exception would have been thrown, just not when I expected it.

This answer was a prime example of going above and beyond to answer a question and explain fully, and Lucas deserves both the gold badge he got for it, and the swag.

2
  • 4
    I'm glad my answer helped you that much. It's a pleasure, thank you for this! :D Commented Aug 22, 2015 at 10:57
  • @LucasTrzesniewski Hello there! Yes, it certainly did. It - essentially - explained a whole new concept of the language to me
    – ArtOfCode
    Commented Aug 22, 2015 at 18:50
20
votes

When I saw this post on meta, I really wanted to share. The problem is that there are simply too many helpful posts for me to easily pick any single one. The sheer volume of exceptional information that I've enjoyed learning about for the last four years and nine months is what has kept me coming back again and again. I selected a few answers worth calling out and picked one at random.

My response matches the first perspective listed.

You just happened to be around when the answer was posted, and saw them continuously expand their answer to teach the subject more effectively.

One of the greatest things about Stack Overflow (and the entire Stack Exchange network) is how knowledgeable people lead by example by sharing what they know in great detail. Even when the topic seems relatively trivial. Scratch that, especially when the topic seems really trivial.


In 2012, when I had <20k rep and T.J. Crowder already had more rep than I do now, we both answered the same question.

Our original answers started off as pretty similar, covering the basics of looping in JavaScript. Nothing I didn't already know.

But over the course of the last three years, T.J. has shown how to properly answer a question. You don't need to say everything all at once, you just need to keep coming back and expanding. Every time he found something new to add, his answer was updated. His answer is on its thirtieth revision and was just updated in June.

With the changes in ES6, I suddenly found myself coming back to make sure that I was aware of all the details. When I had previously thought there was nothing more to learn (I mean, really, how hard is it to iterate through an array?) I was being taught the basics all over again. T.J.'s score soared, and deservedly so; my "good answer" pales in comparison.

This is what Stack Overflow is all about: smart people sharing knowledge to try to make more smart people. It's extraordinary answers like these that give me pride in my magical unicorn points.

Thank you.

1
  • And this is surely not the only instance of him doing that :-)
    – Bergi
    Commented Aug 27, 2015 at 23:27
19
votes

You want teh codez? Let me first give you a university-level lecture on the topic.

Question and answer: Mutual information and joint entropy of two images - MATLAB

I remember the old times when I first came to Stack Overflow. I think I found it the same way any of us had: Google that annoying thing that is not working a couple of times and realizing that Google always throws you here if it is programming involved.

"Hummm, let's put this webpage in the bookmarks, just in case...". - Past me

At the time I was a young undergrad working for the first time in image processing and computer vision. Someone without much programming experience suddenly playing with a field where not only programming, but some maths are required. I remember it took me a while to understand many of the concepts of image processing, and once understood, it took me a while to get them coded. Playing a bit on that I got some experience and suddenly started answering some questions here and there.

I mainly use MATLAB, and because of the nature of the language, a lot of image processing questions are posted there. I generally try to answer them as good as I can.

But, about a year ago, a Canadian guy started to answer questions around. And they were AMAZING. In less than a year, he rocketed from 1 to 40K reputation. Yeah, I am talking about @rayryeng. Every decent question about image processing he answers comes with a university-level lecture about the topic, not only answering the question "How do I do this in MATLAB", but additional explaining (without the OP asking) the whole theory behind it. I learned more about image processing reading his answers than in my three university courses of master level.

I specially like the question linked because it explains how to code (and why) mutual information brilliantly, being a concept very little used in the literature. I was working on the topic when he wrote that answer and his knowledge helped me get an academic article published! That has to mean something.

But it's definitely not his best answer!

I could go on and on with his incredibly detailed answers on image processing, but you can just go and check his profile. Answers like those ones are what keep Stack Overflow as AMAZING as it is.

4
  • 6
    Very rightly put and agreed on all accounts, that guy's a legend!
    – Divakar
    Commented Aug 26, 2015 at 13:57
  • 3
    @Divakar So you are!!!! but could add 2 people in the post :P Commented Aug 26, 2015 at 13:59
  • 3
    I'm so honoured :) thank you so so much. It is people like you that make me want to continue and keep writing more image processing answers.
    – rayryeng
    Commented Aug 26, 2015 at 23:29
  • 4
    @Divakar "Legend" is an understatement. rayryeng is exceptionally willing to teach, and is as skilled as they come. On questions where all I could think was "Good luck, OP!", Ray would step up to the plate and knock it out of the park.
    – chappjc
    Commented Sep 2, 2015 at 18:12
15
votes

When I started using Stack Overflow, I was just learning programming. I graduated college as a networker, then was hired on as a programmer at my current place of employment two days later. Naturally, Stack Overflow has been priceless in terms of usefulness to me while I have learned to code and debug in a trial-by-fire manner.

Several of my questions were basic questions when I started out. My first question was really a problem of misunderstanding how regex works. As I worked on projects and bug fixes at work, I learned more and my questions became a bit better.

At one point, one of my coworkers asked me to figure out ajax calls. No one on the team had used ajax before, so it was all on me to sort out how it all worked. As I muddled along, I turned to Stack Overflow when I hit snags that I couldn't solve myself or through research.

One of the first issues I ran into, once I had the ajax call hitting the controller properly, was getting an error about an undefined callback. I was confused, and Googled the error. After several frustrating hours of not figuring out the issue, I posted my question to Stack Overflow. One user answered my question more directly, but David pointed out another issue that would cause me more trouble in his answer to the same question. Not only was this a well-explained answer, but he also taught me about not misusing Stack Overflow by updating my questions as I encountered related issues.

After directing me to post another question for the new problem, he found it and answered that question as well. (To be fair, I don't recall if I had commented that I had posted a new question on his original answer. If I did, it has since been deleted. Either way, he had no obligation to go look at it and help me figure it out.) The answer he posted to the second question was also very detailed, and upon encountering a small issue with implementing his answer, he gave me direction in the comments on what to look at to fix it.

David was one of the first users to really help me see how Stack Overflow worked, and how much more valuable to me it could be due to how it worked. His two answers really helped me to not only get the ball rolling faster on the project we were doing, but also to come to appreciate Stack Overflow even more than I had.

15
votes

It's all about vectorisation

I pinpoint one of the answers because I really liked this one and the request is for answers and not questions but actually, everything in this Q&A was highly interesting.

It all begins with a general question, posted by a high-rep and very skilled user, about a family of functions that are well known and very often used in R. Those functions usually permit to write less code but are known not to be "really" vectorised so all the question was about that.

I followed one by one the posting of really interesting answers and comments. To try and answer the question, the C code that is underneath the R functions was dig up. But, most of all, there was a whole discussion about what exactly "vectorisation" means.

The answer I'm highlighting today discusses very deeply the definition of vectorisation with links and references, it's more a talk than just an answer really and I had the feeling I was in a kind of amphitheater, listening to a fascinating conference. So, yes, I didn't quite understand everything but kept the question as favourite to go back on the answer later because I know I can learn even more from it.

This is what made this answer special to me.

13
votes

If you're having code problems I feel bad for you SOn,

I got 99 comments, but the problem is done!

My Question: CSV to XML converter using Groovy

Their Answer: https://stackoverflow.com/a/21430831/2641576

The Issue:

This was the first time during my Stack Overflow use that a user really went above and beyond! Most questions I had posted were all answered well and correctly, but if anything else ever crept up the revision to answers were never as urgent or had as much effort put in as this.

The question was a pretty standard "I want to create X using Y" and in this case creating a CSV-to-XML converter using Groovy. This was my first foray into using Groovy as I predominately work with SQL, so I was literally at the end of my tether (and ability) with it.

It had the makings of a very standard question, current code, what I had tried, sample data and expected output, nothing untoward with attracting such a brilliant effort.

Then 37 minutes later the most patient and helpful user I have ever dealt with on Stack Overflow answered.

7 days, 99 comments and countless GitHub revisions later we had an answer! Even with my lack of knowledge and no doubt stupid questions he stuck with me until the end.

I've been using Stack Overflow for around two years (as a member) and longer as a lurker, and I have never (and most likely never will) come across another amazing effort like this!

Thanks Tim!

12
votes

That alone is very warming and makes us feel exceptionally great about what we're doing.

Your words reminded me why I have been part of this wonderful community for almost 2 years now. In the recent times, I have just been flagging stuff and keeping the mods busy, but amidst all this, every time that I took some time out to help someone on SO, I did experience this wonderful feeling that makes us feel exceptionally great.

I came across this question almost two weeks after it was asked. The asker had attempted an interesting excercise with GridLayout alignment, and recieved an answer soon after, and the conversation between them had ended with these words by the answerer:

"Yes, that is the challenge. I referred to it as "driven by content". The only way I have found so far was my first response. I am going to watch this entry to see if someone has a better solution."

The problem was interesting, and the existing conversation between the two users clearly indicated that both of them had attempted it in order to learn about the concept, this wasn't an assignment for either of them.

Since two weeks had already passed since those users had been active on this post, I didn't expect any immediate response for my answer.

However, soon after I posted my answer, the answerer responded with his/her feedback and I revised my answer to include the use case they mentioned. A few hours later, the OP responded and I realized that he didn't fully understand that the composite viewgroup becomes non-flexible if we align it w.r.t. an axis. I was happy to receive responses from both the users whose conversation had encouraged me to write the post. I modified the answer with a longer explanation. After a couple of revisions and addition of some colorful images, it felt good when the OP wrote: "I definitely learnt a lot about GridLayout from this little exercise!"

When the asker finally gets it, irrespective of the simplicity of the solution, it feels so good to have helped someone.

12
votes

Question: In R, what is the difference between these two?

Answer: https://stackoverflow.com/a/2228139/2338862

This question addressed a common problem in . Specifically, it asked why two seemingly equivalent numbers (.9 and 1.1-.2) were deemed not equal by the R interpreter.

Alex Brown posted a relatively brief answer. That was an OK answer to the question. It points out that issue is well-known, included a link to a useful article, and provided a brief explanation highlighting the always confusing nature of floating point arithmetic.

What eventually made this answer great, however, was that Alex came back 8 more times that day, transforming the answer to the question into a comprehensive overview of floating point in R that both solved the user's specific problem but also showed them the underlying logic of floating point (using code examples) so that the answer would be useful to others who encountered similar situations.

The question has now been marked a duplicate of what we users call an or a "canonical Q&A" that we point duplicate StackOverflow questions to. The canonical Q&A is indeed an identical problem that features a very comprehensive "community wiki" answer by Brian Diggs.

Yet, a quick read of the revision history of Brian's answer reveals that about half of the content is in fact from Alex's original answer. While Brian leveraged a variety of sources to create a canonical answer for floating point problems in R, his answer reveals how useful StackOverflow (and its permissive content licensing) can be. Not only did StackOverflow allow Alex to solve a specific user's problem in a compelling way, it also allowed later users (like Brian) to create even more valuable and comprehensive resources to teach programming and solve problems. Alex's answer is an underappreciated gem in the tag that is a great example of how StackOverflow can be used to share thoughtful, detailed solutions to programming problems.

12
votes

Martin Büttner's answer to What are regular expression Balancing Groups? is an excellent answer.

The question is simple and straightforward, and Martin took the opportunity to write a great canonical answer, and probably the best introduction to balancing groups on the Internet.

.NET regular expression balancing groups are a hobby of mine, and I have answered several questions on the subject, but I always approached it as an advanced topic. Martin presented the subject in a simple and clever way without any assumptions on prior knowledge - starting from simple concepts, and only complicating as needed to get to the goal - exactly what is needed for a great canonical answer.

3
  • 1
    Wow, thank you for the kind words. They mean a lot, especially coming from you. And also thank you for helping me improving the answer with yours. :) Commented Aug 24, 2015 at 17:57
  • I wanted to post this one here too but you beat me to it ;) Commented Aug 25, 2015 at 11:15
  • 1
    I love playing around with regex in my spare time, just to see what I can do with them- The answer you linked here taught me a whole new aspect of regex I haven't played around with yet. Thanks for posting this one. =)
    – Kendra
    Commented Aug 28, 2015 at 19:18
12
votes

How a simple comment solved my issue...twice

In July of 2015, I started to help on an older web application to try to figure out why the system began to slow down and affect thousands of users. I tried everything from checking database indexes, to ensuring pages were optimized by keeping some of the workload on the client machine vs the server side.

I got desperate so I decided to post my question:

Performance deteriorating after async postback - scrolling becomes horrendous

After about a weeks time I had absolutely no answer to the question and our user base was complaining about the lack of a fix. I decided to add a bounty to the question....and even after the bounty I had zero answers.

The second bounty was a little better as people started to chime in, but still no answer...at the same time I saw further issues that inspired me to create yet another question, Why is telling jQuery to click my link button slowing my page down?.

How a hint helped me...

I originally thought this newly created question had nothing to do with the original question I posted...but a comment helped drive me in the right direction. The comment was made by a user named Radio. The comment he made can be found here: Why is telling jQuery to click my link button slowing my page down?.

I see what you're saying. I wonder if the update panel is somehow causing multiple instances of the apply button to exist on the dom, yet not visible. So clicking a single button manually triggers a single event, where as calling the whole class to click may cause the click to fire on many instances of ".apply". Worth checking the length of $(".apply") I suppose. Hopefully it's 1. Intuition says this is an event stack leak. This is a tricky issue.

His comment lead me to fix this issue (the second question I had posted) with my answer. But then I realized it fixed my original question as well....

Not only did Radio's comment fix my second issue, but he solved a more mysterious bug indirectly...without him even knowing he solved it. I just wish he could read this post, because I owe him my paycheck! He saved me from thousands of complaining users...and they think I am the superstar..when in reality he really is.

Thanks for the simple comment @Radio that changed the way I approached the problem!

11
votes

CSS selector for first element with class

Had to mention the answer by BoltClock in the above thread. It helped me to understand how the various child selectors worked in CSS. The quality and comprehensiveness of the answer from a technical point of view is there for all to see and the no. of other threads where this answer has been referred to is a testament to it. But beyond the technical aspects, it has been such an inspiration for me on how to write a good detailed answer.

I am a hobby programmer and had joined Stack Overflow to share whatever little I knew about HTML, CSS and JS. Almost all of my early answers were code solutions with very little explanation and they always addressed only the specific question that was asked in that thread. I had never thought of the broader set of users who would have a slightly different problem but probably need the same solution (and) the novice users who would need an explanation to understand why a certain thing works while another would not.

I had come across this answer when another question was closed as a duplicate of this one. Reading this answer taught me a few things (in addition to helping me understand the technical aspects) which have helped me remodel and refine my own way of answering questions:

  • A small piece of code may give users an immediate solution to their problem but it would not tell them why the problem had happened. Without knowing the why, the how (to fix) becomes less obvious. Eventually the answer becomes equivalent of giving the guy a fish.
  • A good answer is one that not only solves the problem of the person who asked the question but also that of future visitors. It is always better to provide a generic answer (while also answering the current question).
  • You can add an answer to a question which already has an accepted answer (a highly voted one at that) as long as it adds a substantial amount of value to the thread and covers aspects that the other answer(s) didn't cover.
  • Long and detailed answers are not unwelcome. They are the ones which are most welcome and are the ones that tend to help people over a long period of time.
  • A good answer is not always one that is written once and stored forever. It is one that constantly gets updated as and when more information are discovered.

As a person who is not a native English speaker, writing detailed answers have helped me focus on and improve my communication skills also to a good extent.

Thank you BoltClock! Your answer(s) have been invaluable to the entire SO community. Following your example has got me positive feedback from other fellow users and a good portion of the credit goes to you.

I have written about the answer that inspired me the most but it doesn't mean that the others haven't helped or made a difference. I've never really asked any question here because there was never any need to. All questions that I've ever had were already answered. I would like to take this opportunity to thank each and every person who has contributed to the quality of Stack Overflow (in the form of questions, answers, edits, reviews) and has made it such a wonderful and trustworthy knowledge-base.

I understand that this thread is more about the answer that has made a difference but I would also like to thank the members of the CSS Shapes, SVG and Design chat room. I am one of the owners of this room and each member has made a difference one way or the other. The discussions we have had there, the questions and the solutions have helped me learn a lot.

Last but not the least, Thank You Stack Overflow!!!

2
  • 2
    Thanks! It's obviously one of my all-time favorite answers, though I mostly see it as just a canonical answer and not one that was meant to teach (I can think of answers where I do actively teach the asker but sadly don't have any links on hand), it's great that it served as such an inspiration to you.
    – BoltClock Mod
    Commented Aug 29, 2015 at 5:18
  • Hope to see a revival of both the user and chat room.
    – m4n0
    Commented Jun 15, 2018 at 11:36
11
votes

Let me introduce you to one of MATLAB's most powerful functions and his most passionate advocate

I've been programming with MATLAB for 19 years now. I have some basic knowledge of other programming languages, but MATLAB is the one I know better.

About two years ago I decided to learn to program on Android. Just for fun. That involved learning Java first, and then delving into the depths of the Android API. Being an absolute beginner at both, I obviously resorted to Google quite often. And I soon noticed that the best results always came from Stack Overflow.

One day a wild thought occurred to me: Perhaps I could also be an answerer here. I know MATLAB pretty well, and I can help with that. And it will be good practice for me.

At that moment I didn't quite grasp how much my MATLAB knowledge would improve in the process. Indeed, seeing other people's answers lets you know new functions, tricks or approaches. Also, answering a question often leads you to push the limits of what you already know (just like your own programming problems do).

One of the functions I didn't know about, and which significantly changed my approach to MATLAB programming, is called bsxfun. For many of us, it's the Chuck Norris of MATLAB functions. An answer using that funcion usually beats any other answer, because of performance, compactness and elegance. And without discussion :-)

So I'd like to draw your attention to one of MATLAB top answerers, and bsxfun's most prominent user by far:

Divakar.

He has got nearly 40k rep in 1 year and a half, answering almost only in such a low-activity tag as MATLAB. Believe it or not, 40% of his MATLAB answers are based on bsxfun. He has a special ability to visualize all sorts of operations with multidimensional arrays (which is what bsxfun is all about), and many of his answers on the matter are impressive. I have learned a lot on the use of MATLAB thanks to him.

I'm highlighting the following question and answer (both by him), in which he analyzes the performance of bsxfun in typical scenarios. Divakar's answers tend to have an emphasis on performance, and this one is also a good example of that.

Comparing BSXFUN and REPMAT

10
votes

You can learn by answering

One time I was going through some new questions and one of them struck me as odd. It was titled "automatically change org.mysql to org.sqlite". Having a little experience dealing with JDBC, I decided to check it out, and found that the asker was having a very perplexing problem: their code was trying to connect to a MySQL database, but it was throwing an exception related to SQLite!

That made absolutely no sense, so I set out to find what the OP was doing wrong. I wasn't able to reproduce the problem, and there didn't seem to be anything particularly wrong with the code (related to the question), so I dug deeper into the JDBC code to see how it handles multiple drivers.

What I found was quite surprising: DriverManager tries all the available drivers, and if the connection fails, it throws the first exception it got (if any). And the key part is that the SQLite driver wrongly throws an exception for the MySQL connection string, instead of reporting that it's not a matching driver (by returning null).

Having solved the mystery, I wrote my answer and explained the details to the OP and provided some suggestions for fixing the error. The problem was solved, I learned something new about JDBC (and found a bug in the SQLite driver too), and even got an "i love you" from the asker :)

1
  • My experience too: answerers can learn as much as askers! Commented Aug 24, 2015 at 19:26
10
votes

What is "entropy" and "information gain"?

The above linked post is probably one of the best examples of an epic answer that StackOverflow has, written by Amro. Back then when I was a graduate student and learning about information theory, the textbooks I was reading were insufficient in allowing me to fully grasp the material. I figured that because textbooks were published, they were the authority in learning a topic and these were the end-all-be-all of learning something.

I decided to try my luck on Google and when I typed in entropy and information gain into the search engine, this was the first result that popped up. This post not only went into a good in-depth detail about the theory behind the topic, but he goes through numerical examples and shows graphics and illustrations on how a decision tree can be formed. Decision trees have to be known before talking about entropy and information gain, and I dare say that this StackOverflow post is better than all of the textbooks I've read and my professor's slides at the time.

The post is still continuing to evolve. If you see the edit history, Amro keeps updating the post with new theory, updating broken links and more examples. This is exactly the same behaviour that StackOverflow embodies - always evolving and updating... just like his answer. In actuality, that post is what got me started in answering questions. The fact that you can provide just a few minutes of your time, with the potential of reaching millions of people and imparting on them the knowledge and experience that comes so easily to you has its benefits and also some great personal satisfaction.


If that isn't enough, then you may know Amro from his post on a Single Layer Neural Network which is a really good example of the reversal badge. The OP did not show any effort in his answer, and not only did Amro correct the code, he posted animated GIFs and pictures of the code actually working and also explained what was wrong with his original defunct code.


Amro is a perfect example of what a StackOverflow user embodies and if you take a look at the comments in the entropy and information gain post, you can see that many of the users that read that post agree.

5
  • 2
    Thank you for thinking of me, and in return thanks for all your excellent contributions on SO! I'm not surprised to see you featured in a story :)
    – Amro
    Commented Aug 30, 2015 at 10:00
  • @Amro - You're welcome :) I tried contacting you by email but I didn't receive anything back so I wasn't sure if you got it... but I guess you did! Once I wrote this up, I've seen some more upvotes to both of your NN and entropy posts. Hope those votes keep coming, and again thanks for being awesome :)
    – rayryeng
    Commented Aug 30, 2015 at 21:27
  • 1
    @Amro I was hesitant to feature you again, but one positive experience with a certain excellent answer stood out (for me) above all others.
    – chappjc
    Commented Sep 2, 2015 at 18:01
  • @chappjc - This post is for you :) stackoverflow.com/questions/32341953/… - lesson learned... never use length.
    – rayryeng
    Commented Sep 3, 2015 at 1:38
  • 1
    I'm very honored, thank you @chappjc!
    – Amro
    Commented Sep 4, 2015 at 5:35
10
votes

He recognized the question that mattered, gave an insightful answer, stole the accept away from my answer, and got my respect (rinse and repeat).

The Question: What's the “right” way to organize GUI code? ()

The title poses a very general and subjective question. The body of the question has many specific questions about various obscure aspects of GUI programming in MATLAB. Hot damn, I thought, I've spent tons of time grappling with these issues! (tl;dr: I took the bait and regurgitated every relevant nugget of information. Amro gave a useful answer). So, I wrote a very detailed answer, going through each bullet with a spattering of undocumented tidbits and trivia that is typical for me. It was a thorough, well-cited... wall of text. Oh, well. I was happy enough and apparently so was the OP as it got the accept. Yay!

Then I went to bed. In the morning, I was surprised to find Amro's answer had popped up, gathered just as many votes as my answer, and stolen the accept. The first thing he did right was to read the title of the question and see through the cruft. The OP wanted to know a lot of things, but mainly how to organize GUI code in MATLAB with some demonstration. (Forgetting that the question would have been closed as too broad or opinion based without a more specific question body.) The second thing he did was to bring some serious talent to the table, and gave a theoretically sound answer with a full working example. Finally, he had the patience and generosity to teach someone a new concept, demonstrated in detail.

enter image description here

In just about every answer, Amro has something to teach and is gracious all the while he makes you look like a beginner. Of course, at user id 97160, he's had plenty of time to practice the art of the perfect answer. As quasi-peers in our micro-tag, , Amro has schooled me time and time and time again. And it has been a pleasure. (How's that for sportsmanship? I think I've just sealed the fate of my "competing" answers!)

I should mention that I could easily write similar accounts for users Luis Mendo, rayryeng, Divakar, Shai, Eitan T and others I know who embody #SOreadytohelp.

3
  • 2
    Someone should write a story about you! My love for accumarray came from you! I wrote about Amro already so I'm not sure if writing another story about you would be taboo :(.
    – rayryeng
    Commented Sep 2, 2015 at 18:03
  • @rayryeng Nah, you and Amro are far more patient and generous than I ever was, and I think that's what makes a great contributor. Cheers!
    – chappjc
    Commented Sep 2, 2015 at 18:07
  • Great story! And thanks for the mention!
    – Luis Mendo
    Commented Sep 3, 2015 at 9:53
10
votes

The Pingsort algorithm

Stack Overflow contains a large number of excellent answers that have been, and continue to be, helpful to many software developers around the world. Some of them have already been mentioned in the other answers to this question.

I want to bring up an old favorite of mine, solely for its comedic value.

The question, which appears to be a remix of an old Google job interview question, was asked back in 2012 and outlined a problem wherein a computer would receive a list of 1 million numbers over a network connection, and had to sort the list before sending it out over another network connection. To complicate things a bit, the computer only has 1 MB of RAM available.

A few answers were posted that attempted to provide practical solutions to the problem, using various approaches.

...and then there was this answer.

Rather than exploring elaborate compression schemes to fit the data in the limited RAM, this answer suggests badly abusing the network by sending out a huge number of ICMP echo requests, thereby using the network as a sort of non-random access temporary storage.

I'm not particularly savvy when it comes to network protocols and infrastructure, so I can't really judge whether this approach even would have a chance of working in practice. But I believe that anyone working with engineering or any kind of technical problem solving can appreciate the creative spirit and nerdy tongue-in-cheek character of the answer. To quote one of the comments: "This solution isn't just outside the box; it seems to have forgotten its box at home :D"

9
votes

VB6/COM Interop: where do these events come from?

One day I got confused and used the wrong attribute in COM-visible C# code meant to be exposed to a VB6 library, which resulted in every single exposed member being exposed as an event... and I couldn't figure it out, so I asked Stack Overflow.

The question was almost closed as a "too localized"/typo, but Hans Passant's and Dan Busha's invaluable answers went out of their ways to explain things I hadn't the slightest idea about, leaving what I deem an incredibly useful post that made the Internet a better place.

Googling "COM interop events C#" brings up that question in 2nd position, which is awesome.

I ended up marking Dan's answer as accepted, because this comment triggered that wonderful "oh!" moment that I'm after when I post a question on Stack Overflow. The funny thing is that, at first, I thought Dan's answer wasn't even about my question.

9
votes

I spent a lot of time and love in SO, it's hard to pick one specific story.

Some of my joys come from the easy answers that got me unreasonnable comments from enthousiastic developers pretending that I "saved their life" or that I am "a genius" or "a God". And there's also this particular comment...

enter image description here

I'm also proud of those answers that I simply made complete enough so that they're useful for a lot of developers. My answer on how to use MySQL in Go was rather easy to come with, even at that time, but by extending it from the strict answer to the question to a small guide, I made it more helpful for the community.

I could also tell the story of that case where I was immediately upvoted for an answer that I later realized was totally wrong and that I fixed before anybody noticing. But the 10M celebration isn't the right time to speak too much about this malfunction (too often do I go to SO while waiting for the effect of the first morning coffee to kick in, or just drunk from some good wine).

So I'll speak of this case I solved with EaselJS.

EaselJS is one of the most popular libraries for Canvas based games in the browser. I had made a small open souce smart game with it, SpaceBullet, because I wanted to learn that kind of technology (go play it! it's fun and of course totally free of any ad). I thus had some basic knowledge of it.

So my interest was picked up by this question: EaselJS onclick takes over entire canvas.

There was obviously nothing wrong in OP's code, so I dived into the code of the library. I could identify the problem, reproduce it in the official demonstration, devise a workaround, then raise an issue in GitHub with a fix suggestion. The small question that almost nobody saw leaded to a bug fix in a very popular library. That's another way SO helps developers everywhere.

That wasn't terribly hard to solve, I choosed this story because it's also a success story of the open source community and I think SO is a big natural complement (and even part) of that community. I'm sure it's at least the same, great, spirit.

3
  • Yeah see, I have a slightly more pessimistic view on that. This is an alternative path that is just as likely to happen: person asks about a problem on SO rather than in the discussion forums or bug tracker of the library itself where the devs can instantly see it and identify it as a bug. SO produces a workaround or less likely convinces said OP to use an alternative. The end, and not such a happy one because SO actually got in the way of progress. The points in your story go entirely to you for actually going the extra mile, SO has little to do with the success. Thank you.
    – Gimby
    Commented Aug 31, 2015 at 16:07
  • so wheres the picture with the tatoo?
    – SMR
    Commented Oct 14, 2015 at 11:43
  • @SMR Unfortunately, he didn't deliver :( Commented Oct 14, 2015 at 11:47
1
2 3 4 5
8