Prevent Multiplayer Cheating

Question: I am almost complete developing a small indie-style multiplayer game. While I intend to allow people to cheat in single-player, this is obviously not acceptable in multi-player. Does anyone know of any ways to help stop the average Joe from using something like Cheat-Engine to modify parts of the game? I currently plan to have the client upload a MD5 hash of each setting file the game uses (stored as an XML) to the game server for verification every few seconds, but is there anything I can do to stop things like memory-editors, etc?
Comment: I would recomend this article, [Building Multiplayer Games - Security](http://playerio.com/documentation/tutorials/building-flash-multiplayer-games-tutorial/security) its written for some multiplayer API, but the ideas are good and still apply
Answer:
The client is in the hands of the enemy. (The Laws of Online World Design)

Really, the only way to beat most cheats is to have the client be a "thin client", that is: To only act as an input and output device, and to never give it more information than it precisely needs.
This won't stop automation and this won't stop passive information gathering and analysis, but you can design your game such that these don't have a significant impact.
This won't stop people hacking each other via malformed messages relied by the server - your client needs to guard against messages from the server same as you would guard your web sites from SQL injection attacks.
Since you also want to use the same client for the single-player game, a solution would be to run a local server in a separate process/thread and treat it internally as a client/server setting. The "cheats" would then work on the server side. Minecraft does something similar, though it's by no means the first game to split the game engine from its interface in such a way.
Suggested reading:

Raph Koster, "How to hack an MMO"
Anti-Cheat for MMOs issues and solutions?
All the forums of the "bad guys" like Game Xploits and similar (know your enemy!)
Answer: If you are worried about locally modified code, then how can you be sure that someone hasn't simply modified your notification code to send a static list of MD5 hashes, the same ones you expect? In fact, you don't even need code modification to do this, you just need a fairly basic proxy (assuming no SSL, but even that could be faked with a bit more effort).
The only way to do what you want is to have a server and simply not trust the client at all. All calculations should be handled on the server and all actions verified as being at least somewhat possible. For instance, don't allow the client to say that they want to move to one side of the map when you know they were on the other side a moment ago. Without a server in the middle doing everything that is vital to the game, it is impossible to not have cheating, because someone smart will always find a way around anything you can build into the client. Even with one, it is still possible if you don't think through all the different ways to manipulate the situation slightly. For instance, the movement validation I mentioned before: If you do a simple point to point calculation people may still be able to teleport through walls.
So the question is, how average is 'average Joe'? You've already mentioned code editing and memory editors. That's above what I would personally consider the average level, and if you do want to be worried about that level then a separate trusted server which does all the heavy lifting is required and the client will boil down to essentially just being display and input devices.
Comment: @user185812: It's usually a good idea to wait atleast a few hours before marking an accepted answer. While personally I think my answer's pretty great (I'm biased), other's will likely have more input though and seeing an accepted answer is quite often a deterrent to others to answer.
Comment: @MatthewScharley - no worries. ;)
Answer: In a basic multiplayer game cheating in the kind of Cheat-Engine simply won't work. The clients are only sending the data and the actions you designed it do to. Usually thats not much more than what the player "did", e.g. in what direction he is running, if he is shooting and so on. So the changes he does to the memory will only affect his own game, but the other players will see no change, a so called desync. Most games detect desyncs like that and remove the desynced player from the game.
Now there are also other ways of cheating, but those are all about how your game is designed.
To protect from the easiest hacks, which is faking network messages, the server should check those package for their sanity. "That guy just jumped 5 screens? Thats impossible, deny package." (Note that you can also go the fully synchronized route -that means everything is synchronized and only "What buttons did the player press."-kind of messages are send- which makes faking network messages useless by design.)
The last way of cheating in multiplayer are visiblity hacks, thats modifying the client so that it shows data to the player which he doesn't know. Examples for this are not showing the fog of war, being able to look through walls, displaying a minimap or other things. These are impossible to prevent.
Comment: I disagree on the visibility hacks. Couldn't these be prevented by not giving the client information until their character would be aware of it? Don't get me wrong, this may not be good design. But that's different from being impossible to prevent.
Comment: @xuincherguixe I think it is impossible in some circumstances. For example both clients are playing under the same IP and the same port. In such case it is only a client's good will that prevents him from reading data meant for the other one.
Answer: To prevent basic Cheat Engine hacks that manipulate the values of your variables then you have to hide those values.  Typically Cheat Engine is used to identify the memory location of interesting variables (say the amount of gold or life or upgrade level of an ability) by doing a search for the known value of said variable, play more of the game and cause the value to change, then Cheat Engine would do a new search from the outcome of the previous search for the new value.  This allows the cheater to zoom in on the memory location of the value, now they can change the value of that memory location using Cheat Engine.
For example, I have 245 GOLD... with Cheat Engine I do a search for 245 and find many memory locations.  Then I play some more and bring my gold up to 314, I then search the previous search output for the value 314 and easily find the memory location for where GOLD is stored.
The way to prevent this is to never have the real value stored in a memory location.  For example, I store the value in an object that has to calculate the real value on demand when it is required.  So lets say that the player has 245 GOLD.  If they do a search for a memory location with the value 245, they might find many but none of them will be the memory location of where the gold value is actually stored, that is because you do not store the value 245 for gold.  When the game needs to know how much gold, it will ask the object that holds the value for it, which will calculate it on demand.
So the question now is: How exactly do you store a value in a way that does not reveal it?  This gets a little tricky and ugly and I'm sure there are many ways it can be done. What I like to do is store a boolean array (or byte array).  The length of the array can be anything, but let's say it is 13. Then you have a counter that represents how many times does 13 go into that actual value.  So if we want to represent 245 then the counter would have a value of 18.  Now the array would have all booleans set to true for the remainder of 245 / 13... basically the modulus.  In this case that's 11, so the first 11 booleans in the array would be set to true, the rest set to false.  To retrieve the value all you need to do is multiply the counter by the array length, then add 1 for each boolean set to true (stopping at the first false).  Now the number 245 would never be stored anywhere and would be hard to find the memory location that would need to be manipulated to alter the gold amount.  You might want to set the array length to different sizes (maybe randomly pick a number between some reasonable range) when this object is created.
EDIT: This is useful for multiplayer and single player.  There is cheating that can also be done in multiplayer, where the values in the packets can get altered.  This would require different techniques to prevent, like signing each packet.
Comment: Typically, to prevent cheating, multiplayer games calculate everything on the server, so modifying a value on the client, or in a packet sent to the server, doesn't change a thing to the actual game. But still, the rest of the answer is interesting.
Comment: To avoid that, you let the server update the new life, then send the new life to the client. Everything is calculated on the server, and let the clients simply be "dumb terminals" for all of the important things: the client will be responsible of capturing the inputs from the player ("clicked at x,y at time T", "hit button X at time T"), sending them to the server, and receiving the new state from the server ("the player is now at position X, Y", "the player has life ZZZ") and displaying it to the player.
Comment: With this, the cheater (man in the middle) can mess all they want with the packets, it will not change the state of the game on the server because the server will make sure that the input are valid ("hmm the client has clicked at five different places within the last 0.03 seconds, that's not normal, let's reject these clicks"), and run _all_ of the simulation itself.
Comment: @AlexandreVaillancourt Good point.  I am concerned with bogging down the server's CPU calculating signatures.  I want to keep the server fast by just passing packets between the two players, but I will take a close look now that you have pointed it out.
Comment: If you only send the inputs from the client to the server, you don't need to sign every packet. Once on the server, if the input don't make sense, they're either simply rejected, or the client is kicked out for cheating. The server calculates the next state of the game, then send the new state to all of the players, that's typically how cheating is avoided (you don't get rid of bots like this, but at least you avoid casual cheating from the players).
Comment: @AlexandreVaillancourt what if the cheater manipulates the packet between itself and the server?  For example, let's say I manipulate the packet so that when I send my new life update, I send a higher number instead.  To prevent man in the middle, we would have to sign the packet and include all the values in the signature.
Comment: @AlexandreVaillancourt I follow.  Very interesting.  I had setup my server to just be a dumb server, kind of the opposite approach... lol.  I put a lot of security into the client, anti debugging and hacking techniques... a lot of signing and slight of hand.
Comment: That's another way to do it, but generally less "secure". Removing cheating completely is _hard_, so one has to compare costs and benefits :) perhaps it's going to work ok for you for this game with your current approach, and maybe you'll decide to do it differently for your next game. You'll see!

Prevent Multiplayer Cheating


Can you enter jannah just by pray juma(friday prayer)?

Question: I don't pray 5 times, I only pray juma salah(Friday prayer) so would I enter jannah if I only pray Friday prayer?.  Another way of asking same question is are you still a muslim if you only prayer Friday prayer?
Comment: All sahaba were in consensus that a person who doesn't pray or pay zakat is not a Muslim. As a Muslim you can't chose whether you pray only jumu'ah or your daily prayers as this would mean you accept some of your duties and deny some (kufr).
Answer: Jannah is for all those who believed in Allah and associated no partners with Him at death.

It is narrated on the authority of Jabir b. Abdullah:
I heard the Messenger of Allah (ﷺ) saying: He who met Allah without
  associating anything with Allah entered Paradise and he who met Him
  associating (anything) with Him entered Fire.
Sahih Muslim 93 b

But does this mean a sinful muslim will not enter Hell? No, not at all.

Indeed, Allah does not forgive association with Him, but He forgives
  what is less than that for whom He wills. And he who associates others
  with Allah has certainly fabricated a tremendous sin.
Quran (4:480)

So if Allah wills the sins will be forgiven. But if not, then the person will taste HellFire till he/she has been punished for his/her sins or if Allah wills be released from Hell at an earlier time through His Mercy.

It was narrated that Abu Sa'eed Khudri said:
"The Messenger of Allah (ﷺ) said: 'When Allah has saved the believers
  from Hell and they are safe, none of you will dispute with his
  companion more vehemently for some right of his in this world than the
  believers will dispute with their Lord on behalf of their brothers in
  faith who have entered Hell. They will say: " Our Lord! They are our
  brothers, they used to pray with us, fast with us and perform Hajj
  with us, and you have admitted them to Hell." He will say: "Go and
  bring forth those whom you recognize among them." So they will come to
  them , and they will recognize them by their faces. The Fire will not
  consume their faces, although there will be some whom the Fire will
  seize halfway up their shins, and others whom it will seize up to
  their ankles. They will bring them forth, and will say. "Our Lord, we
  have brought forth those whom You commanded us to bring forth." Then
  He will say: "Bring forth those who have a Dinar's weight of faith in
  their hearts, then those who have half a Dinar's weight in their
  hearts, then those who have a mustard-seed's weight." Abu Sa'eed said.
  :"He who does not believe this, let him recite, 'Surely, Allah wrongs
  not even of the weight of an atom (or a small ant), but is there is
  any good (done), He doubles it, and gives from Him a great reward.'"
Sunan Ibn Majah -  Vol. 1, Book 1, Hadith 60

Why would anyone want to experience Hell even for a nano-second is beyond me. It is better for you to try to pray the 5 fard prayers daily. If you are a man and are unable to make it to the masjid, start with praying at home. Inshallah Allah will make easier for you and provide a means to the masjid too.
If you are unable to leave your office desk for prayer, try praying while in your cube. Or if you drive and a masjid is not closeby, pray in the car or a parking lot.
The Sahabas are considered among the best of humankind after the Prophets. Many of them had one common thing that depressed them. They were sad that they didn't convert to Islam sooner and raked in more rewards.
Remember Jannah is not just a single huge plane. There are levels in jannah and our goal should be Jannutul Firdaus.
May Allah make it easy for you and all of us to pray our salaats and fulfill our religious duties. Ameen.


How smart are the dragons in Game of Thrones?

Question: What do we know about the intelligence of dragons? Is it portrayed differently in the books than in Game of Thrones? I'm specifically curious about the perceived/known intelligence of dragons when they were more numerous in the A Song of Ice and Fire world.
Comment: As smart as a small pony.
Comment: @WadCheber and twice as deadly
Answer: There's very little information in the books you can use to determine their intelligence. Even if a dragon did something very smart (like attacking Danys enemies and not her friends), you could argue it was just instinct or dumb luck that it acted in such a way.
One thing we know is that the dragons of old were very good at following commands. Whether laying waste to Harrenhalls stone towers, helping forge Dragon Steel Swords or helping melt the ancient Valyrian roads (that Tyrion guesses were stones melted together.)
At the Kingsmoot of the Ironborn we find out how such specific commands were given to beats:

 Euron Greyjoy claims he recovered a magic horn that can bind a dragon to your will.

If this is true it suggests to me, any feats performed by the Valyrian dragons of old can't automatically be attributed to dragon intelligence.
Unless someone has a better example, the most "intelligent" trick the dragons have performed that can't be attributed to blind luck or instinct is breathing fire on command... Drakaris!
Comment: um... ᴰʳᵃᶜᵃʳʸˢ⋅⋅⋅
Comment: I would say they're at least as smart as a dog. Dogs can be trained to do all kinds of neat things on command.
Comment: Daenerys appears to tell Drogon to fly in the season 5 finale. So they're at least two-trick ponies.
Comment: Yeah, that's how ya spell it. I just realized I came to the same conclusion as WadCheber... as smart as a one trick pony
Answer: In A Clash of Kings, the warlocks say

""A wilful beast," laughed a handsome young man. "shall we teach you
  the secret speech of dragonkind? Come, come.""

This implies that dragons can speak, which implies a high degree of intelligence. Perhaps not human level, but certainly higher than animals.
Of course, the Warlocks may have been lying... but I don't see why as there were a lot of visions Daenerys saw there which have since come true.
Comment: I don't think that, even if it exists, **secret speech of dragonkind** implies dragons can speak. I think it was used figuratively, secret speech of dragon kind - is magic, sorcery, some spell used to bind dragon to one's will. That's how I read it.
Comment: I think in the ordinary meaning it's quite clear. If they wanted to teach her sorcery, why not say that?
Comment: @WOPR The warlocks are clearly secretive, and they seem to be generally regarded as deceptive in all matters. Xaro Xhoan Daxos in particular insists that they lie constantly.
Answer: In some mythology, dragons are more intelligent than humans. We observe in GoT that the dragon destroyed (with its tail) the scorpion device that had injured it and while this may have been at the command of Daenrys, we did not hear her command.
Comment: It's hard to say if destroying the scorpion with his tail was instinctual (this hurt me => destroy it), or an element of foresight (this is dangerous => I should destroy it before it can shoot again...), but either way, it showed a level of independent thought that we hadn't yet seen from the dragons.
Answer: There is some evidence that a dragon can bond to a particular person/rider, and that this 'rapport' leads to an instinctive synergy between dragon and rider.
See: The Princess and the Queen, Dany/Drogon.
So, dragons may seem to be intelligent, but most perceived intelligence by dragons can be attributed to these bonds. Outside a dragonrider bond, they exhibit an intelligence roughly similar to a smart horse or dog (Dany's three), with the cunning of an apex predator (Drogon, Viserion and Rhaegal in Meereen, Sheepstealer, Cannibal).
Answer: Dragons smartness and emotional state seems to be very similar to that of a domesticated dog. They can take orders:

Dracarys: The order for the dragon to breathe fire.

Valahd: The order for the dragon to fly. (Note that it appears Emilia Clarke actually says Fly here but she was meant to say Valahd)

Drogon! Valahd.
  Game of Thrones, Seaosn 5 Episode 9, "The Dance of Dragons"

We also know that from a related question that dragons share a deep connection with their dragon riders:

Dany and Drogon share deep connection. And the event in the fighting pit is evidence that Drogon has ability to sense when Dany is in peril.
  Game of Thrones Season 5, Inside the Episode #9, 6:44


I forgot to log out from Stack Overflow from a public computer. What now?

Question: The owner of this account did not logout from a public computer, so a different person is posting this question on their behalf.
Comment: I do thank this person for making a sensible question when finding the account logged in rather than posting junk to get the user banned. Good on you!
Comment: Since the real user may never see this question, is it possible for a mod to forcibly log them out?
Comment: I actual meant _'Please would a moderator log this user out'_ but worded it badly.
Comment: "I left my moderator account logged on on a public computer, how to undelete all the posts ?"
Comment: @Turnip See the top answer.
Comment: It would be better to just ask the question, without the fluff on "teaching a lesson", etc. I don't understand who is asking this question - the original user or the other user who hijacked the original user's account. Or is it the original user who created a new throwaway account? These details don't matter much, so maybe edit the fluff out?
Comment: Why does "log out" affect all devices?
https://meta.stackoverflow.com/q/267948/7724032 for more info
Comment: @anatolyg It was someone other than the account owner writing this post. I've edited it to make it clear.
Answer: Go to the hamburger menu at the top right, click 'log out' . On the log out page check the 'log out on all devices' option  and click the 'log out' button.
Or with a picture

See also https://meta.stackoverflow.com/q/339071/578411
Alternatively moderators also have an option to invalidate your sessions but that follows the same code path as the "log out on all devices" . That option could be used if moderators expect your account is compromised to stop any on-going wrong doings.
Answer: Follow these steps:
Click on the hamburger menu on the right
Then click "Logout"

Then select logout from all devices


Is there an idiom that conveys the meaning of the French "mi figue mi raisin"?

Question: The French idiom "mi figue, mi raisin" (literally: "half fig, half grape") refers to someone or something that is neither entirely good, nor entirely bad. I guess the meaning of the expression can be rather well conveyed by translating it as "neither good nor bad", "not entirely good or bad", or "part good, part bad", but… is there a common English idiom that express this idea?
Comment: If I may just add a precision to include a possible origin of this expression. The story goes ([here is one source in English](http://www.chow.com/food-news/7422/french-food-idioms-decoded/)) that Venetian merchants were occasionally cheated by Greek dried fruit dealers.  Consignments of dried grapes ("raisins de Corynthe") could also contain figs, a less prized commodity.  Which might suggest that a possible translation could include the phrase *mixed bag* (in addition to *lukewarm* as proposed in the source cited above, in a different context).
Answer: A couple of rather-peripherally-related idioms are
neither fish nor fowl and "some of this, some of that", neither of which is as close as Martin Beckett's Curate's egg suggestion, but both of which seem more related than phrases like "six of one, half a dozen of the other".
The idiom "mixed bag" meaning #3, "something tending to have both good and bad results or characteristics; something having a mixture of advantages and disadvantages" seems a good suggestion.
Comment: Very close to _mixed bag_ is _mixed blessing_.
Comment: +1 because this was my instict. However, that more says that something isn't easily catagorized, not anything about it being good or bad. @D Krueger's *mixed blessing* is probably closest to that.
Answer: Curate's egg is probably the closest thing in English - but it's bit old fashioned now. Nobody (except EL&U readers naturally) would know what you meant.
Comment: Except that, if I understand correctly, a curate's egg is entirely spoilt by nature, while "mi figue, mi raisin" is a truly neutral expression…
Comment: @Fx, it's more a literal egg. The idea is claiming that a rotten egg is still good in places.
Answer: "Mixed bag" is when the item has aspects some good some bad.  If it has one aspect in the mushy middle between good and bad you can call it "so-so".
Answer: A somewhat similar idiom is double-edged sword
Currently defined in wiktionary:

(idiomatic) A benefit that is also a liability, or that carries some significant but non-obvious cost or risk.
Comment: As a frog, I can't imagine swapping "mi-figue, mi-raisin" (ambiguity) with "à double tranchant" (two opposite effects).
Comment: 'Something that has both good and bad parts or results' by Meriam-Webster.
Answer: As you can imagine, an idiom in one language doesn't necessarily translate literally into an idiom in another language. So the French idiom "half fig, half raisin" might be guessed to mean something like the English idiom "six of one, half a dozen of the other", in actual usage, it does not.
Checking with some French language enthusiasts (WordReference.com), the preponderance of answers from native French speakers suggests the French idiom is used to indicate the mood of a person. (I would ignore the English speakers, who may be correct but sometimes tend to Anglicize their thoughts.)
More concrete examples can be found elsewhere:
At linternaute.com it's defined to be a mood between agreeable and disagreeable.
Wiktionary.com states the the meaning taken today is along the lines of half willing, half unwilling; pleasant and unpleasant at the same time; to be of two minds (opposing) about something.
SensAgent defines it as that which satisfies and disappoints at the same time; to be serious and lighthearted at the same time.
Sources do refer to the Corinthian raisin commerce, and how figs sometimes made their way into the delivered products. The notion that raisins have a positive association and figs have a negative association may have come from this.
If you are looking for an English idiom with the same meaning, it would have to connote a mood in both negative and positive feelings.
If you are asked "How are you?" in French, then "Mi figue, mi raisin" can be used in place of "Comme ci, comme ça". An English idiom for this is simply "So so."
You can say you are of two minds if you want to express your feeling about a matter. This is better than so so at describing the mixture of both positive and negative mood.
Half joking is what you say when you want to be serious and lighthearted. An emphasis on the serious part would be something like "I was only half joking."
A more recent (1992, wikipedia) expression is meh, which can mean mediocre or unremarkable. It's the equivalent of a shrug, more like a grunt, but it has this meaning in the right context. An equivalent hand gesture would be the hand held out flat and rocked back and forth.
The phrase mixed bag can mean a mixture, but it doesn't necessary have to mean good and bad. (Please, have some jelly beans.) As for describing someone's mood (as with the current usage of mi figue, mi raisin), mixed bag could be used, but it's not common.
The same for the phrase six of one, half a dozen of the other. This idiom wouldn't usually be used to describe a mood, and doesn't have to describe conflicting concepts. (Do you want pastries or donuts today?)
Answer: Having looked in Petit Robert, I think "mi figue, mi raisin" has an element of personal demeanour about it which none of the suggestions above captures. "An ambiguous appearance of satisfaction and discontent, or serious and joking". I saw it used to describe the behaviour of Inspector Maigret (surly and mercurial by turns...).
I don't think there is a neat English equivalent... perhaps not least because, if I wanted to appear "mi figue, mi raisin", I'm not at all sure how I'd go about it. The closest I can imagine is "that way of saying something that is deadly serious, but almost dares you to take it lightly". Or vice versa. "Half serious, half mocking"?
Answer: Depending on the context of course, I might say "fair to middling" or "mezzo mezzo" or "comme ci comme ca". Of the phrases already suggested, I think "neither flesh nor fowl" is the closest equivalent--but the context has to rule, and this wouldn't work to decribe someone's mood.

Is there an idiom that conveys the meaning of the French “mi figue mi raisin”?


Asking a moderator a question directly, a private message

Question: I was just wondering if there is a way to directly communicate with a certain moderator with a private message. Just to help get a couple clarifications on one or two things.
Answer: As far as I know, no, not directly. (and its for the best! I would not want to wake up every 2 mins with other peoples "issues" :))
You can contact us via the general chat or the regulators room by pinging us with @foo_user, we normally keep an eye on those 2 rooms and if the moderator you pinged is not there I am sure the community or some other imba user will be there to help you.
Other than that use the comments under posts using the same method (@foo_user) or if you think some thing needs to be solved and you need to actually discuss it with the community you should open a question on meta (such as this one migrated by a moderator to the right place).
Comment: [General chat room](http://chat.stackexchange.com/rooms/201/ask-ubuntu-general-room) is always a nice place for that, also read the [FAQ](http://askubuntu.com/faq) -if you did not yet- but more important than all is to not take things serious or personal, we are trying to make this the best we can, if you see bad behaviour report it by flagging it and expect edits on stuff that have nothing to do with posts, this is a community driven site, in the end the community will prevail, not matter how many moderators exist or do stuff around.
Comment: Ok, so seeing as to how I am making errors, or mistakes in how I use "Ask Ubuntu" where is the guidelines so I can go over those again? Again I thank you for your straightforwardness and having you explain why you did what you did with my post.
Thank you!
Comment: Okay, thank you Bruno.
Comment: If you have general questions on how to us4e the site then just post here on meta, it's why we have it!
Comment: Okay, thank you Jorge.....man I see your name EVERYWHERE , you must be one busy guy!


For what type of projects Kanban and Scrum better adjusted compared to each other?

Question: For which type of projects Kanban is better suited for?
For which type of projects Scrum is better suited for?
Comment: Not sure why you got a downvote, this seems like a fair question and it's one I hear a lot
Answer: The two approaches actually solve different problems and are fairly compatible with each other if you happen to have both problems.
Scrum
Scrum is designed to solve complex-adaptive problems. That is, problems that are difficult or impossible to quickly identify the best solution for, moving targets, and problems where you understand the problem better the more you work on it. It creates rigid timeboxes that the team should have a shippable increment for because the nature of the problems it is designed to solve are a high risk for run-away work. For example, making a new mobile experience for a bank might be a prime candidate. A team could debate forever what the best new mobile experience is without getting closer to building it. However, as they iterate through and review real software with users, they will better understand what those users need.
Kanban
Kanban is all about flow of work and optimizing a system toward a certain goal (usually throughput and speed of delivery). Kanban is applied to any existing process, so it can also be applied to a Scrum team. In Kanban, you visualize the flow of work and apply constraints to it in order to discover bottlenecks, inefficiencies, and challenges that you can then improve on. A common challenge teams face is that Kanban is not a process, method, or framework by itself. You have to layer it onto another process. This can be Scrum, XP, waterfall, or any other process you happen to practice.
One warning would be that, though you can use both together, adopting both at once can be overwhelming. I usually recommend starting with one, based on the problem you are trying to solve.
Also, it is true that Scrum uses timeboxes and Kanban does not prescribe them. However, Kanban uses other constraints such as WIP limits. Kanban is not a good alternative for when Scrum sounds hard. Kanban is less overtly disruptive to the status quo than Scrum, but I'd argue it is actually harder.
Answer: Scrum works well for projects that:

Have relatively stable requirements - such that they don't often need to be changed inside a sprint
Team sizes from 3-9
Have a stable team that has the time to learn and adopt a framework
Benefit from a regular time-box (the sprint)

Kanban works well on projects that:

Have changing priorities
Frequently have new requirements appear that must be handled quickly
Have almost any team size and may even vary the team members
Find a time-boxed sprint to restrictive
Have lots of external dependencies or complex interactions between specialists

Mike Cohn talks about this in more detail.
Comment: Another type of project where Kanban has an advantage over Scrum is if you have long lead times (for example, to manufacture a design before you can test it).
Answer: Henrik Kniberg and Mattias Skarin have written a short book about similarities and differences between Scrum and Kanban, if you are interested. There is also a summary from Henrik Kniberg found here. For a TL;DR you can jump to page 48 of the summary where you will find this:

If you look at the Kanban differences, where there is no lock down into iterations of prescribed duration, it uses lead time instead of velocity for planning and improvement, it's not mandatory to split work items into smaller estimable items, adding items anytime capacity is available, and there is no need to build a prioritized backlog, and you combine that with what's mentioned in Barnaby Golden's answer (+1), it can be deduced that Scrum works better for product development while Kanban is better suited for production support (for example, you're faster to respond to new work with Kanban than it is with Scrum where you are trying to protect your sprint goal by not messing to much with the sprint scope).
Comment: Prescribed means it's recommended to use because they have proven to be useful. Burndowns are not Scrum artifacts as per the definition of the guide (although because of their usefulness [you might be tempted to stretch the definition of what the word "artifact" means](https://pm.stackexchange.com/questions/27611/how-many-artifacts-are-in-scrum-in-total#comment34669_27611)), but Scrum prescribes them to monitor progress towards goals (see the "Monitoring Progress Toward Goals" section in the Scrum Guide)
Comment: How is Burndown chart prescribed in Scrum if in Scrum Guidebook there are only 3 artifacts? Product backlog, Sprint Backlog, and Increment. I don't believe a Burndown chart was mentioned.
Comment: https://scrumguides.org/scrum-guide.html
Answer: Both Kanban and Scrum share some of the same principles, including:

Both are visual
Teams practicing either are self-organized
Both focus on the concept of continuous improvement, uncovering
bottlenecks
Both create future commitments, aiming to be as accurate as possible
with delivery of work

However, they also have distinct differences, including:

Scrum practices the concept of Sprints, which have start/end dates.
Where as Kanban is an ongoing process.
Kanban inspires work in progress limits but has no formal process
where by work is "committed to" within a set duration of time, like a
Sprint. Instead, everything is continuously planned in Kanban, and
picked up as work in progress moves to completion.
Scrum uses estimation via story points to track the complexity of
work. Kanban doesn't measure the complexity of work as strictly, but
rather encourages work not being started until other work has
finished.
Teams that practice Scrum will typically have team members with
designated roles and responsibilities, such as product owners scrum
masters. Kanban has no formal roles.

I hope this helps, I wrote an extensive blog post about kanban vs scrum a few months ago, worth giving it a read!


Do test pilots on commercial aircraft wear a parachute?

Question: I was watching a video of the first A350 flight. At 0:35 one of the pilots appears to be wearing a helmet and what looks like a parachute. Is that true? Do pilots on maiden flights wear such a kit, so that in case of an emergency they can evacuate the airplane?
Comment: The A350 test pilots were wearing helmets, parachutes and also lifejackets.  [This blog post](http://bloga350.blogspot.co.uk/2013/05/emergency-scape-for-test-crew-located.html) has details and pictures of the emergency evacuation system on the A350 test flight.
Comment: @ColinPickard Note that that says "on some test flights". They don't on all. I remember seeing an A380 test (I forget what it's called), flying at V_md, where they mentioned that was the only test flight they flew with all evac gear on (otherwise it is merely onboard the aircraft in case it is needed).
Answer: To the best of my knowledge, all commercial aircraft being tested have their pilots take on parachutes and hi-vis clothing in addition to creating a possible means of egress on all important flights, such as the first flight and high-speed tests.
Since getting the cabin doors open is practically difficult, the solution I think most producers use is to built a chute down the front cargo entrance which can open.
Bombardier produced a pretty extensive film for their new CSeries.
Here's the solution employed on the Concorde:
Comment: CONCORDE! :D Parachutes sound a bit absurd on it though because you'd probably get screwed at FL 600 and at Mach 2 if something happened up there.
Comment: @shortstheory it's been years since I've seen any of the prototype Concordes; my memory is under that door is a chute all the way down to the bottom of the fuselage.
Comment: And, where do you fall out when you open the hatch? Wouldn't your escape be obstructed by the cargo hold?
Comment: Hey guys, don't worry its only an "intermediate" cover, the real cover is probably somewhere else.
Answer:
Since getting the cabin doors open is practically difficult

No, that's not the (main) reason.
There's something called a wing ... which has engines mounted to it !
Not a very good idea to jump out of a door if you're likely to be sucked into an engine on your way out !
Comment: jump out using the rear exit then?
Comment: What about rear mounted engines (DC-9, most if not all private jets, etc.) Also you would be blasted by jet exhaust.
Comment: This doesn't answer the question
Comment: @shortstheory A forward chute could be easier to reach than a tail door, from the cockpit of a doomed pilotless plane.
Comment: @ptgflyer: The DC-9 has an exit in the tailcone, behind even its engines (I have no idea whether it could have been used for bailing out of the aircraft, though).
Comment: @Sean db cooper did it out of a 727 https://en.wikipedia.org/wiki/D._B._Cooper


Settlers of Catan edition?

Question: I have a version of Settlers of Catan that I can't seem to figure out. It is a family edition, but doesn't match anything I can find online. I recently bought an expansion for the 5-6 players, but the pieces were too big for my smaller pieces to be compatible. I'd like to get an expansion that matches mine, but can't find anything other than 5th editions
Answer: There is no expansion for the Family Edition.
From the Catan website:

This version of Catan is not expandable and not compatible with the regular expansions of the Catan base game!

You will need to get a regular edition (not family edition) of Catan to play with more than 4 players.
Comment: @corsiKa The Family Edition removes a lot of that possibility though. The hexes are not each separate pieces to allow for trying other things; there really isn't any way that you can physically combine the pieces from the 5-6 player expansion to accommodate more players.
Comment: In my experience, Catan is more than a game, it's a game framework. Try exploring with what you have and see if it works out! Even if it doesn't work out it will be a cheap night of entertainment!

Settlers of Catan edition?


Inequalities for a Sum over Elementary Symmetric Polynomials

Question: Define $f(x_1, \dots, x_n) = \sum_{l = 2}(l - 1) \sigma_{l}(x_1, \dots, x_n)$, where $\sigma_{l}$ is the $l^{\text{th}}$-elementary symmetric polynomial and $(x_1, \dots, x_n)$ is non-negative. Beyond the obvious bounds
\begin{align}
\sum_{l = 2}^{n} \sigma_{l}(x_1, \dots, x_n) \leq f(x_1, \dots, x_n)  \leq (n-1) \sum_{l = 2}^{n} \sigma_{l}(x_1, \dots, x_n),
\end{align}
are there sharper inequalities on the sums which can be used to yield something of the sort:
\begin{align}
A \sum_{l = 2}^{n} \sigma_{l}(x_1, \dots, x_n) \leq f(x_1, \dots, x_n)  \leq B \sum_{l = 2}^{n} \sigma_{l}(x_1, \dots, x_n),
\end{align}
for some constants (or perhaps functions) $A > 1$ and $0 < B < n - 1$? If not, what other inequalities are suitable for this problem?
Comment: No better constants are possible. Taking $x_1=x_2=\cdots=x_n=t$ and sending $t \to 0^{+}$ shows that you can't increase $A$ above $1$, sending $t \to \infty$ shows that you can't lower $B$ below $n-1$.
Answer: No constants $0<A<B$ or $0<B<n-1$ can be substituted. Consider $x_1=1,x_2=x_3=\cdots=0$. Then the sum is precisely $\sum\limits_{l=2}^n \sigma_l(x_1,\ldots,x_n)$, ruling out any such constant $A$. Now consider $x_1=x_2=\cdots = k$. Then the sum approaches $(n-1)\sum\limits_{l=2}^n \sigma_l(x_1,\ldots,x_n)$ asymptotically, as the smaller symmetric polynomials become negligible as $k$ grows, ruling out any such constant $B$.


How to remove screws with stripped heads?

Question: As the question states, I am looking to remove a thoroughly stripped screw (the head is stripped) from a hard disk drive. My main issue is that I have no power tools available to remove the screw. How might I be able to remove the screw without drilling it out?
Answer: Try placing a rubber band between the head of the screw and the screwdriver.

This usually helps increase friction.
Comment: @L.B. Yea, I don't think this would work that well on really stripped heads.
Comment: @abby hairboat can you explain bit more detailed how does rubber helps?Sounds interesting but cant imagine how it helps
Comment: I do believe I have stripped it beyond that.
Comment: @pythonstarter Rubber has really good friction. Have you tried rubbing rubber over some surface? It grabs really well. In this case, the rubber band is also pressed down into what remains of the head's crack (whatever that thing is called), producing better grip.
Answer: You can use a good knife or other very sharp and very hard tool and make small parallel scratches on the screw (whatever is left of it), alternatively one deeper scratch in the middle. Then use the hack of abby and a flat tool. I found it most useful to use the inbus (hexagonal screw) bit of my tools to be perfect for this. Depending on the situation you have at hand a rounded tool may be of more use.
You need to apply a lot of downward force on the tool to do this.
That way you will press the rubber band into the small scratches and when you turn the tool it will start twitching slightly. This takes some time to produce results but works. You can monitor the progress if you make the scratches parallel to something nearby.
This assumes the screw will turn at all, so you might need to lubricate it before doing this. If its rusted in or otherwise totally unturnable, you might have lost.
Comment: @Santropedro 'abby' was part of the nick of the user 'hairboat' when I wrote this answer. I added a link.
Comment: "hack of abby" that answer is missing!
Comment: I agree,  hairboat=abby. It says on her profile.
Answer: If the head is not counter sunk, a pair of lock grip pliers (vice grips) can be used to grasp the head of the screw and turn it.
Answer: The correct screwdriver should be used, first of all. Often times the correct screwdriver will grab the screw when it appears stripped. A sharp screwdriver should also be used, not having rounded edges. A correct screwdriver generally involves using a phillips instead of a reed-and-prince which has a sharper point, and a #2 screwdriver instead of a #1. Very seldom is a #1 screw found on a computer. Screws may be small, but are still #2. If a #2 even begins to fit the screw head, it is a #2 screw. The same cannot be said for #1.
In the Air Force I learned the correct way to remove a screw. Many seemingly stripped screws can be removed this way. As mentioned, use the correct screwdriver. Second, apply downward force. Third, bump the screwdriver and do not twist. Usually a slight grab can be felt, but the screwdriver rotates off of it. That slight grab can be exploited. By using a sharp screwdriver and bumping it, going back and fourth, that slight grab will wear into a shoulder large enough to wind the screw with. It takes a certain feel to do this which is not hard to acquire.
I want to follow up by saying how to prevent stripping a screw. Go ahead and twist most of the way in. When it gets to the last and starts becoming tight, stop twisting and start bumping. Use small bumps and never large moves.
Comment: Wow! I never knew any of that! Thank you for the information, I will keep that in mind for future reference!
Answer: How about trying to epoxy or super glue a tool to the screw? Or glue something to what's left of the screw so that you can grip it with pliers or a wrench?
This can be precise work, so you might want to mask off areas you don't want to get adhesive on. You could use what ever you are going to glue to the screw as a punch through the masking tape to create the mask.
Answer: I know this is very late, but I know a great hack for this. All you need a matchstick. All you have to do is use the square bottom of the matchstick and put it in the screw. Now, you can get the screw out by using the match like a normal screwdriver.
Comment: Wow! That is so cool! I never would have thought of that!
Comment: The match will surely break instantly, if it even fits in the stripped area. Have you actually tried this?
Answer: there is a tool called an easy-out that you can stick into the chewed-up screwdriver hole of a phillips-type screw head and, grasping the easy-out with a pair of pliers, unscrew the stuck screw. It may be difficult to find one small enough for your hard drive, but well-equipped hardware stores have them in a variety of sizes.
Comment: They are also called "screw extractors." They have a reverse strew thread that digs into the worn driver socket as you twist to remove the screw.
Comment: exactly right @stan
Answer: Don't forget that you can cut a slot into the head of any screw with a worn socket. A small grinder such as a Dremel Tool, or a fine-tooth hacksaw if you can get at the head of the screw or don't mind defacing the surround especially if it's a washer or bezel that can be replaced.
Also, there are various other shaped driver blades that could fit a worn/stripped Phillips, posi-driver, or screw-lox screw head socket such as a square-head Robertson driver.
Good luck.


Humbucker troubles

Question: I'm rebuilding a Stratocaster, and I put a new pickguard in that's a a very basic wiring setup for a strat: a single humbucker and a volume knob. I have my ground wire soldered in the back. Soldered to the volume knob and my live wire is the volume and the input jack. But when I plug in, I'm still not getting any sound from my strings - although there is a slight hum. The pickup is a Gretsch filtertron bridge pickup. How do I fix this problem?
Comment: If you are sure your wiring is correct, check for short circuits, especially between signal and ground. A small wire thread or a little too much solder somewhere can ruin everything.
Answer: Your wiring description is not all that clear.
I suggest you find a suitable wiring diagram (example here), and make sure your wiring matches.
I would then use a continuity tester to check your solder connections are good.  You should also continuity check that you have not shorted your live connection to ground.
Answer: I found the issue was 2 different things, The first being as mentioned in a comment there was just a little bit too much solder connecting the volume knob, the second was I had no ground wire going to my input jack as the schematic I went off of didn't show one which seemed strange but I followed it.
She sings now though, and looks and sounds spectacular. Weeks of hard work on this project have been a success.

Humbucker troubles


Why is C the base note of standard notation and keys?

Question: Why is it that notes "start" with C? In key signatures, for example, C Major is the basis and accidentals are added for all other key signatures.  I know that the musical alphabet starts with A and goes to G, so why is C the base note of standard notation and keys?  Why isn't A the basis?
Comment: Cart before the horse, Lu. Do is C because C is the base note.
Comment: The first floppy drive was A:.   When there was only one, it could be remapped as B: for disk copying.  When hard drives appeared the first one was C:.
Comment: In a parallel quirk of history, the first drive on a Windows computer is usually C: rather than A:. A different reason of course but in both cases, it is too hard to change now and we live with the situation.
Comment: Though some ingenious justifications have been suggested, I don't think we're going to get a better answer than 'because it is'.
Comment: Because `Do` is the first note, following by Re, Mi, Fa, Sol, La, Si, and `Do` is C
Comment: I'm wondering if pitch has anything to do with it. Currently, A4 with a frequency of 440Hz is the baseline where all other pitches are derived from.
Answer: This was already partially answered here, and there's a pretty comprehensive explanation here.
Notes do not "start" with C; C major is just the easiest major key to notate in modern notation. The concept of a major key came about long after letters were assigned to the notes. Before there were major (and minor) keys, people used modes, usually just using the notes of the modern white keys and starting and ending in different places. The Ionian mode (which became modern major) was a late addition to the modes.
So it's historical accident that C major is treated as "basic."
Comment: In other words, it's not that "C" was given any prominence (directly) as the "base note" but rather the Ionian became the "base mode". The latter names themselves favour the Aeolian as the "base mode".
Comment: possibly relevant video https://youtu.be/NRDwrKMan_Q
Comment: @JamesTauber but the Aeolian mode was also invented at the same time as the Ionian, [in the middle of the 16th century](https://en.wikipedia.org/wiki/Aeolian_mode), and has nothing to do with the assignment of letter names to the notes, which had happened over 5 centuries earlier.
Answer: As is common with these sorts of questions, there's a lot of speculation in various answers.  But, if the question is at least historically why C is the central note of the modern musical scale system, there's one specific and rather clear origin point: Gioseffo Zarlino's Dimostrationi harmoniche of 1571.
Zarlino was perhaps the most influential music theorist of the 16th century -- one of the first to primarily disseminate his ideas in a vernacular language, Italian (rather than the scholarly Latin, where the ideas would be less likely to spread to your average less-educated musician).  For several reasons discussed below, Zarlino decided the renumber the standard modes at the time and to place the mode with the C final (generally represented by the scale C-D-E-F-G-A-B-C) as the first mode, giving it a primary place in the system of music theory for the first time.1
The Central Role of D as the Final Note of the "First Mode"
Before we discuss this new development, the context of the older music theoretical systems is important to note.  The original diatonic scale was derived from a Greek model that extended down to a note called proslambanomenos, the lowest note which often represented an open (unstopped) string on a string instrument.2  In the medieval period, around the year 1000, letter notation for notes became common, and this lowest note was given the name A, with the other letters of the alphabet used in order to ascend the scale.  This note A had no particular importance in medieval music theory -- other than being the lowest possible note -- as it had been borrowed in from an ancient Greek scale system.  (In the ancient Greek system, the A an octave above did have a central place as a sort of "middle note" (mese) in the scale around which the rest of the scale was built.)
Instead, if anything, the central note of medieval music theory was arguably D.  Before letter notation even became common, in the late 8th century books called "tonaries" were invented to classify chant melodies, and they labeled the "first tone" for melodies that had a pattern around the final note with a whole tone below, a whole tone above, and a semitone above that (followed by another whole tone).  Using letters for note names, we can see that conforms to the note pattern C-D-E-F-G, with D as the final note that melodies tend to cadence on.
Why D?  Not again because it was anything particularly special.  Its main advantage was that it was first in an ascending order of classification of modal final notes.  Chants ending with the pattern above were originally in the "primus tone," those which had a pattern conforming to what we'd think of as the note E now were labeled "secundus," those with F were "tritus," and those with G "tetrardus."  Essentially, the first, second, third, and fourth "tones" (later called "modes") were based around cadential notes that were equivalent to what we now call D, E, F, and G.3
The modal system was gradually systematized over many centuries during the medieval period and the early renaissance.  But the mode that placed D as the final was pretty consistently referred to as the "first mode," just because it happened to be the lowest note in the scale that served as the basis for a mode.
The Importance of C, F, and G as the Lowest Note of Hexachords
Over the centuries, other notes in the musical scale also began to assume some importance.  In the 11th century, a music theorist named Guido of Arezzo invented a number of essential music elements, including the standard staff notation and the predecessors of clefs.4  While clefs originally came out of the important location of the semitone in the scale (below the notes F and C), they eventually also became associated with another of Guido's inventions: the hexachord.
It's unclear what the original inspiration of the musical unit of the hexachord was.  By this point, the scale had been extended another whole step below that A to a note known as Gamma.  Beginning on that note and ascending through the first six notes (Gamma-A-B-C-D-E) gave a pattern of whole tones and semitones: W-W-S-W-W.
Guido noted that this pattern could occur at several other places in the standard scale, including on G-A-B-C-D-E in other octaves and on C-D-E-F-G-A.  At the time, again due to complexities borrowed from the original Greek scale system, B-flat was the only "accidental" possible in the medieval scale.  Thus, the hexachord pattern of W-W-S-W-W could occur in one other place in the scale: F-G-A-B♭-C-D.
As noted, F and C already had assumed an importance in the scale due to placement of semitones directly below them.  (Before standardized clefs, knowing where the semitone was would be an essential part of reading music and orienting oneself to the placement of the notes of the scale.)  The hexachord patterns emphasized by Guido became the basis of solmization, originally with the syllables Ut-Re-Mi-Fa-Sol-La, and the placement of Ut also emphasized F and C, along with G.
The Twelve-Mode System and C as a "Legitimate" Final
The hexachordal system was the foundational system for learning how to sing for over half a millennium.  It's possible that the placement of "Ut" in that system perhaps created a tendency to emphasize "major sounding" modes.  Or perhaps there were other stylistic trends (accelerated with the new emphasis on tertian harmonies in the 15th century) that led to more compositions in modes that were based on C, F, and G.
In any case, by the early 1500s, it was pretty clear that a lot of actual music was being written using what we'd call the "major scale" today (or in some cases a Mixolydian scale that would often using a raised leading tone at cadences).  While such music could be written using a central note of G (and musica ficta assumed at cadences, as F♯ was not a "proper" note of the scale yet) or written on F, using the B♭ that was part of the scale, some music theorists felt there needed to be a place for a legitimate mode based on the note C.  Prior to this time, music using a C-D-E-F-G-A-B-C scale would have been viewed as a transposition of the Lydian alternate scale using B-flat, i.e., F-G-A-B♭-C-D-E-F.5
Heinrich Glarean's Dodecachordon of 1547 thus proposed the addition of A and C to the list of standard final notes for modes (beyond the D, E, F, and G mentioned above that went back to the first modal classification systems in medieval music nearly 800 years earlier).  The note B was rejected as a final for standard modes mainly because it lacked a perfect fifth above the final.  The new system of modes thus went in the order D, E, F, G, A, C, for a total of twelve modes, two numbered on each note.6  D was still the traditional "first mode" and beginning of that system, while the modes on C were 11 and 12, the very last.
Zarlino, Tuning Scales, and the Primacy of C
This is the world Zarlino came into: a world with competing systems.  Modes began their numbering on D, but hexachords were based on C, F, and G.  And more and more popular music was being written using C and F as finals.
In his Dimostrationi harmoniche of 1571, Zarlino thus proposed a way of bringing all of this together into a more coherent system.  The first mode would be numbered beginning on C.7  Several reasons were given, but for Zarlino, the quest to place C (and what we now call the major scale) at the center of his modal system began with his new approach to tuning.
In medieval theory, priority in tuning systems was given to what we now think of as "Pythagorean tuning," a system that emphasizes ratios 2:1 (the octave), 3:2 (perfect fifth), 4:3 (perfect fourth), and 9:8 (one of the standard whole tone ratios dating back to ancient Greece).  But the practical use of "sweeter" major thirds with ratio 5:4 (along with minor thirds with ratio 6:5) instead of the Pythagorean ditone (81:64) composed of two 9:8 whole tones led Zarlino to advocate for a new approach to tuning.  Rather than the ancient Greek tetractys, which stated that consonances could be composed of ratios with whole numbers up to 4 (thus including the octave, perfect fifth, and perfect fourth as stated above), Zarlino argued for a new concept of the senario, based on the number 6 as the limit for consonance.  Thus, the 5:4 major third and the 6:5 minor third were admitted to the realm of harmony in a new way.
What does this have to do with the scale C-D-E-F-G-A-B-C?  Well, in dividing up the octave to demonstrate this new emphasis on sweet 5:4 thirds, Zarlino chose that particular sequence of notes and division of scale.  It also had the advantage of being built around a central tetrachord of E-F-G-A in a particular ratio that corresponded to a tetrachord Ptolemy had advocated in ancient Greek tuning systems, thus allowing Zarlino to bring together modern practical tuning with sweet thirds and ancient authority.8
Ultimately, Zarlino gave a number of reasons for viewing the octave scale based on C as the first (and primary) one:

The C-D-E-F-G-A-B-C scale exemplified Zarlino's new tuning system and use of harmonic number for the primary ratios that underpinned his central scale.  He argued that this particular division of the octave was therefore the most "natural."
This word was not a coincidence, as C was the bottom note of the so-called "natural" (naturalis) hexachord.  As mentioned above, C, F, and G were all used to begin hexachords.  But F required the use of B♭, known as B mollis ("soft B"), and G required the use of B♮, known as B durus ("hard B").  (The shape of our modern flat and natural signs derives from the rounded and square shapes of the "soft" and "hard" Bs.)  The C-based hexachord was natural because it avoided all of this problem of choosing a B.  It just had the notes C-D-E-F-G-A and thus had a kind of superiority relating in some ways to notions of ratios and harmonic number relating to the scale as well.
All of the modal finals could be arranged in ascending order within the Guidonian hexachord based on C, i.e., C-D-E-F-G-A.  Recall that the original primus mode began on D simply because it was the lowest among the four original finals of D-E-F-G.  Rather than having a gap and skipping over B, as Glarean's 12-mode system did with D-E-F-G-A-C, Zarlino recognized the simplicity of a system that simply walked up the scale with the numbered modes.  (A related but somewhat more technical point had to do with the arrangement of "species" of octave, i.e., the different locations where semitones could fall in relation to the whole tones.  Placing C first also allowed cycling through the various octave species that tended to be enumerated in music theory treatises of the time without interruption.)
Even better, the actual six finals of the mode in order would now make up their own uninterrupted diatonic hexachord in order: C-D-E-F-G-A (i.e., Ut-Re-Mi-Fa-Sol-La).  This served to tie Zarlino's system into the authority of Guido's hexachordal system in a rather fundamental and intuitive way.
Lastly, Zarlino was sensitive to the fact that ancient Greek place name terms like "Dorian" and "Phrygian" had been mistakenly mapped onto the medieval modal system.  (For example, the first mode was called "Dorian," but the ancient Greek conception of Dorian was actually closer to the intervals of what we'd call a Phrygian scale.  Medieval music theory was often based on misunderstandings and mistranslations built on top of other misunderstandings.)  According to some ancient sources, the Dorian, Phrygian, and Lydian scales were each a whole tone apart.  So Zarlino decided that perhaps it would be better to map "Dorian" -- a name for a mode which had been viewed as a central mode both by the Greeks and renaissance theorists as central -- onto the C-C octave instead.  This tended to accord better with some ancient Greek accounts of the character of Dorian, in Zarlino's view.  (Same thing with the supposed ancient characters of Phrygian and Lydian, which for Zarlino perhaps mapped better onto the D-D and E-E octave scales respectively.)

In addition to all of these explicit justifications, there's something to be said for the general sound and popularity of the C-based major scale as the first mode.  After Zarlino renumbered the modes, his published music that grouped pieces by mode tended to emphasize compositions that we'd now say sound like they are in "C major."  This wasn't so much a theoretical argument as much as a practical benefit that Zarlino seemed to make use of.
After Zarlino: A New System of Keys
Zarlino's renumbering of the modes wasn't universally adopted.  It gained some currency, particularly among French theorists.  But many German and Italian theorists would continue using Glarean's numbering of the 12 modes (or the original numbering of only the 8 modes) well into the 1700s.  (Zarlino's renaming of the modes with C being called "Dorian" proved even less popular, though that was perhaps also partly because Zarlino himself downplayed the ancient Greek names as he knew they had a long history of misappropriation by others.  Instead, he advocated for a strictly numerical naming system for the modes.)
Nevertheless, Zarlino revised his most popular treatise to include this new numbering starting on C, and it became the most widely disseminated discussion of modes throughout the seventeenth century.  Zarlino was also perhaps the first theorist to suggest a kind of major/minor polarization of modes based on the quality of the third above the final, and his rationales in tuning and the connection to the hexachord for privileging what ultimately would be called a "C major scale" lived on, even if his numbering system wasn't always used.
The gradual decline of modal theory and the emergence of new "church key" systems with their related notions of transposition gradually allowed the creation of tonality and eventually the 24 major and minor keys.  By the early 1700s, one can still see a kind of dual recognition of D Dorian and C major both as central primary scales for the new lists of keys.  Dorian and Aeolian/natural minor continued to be alternative key signatures for "minor" scales in general well into the 18th century, though eventually our "natural minor" won out and D as central note faded completely from communal memory.
But C major, the scale with no sharps or flats, emerged victorious as the central scale/tonality/modality, a role it had first been cast in by Zarlino.  French theorists who had been influenced by his numbering system, notably Rameau, would ultimately place the major scale on a supposed "natural" basis by expanding Zarlino's ratio arguments to new acoustical discoveries related to the harmonic series.  Once valued only for its connection to the semitone below in Guido's day, the lowly C had gradually accumulated weight in its connections with the hexachord and clefs, only to be heralded as a new basis for a mode that ultimately took its place at the center of the Western musical system.

Notes:
1The standard scholarly discussion of Zarlino's renumbering of the modes with the placement of C as the "first mode" can be found in Richard Crocker, "Perché Zarlino diede una nuova numerazione ai modi," Rivista Italiana di Musicologia 3 (1968): 48-58.
2I've discussed the construction and original structure of the Greek diatonic scale in an answer here and the mathematics underlying it here.
3Note that this pattern of tones and semitones could also occur on A, B, C, and D in the scale.  Before letter names were adopted, these were alternative "final" notes for many chants, but later became thought of as transposed versions of the true final notes on D, E, F, and G.
4I've discussed the origin of the association of clefs with the notes F, C, and G in an answer here.
5Glarean is sometimes credited with "inventing" the major scale, but he did no such thing.  Music had been written using a major scale for millennia prior to Glarean, even if it wasn't yet called a "major scale."  And medieval musicians would have thought of such as scale as perfectly legitimate, even though from a chant perspective they'd have seen its proper foundational note on F (with a B♭) instead of on C.
6Two modes were given to each final note for authentic and plagal versions of each mode.  These were originally introduced for chant melodies which had a high range that extended far above the final note (authentic) and those which tended to circle around the final note, going both above and somewhat below that central note (plagal).  These distinctions were dropped when the modal system gradually gave way to the key systems for tonality in the 18th century.
7Zarlino's reasons are concisely summarized in Joel Lester, Between Modes and Keys (1989), pp. 9-12 and in Nejc Sukljan, "Praetorius Versus Zarlino: The Question of Modes," De musica disserenda 15:2 (2019): 105-124.  For a discussion of Zarlino's renumbering in historical context, see Cristle Collins Judd, "Renaissance Modal Theory" in Thomas Christensen, The Cambridge History of Western Music Theory (2002), pp. 364-406.
8For a more detailed discussion of this process, see Randall Goldberg, "Where Nature and Art Adjoin: Investigations into the Zarlino-Galilei Dispute," Ph.D. diss. (Indiana University, 2011), pp. 59-62.  Zarlino's incorporation of the tuning system into his arguments for renumbering the modes is discussed on pp. 209-216.
Comment: This should be the selected answer.
Comment: In light of this post, please consider an answer to this question [What is the origin and original meaning of "tonic", "supertonic", "mediant", etc.?](https://music.stackexchange.com/questions/109917/what-is-the-origin-and-original-meaning-of-tonic-supertonic-mediant-etc). Seems like it might be in your wheelhouse.
Answer: I feel this question deserves a shorter, more to the point answer:
Because when they decided to name the notes with letters, they took a minor scale and named the notes "naturally": A, B, C, D, E, F, G. This is what we know as the A minor scale.
(CONTINUED EDIT:)
Therefore the choice of names was accidental - it just happened that they considered a minor scale instead of a major one. Now if we want to use the same "natural" notes in a major scale, then we need to start with C.
If, however, we were to turn back time and influence the early notation to use a major scale as a basis, then they would name "A" the first note in the natural major scale, and then today we would talk about A major as the "standard" scale. But of course this "alternate" A would be the same frequency as "our reality" C.
Comment: The letter names have existed at least since Guido d'Arezzo, which was centuries before there was such a thing as a natural minor scale.  Even then, by Guido's time, there was one note before A, called Γ (Greek gamma).  That seems to imply that in some earlier system, A was the first note for some reason, but it's not clear to me when, why, or how.  In Guido's system of hexachords, A was one of four notes that could be in any of the three hexachords; it could be *la* of the natural hexachord (c to a), *mi* of the soft hexachord (f to d), or *re* of the hard hexachord (g to e).
Comment: @RandyZeitman it's a perfect answer except for the minor deficit of it not being true
Comment: I am uncertain. But, as other posters have pointed out in this thread, the nomenclature is much older the natural minor scale as we know it.  Alas, it is easier to know what the answer _isn't_ than what the answer is... If I find out, I'll post an answer.
Comment: @RandyZeitman whatever the correct answer is, it is to be found in the music theory of 1000 or more years ago.  The minor scale is only about 400 years old.
Comment: @RandyZeitman the so-called grand staff seems to have arisen in the middle or late 18th century in different regions.  Before that, it was common to have a soprano clef for the right hand.  But I don't know when it was given that name, and I don't suppose anyone noticed that middle C was in the middle of the grand staff until somewhat later.  The reason for the switch probably had more to do with changing compositional style than with any desire for symmetry.  Regardless, all of that happened centuries after the notes were named.
Comment: @Some_Guy knowing what the answer isn't reminds me of a story about a student in a yeshiva.  I don't remember the story very well, but the student offered some outlandish interpretation of some biblical verse or something like that, and the rabbi said "no," and the student said, "but rabbi, you yourself said that there are (some large number) of possible interpretations," to which the rabbi replied "yes, but that isn't one of them."
Comment: I think the issue with this answer is that a) people obviously seem to disagree that the minor scale was even invented when the notes were named, and b) it doesn't explain who "they" is, so it's still fairly unsatisfying. Though it would probably make a sufficient explanation to a layman or beginner.
Comment: @awelotta who claims that the minor scale existed when the notes were named?
Comment: "it just happened that they considered a minor scale instead of a major one." There ya go... that's a perfect answer. You should get 60 upvotes.
Comment: @phoog The question writer? If they were to choose arbitrary starting notes, they would probably pick the root of a scale that already exists. The dorian and phrygian modes were used as church modes (more or less) before the aeolian mode, IIRC, so that's why I question that theorists would pick the minor mode arbitrarily, rather than another mode.
Comment: @Some_Guy Ok, what's the right answer?
Comment: @awelotta I see. I would attribute the question's premise to confusion or misunderstanding rather than a claim.  As far as I'm aware, the concept of scales that span an octave in general wasn't as firmly established, which is presumably why Guido's system uses overlapping hexachords.  But since the Guidonian gamut starts with gamma, the note below A, the identification of A as a starting point (of whatever sort) must predate Guido.  Subsequent to that point, there was a need for the note below, whether this was identified by Guido or by some predecessor.
Comment: @phoog  "The standard five-line staff appeared in about 1200 in polyphonic music. Some 16th-century keyboard music used staves of more lines. Modern keyboardists play from two combined staves: one for the right hand in treble clef, and one for the left in bass clef."

https://www.britannica.com/art/staff

So it seems that the grand staff defined C in the middle is part of modern music.
Comment: @phoog "I don't suppose anyone noticed that middle C was in the middle of the grand staff until somewhat later."  ... why would it take years to realize it's exactly as it was created?
Comment: My point is that the story about middle C being in the middle of the grand staff is just that: a story.  A creation myth, if you will.  It doesn't actually explain why the grand staff came into being.
Answer: "... the choice of names was accidental - it just happened that they considered a minor scale instead of a major one. Now if we want to use the same "natural" notes in a major scale, then we need to start with C."
I don't think it was accidental that first mode is A minor. Rather, it represents the music of the people that created music notation: Monks. An 'Aeolian-like' sound was the their preferred mode of music making. The notes of that "Aeoloian-like" sound would have been a minor scale. That is the sound they liked to sing- and the first note of it they named 'A'. Over the course of time there was a shift brought about by the development of the tempered scale, as well the development of craftsmen skilled in tuning instruments, which made it possible for Bach to write his music (dig The Well Tempered Clavier). Bach is really the beginning of modern music and, in a way, modern consciousness. When we ponder the key of C on the piano and wonder why it's not called A, it's because we don't perceive the bias we have for the major scale. It's become part of the foundation of Western consciousness.  In my humble opinion...
Comment: Yes that's why I wrote "Aeolian-like" . They had many modes available, and looking at the Wikipedia page you have linked there is shown 8 tonalities, and #2 shows "Hypodorian" which is notated as a natural A minor scale... which we call Aeolian mode. They had lots of choices.  It could be that they omitted tones or shifted modes as needed in performance.
Comment: This is what I learned in a music theory course. Unfortunately, I did not ask the prof if we have any examples of medieval plain chants that use Aeolian, because it seems rather difficult to find them. See here for starters: [**_Gregorian mode_**](https://en.wikipedia.org/wiki/Gregorian_mode) - there doesn't seem to be any particular focus on Aeolian mode at all.
Comment: Understood. But that takes the edge off of this answer.
Comment: @Stinkfoot the aeolian mode was invented [in 1547](https://en.wikipedia.org/wiki/Aeolian_mode), well after the end of the middle ages.  The letter names were established over 500 years earlier.
Comment: The Hypodorian mode uses the same set of pitches as the Dorian, but its range is different.  The final note, that is, the home pitch, is the same, namely D, so it does not correspond to the Aeolian mode.
Answer: Well, others have already mentioned that the A-G scale names precede Major as tonality and that the naming scheme is a bit arbitrary/historical.
The really curious thing is how C has become the octave starter, with B3 preceding C4 in scale (or, in other notation, b preceding c').  So obviously when a standard for octave notation was added to the note name system, C had already replaced A as the notation baseline.
That C has become "middle C" (and thus a prominent notation center in piano literature) is also a later development since the earlier collection of clefs was much more diverse than the current main system of violin clef and bass clef and there were several other notation systems for what amounted to organ notation before the current middle-C centric system that is now the basis for piano notation became the standard.
Comment: Good point.  Guido's system of octave notation did run from A to G, for whatever that's worth.  The lowest pitch was Γ, then A-G, then a-g, then aa-ee.  The systems in use today go back no further than the 19th and 20th centuries.
Answer:
I know that the musical alphabet starts with A and goes to G

Here is your mistake.  The musical alphabet of modern music notation starts with C, as can be seen because C2 is a much lower note than B2 in the scientific notation, and c' is a much lower note than b' (or rather h') in the Helmholtz notation.
That is, by the time octave designations were added to note pitches, the base note of the chosen reference scale had already shifted from Aeolian mode (which starts with A) to Ionian mode (which starts with C).
Yes, it would have ended up looking more logical if octave relations would have been nailed down while A was still leading the pack.
Blame history.
Answer: To add to all the answers (and to summarize), the names weren't thought from English, not even from an alphabet but a religious text. English names were way too later (as far as I know), so even if romance languages and English (and some other maybe) have "ABCDEFG" as the first letters in their alphabet, Guido d'Arezzo didn't think about the alphabet in the first place.
Not that he didn't, but as I see on the Guidonian Hand they are uesd diferently.
Comment: The aspect of the Guidonian system that has changed the least in the last millennium is the alphabetical letters.  The syllables and their use have changed rather more.  For example, D in the Guidonian system is the same as D today, the note a whole step above that indicated by the C clef and a minor third below that indicated by the F clef, but _re_ in the Guidonian system can denote D, G, or A.
Answer: I hope you don't find this answer to simplistic If you look at the keyboard and start with c and look at it again and start with A you would see that the black notes spacing of groups of 2 followed by groups of three are not the same . this would make the circle of fifths no longer function . You could however start with A but consider it a minor key you still use only white notes and your order would be minor,diminished major,minor minor major major in chord order and you could still follow the rules of building chords with every second name convention and the circle of fifths working on the inside where A minor is the inside circle of c major and chords are built with notes 1-3-5-7-9-11-13 using every second note name over two octaves.
Bob Forrest amateur composer
Comment: The circle of fifths works fine no matter which pitch one starts on. That's what makes it a circle.
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Answer: The theory that the Minor Scale starts with the letter A is plausible. However, has anyone thought of the fact that on a piano C is just the middle key (which we refer to as "Middle C") on the keyboard--half the notes are above it and half are below. It has nothing to do with Major or Minor key signatures.
Comment: Middle C is not the middle key on the standard keyboard.
Comment: @Aaron indeed, with an even number of keys, there is no middle key.
The closest you can get is a middle pair of keys, which are e and f.
 Furthermore, LAntione, C had its special status at least 8 centuries before the 88-key keyboard became standard.  It was already special in the time of Guido d'Arezzo, 1000 years ago, while the piano reached its present compass about 200 years ago.
Comment: @phoog 200 or later. My piano, from the 1930s has 85 keys (A to A) over 7 octaves, so the middle note is E flat.
Comment: @Peter well perhaps the first 88-key pianos arose then.  I don't know when that compass became more or less standard, but even today it is not universal; there continue to be pianos made with different numbers of keys.


What questions should be closed with reason "too localized"?

Question: What is the definition of "too localized" for closing a question? I see several suggestions, but nothing definitive or specific.
Comment: See also [Do "fix my code pleeese!" questions fit into "too localized" case?](http://meta.stackexchange.com/questions/82874/do-fix-my-code-pleeese-questions-fit-into-too-localized-case)
Answer: "Too localized" should be used for very tiny geographic regions or vanishingly small periods of time. It is used when a question cannot possibly be answered because nobody participating in the site is likely to know the answer, and even if it were answered, nobody else would care.
For me, the canonical "too localized" question would be:

Why is there a green Honda Civic parked out in front of my house?

This is too localized because:

Who cares?
Is it even still there? Go check.
What are the chances that this question could ever be answered in a way that would benefit anyone else?
Now is it there?

There seems to be some knee-jerk closing of questions as "too localized" throughout Stack Exchange simply because they mention a time span or because they mention a geography. There are many questions which are limited in time or which are limited in geography, which, nevertheless, must not be closed as "too localized." For example:

A question about handling special characters which only appear in Turkish. Even though, yes, Turkey is a place, and only reflects a small portion of the developers in the world, the question is still extremely useful.
A question about software companies in Montreal. Believe me, there are way more programmers in Montreal than there are OCaml programmers, and I've never seen anyone suggest that an OCaml question should be closed. If the question were about one street in Montreal it might be too localized to get an answer. (BTW that question would no longer be considered on topic for Stack Overflow, but "too localized" it is not).
A question that only applies to a certain build of software. For example, a developer discussing a bug that only occurs in a certain version of the .NET framework. Sure, that version is going to be replaced with another version, which might fix the bug, but we're still going to answer it!

I am increasingly seeing trigger-happy people who misunderstand the purpose of this close reason... yesterday someone on Meta.SO voted to close a question about Stack Overflow Dev Days 2011 on the grounds that it was "too localized." COME ON!
Comment: I suspect @Closer was messing with you, Joel.
Comment: I don't necessarily disagree with this, but it is a bit of a departure from established trends. Specifically, "where can I find X in Y" questions have almost always been closed as TL when "Y" is - roughly - anything smaller than a province or state. Does the whole team concur that these should be allowed? I worry that in practice, this could lead to a glut of, basically, shopping questions, that would be better placed on a site like Red Flag Deals.
Comment: what?! i've been trolled?! :) But seriously, though, I see "vote to close as too localized" way too often, although it doesn't usually pass, I just wanted to make sure people understood that this close reason is really for situations that are so rare as to be unanswerable.
Comment: May I suggest closing those annoying OCaml questions? And while we're on it - how about Montreal? ;)
Comment: Obviously too localized is/was a valid reason, but your third point should be removed because it makes it sound like SE sites are *not* a place where people can get help for problems they are facing, and anyone who has a problem is only welcome to ask if their problem is so general that it could apply to a enough *other* people. This has two problems: • the asker doesn't care about other people, and certainly not in the future; they are trying to get help with *their* immediate problem • if it *is* a general problem, then chances are it has already been solved elsewhere, so why bother with SE?
Answer: Shouldn't some of the questions regarding compiler errors be closed as too localized? If someone forgets to add a semicolon or close a parenthesis that is too localized; it only applies to him in a very specific point in time and will ultimately benefit no one except for him. Stack Overflow is not a crowd-sourced compiler/debugger.
Here are a few questions that fit this criteria:

https://stackoverflow.com/questions/5829928/incorrect-syntax-near-the-keyword-as
https://stackoverflow.com/questions/5787666/code-eror-to-display-data-in-grid-from-textbox (actually, most of this guy's questions seem to be like the one linked)
https://stackoverflow.com/questions/5831673/sql-server-2008

The list just goes on forever. I'm not saying we should help these people out, but I also don't see the benefit to the community, as a whole.
Comment: I agree, "fix my beginner level code" questions could in many cases be "too localized" closures. I mean, I hope the guy gets an answer before the votes fill up, but beyond that, the question really doesn't need to stick around.
Comment: Most of these questions can be answered in a comment. So you can close a question and still answer it without much problems...
Comment: This was discussed by Jeff and Joel in the SO podcast from the other week (although I can't remember what there consensus was :(). Jeff did say that he was pro-actively closing 'low' quality questions like the ones you mention though.
Comment: @DanatheSane: I think this should be done more often, and not just by Jeff. It should be included in some way in the wording of the *Too localized* close reason.
Comment: @Dana, I've added an answer that provides some points from the podcast you're referencing.
Answer: Per Stack Exchange Podcast #02 (not Stack Overflow Podcast #02) starting at ~22:00, here are some guidelines for "too localized," mostly from Jeff:

not limited to physical location
this was only relevant for two minutes, those two minutes occurred yesterday, and it'll never be relevant again
you're curious about the syntax of a programming language you wrote that nobody else has ever used
when will [product name] be released? (close after the release takes place; see also Are strongly on-topic questions about predicting the future allowed?)
questions can be localized without being too localized

"The right frame of mind is 'How many people are going to benefit from this question being asked?' It's in your interest, and really everyone's interest, for you to try to ask questions that can apply to as many people as possible. Not to an absurd degree. If it's only helping you, then that's not making the world any better, but if you can just try to generalize a little bit so more people will think 'hey, I had that problem once'; if I can put myself in your shoes, then all of a sudden, hey, I'm interested in answering your question."
(Disclaimer: this isn't a true quotation, I picked and chose words Jeff actually used and attempted to preserve his meaning/intent.)

Joel's answer to this question summarizes a lot of his thoughts from the podcast; I haven't bothered recopying them here.
EDIT:
I just noticed that Jeff weighed in on this a few weeks ago:

If it's about a specific error code that can be somewhat narrowed down, it's ok-ish.
If it's about "oops, I forgot to put a semi-colon at the end of a line", then I don't see any value in it, and it should be flagged for deletion.
Answer: The now-all-too-common "debug this code for me" or "what is wrong with my code?" falls into this category, since SO questions should be about languages and/or tools. SO is not a crowdsourced debugger, nor a discussion forum, nor simply a place to "get free help".
Answer:
Limited amount of answerability based on the location asked (Blah Blah in [insert town here])
Spoken language is not English
Requires extensive knowledge of a custom built system which is not available for others to use.

Those are some basic reasons off the top of my head.
Comment: I'm sure I've also seen questions closed because they were too localized in *time*.
Answer: I'd use that close reason when the question is written in a non-English language.
Answer: Using the following query on google: http://www.google.ca/search?q=site:stackoverflow.com+"too+localized"

When questions are specific to a certain local: Best Software Companies in Montreal
Questions related to pay: Entry level software developer pay
Extremely niche questions: GDI has been accelerated. Does anyone know when this happened?
Institution specific questions: B.com vs B.tech (in computer science)
Comment: "GDI has been accelerated. Does anyone know when this happened?" I don't see how that is question is too narrow. Just look at how many people actually answered it before it got closed. It's a good thing QBziZ before other people got a chance to write even more useful answers. :p
Comment: Informative, but only indicates 'popularity' rather than the optimal use.
Comment: @Dana - It seems on SO there is a fuzzy line between popular/optimal (ie Wiki Questions) they were designed for one thing and became another.  So doesn't popularity then define optimal use?
Comment: Fair enough, I suppose I'm tempted to be more lenient than the mods these examples.
Answer: Interesting.  I always thought that meant that the question does not have appeal to a broad enough base of developers.  It's like that guy at a company meeting with 500 people in it who will raise his hand and ask a really specific question about his project that nobody else in the room gives a damn about and won't get off of it. :)  Something like ...

"Here at my company we use a library
  called AwesomeLib.  But when I call
  DoGreatStuff on CoolObject in
  AwesomeLib, I get the following
  exception ..."

It's a question and it's programming related.  It might be considered "not a real question," but assuming the guy is sincere in asking it, it's just too localized to be answered or interesting to anyone if I did answer it (like I'm in his company or something).  That was what I thought anyway.
Comment: So basically, people are only to answer questions that that appeal to as many as possible, rather than to help someone solve their problem? I thought these sites were exactly for that: a place where a person can get help solving their problem.
Comment: Don't see why a question should be closed because of this though.


SAML authentication and custom redirect URL

Question: We're in the process of looking into implementing SAML based SSO authentication in our applications and I'm wondering if it's possible to specify custom redirect URLs via SAML.  In other words can we have a single Service Provider configured in the Identity Provider and have the Service Provider via the SAML request specify where the Identity Provider should redirect the user to after logging in?
The reason why we're looking for something like this is because our applications run on different servers depending on which stage of development they are in (dev, test, staging, prod).  It would be great if we didn't have to configure four separate Service Provider entries in the Identity Provider for every single application we'll be migrating over to SAML SSO.
Answer: Each SP has its own Assertion Consumer Service endpoint where the SAMLResponse is validated.
One of the checks that the SP does is verify that the SAMLResponse was sent to the right ACS endpoint, so you cant process a SAMLResponse built for the prod server at the test server.
If you decide to process all the SAMLResponses in 1 unique SP endpoints and your idea is to use the "RelayState" parameter to indicate from the SP to the IdP where to redirect the user after process the SAMLResponse at the ACS you may set a global session readable by all the environments because there is no secure/standard method to send the processed data from the to the final endpoint.
If you are not able to set a global session readable by all environments then you must register all the SPs in the IdP.


How do you store membrane proteins?

Question: We're producing some membrane proteins and they aren't amenable to freeze thaws even when we add glycerol. The proteins are solubilized in detergent above the cmc so they should be in micelle form in solution. Currently, they are being held at 4C. I'm curious what is the best way to store them for long term use?
Comment: this sounds like a case by case issue,but i'd be interested to see what someone with experience would say.
Comment: Can't you just store the cells you use to produce the protein and thaw them when you need them to produce more? Like that you wouldn't need to store the protein itself for a longer time.
Comment: You could always just add sodium azide and keep them at +4, so they don't have to go through a freeze/thaw at all.
Comment: @Suvidu, I would counter that if the purification protocol is a pain, it's a valuable investment to be able to scaleup effectively.
Comment: I've heard some MPs like lac permease can be scaled up, others are more delicate.  do you have an assay, or even crude crystallization conditions? that would really help of course.
Answer: I work with membrane proteins and in my experience some proteins can be frozen and thawed without any problems, other proteins just don't like that. It's linked to the stability of the protein. If you really need to freeze the protein you may think about playing around with different detergents to see if you can improve the stability of the protein.
General rules:
- freezing membrane proteins at -80°C without glycerol
- avoiding protein freeze-thaw cycles, making aliquots before freezing
- keeping them at 4°C only for short term use
- after concentration always spinning the protein (10 min at 100k for example) to precipitate aggregated material. Aggregation causes aggregation, so you want to get rid of it.
Comment: Hello metionina. This is an informative answer. Can you, if possible, add reference to the protocol that you follow.
Comment: I couldn't find any published protocol, probably because every membrane protein behaves very differently. This is what I learnt working with membrane proteins and what people mostly do where I work. Then, again, every membrane protein is different and I suppose you could find what I said true, partially true or false for your protein. These are for me general things I would do when working with a new protein.
Answer: If i were to have a blind attempt at your question, it is never a good idea to freeze thaw any protein, not even cell lysates. Thats the whole point of glycerol use, which we use in our lab at 50% (v/v) to store bead bound proteins. Thats also why antibodies and restriction enzymes are stored in glycerol since freeze thawing antibodies dissolved in water often leads to their degradation, although you only tend to store stuff in glycerol, like restriction enzymes, if the concentration of the protein is very very high. One golden trick I use is aliquoting my samples and snap freeze them in liquid nitrogen and store in -80 freezer. I'm curious as to what happens with your protein, does it degrade after a freeze thaw cycle? (I'm aware that transmembrane proteins are notorious when it comes to storage/maintenance due to their awkward hydrophobic transmembrane region so its best to speak to an x-ray crystallography expert, if there is some one like that roaming around your research lab :), since they have face problems like this quite frequently and have excellent suggestions). Are your proteins GST tagged and bound to glutathione agarose beads? or you use HIS tags and nickel beads and elute the purified protein through imidazole? i suspect it is GST in which case its probably not a good idea to snap freeze although I have (somehow) had frozen glycerol beads at -20 and they were fine after use. I have had a friend talking about protein purification and the fact that protein isolation has to be done fresh so you might have to go down that root if your current method is not ideal. Also one last question, are you purifying you protein bacterially or they get secreted into the media? I suspect if its a membrane protein you are using the cell based system since if it was E. coli you were using (as suggested above) you could have just had your protein expressed through IPTG and just washed you cell pellet in STE buffer and spun it down hard and stored the pellet at -20, in which case would save you some time in the purification process. The use of Na azide is a good idea too but I only use it for primary antibody storage which is already dissolved in the block buffer such as 5%-BSA-TBST for WB and store the whole thing at 4 oC and Na azide is there to prevent BSA and the Ab going off.
The main problem many many people have, including my self is that the majority of times, over expressed protein is insoluble or just doesn't get expressed in certain systems so you are very lucky to have a working system.
This is all I know about protein storage. I hope this helps.

How do you store membrane proteins?


Singleton pattern for database.

Question: I would like to know if using singleton pattern for my databaseHelper.java class, which have all database related operations i.e (Crud) is a good idea or not? I want to minimize my database hit and memory usage. I use c3p0 i.e connection pooling.
Answer: Strictly speaking, this is an awful idea for too many reasons.
I suggest you run a simple google search, and even here to find out why. No point in spaming this site.
For example:

Is it OK to have singleton DAO objects?
https://stackoverflow.com/questions/6516230/is-it-ok-to-make-a-dao-class-as-singleton
Singleton Design Pattern: Pitfalls
Alternatives for the singleton pattern? (C# but you can get the idea)

Try looking at the solutions provided by the Spring framework. It would give you a much better starting point.

Singleton pattern for database.