Reducing complexity in specification While the quantity of code is reduced, how much are we really simplifying the persistence problem? It seems to me we are moving complexity from one language of specification (Java) to another (an XML dialect). While the XML config is not unintelligible...
Re: How would you write a shuffle algorithm? I had posted this earlier but did not do a preview.
public static int[] Shuffle(int[] cards)
{
var cardsCount = cards.Length;
int[] shuffledCards = new int[cardsCount];
var counter = 0;
var iter = true;
var random = new Random();
while (iter)
{
var ...
Re: How would you write a shuffle algorithm? I was given this question for an interview and I went home and just took a first crack at it. This is what I intuitively came up with.
font color="#0000ff" size="3"font color="#0000ff" size="3"
public
{
}
shuffledCards[counte...
Re: iPhone email, how do you have it configured. I assume by now you've discovered that Gmail supports IMAP? May they didn't at the time of this post ... but definitely now - drop the AOL forwarding like a sack of hammers!
Re: How would you write a shuffle algorithm?
These issues are all covered pretty well in the Wikipedia entries for Shuffling and the Knuth_shuffle. Swapping only 26 times clearly cannot produce a perfect shuffle by a pigeonhole argument.
If you do 26 swaps, each with 52 possibilities...
Re: Too Little Time To Shuffle Interesting. Can you summarize the rules and how the game was played. I'm curious if it is the same game.