Are developers a stakeholder in a system

Question: Are developers of a product considered stakeholders?
Comment: Maybe... it might depend on the system.
Comment: Stackholder as in responsible for failures. Not as in one who benefits from the success monetarily.;)
Comment: "Stakeholder" is kinda Newspeak for "Someone who things they should have a say, but have no legal right to it."  What **is** the real question, we wonder?
Comment: Depends on the system.
Comment: Please specify if you mean specifically "stakeholder" as defined by **scrum** or if you are just using the term in a general sense? The answer is completely different based on this context.
Comment: Yes, developers are stakeholders. They are pigs. Most other stakeholders are chickens. [link](https://en.wikipedia.org/wiki/The_Chicken_and_the_Pig)
Answer: Generally, yes, developers are stakeholders on a software project. That's consistent with the dictionary definition of the term. Here are a few definitions of stakeholder, from various publications:
Karl Wieger's Software Requirements:

stakeholder A person, group, or organization that is actively involved in a project, is affected by its outcome, or can influence its outcome.

Ian Sommverville's Software Engineering 8:

The term stakeholder is used to refer to any person or group who will be affected by the system, directly or indirectly. Stakeholders include end-users who interact with the system and everyone else in an organisation that may be affected by its installation. Other system stakeholders may be engineers who are developing or maintaining related systems, business managers, domain experts, and trade union representatives.

Roger S. Pressman's Software Engineering: A Practitioner's Approach (6th Edition) defines five groups or stakeholders: senior managers who define business issues, project/technical managers who organize and control the practitioners, the practitioners who engineer the system, customers who specify the requirements for the software, and end-users who will interact with the delivered system.
Scott Ambler's Active Stakeholder Participation: An Agile Best Practice:

My definition of a project stakeholder is anyone who is a direct user,
  indirect user, manager of users, senior manager, operations staff
  member, the "gold owner" who funds the project, support (help desk)
  staff member, auditors, your program/portfolio manager, developers
  working on other systems that integrate or interact with the one under
  development, or maintenance professionals potentially affected by the
  development and/or deployment of a software project.
...
In this definition I have chosen to exclude the developers who are
  working on the project.  This may seem strange at first because
  developers clearly have an important stake in the projects that they
  work on.  Yes, developers are definitely project stakeholders.  Why do
  I continue to distinguish between developers and project stakeholders?
  Because I want convenient terms to distinguish them, I really don't
  like "developer stakeholder" and "non-developer stakeholder", and
  because they have different roles to play on a project.

In practice, I've typically seen stakeholders broken down into groups, and one group contains the people building the system. It is important to recognize that, when building a system, the developers do have needs and concerns that need to be balanced with the needs of everyone else. However, these need to be prioritized and taken into consideration with every other need.
Answer: If this is being asked in relation to Scrum then no...

...definition of a project stakeholder
  is anyone who is a direct user,
  indirect user, manager of users,
  senior manager, operations staff
  member, the "gold owner" who funds the
  project, support (help desk) staff
  member, auditors, your
  program/portfolio manager, developers
  working on other systems that
  integrate or interact with the one
  under development, or maintenance
  professionals potentially affected by
  the development and/or deployment of a
  software project...

Stakeholders are individuals external to the current product development team in one form or another. If you are on team X and another developer is on team Y and you are working on differing products which interact with each other at a later point in time then you become a stakeholder in each others product.
Comment: @Jim I don't agree with the fact that developers within the direct team are stakeholders. The whole idea is that stakeholders prioritize the backlog, stakeholders appear at the sprint review meeting, stakeholders make decisions about the project outside of the coding approach, etc... The developers within the direct team working on the project by the above mentioned items are not stakeholders. Are they part of the overall team be it Scrum or some other methodology? Yes; but stakeholders they are not. The pig and chicken fable is about commitment to the project...not being a stakeholder.
Comment: -1. You missed "Yes, developers are definitely project stakeholders".
Comment: I'm just pointing out that you're citing someone to support your position who would not agree with your position. For the purposes of that discussion, he's using "Stakeholders" in the narrow sense, but also says that he considers the concept to normally encompass the developers as well. Why cite someone who disagrees with you to make a point? You're better off stating your point of view without reference and letting it stand on merit of your own arguments.
Comment: @Jim I quoted what was relevant and gave credit to the source. Surely you wouldn't expect me to cite a passage in a novel yet expect that everything within the novel was relevant to my citing? Same idea.
Comment: Alright then, I guess I can buy that. Sometimes folks cite others without reading the whole thing. I made a whitespace edit so I could pull the downvote off.
Comment: PLEASE PLEASE correct your answer to refer to "Scrum" **NOT** "Agile" ! The idea that these are synonymous is a misnomer that just won't die and it drives me nuts! Not all agile methodologies have "Stakeholder" roles! In the sense of scrum your answer is correct though. (but in the sense of agile per the manifesto your answer doesn't make any sense at all)
Comment: @JimmyHoffa Fair enough, edited.
Answer: Usually no, but there can be exceptions.  "Eating your own dog food" comes to mind as the main exception as in this case the developers may be using what they build directly and thus they are stakeholders to some extent.  However, I'd question if this was more than a few percent of developers overall though.
Comment: Stakeholders != Users.
Answer: Yes - for a system that will live on and be maintained. Developers are likely to work with the code to fix bugs and introduce new features long after the initial team closed the project. An important requirement for long lived systems are maintainability and who should put their stakes in this if not developers?
Answer: After a bit of googling, I must say that this is an unanswerable question. There is no one definition of a stakeholder and different sources use it differently.
As the Scott Ambler reference by Aaron points out, more than one methodology avoids the term altogether. Others try to break it down into different categories of stakeholders. The result is that while there's a general meaning that stakeholder is "someone with interest", the precise meaning is lost.
What that interest is comes down to one of two meanings in my mind:

Those who expect to derive primary value from the application

or

Those who will invest in the outcome of the project.

The sponsorship body fits either definition. How end users fit into the sponsorship body is another topic entirely. For now, lets assume they do fit in because I'm not willing to split hairs on it.
Anyone on the project team fits the second meaning as well.
In the end what matters is that value is derived from our applications and we understand that the sponsors get the final word.
My general feeling is that people who want to lump in developers into the "Stakeholders" group largely care because they have seen situations where developers are treated as cogs in a machine and often treated poorly as a result. Feedback on requirements is not allowed, significant unpaid overtime is mandatory, etc. Because you're giving up time and sanity above what should be expected, there are people inclined to see that as an investment. Investment = stake so in their minds the development team are stakeholders.
As a result, I'm not a fan of the term. "Sponsors" is clear. "Stakeholders" is not.
Answer: I'll answer this question from a different point of view.
In every project I worked on, not treating the needs of developers, testers, help desk, operations the same way as the needs of users of the system, with the same process for prioritization and refinement, resulted in half-assed, difficult to maintain, to operate and to support products, with unhappy users, regardless of how well other processes were performed.
Therefore, if you want an outcome that makes users and their managers happy, you need to consider developers, testers and all other technical personel stakeholders, and give them the same treatment you give to any other stakeholder. The same way there's more to a car than the engine, the drivetrain and the wheels, a software system needs a lot of supporting components, besides the business logic implementation. These components are what the technical personel needs, in order to make the system run in production. There's no way to properly manage the development of those parts unless you consider the people using them stakeholders too. If you don't, you get the equivalent of a 1800s steam powered vehicle, not a modern car.
Answer: They may be. If their postion after the product is finished will be different than before, they are a stakeholder. For instance, if a developer is paid a salary to develop software for a company, chances are he is not a stakeholder because nothing will change afer the product is delivered. However, if he is a partner in a startup, where his financial position depends on the product being successful, I would argue that he is a stakeholder.
Another example would be the (admittedly rare) case of a developer making software that he will use. In that case, he definately is a stakeholder because he has a vested interest in having that software work correctly.
Answer: Developers are indeed stakeholders (affected by what is produced): both those who initially develop a system, and those who maintain it. The former tend to be interested in new technologies and increasing their skill base, whereas the latter want to be able to keep up with the usually large number of systems they have to maintain.
However, 'legitimate' stakeholders is another question. When balancing requirements, all stakeholders are certainly not going to find their concerns addressed to their satisfaction. Is your company worried about losing top developers? Bump up developer concerns. If not, developers tend to end up fairly low on the totem pole. Unfortunately, this can have the effect of ignoring maintainability as well, building up technical debt like there's no tomorrow.
Answer: No, they're not.
Stakeholder: A person or organization that may be affected by the success or failure of a project or organization
Source: http://www.site.uottawa.ca:4321/oose/index.html#stakeholder
Comment: What? So you're saying that if the programmer creates crappy software and as a result the company that sells the software cannot survive, that the programmer would not care?
Comment: If I lose my job as a result of the project failing, I'm guessing I'm affected. If I'm the one working 60+ a week, I'm affected. Please clarify your definition of affected.
Comment: Developers are among those most affected by the success or failure of the project.  Personal stress, corporate status, current and future employment -- all these and more are affected by the progress and outcome of the project.
Comment: @Klaus - I think it assumes a basic level of professionalism, that is he won't produce crappy software.
Comment: By that definition, considering the chicken and pig fable, developers, who are archetypal pigs, are definitely stakeholders.
Answer: Basically, a Stakeholder is an individual or organization or, put it simply,
"is an entity which is having good/bad influence on the project completion".
Stakeholders are very important in project accomplishment. Stakeholders may be a client, usergroup, project manager, project leader or coordinator.
You have to satisfy expectations of stakeholders in project completion.
Answer: I think it depends on the project.
A stake holder includes anyone who has a stake or interest in what the system does because then they will have some requirements to say what it should do. Therefore I wouldn't include developers in a project where the code is simply pushed out the door and forgotten but would include them if they are supporting the project or extending it as it is then the developers require the system to be maintainable/extendable.


Problem, when I redraw on a grease pencil layer new strokes doesn't appear above old stroke

Question: I'm trying to remake a grease pencil file and I forgot one little shading detail on the body part. I then went back to add the shading on said layer but it appears under it instead of over it. How can I fix this? See the images below. I'm 100% positive it is on the same layer.
Answer: Enter Edit Strokes mode, and in tool panel you will find this menu:

It orders selected strokes inside layer.
Comment: Is it possible to update this answer for 2.8? I'm a bit of a noob but as far as I know semantic 'layers' are now 'collections' and most menus are moved around
Answer: My scenario is a bit different as I am not using grease pencil for anything except annotation, but I had a very similar problem
I am working in 2.8 and for me it worked to press n as suggested here; instead of it saying anything about 'grease pencil', at the bottom of the 'view' tab there was an 'Annotations' drop-down.
In the drop-down was my existing annotation layer, if I added a new layer above the existing and drew on that everything stayed intact with my original annotation. Hurrah!
I would imagine that for your specific scenario (whilst working in 2.8) a better reference would be the blender docs here, but this is only if you can enter into edit mode on your grease pencil lines, which I couldn't because they belonged to the edit mode context of an object for me.


How can you explain a concept that resembles magic, but with science?

Question: We are making a game, and we want to add a potion/magic mechanic to it, but keep it consistent with the lore (1787ish) and fairly realistic. Does anyone have any ideas on how to do it?
Comment: *"[Any sufficiently advanced technology is indistinguishable from magic](https://en.wikipedia.org/wiki/Clarke%27s_three_laws)"* (Arthur C. Clarke).
Comment: How "magical" you want this mechanic to be? Anything sort of raising the dead? Magical healing (or just accelerated healing)? Monstrous strength? Fairly realistic is not defining enough, and as it is now it's too broad.
Comment: Is your magic limited to drinking potions or can they also be thrown or are there other forms of magic? We need a lot more details.
Comment: Welcome to the site. Please note that the [tag:magic] tag specifically mentions that constraints and limitations of your magic need to be defined in your question. You can add this in via an [edit]. As is, this question is too opinion-based or broad to be reasonably answerable and is likely to be put on hold until such clarification is provided.
Answer: Alchemy.
Alchemists believed they could change a metal into another, dissolve them, cure every sickness, prolong life or even expand their conscience. Well, maybe they did achieve that last one with opium or the fumes from boiling mercury.
Even Newton believed in Alchemy. From Wikipedia:

In his Hypothesis of Light of 1675, Newton posited the existence of
  the ether to transmit forces between particles. The contact with the
  theosophist Henry More, revived his interest in alchemy.[50] He
  replaced the ether with occult forces based on Hermetic ideas of
  attraction and repulsion between particles. John Maynard Keynes, who
  acquired many of Newton's writings on alchemy, stated that "Newton was
  not the first of the age of reason: He was the last of the
  magicians."[51] Newton's interest in alchemy cannot be isolated from
  his contributions to science.[50] This was at a time when there was no
  clear distinction between alchemy and science. Had he not relied on
  the occult idea of action at a distance, across a vacuum, he might not
  have developed his theory of gravity.
Answer: You are being rather vague; I don't know what "consistent with the lore of 1787" might mean.
Many realistic things, like radio transmission, magnetic effects (and especially electromagnetic effects in which the field can be switched on and off), remote hearing (what 'telephony' means), remote viewing (what 'television' literally means), a self-moving machine ('auto-mobile') and so on would be considered magic in earlier ages. Music from a cell phone would be considered magic.
added: As far as a potion is concerned; something like an oral antibiotic to cure an infection, or a hallucinogenic like LSD, or a knockout drug could be considered 'magical'. Drink it and you pass out for twelve hours, but wake up rested without any hangover or other ill effects. Heck, even an oral topical anesthetic to "cure" a toothache might be considered a magic; just the ache returns when the magic wears off. Most pills could be dissolved in liquid to make "potions", how about nitroglycerin to alleviate chest pains? Concentrated aspirin (salicylic acid) to relieve other aches and pains?
Again, if you can be more specific about the magic component you wish to introduce, we might be able to help you more; I will revise this answer.
Answer: If you were a real pedant, you would read Newton, then Lavoisier and the scientists of that era (there were many), then jump off from them.  Some of the second string crew had some cool ideas - I stumbled into Marat's experiments on the nature of fire but I had trouble finding them in full text - link please anyone who can.   Often the original works contain their own speculations which are perfect for your needs but dead wrong, and so these bits do not make it into the modern summaries.  Some of this stuff is hard to find on line.  The thing is that it would take a lot of reading time but for a game, your audience (unfamiliar with these works) would not appreciate how true you were being to the 1787 scientific vibe and how much reading it took to get you there.  Probably this path would be better for a novel where the readers would include aficionados who would be thrilled at correct references and would notify others of their ilk.
A shortcut for you would be to jump off from Jules Verne - 50 years later than you want but no matter.  I greatly suspect that most steampunk writers read Verne and Wells and take it from there in a similar vein.  Nothing wrong with that, and you can find all the works of both men on line.
I suspect that you might want a third and even quicker route: to have someone here familiar with path 1 or path 2 provide you with what you need to build your game.  That is a fine thing for the world building site but you need to be more specific as to what this magic will do.  There is lots of kinds of magic people have made up.
Comment: Definitely the original scientific literature of the time is full of interesting stuff. And, alas, difficult to access & would be underappreciated as the real deal.  Sadly, I greatly suspect that most steampunk writers *do not* read Verne and Wells, because if they did steampunk would be more interesting reading.
Answer: Microorganisms are an invisible force of nature that directly interfere with the lives of human beings in a myriad ways.
Depending on the setting you could explain what's happening using microorganisms, bio-engineered, natural or otherwise.
You couldn't shoot fireballs with them, but curses, hallucinations, mind-altering, curing diseases, physical changes and some light transmutations are possible within the limits of the setting.


Issues if insurance is not compulsory for population

Question: So I remember this in my Econ 101 course thing.. eg. If all cars are legally required to be insured, insurers work off a population statistic to calculate cost of crashes/ individual issues (population statistics are public). If insurance is not compulsory, worse drivers insure, better ones don't, then insurers can't price off the population statistic because they only have a sample statistic (not public) of worse drivers on their books. I believe this was called the 'pooling problem' in my lecture, but sadly google comes up with entirely different ideas for that search! Please enlighten me! :) (if possible, some links to theory would be great, thanks!)
Comment: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=76452
Comment: https://www.americanprogress.org/issues/healthcare/news/2008/12/23/5259/an-unhealthy-individual-health-insurance-market/
Comment: http://hir.harvard.edu/article/?a=2313
Answer: If insurance is not compulsory for all drivers there can be a case where the affected parties are unable to be compensated when an accident happens. In that case those affected by the accident wont have the means by which they can have their property replaced.
Insurance provides a service which guarantees a certain level of wealth for a party who is insured. Without insurance sub optimal transactions can take place making everyone worse off. This can be illustrated via an abstracted example.
Example
 1. Party A has wealth of \$50 and Party B has a wealth of \$100 and all their wealth is stored in their cars.
 2. Party A and Party B both get into a car accident.
 3. Party A destroys Party B's Car and legally owes Party B \$100
 4. without insurance Party A is unable to compensate Party B and loses all his income.
This whole issue can be avoided via the purchase of car insurance. So the law requiring all drivers to have insurance actually leads to a net increase in welfare for all involved  because it allows legally required transactions to take place.
Comment: But consider if you don't have medical insurance and are injured in, say, a mass shooting.  Hospitals will be compelled to treat you regardless, but they won't be able to collect from poor you, and so the costs must be passed along to other users of the hospital.
Comment: @HotLicks yeah. Basically insurance allows for legally necessary or otherwise required transactions to take place.


What features would you like to see in Blog Overflow?

Question: I like the StackOverflow interface so much I am now disappointed when I go to a blog and cannot vote up or down groups of comments. It bugs me even more when I go to https://blog.stackoverflow.com or Coding Horror and the site just seem off. I am hoping that Jeff and Joel hire someone like they did for Stack Exchange and adapt the engine for blogging.
Comment: related feature request: http://meta.stackexchange.com/questions/18348/power-the-blog-content-and-discussion-with-meta-instead-of-wordpress
Answer: Voting is clearly important, but I'd also love to be able to use markdown, particularly for coding blogs.
Comment: I've been using LiveWriter and writing code in VS or SnippetCompiler then inserting via a code plugin that also does syntax highlighting.  I find this actually easier than using markdown for blogging, primarily because I want to make sure the code works anyway before posting it.
Comment: @tvanfosson: I use LiveWriter and my own formatter, but I *constantly* miss markdown. Obviously I'd want to test any big bits of code, but just formatting a couple of lines, markdown's a heck of a lot simpler.
Comment: I hate it when my blog post content contains anything non-semantic like hundreds of little styling tips for code, I find the javascript based highlighter work fantastically, and ended up using one of those on my blog
Answer: When I blog, it typically takes a little while to phrase it (especially if I need to add attachments). I suspect you'd need pending posts (visible to the author only) that you can edit incrementally before finally publishing it.
If you wanted to get fancy, delayed publish so you can blog while on holiday ;-p
Answer: My number one request would be for having groups of comments be like an answer and be able to vote up and down the comment.
Answer: Attachments (here|here) - or at least, a simplified process for doing an upload+link in a single operation.
Answer: I'd like the syntax highlighting to be smarter, particularly I'd like it to be language aware and let me choose from various languages so that keywords, etc. are highlighted better.  For example I'd like to be able to choose to highlight some parts of the entry as HTML, C#, or Javascript or mixed (MVC views, for instance).
Answer: Ideally, this would be a WordPress plugin which supported both threaded comments and comment voting.  In a perfect world, it'd even support point-based reputation that gave commenters increased moderation abilities.
Anyone could just drop the plugin into their WordPress, and automatically get SO-style comment voting/threading/moderation.
Markdown could be offered as a separate WordPress plugin...  in fact, I think one's already available:
http://michelf.com/projects/php-markdown/


How to build Emacs from sources on Termux

Question: Background: Termux is a Linux terminal environment that runs under Android. It provides a terminal version of Emacs 25.3.
However, I would like to build Emacs directly from the master branch in the archive. However, I have stumbled on two problems:
1) The emacs build recipe for termux patches a number of files. I will need to apply those patches as well.
2) When running autoconf.sh (to generate the configure script), I get a number of errors. (I can't copy-paste from the android device, unfortunately). When running autoreconf -fi -I m4 the following is emitted:
/PATH/TO/bin/m4: m4_syscmd subprocess failed
configure.ac:5191: error: expected source file, required through AC_LIBSOURCES, not found
m4/gnulib-comp.m4:177:gl_INIT is expanded from...
configure.ac:5191: the top level
autom4te: /PATH/TO/bin/m4 failed with exit status 1
...

Does anybody has a step by step description on how to build Emacs from source on Termux? Alternatively, do you have any suggestion on how I should modify the build scripts myself so that they get the latest version rather than a specific one? (The build scripts downloads the sources as a tar.gz file, presumably with a pre-generated configure file, so a great help would be if someone would provide the latest sources the same way.)
Answer: Latest source tarball is available from
https://hydra.nixos.org/job/gnu/emacs-trunk/tarball/latest
Comment: Thanks, this is just what I need! I'll try to build Emacs on termux and get back with a full recipe.


short story about people from the future who think sci fi writers from the 50's were psychic

Question: What's that story about the prescient writers? It's a science fiction story ABOUT science fiction writers. It features people from the future who think sci fi writers from the 50's were psychic and they travel back in time to try to get a writer to describe the workings of a space ship or something? Does this ring a bell for anyone? It's driving me crazy!
Comment: Sounds like "Who's Cribbing," but in reverse.
Comment: @Lorendiac You might be thinking of [_Security Check_ by Arthur C. Clarke](https://scifi.stackexchange.com/q/144179/4495).
Comment: This suddenly reminds me of a short story I once read which had a *slightly* different premise (I think). I'll keep an eye on this and see what sort of answers you get. If all else fails, I'll start a new question about the one I remember. (Note: I also remember "Who's Cribbing," but that isn't the one I read 30 years ago.)
Comment: When did you read it?
Comment: There's a story by Ray Bradbury that is kiiiiinda similar, if that's what you're thinking of, but it's not that. I'm curious as to what other stories fit this description! I want to read them!
Comment: @Mr Lister -- Right the first time! That's the one I was reminded of. I'm amused to see that it actually predates the original "Star Trek" series by many years; I would have guessed otherwise.
Answer: "Waterspider", a novelette by Philip K. Dick, first published in If, January 1964, available at the Internet Archive.
Description from NESFA's Recursive Science Fiction site:

In the 21st century the Bureau of Emigration sends agents back to the 1954 World SF Convention to abduct Poul Anderson. They believe that the 20th century SF writers were precogs (even if they didn't know it themselves). They need Anderson to tell them how to solve their speed-of-light drive problem.

Excerpt from "Waterspider":

"I'll tell you something," Fermeti said. "We have a new tack." Now Tozzo's co-worker Craig Gilly had come sauntering up. To the two men, Fermeti said, "We're going to try using pre-cogs in obtaining our formula for re-entry." His eyes flickered as he saw their reaction.
Astonished, Gilly said, "But all the pre-cogs are dead. Destroyed by
Presidential order twenty years ago."
Tozzo, impressed, said, "He's going to dip back into the past to obtain a pre-cog. Isn't that right, Fermeti?"
"We will, yes," his superior said, nodding. "Back to the golden age of pre-cognition. The twentieth century."
For a moment Tozzo was puzzled. And then he remembered.
During the first half of the twentieth century so many pre-cogs — people with the ability to read the future — had come into existence that an organized guild had been formed with branches in Los Angeles, New York, San Francisco and Pennsylvania. This group of pre-cogs, all knowing one another, had put out a number of periodicals which had flourished for several decades. Boldly and openly, the members of the pre-cog guild had proclaimed in their writings their knowledge of the future. And yet — as a whole, their society had paid little attention to them.
Answer: It's probably less related than "Waterspider", but Star Trek: Deep Space Nine, season 6, episode 13 "Far Beyond the Stars" is what first came into my mind.
In said episode, in the 24th century the mind of Captain Benjamin Sisko somehow gets transported into Benny Russell, an African-American science fiction writer in 1950s New York City. He starts writing stories closely resembling the actual future, and his acquaintances react on a wide range of emotions.
Comment: By the way, the idea of somebody writing actual future events as science fiction stories was used in [Boucher's "Transfer Point"](https://scifi.stackexchange.com/questions/87776/undulating-ribbon-like-invaders-coming-in-through-the-vents). Also I guess you could describe the frame story of Stapledon's *Last and First Men* (and many others) that way.
Comment: Do you think that Deep Space Nine episode is the story the original poster was trying to remember?
Comment: Don't worry, I'm not trying to compete against your accepted (and admittedly great) answer. But as the OP mentions in his comment - " I'm curious as to what other stories fit this description! I want to read them!" -
So I figured my answer is still relevant, even if it's not the perfect answer. Do you disagree?
Comment: It's just that, on this site, only legitimate attempts to *answer the question* are supposed to be posted as *answers*; reading recommendations etc. should rather be posted as *comments*. B.U.É.K.!
Comment: And if "what other stories fit this description" had been posted as a *question* it would have been closed for being off-topic.


Does 'erase all content and settings' actually erase all data?

Question: I recently decided to sell two of my iPhone's (5 and 6s) and I used the 'erase all content and settings' option to wipe and factory reset my iPhone. Now, I'm a little concerned whether this is enough to prevent any data retrieval on my iPhone's and I was wondering if a simple reset in iPhone's settings can provide the same effects as that of an overwritten data? If not, what should I do? Is there a method for overwriting data on an iPhone as there is for macOS?
Answer: As long as you follow the steps provided by Apple to erase your iOS device, it will erase all data on the device.  A simple 'reset' of the device is not the same as 'erase all contents and settings'.
Follow these steps:

If you paired an Apple Watch with your iPhone, unpair your Apple Watch.
Back up your device.
Sign out of iCloud and the iTunes & App Store.

If you're using iOS 10.3 or later, tap Settings > [your name]. Scroll down and tap Sign Out. Enter your Apple ID password and tap Turn Off.
If you're using iOS 10.2 or earlier, tap Settings > iCloud > Sign Out. Tap Sign Out again, then tap Delete from My [device] and enter your Apple ID password. Then go to Settings > iTunes & App Store > Apple ID > Sign Out.

Go back to Settings and tap General > Reset > Erase All Content and Settings. If you turned on Find My iPhone, you might need to enter your Apple ID and password.
If asked for your device passcode or Restrictions passcode, enter it. Then tap Erase [device].
If you're switching to a non-Apple phone, deregister iMessage.
Contact your carrier for help transferring service to a new owner. If you aren't using a SIM card with your device, you can contact them to get help transferring service to the new owner.
Comment: Oddly enough a few times I have wiped some work-purchased and returned iPhones. These are phones with disabled SIM cards (Via AT&T) but after the reboot and going through the setup procedure there was a red dot over the phone.app icon indicating a number of voicemails were there. They did not exist on the phone and you couldn't make a call to retrieve them from AT&T and another trip through "erase all content and settings" did nothing. So god only knows what was going on, perhaps a bug in an older version of iOS but still damn strange.
Comment: Just to add onto this, yes it will erase all data effectively–you don't need to overwrite it or anything like that.
Comment: @EzekielElin Yes, isn't that what I indicated in my answer?


Where are the Act 1 lore books?

Question: What are the locations of the Act I lore books needed for the achievements A Quick Study, Taking Notes and Historian of Tristram?
Answer: I'm drawing a lot of this from diablowiki and a fantastic compilation thread; the rest from personal experience.

A Quick Study
Adria's Journal: Leah will drop this after you fight Captain Dalton in Adria's Cellar.
Lachdanan's Scroll (all parts): These drop from scribe's lecterns found throughout the cathedral.
Leah's Journal (all parts): All pages can be found in Leah's room on her desk.  New pages are activated as you progress through the quests.
Leoric's Journal (all parts): These can be found on pedestals in the Royal Crypts, Leoric's Manor, or the Hall's of Agony.
Farmer's Journal: In a satchel that spawns on the north end of the Fields of Misery (up a short flight of stairs - shares a spawn with Tinker's Hovel & Pillaged Home).
Scabbard of Talic the Defender: Spawns when doing the event on level 2 of the Watch Tower (Northern Highlands) - look for Vendel the Armorsmith.
Deckard Cain's Journal (all parts): Found in Deckard's home on his desk; the second part shows up after you start Sword of the Stranger.
Adenah's Jottings: Found in the House of Curios (Fields of Misery) near the bed.
Hermit's Ravings: Drops in a satchel that spawns somewhere in the Caverns of Araneae.
A Prisoner's Journal: Drops after you free Merhan in a random event found at the very end of the Halls of Agony (the large area just below the door to the Highlands).
Queen Asylla's Journal: In her cell, as you enter The Cursed Hold.
Scoundrel's Journal: In a satchel in the Fields of Misery near the trail to the Old Mill.
Kingsport Bill: Drops when you talk to the scoundrel about his origins.
Skeleton King: Drops when you kill him.
Wandering Tinker's Diary: Inside the Tinker's Hovel in the Fields of Misery.
Notes of Urik the Seer (all parts): Satchels found inside the Cave of the Moon Clan.
Priest's Contemplations: A satchel along the lower fork at the start of Wortham.  Both parts drop from the same spot, so you need to do the quest twice (or leave your game and resume).
Mira's Letter to Haedrig: Drops in a box near Haedrig's smithy.
The remaining books are all found in an Old Keepsake Box that spawns along Old Tristram Road or in The Old Ruins.  You will need to come back several times to get all the books:

Cain's Old Journal (all parts)
Gillian's Diary (all parts)
Lost Journal
Old Diary
Despina's Journal

Taking Notes
Report from Wortham: On a corpse in the courtyard that connects the Northern Highlands to Leoric's Hunting Grounds.
Command from Cultist Grand Inquisitor: On a Musty Lectern in the Halls of Agony.
Reply from Cultist Grand Inquisitor: Same as the command; you will probably need to come back to find the reply.
A Page From Lazarus's Grimoire: At the bottom of the Halls of Agony level 3, watch the cutscene about Queen Asylla.
Orders from Maghda: Drops from the horde of mobs just inside Leoric's Manor.
Villager's Journal: In the keepsake box in the ruins of Old Tristram (Patch 1.0.3).
A Summoner's Journal: In the Southern Highlands, to the right of the map, there will be a small set of stairs to a cultist chanting.  (Random spawn)

Historian of Tristram
The Hanging Tree: Drops after you trigger an event at a tree w/ people being hung (random spawn in the Weeping Hollow, and random chance to get the event, even if you find the tree).  A horde of skeletons will spawn after breaking the coffin if you have the correct spawn.
Gravedigger's Log: On a skeleton in the Cemetery of the Forsaken.
Tristram Fields: In the Fields of Misery, near the entrance.
Khazra Heads Wanted: In the Northern or Southern Highlands, on a corpse.
Researching the Khazra: In the Northern or Southern Highlands, on a corpse.
The Khazra Massacre: In the Northern or Southern Highlands, on a corpse.
The Highlands: In the Southern Highlands (in a lost chest)
Torn Letter: In the Caverns of Araneae in a satchel.
Torn Letter's Response: In the Caverns of Araneae in a satchel.
New Tristram: On the table just inside the The Slaughtered Calf Inn.
Traveler's Journal: Off of an adventurer's corpse along Old Tristram Road
Warriv's Journal: Off of Warriv's corpse along Old Tristram Road
Tomb Robber's Journal: On a corpse just inside the Crypt of the Ancients (in the Festering Woods)
The Last Stand of the Ancients: In the Festering Woods after completing this event.
The Drowned Temple: On a dead body just inside the temple.
Warrior's Rest: Just inside Warrior's Rest in the Festering Woods.
Old Tristram Journal: In an Old Keepsake Box (same one mentioned for A Quick Study above)
Comment: 7k views and only 4 upvotes. Gosh!
Comment: Warriv's corpse is found on bed near a caravan with a fire. Spawns in the 2nd area of Old Tristiam Road between Old Ruins and the 1st area you enter directly after leaving New Tristiam.
Comment: As of [patch 1.0.3](http://us.battle.net/d3/en/blog/6457499/6457499#bugfixes), the Villager's Journal can now be found in the keepsake box in the ruins of Old Tristram.
Comment: Confirmed the Villager's Journal is in the keepsake box in the ruins of Old Tristram. Also, the Lyceum has now been fixed and has spawned numerous times for me.
Comment: Are any of these locked in Adventuring mode or is my luck with the Hanging Tree event just that bad?

Where are the Act 1 lore books?


Is there a way to use the brush that stays within the borders of a layer? (Photoshop CC 2015)

Question: My layer has a transparent background and has irregular borders and I want to use a brush that stays within the borders of the layer (So when I "color in" parts of the layer, the pre-existing shape is still intact but has color on the inside). I'm still learning how to use everything so any help would be very much appreciated!
Answer: If I understand you correct, you want to use "Lock Transparent Pixels". First click on the layer you want to colour. Then look above all the layers and you will see "Lock:" with a little checkered icon. Click the icon. Now when you use your brush it will only paint on the existing pixels, not the transparent area.


I dropped my phone in water and now the screen isnt working - i cant remove the battery

Question: So my Phone is a "Alcatel" and i honestly didnt know what type it is. Yesterday night. I accidentally dropped in into my running bath water, being clumsy. i quickly grabbed it and attempted to dry it off. At first it was fine and The microphone and camera wasnt working so i thought it would be okay (Ive dropped my phone in water before). SO i set it down, About maybe 2 minutes later I went to check my phone that i had plugged into my charger to see the screen not working. I could see and turn it on but the screen itself isn't working. Then next thing i know my phone died, which scared me becouse it was at 25%. I turned it off and put it in a bowl of rice, ive only checked it once sense then. I dont know what to do, im scared i damaged my phone
Comment: Time for a new phone. They don't get along with water very well.
Answer: The first thing you should do when dropping a phone into water is switch it off immediately and make sure it's completely dry before turning it on again. Keep it inside a case of rice so that the rice can soak all the moisture from the phone. Keep it inside for a day or so and try turning it back.
So try doing it now and hope it works else you'll need a new phone.
Answer: You can try very carefully measuring your battery terminals + & -. If it experienced a short you may be able to observe <3.6V meaning the phone won't power until it see's what it wants (typically 3.7V / 3.8V). A faulty battery is the best case scenario but it sounds like the electronics may be damaged from your description.


Limitations on  character in Fix Message

Question: In Fix message, <SOH> character is used as a delimiter between [tag=value] groups, Is there a problem if I used more than one <SOH> character in the FIX message ?.
i.e:
tag=value<SOH><SOH><SOH>tag=value

8=FIX.4.2<SOH>9=153<SOH>35=D<SOH><SOH><SOH>49=BLP

Answer: What you are proposing is not valid FIX.
Sure, some libraries might allow it, but others will (properly) reject it.
Why spend effort doing it wrong?  Just do it right.
Or better yet, don't build it at all.  Use one of the pre-existing open-source FIX engines that are already trusted by developers worldwide.
Answer: Depends on the FIX library handling the parsing. But this seems a very trivial problem, which almost all libraries might be handling without any problems.. But why would you do it ? The more the library spends computational power on parsing for no apparent gain, you will slow down it's efficiency.

Limitations on  character in Fix Message


How to configure dynamically cakephp applications with nginx?

Question: My problem is: I'm trying to configure a nginx with multiple cakephp applications (that will be added and removed from time to time). And I want to this configuration to be dynamic (if the subdirectory exists, then it will be loaded as a cakephp application, if not, 404).
But the thing is: I cannot configure the nginx to serve correctly the root for each application (i do not want to put every location on my conf file).
Ex:
/var/www/cakephp1 + /app/webroot/ Will be served as: www.mydomain.com/cakephp1
/var/www/cakephp2 + /app/webroot/ Will be served as: www.mydomain.com/cakephp2

I know how to make a configuration to run a single app. Any ideas how to achieve this? With dynamic configuration?
Answer: You can use try_files for this easily. If you match anything in your location directive, you can reuse any part of the matching group in your try_files directives to try multiple locations. Also, you can use things such as $http_host to compose a different app root.


Winternitz-OTS+ with Poly1305

Question: Would it be safe to implement Winternitz OTS+ using Poly1305 as a parameterized MAC? It's very fast and apparently very secure but with the caveat that keys cannot be used more than once, which is fine for this application. Does anyone know if Poly1305 has any features that differ from a normal HMAC that would make it unsafe for this application?
Answer: The requirement of the function in Winternitz OTS+ is a pseudorandom function family, or PRF: a family of functions $F_K\colon \{0,1\}^n \to \{0,1\}^m$ such that if $K$ is uniformly distributed in all $k$-bit strings, then $F_K$ is indistinguishable from a uniform random choice of function $U\colon \{0,1\}^n \to \{0,1\}^m$.  Specifically, the best known random algorithm $A(G)$ taking a function $G\colon \{0,1\}^n \to \{0,1\}^m$ to a true/false value and having a plausible computational cost has a negligible PRF advantage, $$\operatorname{Adv}^F_{\mathrm{PRF}}(A) = |\Pr[A(F_K) = 1] - \Pr[A(G) = 1]|,$$ which compares the probability that $A$ returns true for $F_K$ under uniform random distribution on $K$ to the probability that $A$ returns true for a uniform random function $U$.
Poly1305 is a one-time message authentication code, or one-time authenticator/MAC: a family of functions $H_K\colon \{0,1\}^n \to \{0,1\}^t$ such that if $K$ is uniform random, then given up to a single message $M$ and its authentication tag $T = H_K(M)$, an adversary has no hope of finding another message $M'$ and authentication tag $T'$ such that $T' = H_K(M')$—it resists forgery after a single message.  That is, the forgery probability for a random algorithm $A(M, T)$ giving $(M', T')$, namely $\Pr[M' \ne M, H_K(M') = T']$, is negligible.
A PRF makes a passable MAC, even a one-time MAC, although as you note Poly1305 is a much more efficient one-time MAC than a PRF.  However, a one-time MAC does not make a passable PRF.  Why not?  The adversary's algorithm $A$ in the notion of PRF advantage is allowed to call the function more than once.
To make this concrete, consider the secure one-time MAC $H_K(M)$ for $K = (K_0, K_1) \in \operatorname{GF}(2^{128}) \times \operatorname{GF}(2^{128})$ and $M \in \operatorname{GF}(2^{128})$ defined by $$H_{K_0, K_1}(M) = K_0 M + K_1.$$  (This is essentially GHASH, of AES-GCM, limited to one message block, which is a polynomial evaluation MAC much like Poly1305.  We can naturally interpret any 128-bit string as an element of $\operatorname{GF}(2^{128})$ given a choice of irreducible degree-128 binary polynomial like the standard GHASH one.)
How do we define the algorithm $A$ to distinguish $H_K$ from $U$?  We can first compute $T = K_0 M + K_1$ and $T' = K_0 M' + K_1$ by evaluating the putative $H_K$ on two different inputs, and then solve for $K_0$ and $K_1$ using secondary school algebra.  Then we can immediately distinguish $H_K$ from a uniform random function $U$ with high probability by computing the candidate function on $M''$ and checking whether we get $K_0 M'' + K_1$: with high probability, a uniform random function will give something else.
Actually, Winternitz OTS+ requires a slightly weaker notion than pseudorandom function family, namely key one-wayness: for uniform random key $K$ and input $X$, letting $Y = F_K(X)$, the success probability of the best known algorithm $A(X, Y)$ for recovering the key (or an equivalent), $$\operatorname{Adv}^F_{\mathrm{KOW}}(A) = \Pr[Y = F_{A(X, Y)}(X)]$$ is negligible, as long as it has a plausible computational cost, where $Y = F_K(X)$.  I leave it as an exercise to the reader to define such an algorithm $A$ for a polynomial evaluation MAC like the above example.
Comment: Now that I think about it, I'm actually not sure the KOW condition gives $A$ access to $F_K$ on more than one message, in which case maybe a one-time MAC _is_ sufficient.
Answer: WOTS+ requires a family of second-preimage resistant, undetectable one-way functions. Any MAC does most likely not fulfill this requirement and the definition of MAC definitely does not suffice.
There exists a WOTS version (later) called WOTS-PRF which uses a PRF instead. However, it recently turned out that there is a flaw in the WOTS-PRF paper (see this paper). Currently it is not known how to fix the proof. While this does not allow for an attack, instantiating WOTS with a PRF is not suggested until someone figures out a fix. Note that this flaw is limited to the proof for WOTS-PRF and does not concern any other variants like WOTS+.
Comment: Sounds like it's unwise then to implement Winternitz in any form without using a strong truly cryptographic hash function like SHA, BLAKE, etc.
Comment: Well, you need second-preimage resistance, undetectability and one-wayness... collision-resistance is not required (if you use the WOTS+ construction). Only the WOTS-PRF proof has a flaw. The others are fine.

Winternitz-OTS+ with Poly1305


How did lower classes with aspirations to high social standing greet each other in the Paris of the 1630's?

Question: I am running a game of En Garde over on the RPG Stack Exchange. For purposes of verisimilitude, we're wondering about station-specific greetings in Paris in the 1630's. What would be an appropriate greeting between two low-class males with aspirations of climbing the social ladder? What would be a greeting from a low-class to a high-class (but non-titled) male? And what would be a greeting between two high-class gentlemen?
Comment: You'll need to be more specific about class, and how in the hell they think they're capable of changing their class position (1nd estate priests from bourgeois with a unique administrative capacity, noblesse de graduelle?  http://en.wikipedia.org/wiki/French_nobility#Classes_of_French_nobility ).  The wikipage seems to help.  Also, Dangerous Liasons.

Or do you mean gutter snipes attempting to get an apprenticeship and thus possibly become Masters by marriage?
Comment: There's a listing at the encyclopaedia, above.

This encyclopaedia page probably fills the needs for RPG fidelity to actual history. Louis XIII didn't have as much power as Louis XIV, but military success, combined with "discovered" genealogy records could advance people as fast as required—if causing grief amongst the old nobility. The systems and hierarchies of nobility developed in opposition to the centralising power of Louis XIV and in part in relation to the attempt of Louis XIV to control the nobility. So atypical and absurd advancement is fine—if it generates suitable conflicts.
Comment: Well, in this fictive setting, mainly by attaining glory in the army. The fact of *absurd* social mobility is the essence of the game, and the intent of the question is to add appropriate set dressing to it. But this ranges from the bastard son of a labourer to the first son of one of the titled nobility.
Answer: In general, a commoner would address a gentleman as "Monsieur" and a lady as "Madame". Among nobility the practice would be the same, although the king is addressed as "sire". If a person was a servant of someone else they may use a special term of subservience. For example, in the play Le Cid (1637) by Corneille, when the page addresses his mistress he begins

Par vos commandements,... etc

"By your command". This is because the page is the servant of the person being addressed. In the same play when Don Rodrigo addresses the Count, he says,

A moi, Comte, deux mots.

To me, count, two words. In other words "come to me, lets have a word or two". Don Rodrigo is below the count in status, but the two are close friends and well known to each other, so Don Rodrigo is informal.
In plays like "La Veuve" which takes place in Paris and is dated to 1632, the servants and workers are always addressed by their occupation ("nurse", "coachman", etc) and the gentlefolk as either "Monsieur" or "Madame".


Illustrator equivalent to Photoshop's skew tool

Question: In Photoshop the skew tool allows you to move each corner of the object being skewed independently. Is there an equivalent in Illustrator? Envelope distort seems overkill and harder to achieve the same result.
Answer: You can use the Free Transform tool (keyboard shortcut is E).
There is a trick though:
Click and hold on the the corner you wish to move. THEN press and hold the Command (or Control for Windows) key. Now you can drag the corner around.
Make sure you click FIRST. Holding Command and then trying to click and drag won't work.
Bonus Tip:
You can do the same thing with Command + Option + Shift to do a perspective distort.
Comment: That's one of those Creative Suite UI points that will be synchronized across applications one of these days. Holding one's breath is not recommended.
Comment: It works only on vector graphics, but for the images "Shear tool" is useful which can be found under "Scale tool".
Comment: This actually works sometimes, sometimes it just doesn't :\
Answer:
Select your object
Click Effect - Distort & Transform - Free Distort.

Click and hold point to drag object into desired shape.

Click OK to implement your modification

Click Object - Expand Appearance

That's it, your done.Your Object is ready for standard editing.
Answer: If you want to use a skew effect with text, you can get a pretty good result from using Illustrator's 3-D - Extrude & Bevel effect.
Once your text has been 'Expanded', select it and click on 'Extrude & Bevel' in the 'Effects' menu. Set all of the option bars to 0, except for 'Rotation' and 'Perspective'.
Now simply experiment with these two until you get the result you're looking for.
I hope it helps.
Answer: To get these individual point selections in Photoshop, you use skew. But in Illustrator this is unnecessary. The easiest way to do this type of manipulation is with the Direct Selection Tool (A) (the little white arrow). With this tool you can select individual points and move them around as you see fit.
In addition to that, if you hold SHIFT and click on each point, you can select multiple points to move around.
Comment: you're right - direct select is definitely best for simple shapes, but doesn't work so well if you're looking to distort text etc.
Comment: I hadn't considered that, sorry!
Answer: You can use the Shear tool to do this. It's stored with the Scale Tool (s). Click and drag a corner, same as Photoshop.


Working with applied math advisers as a pure math PhD student

Question: I'm currently applying to pure math PhD programs in the US to study theoretical PDE, especially things like fluids and waves. The issue I'm running into as I write applications is that at some institutions, the professors who work on this are split between the pure and applied programs. My question is whether I would be eligible to be advised by an applied professor and if I should mention applied professors in my statement. Also if this depends on the institution, how would I go about finding out in particular cases?
Answer: Here's my suggested rule of thumb:

If the pure and applied mathematicians are within the same department, mention everyone whose work you would like to contribute to - i.e. anyone who does any theoretical PDE work.
If there are separate departments, most of the people you want to work with should have a "primary" appointment in the department you are applying to. For instance, taking a look at UW's applied math department, it looks like Randy LeVeque is a professor in Applied Math, but has an adjunct appointment in pure math. This probably means his primary appointment is in Applied Math, but he could still mentor students in pure mathematics. Just be aware that if all the people you want to work for have primary appointments in different departments, it might look like you want to work in a different field (e.g. Applied Math).
Comment: Thanks this is helpful, and you correctly guessed that UW motivated this question.
Comment: Also check to see whether there are separate pure and applied tracks within the PhD program (or even separate PhD degrees in pure mathematics and applied mathematics.)  It's not uncommon to have a single mathematics department with separate PhD programs in pure and applied mathematics with different course requirements, qualifying exams, etc.
Comment: You never know where a theoretical PDE person might be lurking. // Read the list of faculty on the program's website, read the rules about who can be the primary advisor, and as Brian said, think about whose qualifying exams you want to take. // In my view, mentioning specific names is not necessary in the U.S. when writing the SOP; rather, the important thing is to talk about what you are interested in.  The committee will figure out who needs to read your SOP. // You can take courses outside your department, of course, but make sure the one you apply to has *some* courses of interest.


How does Stack Exchange work around the lack of Redis clustering?

Question: I read that Stack Exchange uses Redis for caching and Redis doesn't have clustering support yet. So I was just wondering how Stack exchange works around this lack of an important feature? Does it use servers with huge memory? If so, how much? Or else, what is your approach?
Comment: I don't know how Stack Exchange does it, but it would be sensible if they just did sharding.
Answer: Basically, yes: we are currently simply inside the memory limit of the servers. We haven't intentionally gone for "huge memory", but they do have an amount appropriate to their role. We only solve things that are actually problems, but we have plenty of options. To explain our setup - we currently have only 4 physical redis servers for the production environment (servers for dev/QA/etc are irrelevant to this discussion); 2 in each DC. We have 8 redis instances on each redis box currently, that each serve fundamentally different roles - one for our core cache etc (where "core" here means "not careers"), one for machine-learning, one for pub/sub distribution, etc. These 8 instances are then replicated (master/slave) between the servers for HA / DR, persistence and performance reasons (noting that SE.Redis allows individual commands to be targeted, i.e. "demand master", "prefer master", "prefer slave", "demand slave").
Currently (glances at our opserver monitor) we are running at (picking a server at random), for the 8 instances: 28.55GB + 4.51GB + 1.66GB + 15.18GB + 2.55GB + 1.72GB + 224.79MB + 82.26MB
The OS reports 56.71GB of 94.48GB memory used (60.04%) - so: some headroom, but if we exhaust our available memory, we have plenty of options:

add more memory
move some of the roles to different hardware (in particular, get the 28.55GB and 15.18GB roles onto separate hardware, and juggle the rest to suit)
proxy-based sharding via something like twemproxy (SE.Redis supports this already, but I have not investigated whether all of the operations we use are provided)
client-based sharding - not currently implemented (except for "cluster") in SE.Redis, but all the hooks and logic are in place (because: "cluster") - it would simply be a job of implementing one or more sharding conventions in SE.Redis
server-based sharding (aka "cluster") - the code exists in SE.Redis, but "cluster" is not yet RTM, and there are some issues, in particular relating to multi-DC replication and promotion; this is discussed more here
caller-based sharding - which could be useful if we wanted to move individual databases to different physical or logical servers

In the comments, @bitoiu requested more information about DC failure, also mentioning cluster support. On the topic of redis-cluster, our custom (and publicly available) redis client has preliminary support for redis-cluster (although it needs some more work), however, at the current time:

redis-cluster is still premature
redis-cluster lacks a good multi-DC story

Salvatore is aware of our needs on the second one, and has some things on the horizon to address them; as a one-line problem statement, it would probably boil down to:

if a NY (DC1) node fails, do not ever automatically promote an Oregon (DC2) node to take over as master for those slots; if we want to fail to Oregon, we don't mind pushing a big red button to do that explicitly.

So for now, we're using regular redis replication between DCs; the NY web-servers only know about the NY redis nodes; the Oregon web-servers only know about the Oregon redis nodes. That means that for most things, Oregon discovers that redis is entirely readonly (except for a set of nodes that is DC-specific - replication inside the DC, but not between DCs). In the case of DC failover, we simply make one of the other-DC's redis nodes "master" - ideally using a tool that broadcasts a "please recheck the redis configuration" at the same time (and conveniently, "opserver" is one such tool).
Comment: Thanks. That is a great answer.
Comment: great post. nowdays redis has clustering support, but could you also add to the article how you did DC sync if you did any? How would you deal with DC failure?
Comment: @bitoiu see edit; did I answer the question?
Comment: hey @MarcGravell, thanks for taking the time to edit the answer, much appreciated. I had to read the whole post again, to confirm that you're only using Redis as cache, correct? So just to confirm, each of those 8 Redis instances are running exactly the same *roles*. So if one of your DC's goes down, you momentarily loose cache and manually opt to route traffic? Does my question make sense?
Comment: @bitoiu not **just** as cache, no. But if, say, [you lose an entire DC at once](http://meta.stackexchange.com/questions/231739/what-happens-when-you-plug-a-ups-into-itself), then obviously any data not yet replicated is *probably* going to be unobtainable - we aren't a bank, so we're fine with that. We also use SQL-Server AG-groups for crucial data, which is persisted constantly (unlike our redis persistence, which is more periodic). The 8 redis instances per box *are* the 8 roles.
Comment: Thanks a lot for clarifying @MarcGravell.
Answer: It's unfortunate that the documentation for Redis is misleading - and recent mention of upcoming clustering support also contributes to this misunderstanding. Redis fully supports "clustering" the way that many people are thinking, which relates to high availability and fault tolerance. You can have multiple Redis instances running, one is the master, and you have one or more slaves. All instances can service read requests, but only the master can take write requests (although that can actually be configured such that slaves accept writes - I don't understand that use case). If the master goes down, there is another Redis service called Sentinel that can be used to automatically promote one of the slaves to become the master. When the previous master comes back up, Sentinel reconfigures it to be a slave.
The functionality that is not RTM yet, which is referred to in the Redis documentation & release notes as "clustering" is in fact the ability to partition the storage of keys across multiple Redis instances. It may have been better perhaps had they decided to call this functionality "sharding" or "partitioning" instead of clustering.
If you have a need to have a Redis database that is so large that it would be difficult to host on one machine and have it be fully in memory, then yes, you're going to have to wait for the functionality that hasn't been released yet. But if your data set easily fits in memory, and you just want horizontal scalability to correspond to the horizontal scalability of your cache clients, then Redis is more than capable of working for you.


GTO principles - Indifference: what am I missing?

Question: TLDR
I've read around that the GTO action is the one that makes your opponent indifferent to something. Could anyone be as precise as possible stating this? Indifferent to any action? Indifferent to changing the frequencies of his actions given the situation and range he has? Indifferent to small changes in his frequencies?
Long rant: thinking out loud
I'm trying to understand the principles of GTO, and I'll use this post to clarify my own understanding and doubts, and ask for confirmation and guidance. In particular, the "indifference" principle is confusing me.
By "strategy", I understand some set of rules that dictate the action to take given any situation where the player doesn't know what the other players cards, but does know his own. It might be deterministic if the action is always the same given the situation, or mixed if you inject some randomness in it.

GTO is the strategy that maximizes your EV against the best an opponent  that knows your strategy can do
GTO is also (one of) the best counter-strategy to GTO. In other words, there won't be some deterministic strategy that can do better against GTO (that doesn't adapt) than GTO. I can kiiinda see why this could the case for strategies close to GTO but I don't see it in general yet. Is it? Let's say I buy it.
For any fixed strategy (mixed or not), the best counter-strategy is deterministic. If there are more than one, then surely any combination of both, random or not, is also optimal. This I totally buy.

So if 2. and 3. are true, then GTO, being a mixed strategy, is a random combination of best determinist strategies against itself. This means that if you knew you were playing against perfect GTO, then you could play any of these deterministic strategies and not lose (though you would lose against an exploitative style). This also means that, given that I've heard GTO is mixed, if the opponent will definitely play GTO, then there are always/usually/often(?) more than one deterministic best strategies. Is this just for when he plays GTO or its the case for any strategy he picks? If its just for GTO, maybe this is the justification for the indifference principle:

If you are playing GTO, your opponent is indifferent to folding/betting (or is it any action? or is it "changing the frequencies of his actions assuming these are already GTO?)

At least some possible interpretations of 4. ring some alarms, so I don't want to get this wrong, and I'd appreciate feedback. For example, for any fixed (but possibly mixed) strategy of mine, there are best counter-strategies, and for any of these, changing slightly the frequencies of each action shoudn't change the outcome (as in, when you are at a function's maximum you don't mind moving a tiny bit). If this is what 4. means, then the suggestion of "play what you think would put your opponent indifferent to changing his current strategy a bit" would be a bad tip. It means: play the strategy that makes your current opponent's strategy the best one. So this can't be it.
Now, if it means, "put your opponent in a spot where NO action he takes makes any difference (as opposed to 'slight changes in the frequencies of his actions')", then

is this always possible? My intuition tells me no, but in rocks-papers-scissors it is.
if this is possible and one plays this way, how could we EVER get any edge even if he plays the worst poker ever? Wouldn't we be dooming ourselves to lose on rake? So again, this can't be it.

Or maybe it means "put your opponent in a spot where he's in doubt between 2 actions". But that would be weird. An action could be 'raise 3 pots' and another one 'raise 3.1 pots'. What would I gain my making him indifferent between two things that both leave me in a bad spot?
Also, the fact that it's a "partial information" game and the opponent strategy cannot possibly depend on my exact cards as long as my strategy doesn't depend on them either, makes this more complex.
In sum, what exactly does that indifference principle I've read loosely stated mean? Is there anything I'm clearly getting confused about here?
I'm hoping that once this is clear, the "range balancing" idea and its importance will fit into place with a stronger mathematical intuition that my current "it's good to not give much information to the opponent so he eats your bluffs and your value bets sometimes".
Simplest example that illustrates all the relevant principles
In a rock-paper-scissors game where the bet is doubled if the winner has rocks, one would be tempted to choose rock more often. However, this is the opposite of GTO, since a guy that always chooses paper would get positive EV. If I'm not mistaken, one should choose paper with double the frequency of the other two. This gives an EV of 0, no matter the strategy of the opponent. He can't exploit us, but he can't make mistakes either. Does this also extend to GTO poker, where if played perfectly you just can't win until you deviate from it a bit, or is this an oversimplified example that misses some crucial property? If the former, then GTO suddenly sounds less interesting, given that it boycotts every chance you get of getting an edge. But if the latter, what could be the simplest example of a game that catches all the basic properties here?
Comment: Not enough for an answer. GTO does not maximize your EV. There is no simple example that catches all the basic properties. GTO is only solved for some very simple cases in poker. https://poker.stackexchange.com/questions/1045/the-right-bluff-frequency/6690#6690
Comment: @Paparazzi Quoting you, GTO implies always making the decision that puts your opponent in a situation where calling gives him 0EV, just like folding (and raising who knows). Is that right?
Comment: That is GTO for a very simple situation.    I suggest you search on poker Nash  equilibrium.
Answer: Nash equilibrium

If each player has chosen a strategy and no player can benefit by
  changing strategies while the other players keep theirs unchanged,
  then the current set of strategy choices and the corresponding payoffs
  constitute a Nash equilibrium.

The idea is you play enough hands and make micro adjustments until there are no adjustments to be made. It can only be solved for simple situations like short stack push fold.
In a fixed strategy you play a situation or not. So if you start opening with 87s it becomes profitable to call with 98s.  But then it is not longer profitable to open with 87s. In a mixed strategy you would split how often you play some of the fringe hands.
Some people use GTO to mean other stuff.  Or at least what they are explaining as GTO is not what I would call a Nash equilibrium.


Who are the Buddhas Yet to Come and what Information do we have about them as per Theravada standpoint?

Question: Who are the Buddha's who have got definite prophecy of Buddhahood? What is the description we have about them, their parents, family, disciples and sasana? What are the sources?
Answer: There are many schools and teachers in Buddhism. They all contribute to the growing dispersement of Buddhist teaching. The past is full of references to the Buddhas of the past like Shakyamuni Buddha, his closest students, Bodhidharma, Dogen, and all the Buddhist teachers that have come to the west in the last 75 years.
How can we know what tomorrow's flowers will look like and what scent they will carry when they are only seedlings popping out of rocky soil? Just don't know.


How to make a segmented double hammock?

Question: I have been toying with the idea of a split hammock.  My idea is a wider than usual gathered end hammock, about 11' by 8', with an adjustable line running under to separate our individual sag points.  If the dividing line is run diagonally, perhaps through loops stitched into the hammock to hold it in place, I'm thinking it would give each of us our own pocket right next to each other without crushing us together. The line could be loosened for a traditional single hang. Has anyone seen this solution tried? What tips do you have to make it work?
Comment: Hi there - as it currently stands, this question is not a good fit here (see [about] and [ask] ) - but you can edit to articulate a specific question, ie do you want to know how this could work? Or what approach is commonly used?
Answer: If you want to sleep in a hammock, go for a South American one, which is bigger than you describe and asks for a different position in it, (in my view a much better position to sleep in.)
Those hammocks come in double, and owing one of those I can say that two people who do not want to cuddle can roll away from each other and will have a bit of space between them.
The most I have seen in my hammock was four teens (which were pretty much fully grown,) but they did fill all the space.
If you want to use the European (and North American) kind of hammock, with a spreader bar, with two, you need more than twice the width of a single one. Your idea of using it with a diagonal line makes me think that you and your partner will be toe at nose and nose at toe, and that is asking for accidents.
If you do want to divide a netted hammock, I would go for weaving a line through the material of the hammock. With a solid fabric one, I think, sewing the string to the fabric will keep it where you want it.

How to make a segmented double hammock?


Gifts for Chinese hosts?

Question: I am traveling to China for work (I am an academic), and would like to bring small gifts with me for the hosts who have been working to coordinate my visit. What are some recommendations for the kinds of gifts which Chinese people would appreciate?
Comment: Yes, to be purchased in the USA. I don't have a specific limit but it shouldn't be too much, maybe $15-$20 max.
Answer: The holy trinity of Chinese gifting is liquor, cigarettes and local delicacies.
In the $15-20 bracket you're presumably not looking to bribe anybody, so a nice bottle of California wine might fit the bill, although they're fragile and a pain to transport due to liquid restrictions.  For local delicacies, things like chocolate or candy are pretty safe, and much easier to carry.  Extra points if it's got something 'healthy' (according to Chinese medicine) like ginseng in it. This handy infographic lists most of the do's and don'ts, although it's a bit geared towards people already in China (unless you were thinking of bringing pu-erh tea or longans...).
In all cases, packaging matters, and it's actually a bonus if it's as tacky/obviously-foreign as possible, meaning draped with eagles and flags or packed into a Statue of Liberty tin or whatever.  The reason is that your gift is likely to parked somewhere visible, so your host's visitors can see it and be impressed by tribute brought to him from far-off foreign lands.  (Probably not that big a deal in your case, where your hosts are academics who presume do this sort of thing all the time, but worth keeping in mind if visiting people who don't generally have laowai guests.)
Comment: "from far-off foreign lands" ... which was probably made in China. ;)
Answer: I haven't traveled to China, but I have traveled extensively through Thailand, India, Indonesia, Pakistan and Nepal. In my experience, the locals really appreciate small American-made things like chocolates and candy. A bag of Hershey's kisses made me the favorite person among all the kids when I was visiting a friend in India.
Key here is to buy something obviously American or American made. For my Indian friends, I bought some quality American-made pens which they appreciated a lot. On a lark, I bought my Indian friend's older brother an American-flag wallet, which, to my surprise, he still carries around to this day.
If buying candies and similar items, I recommend buying something that's not easily available over there. This means no Mars bars or Snickers. Instead, get handmade chocolates (more expensive) or cookies. In my case, Pepperidge Farms' Milano cookies and Pirouline Wafers were especially well loved.
My Indian friend's dad also requested me to bring some American BBQ sauces. Apparently, he's big on the grill and these sauces aren't readily available there.
A lot would depend on your familiarity with your hosts as well, but food items are a safe choice. Other items like wallets, souvenirs or other nick-knacks might be construed as 'tacky' by some people.

Gifts for Chinese hosts?


Column formatting with json

Question: On a standard Date field that is inputted, can I display a full data format (example Friday, 23 March 2018 instead of 23/03/18) with Json to place in the column settings? Please advise
Answer: Currently this doesn't seem to be possible. The official documentation for Column formatting says that there are three options that we can use for formatting date objects:
<code>toLocaleString() - Displays a date type fully expanded with date and time.
toLocaleDateString() - Displays a date type with just the date.
toLocaleTimeString() - Displays a date type with just the time.
</code>
EDIT:
In order to use this format, you would just need to paste the following code into the column Formatting box (you would just need to change the "operator" if you want other format):
<code>{
   "elmType": "div",
   "txtContent": {
        "operator": "toLocaleString()",
        "operands" : ["@currentField"]
    }
}
</code>
What you could do instead, is create additional calculated column with the following formula, and show that column instead of your date column:
<code>=CONCATENATE(TEXT([Datum],"DDDD"),", ",TEXT([Datum],"DD")," ",TEXT([Datum],"MMMM")," ",TEXT([Date],"YY"))
</code>
Comment: in case i were ok with one of the 3 above it would just be enough for me to type in the box 'toLocaleString()' ?
Comment: Please see my edits for the json code.
Comment: I have just tried your code and the date remains exactly the same. It was 23/03/2018 and after the code it is still 23/03/2018. I have tried the first operator and the second. The date column is set to display standard (and not friendly) dates. what am i doing wrong?
Answer: The code in the replies above is correct however the json formatting works only in the new experience view of the list

Column formatting with json


Were the Spanish aware that American mainland existed after discovering the Caribbean?

Question: After the Spanish (Castille) first discovered The Caribbean (Nowday Dominican Republic, Cuba ect.) in the late 1400s / Early 1500s were they aware / did they predict that mainland North and South America existed?
Comment: Related: [How did people realize that America was a different continent?](https://history.stackexchange.com/questions/8793/how-did-people-realize-that-america-was-a-different-continent)
Answer: I'm assuming you're referring to Columbus' first voyage, which resulted in the tentative discovery of new lands west of Europe. Columbus' own conclusion after his voyage was that he had reached islands off the coast of India, or perhaps China (Cathay), and repeatedly referred to the land masses he encountered as "las Indias", and their inhabitants as "Indios".
So no, it's safe to say that Columbus himself had no inkling that he had discovered a new landmass totally unknown to his European contemporaries. He did make the assumption that there was a continental landmass beyond the islands he "discovered" but he remained convinced after his first journey that that landmass was Asia.
I wasn't until Columbus' third voyage that he encountered and described a previously unknown continental landmass (which turned out to be South America). But even then he still wrote in his reports that he assumed the landmass to be some part of Asia.
It's important to bear in mind here that the concept of "Asia" was poorly understood and loosely applied by Europeans in the late 15th, early 16th centuries. Knowledge of the spherical nature of the earth was well known among educated Europeans during Columbus' lifetime, any many who interpreted Columbus' discoveries at the time thought that he had encountered the western tip of Asia. This is reflected in the Treaty of Tordesillas, signed only two years after Columbus' first voyage divided the earth into two hemispheres, with one half for Spain & the other for Portugal.
This image depicts the geographic thinking in the decade after Columbus' first voyage. Imagine the two circles on the map forming a sphere so that the Caribbean is off the coast of Asia and you'll have an idea of how Columbus and his contemporaries thought.
European exploration progressed rapidly after Columbus, however, and by 1513 Europeans had confirmation that the Americas and Asia were two distinct continents.
Comment: A point was made in that other question (unfortunately, with no references) that not admitting this wasn't Asia/The Indies may have served the political purposes of Spain.
Comment: @T.E.D. That's a really interesting theory that I haven't encountered before and it would be nice if there was a source. At the very least there was documented scepticism directed towards Colombus' own accounts and it became abundantly clear within a decade or so that the Americas were not Asia.
Comment: Agreed on all counts. The user who made it is er...kind of known here for coming up with out-of-the-box unattributed answers as well. But that doesn't make them wrong.
Comment: @T.E.D. Hey man I'm just trying to create/program a historical game and I need some information to back it up. My game is also 'out-of-the-box'.
Comment: @Jake - Was referring to a poster of an answer on another question, not you. Anyone who can post a good on-topic question here is automatically one of my favorite people. :-)
Comment: @T.E.D. Didn't know I was 'known on here' for being odd
Comment: @Jake - I don't believe you are. Give it time. :-)


Moving extension from Connect to Marketplace problem

Question: Magento announced they will close Magento Connect site just 30 days before closure. Everything would be OK if they would provide a fast way to move extension from Connect to Marketplace, but this is not a case.
It took almost 1 week to get approved business review. Now I need to submit extension to pass technical review. But when I try to upload extension it shows this error:
You have already created the "company/module_name" extension. Use the edit form for adding new versions.

I don't have any existing extension inside, only the one with business review status. I contacted their support, I even contacted their partnership program and was ready to pay almost $5000 for their partnership program to get priority support, but they simply ignored my message and after 1 week I still don't have any reply from them. I get main revenue from Google serp (1st position) but if they close Connect site before they move my extension to Marketplace I will lose this position and most of the revenue.
Do anybody face the same problem about "You have already created the..." error? I am lost here, I can not get their support but they will close the site in 4 days. Not very professional from them.
Answer: It was a problem from their side, I finally received answer: There was a slight issue on the backend of developer portal that has been corrected
Now I could upload the extension. Not very professional from Magento team to announce closure of Connect site just 30 days before and they can not handle smooth transfer of extensions to Marketplace in that time.


Why is it considered good practice to not remain attached to just a Personal Anchor System?

Question: I'm watching videos on how to lower while outdoor climbing (sample video) and it seems that the accepted practice is to always be attached to the wall with both a rope and the PAS. But what is the rationale for this? Is it expected that the PAS is less reliable than the rope? Is it because the rope might slip out of your hand as you're untying it from your harness? Obviously the holds themselves could fail but that's an equal risk regardless of your method.
Answer: In general, redundancy is key.  Second, it is critical to retain the rope at the top of the climb.  If the rope falls with the climber anchored to the top, you're going to be in for one heck of a time.  If you only have the two of you, you're likely to require outside assistance/rescue.  Therefore, the rope should stay physically attached to the climber in some way at all times.
One thing you might not know, depending on how much climbing you've done, is that rope is heavy.  I've been at the top of a 100-foot pitch, and let me tell you: you can really feel the weight of the rope.  The weight alone can be 4-5 pounds, and that's not counting any friction. Trust me, you will really notice 4-5 pounds pulling on a rope if you're trying to manipulate it.  It's far too easy for it to slip out of your hand as you're threading the end through the rings.  When it's secured to you, that's not even a worry at all.
As a side note, when "cleaning" a route, you're not really holding onto any holds.  Both hands are active, and you basically are suspended via the anchors, with your feet just providing some stability.  If by "Obviously the holds themselves could fail but that's an equal risk regardless of your method." you mean the anchors themselves, then yes.  Otherwise, there aren't really any holds that you're actively using.

Breaking down the video a bit further:
In the first method shown, the climber attaches themselves directly to the anchor, pulls up slack through the rappel rings, then ties themselves in before untying their original double figure eight knot.  Realistically, they are only properly protected by the anchor as they manipulate the rope, especially as some methods I've seen have the climber "off belay" as they work at the top.  Even if the belayer is prepared to catch you, you're going to have a bad time if the anchor drops you while you're fiddling around up there.
In the second method, the climber follows a similar method, only they tie a figure eight on a bight and attach it to themselves, before threading the end of the rope through the anchors (not the best plan, especially if they aren't exactly the right type of bolt).  Honestly, I personally wouldn't trust a single non-locking carabiner with my life when it's not already loaded, but some people do, it seems.

My personal preference includes using 2 quickdraws at the top (opposite and opposed) before messing around with attaching myself to the anchors.  That way, you are much less likely for a slip while messing around to unclip your rope from the carabiner there.

TL;DR:  Never have the rope in a position where it would slide out and fall to the ground without your active intervention.  It must either have a stopper knot (when preparing to rappel down) or be tied to your harness in some way.  In some systems, you don't even properly "tie in", but simply attach the rope to your harness (via an overhand on a bight, say) as you untie your main knot.  Your sling/anchor system can be fully trusted to hold you (though I like attaching to both anchors if possible) but you can not let the rope fall down.  Without it, you may be stuck, hooked into the anchors, for a while as your friends/the authorities try to rescue you.
Comment: Thanks. Just to confirm though - assuming that the rope itself is secure, it's perfectly safe to be hanging from just the PAS? And yes - I meant anchors, holds was the wrong terminology.
Comment: It's safe to do so, though I personally attach to *both* anchors when I do so.  I prefer a pair of locking carabiners girth hitched to my harness.
Comment: If your PAS only has one attachment point, you can connect both bolts with a quickdraw -- if one of the bolts fails, you'll be redundant on the other. Just don't forget to remove the quickdraw before you go down


Why aren't block hashes a reliable source of randomness?

Question: I just saw this answer that informed me that block hashes were not a reliable source of randomness. In what situation are block hashes not a reliable way to obtain randomness?
Answer: Block hashes are not a reliable source of randomness in situations where the miner that has mined a block at that height, or a subsequent miner with the choice of whether to mine on top of that block, has an incentive to try to alter the result. For example, if you're making a lottery, a miner can make a bet, mine the block whose hash will settle it, and throw it away if the block would make them lose the bet.
The miner can either discard a block they would otherwise have broadcast, or ignore a block they would otherwise have mined on top of. Doing these things has a cost to the miner; Discarding a block means you lose the block reward and fees that you would otherwise have got, and not mining on top of a valid block increases the chances that your next block will be orphaned. In the former case the loss is roughly equivalent to the lost block reward and fees, although it can be more complicated if you also also combine other strategies like Selfish Mining where you might withhold a block for other reasons.
Since the cost to the miner of gaming a block hash is significant, it is often sufficiently secure to use for low-value contracts; The miner could game it if they wanted to, but gaming it would cost them more than they would stand to gain.
Answer: To sum up this thread :

Using a blockhash, timestamp, or other miner-defined value. Keep in mind that the miner has a choice of whether to publish a block or not, so they could conceivably have one chance at the prize per block they mine.

In other words, a miner can choose to only publish a block that he knows the seed of the said blockhash would yield him the result he wants.


How to make a vertex meet an edge exactly?

Question: I want to move the selected vertex along the blue axis until it exactly meets the intersecting edge. How can I make sure it exactly touches the edge without gaps or overlap?
Answer: Hold CTRL while moving the vertex and it will snap to the midpoint of the edge (it will also snap to other vertices). Once you get it on the edge, you can switch to the "Normal" coordinate system and slide it back and forth along the edge.
Answer: Dynamic Context Menu
Enable Dynamic Context Menu from UserPreferences > Add-ons

then select the two edges that intersect

then hit Spacebar > Snap Cursor > Cursor to Edge Intersection

that moves the 3d cursor to the intersection

then pick the vertex you want to move to that position, then pick Mesh > Snap > Selection to cursor.

then you get this.

Advice
If you need to repeat this kind of operation many times during your session then  get acquainted with the keyboard shortcuts whenever they're listed beside the menu entries.
Answer: In Edit Mode:
First press Ctrl+Shift+TAB and select Edge to snap to Edges.
Then press G and Z to move along the blue axis (or use manipulator) and aim the mouse at the part of the edge you want to snap to, press and hold Ctrl to enable snapping and then press LMB or Enter whenever you're satisfied with the position.
This makes the vertex go along the Z axis to align with the edge you hovered over while holding Ctrl in 3D view.


Can I put 'which' in place of 'where' in this sentence?

Question: The following passage is the excerpt from a school textbook. What I want to know is whether 'where' in the passage can be replaced with 'which.'
I know the verb 'hit' can be used both as transitive verb and as intransitive verb.
In this context, can I put 'which' in place of 'where' and use 'hit' as transitive? I think it makes no difference.

Here is a story of a young man who survived Hurricane Sandy, one of
  the most violent storms ever to hit the United States. A lady named
  Christine at Toms River, New Jersey, where the hurricane hit hard,
  was lucky enough to escape from her house before the storm hit. When
  she returned to her damaged house, after the storm had passed, she
  found a note.
Answer: Yes, you're correct. You can use 'which' instead of 'where' and make the verb 'hit' transitive. It won't change the meaning of the sentence.


Who created topology, and when, and what problems led to this creation?

Question: Who created topology, when did that happen, and how was it discovered?
Comment: See related thread What caused the name change from "analysis situs"  to "topology"? http://hsm.stackexchange.com/questions/2711/what-caused-us-to-call-the-study-of-topological-invariants-by-the-name-topology
Comment: Welcome to HSM! Good question, although I think you might see some long answers to the latter part.
Comment: I find this question to be far, far too broad.
Comment: @JackM Fortunately, the question has since been edited.
Answer: Some topological problems were considered long ago, for example by Euler (see the previous answer).
Some ideas about topology were even earlier proposed by Leibniz.
The famous kindergarten problem about three houses and three wells belongs to this class.
One notable invention was Möbius band, another Gauss knot invariant.
However, one can agree with Dieudonné's opinion that topology as a separate area of mathematrics begins with Riemann. Originally it was known as Analysis Situs, the term which
existed until the beginning of 20th century. The term "Analysis Situs" was introduced by Leibniz(!)
The word topology was used by the Germans and since the beginning of the 20th century it is accepted. Depending on the point of view one may also consider this whole period
before Poincaré as "pre-history", however some basic results about closed surfaces were proved
at that time, and Betti introduced "Betti numbers".
The modern subject was really defined by the work of Poincaré
in the very end of 19th century with his work called Analysis Situs in six parts.
References: Dieudonné, Abrege d'jistoire des mathematiques, 1700-1900, vol. 2.
Poincare, Analysis situs, J. Ecole Polyutechnique 1995, 1, 1-121.
All this concerns what is called today "Algebraic topology". A different part of mathematics, called "General topology", has a different origin: in real analysis (Cantor).
Answer: Many sources, including this one, credit the idea of topology (and its applications) to Leonhard Euler, to solve the puzzle of the Seven Bridges of Königsberg (or, rather to prove that there was no solution). Euler first used the concept in the first half of the 18th century:

Perhaps the first work which deserves to be considered as the beginnings of topology is due to Euler. In 1736 Euler published a paper on the solution of the Königsberg bridge problem entitled Solutio problematis ad geometriam situs pertinentis which translates into English as The solution of a problem relating to the geometry of position. The title itself indicates that Euler was aware that he was dealing with a different type of geometry where distance was not relevant.

Euler went on to make subsequent developments in the fledgling field of topology. The page gives essentially a complete history of topology, from Riemann to Poincaré, which might answer any other questions you have. Britannica confirms those facts regarding Euler.
This page also credits Euler with creating the concept of topology, using it to solve the Seven Bridges problem.

One of these areas is the topology of networks, first developed by  Leonhard Euler in 1735. His work in this field was inspired by the following problem: The Seven Bridges of Konigsberg

Here we find an interesting PDF on the development of algebraic topology. McCleary credits Poincaré with some of the earliest work in the field, including applying topology to manifolds, although Hilbert later extended Poincaré's ideas.
Answer: Let me add another piece of history going slightly back in time.
The idea that polyhedra satisfies the formula $V-L+F=2$, where $V$ is the number of vertices, $L$ is the number of sides and $F$ is the number of faces, goes back to Descartes.
The formula is nowadays called Euler's formula (yet again, Euler!) because he was the first one to attempt a proof. I say "to attempt" because his proof was "almost" correct. But exactly in this almost layed the interesting part.
In the nineteenth century various mathematicians proposed example of "polyhedra" that were not satisfying the formula: a cube with inside a cubic cavity, a smaller cube sitting on the side of a larger cube (which satisfies or not the formula dependind on how you count faces) and so on.
I wrote "polyhedra" because the usual objection to such examples was to refine the notion of polyhedra as to exclude them.
Incidentally it is exactly in studying this kind of anomalies that Listing and Möbius came across the Möbius band.
When it turned out the the definition of polyhedra became so complicated to counter intuition, it solwly became clear that such anomalies could in fact bring in new informations... it is also in this way that the Euler-Poincaré (genus) invariant was born. A discover which sits at the core of further developments of homotopy thoery and later on homology theory.
As Alexander wrote general topology was born more in connection with clarifying the foundations of real analysis. I just want to stress that also in this case a notable role was played by "monsters", i.e. by all sorts of strange, intuition defying math objects that were developed throughout he second half of the nineteenth century and the first half of the twentieth (Cantor set, Sierpinski gasket ecc...)
Answer: Topology is the idea of continuity. Archimedes was the first to use the notion of continuity in his method of exhaustion, an early version of the integral calculus.
Whilst Rene Thom, a famous French algebraic geometer credits the first philosopher and the only philosopher for a millenia yo seriously think about continuity. It's because of his thinking on tgos that Aristotle dismissed atomism as untenable which quantum mechanics has shown to be valid.
Answer: In the "Elements of the History of Mathematics" by Bourbaki you can find in section "10. Topological spaces":

It is Riemann who must be considered as the creator of topology, as of so many other branches of modern mathematics: it is in fact he who, first, sought to disengage the notion of topological space, conceived the idea of an autonomous theory of these spaces, defined the invariants (the "Betti numbers") which were to play the greatest role in the later development of topology, and gave its first applications to analysis (periods of abelian integrals).

You can look there for more.