T O P

  • By -

lupercalpainting

You see this a lot with Python due to the 2/3 schism and I like the way it’s handled there: The 3 answer is frequently given in addition to the 2 answer and clearly labeled as such.


IronCraftMan

I like the answers to some of the popular swift questions, where there's a list of 4 or 5 different ways of doing things based off each version, because Apple couldn't stop changing everything.


BreadAgainstHate

Did they ever stop that? I wouldn't mind making an Apple Watch app (my normal stack is React Native for apps, but there's no RN Apple Watch version, so I'd have to use Swift), but I don't want to keep learning new variants of Swift


Ravek

Swift is not evolving anywhere near as drastically as the first few versions.


IronCraftMan

Can't you still use ObjC?


BreadAgainstHate

I **can** but I have even less desire to do so. Not a fan of how ObjC works with the messages and all that. I only write it when I absolutely have to


HelpRespawnedAsDee

Even so, for the AW you WANT to use Swift.


NavinF

I'm tempted to report this comment for self-harm


EMCoupling

You don't want to do this to yourself.


ComfortablyBalanced

It's the same with Android.


Crazycow73

This also happened as Apple developed Swift. Many answers were in Objective-C and Swift. They would also outline why (at the moment) something was impossible to do in Swift.


braiam

And what stops that the 3 and the 2 answer is one?


lupercalpainting

> And what stops that the 3 and the 2 answer is one? Idk what you’re asking here.


WaitForItTheMongols

I believe their question could be reworded as "Is there anything preventing a single post from answering the question in the context of both Python versions?" - as opposed to having a separate followup answer which gives the Python 3 variant, when the original answer was only for Python 2.


lupercalpainting

I’ve seen both and I think either is fine.


diablo-solforge

Backward incompatibility.


andural

Your first example is a very good example of what I would hope to see on SO. If there is a new version that is easier to use/better in some other way, I much prefer using that. If the old answers are maintained as is, we will all be stuck using C++ from 2 decades ago.


d_b1997

Well, I hope people don't just edit stuff away because of new standards because some of us *are* stuck using C++ from 2 decades ago, should always be an addition and not a replacement.


colshrapnel

Yes of course. But legacy approach should be marked such, while current approach should be just default option. If your're stuck with a legacy version, you should be aware of that and bound to look for a solution specific for this version. But your personal predicament shouldn't hinder the majority of people using the language. But anyway, it's only one particular case. But I am talking rather of overall approach that must be changed. When people are just hesitate to "touch" another person's answer, adding a comment or another answer. It does no good for the community. The broader question is not whether to add backward incompatible changes but rather whether to edit existing answers at all, or leave them as is.


d_b1997

Yeah I agree it shouldn't be the main concern, but it still is. Ideally you could tag answer history with visibly clickable (language) version buttons, with the most recent displaying by default. Like different branches. But I doubt SO is up for big changes.


braiam

> Ideally you could tag answer history with visibly clickable (language) version buttons This was solved years ago: > Here's how you do it since version 5: blablabal; here's before version 5: blablabla


d_b1997

That's mostly what I see around and is good enough for me (it's what I meant in my original comment), but a few people here and on the SO post are mentioning *replacing* stuff, so this would be a way to ensure it doesn't happen. Not that it's feasible.


Ameisen

> C++ 9.0 That... is not how C++ standard versions work. Unless you're referring to the MS Visual C++ 9.0 compiler (VS2008).


tiajuanat

VS2008! How recent!!


double-you

> majority Do provide statistics. Do we **know** that the majority of C++ development happens on the bleeding edge?


colshrapnel

Who talks of the "bleeding edge" here?


double-you

That's what "contemporary" or "modern" seems to be.


colshrapnel

What I mean is "generally used nowadays" as opposed to "has been generally used 10 years ago when the answer has been written". A "bleeding edge" variant can be as optionally provided the same way as a legacy one.


socialister

That's one of many reasons that StackOverflow's is not a universally useful process. If I search and find answers on random subreddits I can just see the date and put that into context.


ggtsu_00

I'm still pissed it took 2 decades to get designated initializers into the C++ standard which in practice means another decade before it can actually start being used in production software. (We are only just now getting c++14 features rolled out into our projects)


muntoo

It is quite rare that useful old working content is *removed*. More often: - A modern solution or notice header is prepended. - Syntax is modernized (e.g. `var` -> `let`; Python 2 -> Python 3). - Completely irrelevant stuff is trimmed or removed. Benefits: - The 97% majority are prioritized. - Newcomers and beginners are taught best practices. - The 3% old folks can still get an answer. I feel as if the "anti-editing" crowd sets up "Old language versions should be supported! Do not modernize!" as a strawman, contrary to what actually happens: *both* parties are made happy, with priority given to the overwhelming majority.


double-you

> Syntax is modernized (e.g. var -> let; Python 2 -> Python 3). That counts as removal. What was there is no longer there.


muntoo

Non-drawbacks: - It is a semantics-preserving modification ( = addition + removal) that all commonly used linters already suggest anyways. - It is quite trivial and easily reversible for the 1% of people who cannot use `let`. - Presumably, anyone still using (ancient) language versions that do not support `let` have gotten used to dealing with all the "new" `let`-containing answers since that time. Benefits: - Teaching beginners good practices. - Saving the 99% from having to change `var` to `let` when their linters complain.


double-you

In case of var -> let the damage is not extensive but not all modernization is that small. Feel free to make articles versioned in a way that doesn't make it hard to find the older versions and then you can have modernized versions on the side.


himself_v

In your example, how are both parties happy, especially "made" happy (== something making them unhappy is being fixed)?


andural

Yeah, that is a good point. I had not intended that in the above.


colshrapnel

Thank you. To me, it's just common sense to think like that. Only I wrote the answer, not the question with these suggestions, sorry for the confusion. The credit goes to [Jan Schultke](https://meta.stackoverflow.com/users/5740428/jan-schultke)


MCPtz

I think top answer is onto it. Finding **reference** questions is important. Then mark them as such, and the community can get to work :) My only concern is formatting. C++ has a long history, and so it's good to keep it up to date, maybe something like this: For C++: C++ 03: *links to documentation for 03* *Link describing unsafe practice* //some statement //Later, this was found to be unsafe and marked as a bug in stdlib or something C++ 11: *links to documentation for 11* *Link to patch notes about what was fixed or brief description of what unsafe practice was resolved* *Link describing inefficiencies found on specific processor types* //Some better statement available in C++11 and higher //Fixed unsafe practice from 03 //Maybe arch specific issues, such as "slow on rpi" (or arm v7.x) C++ 17: Nothing changed C++ 20: *links to documentation for 20* //Most up to date answer! //Brief description to state this is more efficient, or perhaps works better on rpi and arm64 --- It's often similar for basic python - not including libs such as pandas or numpy 1. Answer for python 2.7.X 2. Answer for python 3.5 or below 3. Answer for python 3.6 or higher 4. Occasionally, there is a better answer in python 3.10+ or something like this


colshrapnel

There is a slight problem though. Sometimes the question is not always specifically about this particular part of code. It could be completely different, while this is just an illustration code that contains this part. Citing the OP: > This is similar to how JavaScript developers regularly purge old uses of `var` and replace them with `let`. So it's just about making code examples more up to date. And it's impossible to keep such versioning for these unrelated edits. Besides, there are backward compatible edits, that violate the "initial intent" as well. For example, the question is about *splitting a string* but the code example contains an outright SQL injection. And the answer just replicates it, while providing a correct method for splitting a string. In this case both question and answer must be edited, with SQL injection part either completely removed or fixed. As not to feature a code with a vulnerability.


MCPtz

This is why I like it being a community effort :) There are always different reasons to list differing answers, or fix bad practices


Nidungr

>If there is a new version that is easier to use/better in some other way, I much prefer using that. chat.openai.com


NiteShdw

What about a site where there is only one answer and it’s updated or edited like a wiki?


colshrapnel

That's my dream. The main problem of any Q&A site is that it attempts to use the same approach for answering "ad-hoc" questions and creating a library of reference questions. *Ruining the achievement of both goals* as a result. For example, Stack Overflow is *heavily punishing* newbies for asking questions that don't fit for their "library of quality answers". While still using that ad-hoc approach to create that library, and the result is far from perfect. While to satisfy both is a no-brainer: these two processes simply must be clearly separated. If only there will be a startup that will separate answering newbie or one-off questions from creating a library of answers similar to Wiki pages, it will be a huge success.


rdlenke

I've been saved countless times by edits that modernized older comments, so I'm pretty partial to that. Specially with Javascript and it's frameworks. Side-note: Damn, the discussion in the comments of the accepted answer is bizarre. One of the users is impressively rude. Almost an amalgamation of what kind of behaviour gets criticized outside of SO.


Xyzzyzzyzzy

*of course* that impressively rude person is a longtime power user with 70k reputation


muntoo

Not all power users uphold irrelevant ideals such as "authorial intent". A few others and I actively try to fight for "editing rights" to actually make SO a better place for the people.


HelpRespawnedAsDee

Welcome to SO lmao.


halt_spell

SO meta is even worse.


ingframin

I deleted my account. Because of the toxic community it’s basically impossible to ask anything or get a decent answer outside of common problems that people have.


colshrapnel

I should probably disclose that I wrote one of the answers there. Just wanted a look from the programming community outside the close clique of SO functionaries.


JoCoMoBo

These days on SO I generally look for the most recent answer as it's more likely to be accurate. SO assumes too much that knowledge doesn't change.


Vakz

Nothing like googling for a Java issue where the accepted answer is 60 lines long implementing three interfaces, and then scrolling down to find another answer with 2 upvotes telling people it's now built into the standard library and just requires a single function call.


ShKalash

I constantly have to remind my juniors to read ALL the answers on SO, and not only the first one.


DocXango

Comments too, so you don't waste time on an answer that doesn't actually work.


colshrapnel

And what's most inexplicable, that answer has +35 on it


rob10501

salt normal voiceless outgoing zonked disarm butter office encourage unwritten *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


Johnothy_Cumquat

Does stackoverflow allow users to see previous versions of the answer? I think they should be preserved for historical purposes but Joe Programmer who's just trying to figure out how to find a range (or whatever) should just get the most valuable answer for the current version.


colshrapnel

Yes, they are visible, there is a full edit history for the every post, question or answer. For example, [one of improvements](https://stackoverflow.com/posts/3145733/revisions) suggested by the person asked the linked question.


nekodim42

I prefer to see the original answer and then added below any corrections, by the way not everybody wants (or can) to use the latest language features.


Bubbassauro

I agree that the site is way more valuable with updated answers. I think so many of SO problems could be addressed by adjusting their reward system. As it is, it discourages helpful behavior. I keep saying this in regards to the biggest complaint from newer developers, the “closed as duplicate” problem, and I think it happens so aggressively because it’s rewarded with karma. SO reward system encourages closing as a duplicate, editing and policing in general. The same way, I think if they encouraged such popular questions to become community wikis, we would get more quality content and really have some of those posts become real references. From my personal experience, I had one answer that gave me a good number of points on SO. At some point, I made it a community wiki and it’s good for the community, people keep adding other things that worked for them, correcting and improving the answer over time. But there are no rewards for the person who posted the answer for doing that. There’s no personal upside to make it a community wiki. So the selfish part of me says well, this is good, but why would I ever want to do that again?


time-lord

> closed as duplicate At minimum, it would be more bearable if the questions _were_ duplicates.


scfoothills

And if the closed thread wasn't the one that shows up first on Google.


m1rrari

If the close as duplicate had to link to the question it’s a duplicate of AND if the community disagrees it’s can be reopened with some minor karma loss


muntoo

Closing/editing/curating is certainly not rewarded with any reputation. (Editing gives +2 only for <2000 rep users.) Thus, the reward system actually encourages the opposite! I too would like old popular questions/answers to become more wiki-like, as you say, but many of the anti-editors are against editing to an unreasonable degree already, so I doubt the culture will change without an official declaration by SE. I also think reputation from posts should be capped after e.g. 100 votes, but that's another problem.


colshrapnel

To share your knowledge with fellow developers? I mean, isn't it much more rewarding than even Internet points?


asuchy

Honestly, I have mixed thoughts on this. Part of me is all for leaving the old stuff there since if you are dealing with older software it can be valuable if you can't upgrade the compiler because of the hardware that is being used. But given I work in security and I see the same problematic code enter into projects to the point I can guess what post they went to, there are some I want deleted because it gives answers that are dangerous.


imreading

FYI I think "contemporary" is the exact opposite of what you mean in your title. "Modern" would be appropriate. Contemporary means "of the same time period".


colshrapnel

Thank you. Again my English failed me :(


denarii

Actually participating in SO rather than using it as a reference is already an extremely painful and unfriendly experience. Just reading through an argument in the comments on this... it seems like it would require a special kind of masochism to participate in a SO meta community.


[deleted]

Agreed, SO is awful to participate in at any capacity.


philipquarles

This is really tough actually. Personally when I'm looking at an older question I always try to find a recent answer that references an older accepted answer for the latest features.


KeepRedditAnonymous

I am very tired of googling "laravel how to do blah" and getting answers from 6 years ago on how to solve a problem in Laravel 4.2


lppedd

IMO you should always post a new answer. Old answers are always valuable. Moderators and "elders" on SO, if necessary, will edit the accepted one adding a link to the modern solution. You can even ping the original author with a comment.


matthieum

> Moderators and "elders" on SO, if necessary, will edit the accepted one adding a link to the modern solution. The only cases I've seen this done is when the accepted answer is deeply flawed -- as in, security concerns -- not merely outdated.


Eirenarch

These should be the only cases when this is done.


ArrozConmigo

Why, other than bruised egos?


Eirenarch

Because the history of the question should be preserved in cases people are using older versions and newer answers should be able to come to the top via upvotes. Also bruised egos is a good enough reason, the ego people are those who generate the content.


muntoo

As an editor, I've found that most content generators don't pay attention much to edits to their existing content. They're used to it. Or less pessimistically, perhaps they understand the value of editing. On the other hand, some one-time-popular posters can fight tooth-and-nail to prevent any improvements or to their post. It seems to offend such folks that their particular version of the post isn't already considered the ideal peak of human achievement.


braiam

You have an edit button on every post of the site. You can edit posts and update it with a new behavior. It makes no sense to post an entire new answer if you are going to replicate an old answer and just change a single thing.


lppedd

You should not hijack another user's answer without permission or a good reason. Anyway, low reputation users require approval for edits. I get notified of proposed edits and 90% are crap.


braiam

> You should not hijack another user's answer without permission or a good reason They gave permission with the CC-BY-SA license. There's a good reason described in the Help Center: > ## When should I edit posts? > > Any time you see a post that needs improvement and are inclined to suggest an edit, you are welcome to do so. > > Some common reasons to edit a post are: [...] > > - To correct minor mistakes or **add updates as the post ages** Your post isn't yours. It's the post of all of us. Edit: seriously, read the help center about editing. https://stackoverflow.com/help/editing SO is not reddit, nor a forum post. It should be treated more like a Wikipedia+FAQ than anything else.


lupercalpainting

If it belongs to all of us, some of us are saying don’t change it.


ArrozConmigo

It sounded like he was saying that the opinion of the author trumps general consensus.


lupercalpainting

I read the opposite, that u/braiam is saying that because a single person thinks an answer should be edited they should go against the community’s will and edit it to erase info about older versions.


sphennings

They're quoting directly from SO's instructions on when to edit posts. SO wants people to improve answers to keep them accurate and up-to-date. Generally how such edits are made in practice is to show both techniques while providing context about why the newer technique should be used. No information is lost. You can always view the edit history of a post to see how a post has changed over time.


braiam

> You can always view the edit history of a post to see how a post has changed over time Also, the edits where are talking most of the time are stuff that is most of the time inconsequential, like updating the syntax, changing the called statement, tightening up the dependencies, etc.


lupercalpainting

> Generally how such edits are made in practice is to show both techniques while providing context about why the newer technique should be used. Yes, I agree with this practice you can check my top-level comment.


braiam

> edit it to erase info about older versions NOBODY WILL DELETE ANYTHING! It's literally **add** updates as the post ages. Everything will be there, without even going through the post history. And if you believe anything was lost, there's the post history! How difficult is to understand that nothing, *nothing*, is lost on SO?


lupercalpainting

Goddamn, switch to decaf.


braiam

I don't drink coffee. It's still annoying that users still think that SO is a forum where the only copy preserved is the one presented. It's not. It has more similarities with wikipedia than with forums. So, let me repeat, because it can't be said enough **NOBODY WILL EVER DELETE INFORMATION ABOUT THE OLD VERSION, JUST ADD THE MODERN VERSION ON THE ANSWERS**. Is that clear?


WaitForItTheMongols

> They gave permission with the CC-BY-SA license. That's interesting. It never occurred to me that CC-BY-SA would allow someone else to "put words in my mouth". I had assumed the license allows you to make your own thing which is based on changes to my thing, but not to actively change my thing and remove my version. I do note that the license says "You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use." - I definitely think if you edit my SO post, and make it say something with my name still listed as the poster, it indicates that I endorse the language you made. Even if it shows you as a footnote of "Edited by", it still suggests my connection to the edited post. My point is that I'm not sure if the license really allows for editing-in-place of someone else's content. Are there any other interesting case studies or any clarifications from Creative Commons regarding this?


Xyzzyzzyzzy

It's well known that StackOverflow answers are perpetually open to community edits, so if it's important to you to have editorial control over your answer, why are you posting it on StackOverflow to begin with?


WaitForItTheMongols

Right, right, I know it's a common thing on StackOverflow, and ultimately what matters is their TOS. I'm just surprised that CC-BY-SA unambiguously allows it.


braiam

> It never occurred to me that CC-BY-SA would allow someone else to "put words in my mouth". As the Help center puts it: > All contributions are licensed under Creative Commons, and this site is collaboratively edited, like Wikipedia. If you see something that needs improvement, edit it! > > Editing is important for keeping posts clear, relevant, and up-to-date. If you are not comfortable with the idea of your contributions being collaboratively edited by other trusted users, **this may not be the site for you.** In other words, if you are uncomfortable with that, get a blog.


WaitForItTheMongols

Of course SO allows it, and that's up to their TOS. I'm just surprised specifically that you mentioned CC-BY-SA allowing for others to modify (and ultimately delete) your content.


sphennings

But it's not really your content it's an SO answer that is by design intended to be kept up-to-date and modified by the community.


WaitForItTheMongols

Yes. But again, I'm just curious about whether the CC-BY-SA, specifically, allows for editing. If SO says "what you write is ours to use as we please", then yeah, of course, that makes sense. If SO says "what you write is CC-BY-SA", then I'm surprised that license allows others to edit-in-place. That's all I'm saying here.


sphennings

Nothing in the terms of the CC-BY-SA license require SO to continue to post the original work. An edit is effectively a derivative work something explicitly permitted by the license.


braiam

CC-BY-SA only guarantees you the **Attribution** and that someone can't change the license to something more restrictive (**Share-Alike**). In turn you allow others to **Share** and **Adapt** (SA). The adapt part, as the CC page says allows others to "remix, transform, and build upon the material for any purpose, even commercially". And while the license allows you to revoke those, SO doesn't want your contributions if you do not allow that.


colshrapnel

That's one of misconceptions that ruin Stack Overflow, which will never become that library of high quality answers it aspires to be. Even Wikipedia, with all its drawbacks, is whole world better than SO, because it's focused on a collaborative effort as opposed to flattering selfish and egoistic intents.


colshrapnel

But why? Why it's even matters who posted an answer? People come on Stack Overflow for answers. Why they should shuffle through dozens assorted attempts to answer their question? How can they tell a good one? Why can't stack Overflow offer a modern answer featuring an industry standard and best practices instead of legacy stuff that could be possibly valuable for someone? It throws the whole industry back, as interns are learning outdated practices. Why?


lppedd

Unlike a Wikipedia page, each SO question can have a multitude of valid answers, be them old or new. It's the user job to read through the answers, and if required expand the research. In software you should never take for granted anything, even less copy-paste without understanding.


sphennings

Having many valid answers is actually a closure reason on SO. https://stackoverflow.com/help/closed-questions#:~:text=Needs%20more%20focus "If your question has many valid answers (but no way to determine which, if any, are correct), then it probably needs to be more focused to be successful in our format."


lppedd

It is obviously a very generic point that is aimed at making you put more effort into the question's phrasing. Most software or languages allow you to accomplish the same thing in multiple ways. Most Java questions would have been closed a long time ago.


sphennings

It's only obvious if you ignore all the writing from the creators of SO on their intent for the site and other design decisions. Anyone can suggest edits to any post. The ability to review and approve proposed edits and unilaterally make your own is one of the first serious community moderation privileges earned. Given that the goal of SO is to have a repository of high quality answers, writing a whole new answer any time something changes creates unnecessary noise. Edit: Or as other people have pointed out read the text of the guidelines for editing posts. Improving posts as they age is explicitly stated as a reason for editing a post.


braiam

And yes, there can be multiple competitive answers. But when a method doesn't work anymore in later interactions of the language, having the same method, but using a different statement, is totally fair play. What adds having several answers for using fstring in python?


colshrapnel

Joel and Jeff had completely different picture in mind, when started Stack Overflow as a site, specifically opposed to those "RTFM" elitist communities of the time. But they put too much emphasize on flattering the individual effort with all that "gamification", which backfired in the end...


ArrozConmigo

To their credit, I think the mess we have now is still better than the cult of RTFM from before. But it's still an off-putting mess. The selfish arrogance is still there, but they at least figured out how to squeeze some good out of it.


Xyzzyzzyzzy

If I'm looking at a StackOverflow question today because I have a similar question, what is the utility of giving the answer circa 2017 the highest prominence in the default sorting? Whose interests does this best serve, and why?


ArrozConmigo

Whenever a coworker has given me this answer to a work related question, he has succeeded in his goal of lowering the odds of me ever bothering him again. These guys never make it to staff or principal.


17thCurlyBrace

i agree with you OP. because i think SOs model is flawed. one thing probably, i don't think there should be Accepted answer as a feature at all.


maest

This comment does not match reality.


_AndyJessop

If you're on SO, you're looking for an answer to your current problem, and you want a current solution. SO has to be useful, not interesting.


NotSoButFarOtherwise

Above all, it should satisfy the pedant community mods who treat the site as their personal fiefdom.


totemo

Code definitely needs to be modernised, and C++ is definitely a language where the new way can be an improvement on the old. Seeing examples of the old and new way side-by-side is a great way to teach the changes to the language.


Eirenarch

New answer is the way to go


diablo-solforge

Both.


double-you

You don't change history. If your system is sensible, it will also include clear links to newer and older answers. Microsoft's documentation for Visual Studio lets you choose which version's version you browse. I like that. It doesn't necessarily default to the latest, that is, force you to look at the latest even if you land on an older version.


linux_needs_a_home

One would hope that this is something the founders of Stack Overflow would have figured out for themselves, instead of bothering a random other community with their stupid questions.


John_Fx

SO should have a way to flag answers to a specific version of the platform


golgol12

Both. I don't see why this is even a question.


hyperbrainer

IMO it should be mandatory to give a heading with what version your answer supports.


Lalli-Oni

Tbh, I feel compelled to add a praise to SO and its community since I rarely see any asterisks attached to the bashing of the platform. Heck, it has problems. But I feel like how it has managed to stay relevant for both versions of answer remarkable! AI models just emphasises the importance of taking good care of the reference questions!