crazy they didn't add a overload for a list considering it is backed by an array anyways, oh well. thanks for the video Tim.
@IAmTimCorey Жыл бұрын
That would be nice.
@benjaminshinar9509 Жыл бұрын
I think it probably has something to do with garbage collection. both arrays and span are stack allocated. maybe the shuffling would mess up the reference tree if it was allocated on the heap.
@hqcart1 Жыл бұрын
how to create a new shuffled list and keep the original one in the same order?
@KeyboardKrieger Жыл бұрын
Personally I would clone the existing list and shuffle the new one. That's at least how I do it in card games for the deck.
@adam-xt8te Жыл бұрын
Mr Corey, do you have plan for making tutorial about publishing apps in MS Store?
@IAmTimCorey Жыл бұрын
Not at this time. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@FAHADBINYOUSUF Жыл бұрын
do you have any video on ABP Framework and .net Zero?
@IAmTimCorey Жыл бұрын
Nope, not yet. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@PerryCodes Жыл бұрын
I JUST needed something like this in a little utility that I'm using to learn the guitar fretboard... notes, chords, scales, and arpeggios - that sort of thing - and simply using .NET Random.Next() wasn't creating a good distribution (or maybe it was TOO good! Being asked to "Find the C on the A string" 4 times in a row... not ideal!), so I took to the interwebs to see what some options would be. This led me to learning about Fisher-Yates, Durstenfeld, and a reminder that one of these days, I should really make a better effort to get further than the first 50 pages of The Art of Computer Programming, because Knuth has a little something to say about algorithms! Anyways - creative use of a good ol' Shuffle provided a useful distribution of "random" objects.
@IAmTimCorey Жыл бұрын
Thanks for sharing!
@JoelKlee-s4l Жыл бұрын
Good content and you've got to keep up with the Jones.
@IAmTimCorey Жыл бұрын
Thanks.
@sbraudrick Жыл бұрын
There's no such thing as random when dealing with binary, there's always a seed. I'm interested what seed was used in this function. (I'm not suggesting you left anything out.) But there must be a seed whether it be time, some screwy calculation based on time, where the processor is in cycle count, etc... but there is no true random in computing, just a random you can't figure out in that carbon based thing in your head..... but this was cool to learn about and keep up the awesome content!
@IAmTimCorey Жыл бұрын
There's no such thing as generated random numbers. That's why Cloudflare uses 100 lava lamps to generate random numbers. However, for most cases, the Random library in C# works just fine (just not for cryptography). In .NET 6+, the Random library was upgraded to include the static Shared option. This is a thread-safe way to generate pseudo-random numbers in C# now. We don't get to set the seed value, though. If you want to do that, you would instantiate your own version of the Random class instead. As for what specific seed value it uses to start out, I'm not sure.
@luke2v52 Жыл бұрын
Howdy Tim! I was wondering if you were planning on updating the course website to use the new blazor or if you were going to continue without it. I ask since I have watched the why not blazor video on the iamtimcorey website course and it seems the new blazor might work out now.
@IAmTimCorey Жыл бұрын
I’m debating if I redo it using Blazor or not. There are compelling reasons both ways. I’m going to take some time to consider the options. After that, I’ll publish something about the process at least.