Hi James, great video. One gotcha you missed is that by using random method you won’t be able to guarantee that all categories are satisfied i.e. a password of length two with symbols and lowercase selected is most likely to return two lowercase letters than their combination
yh. I liked the challenge so I tried solving it before watching his solution and noticed it too. and they'll probably be a minimum character length in the UI based on how many boxes are checked. my solution involved making sure the categories are satisfied before picking randomly and then shuffling the password at the end.
Right Bro i was also thinking same let's say user selected length of 8 and want only upperCase and lowerCase letters then, according to his logic there will be an array containing all the upperCase and lowerCase letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'], length will be = 52 then he is selecting the random index (between 0 and length of the array) and let's say the random Index which got selected are (21, 6, 8, 17, 19, 25, 3, 9) , so characters corresponding to the index's will be (V, G, I, R, T, Z, D, J), then we are adding these character into our password variable, so the password will all of upperCase letters but we are selecting upperCase and loweCase letters both.. His logic works fine most of the time but sometimes randomIndex which he is selecting could be all of upperCase letters and not of lowerCase letters..
Hi James, great video. One gotcha you missed is that by using random method you won’t be able to guarantee that all categories are satisfied i.e. a password of length two with symbols and lowercase selected is most likely to return two lowercase letters than their combination
yh. I liked the challenge so I tried solving it before watching his solution and noticed it too. and they'll probably be a minimum character length in the UI based on how many boxes are checked. my solution involved making sure the categories are satisfied before picking randomly and then shuffling the password at the end.
Aghhhh good point. Thanks for adding that here!
Motivated me to practice is more. Haven't really been sharpening my frontend skills. Been mainly focused on the backend. Thanks James
What is your vscode theme ? Great video!
first of all, your the best. second, you are the best, and third, you are the best
Nice video! I guess the excluding similar characters part would involve creating the letters array manually though
Wow ! Great content, thanks for sharing.
That was so cool, will try it out
:)
Great video, but Where does length come from in the for loop?
It’s a parameter in the function.
@@JamesQQuick 🤦🏽♂️🤦🏽♂️🤦🏽♂️ I was clearly half asleep, watching this again & I see it clearly now 🤣😳
Thank you!
James is kind, generous, and extraordinarily good looking.
I don't think I've ever seen any password requirement stating that a number MAY be included in the password, or an uppercase letter MAY occur? 🙂
Awesome
Your algorithm doesn't guarantie that all the required catagories are present in the generated password.
Why?
@@mhdfr Because the random selection might hit on lowercase letters only. But many sites requires the categories to be present.
Right Bro i was also thinking same
let's say user selected length of 8
and want only upperCase and lowerCase letters
then, according to his logic
there will be an array containing all the upperCase and lowerCase letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'], length will be = 52
then he is selecting the random index (between 0 and length of the array) and let's say the random Index which got selected are (21, 6, 8, 17, 19, 25, 3, 9) , so characters corresponding to the index's will be (V, G, I, R, T, Z, D, J), then we are adding these character into our password variable, so the password will all of upperCase letters but we are selecting upperCase and loweCase letters both..
His logic works fine most of the time but sometimes randomIndex which he is selecting could be all of upperCase letters and not of lowerCase letters..
I am going to try to make this in python🤣
No offense James but get some rest.
I get plenty :)