The purpose of this project is to provide a quick and convenient way for a computer user to obtain a purely random password that provides specific criteria, i.e., number of characters and type of characters: digits, lower case letters, upper case letters, and a selection of special symbols.
The requirement was to create this password generator; HTML, CSS, and Javascript files were provided. The instructions were to prompt the user to enter the length of the password (between 8-128); and the type of characters mentioned above. I took this direction in the generic sense of prompt--to give the user instructions on what to do, not literally use prompts to receive their requirements.
I did this in the form of simple instructions at the top of the page, as can be seen in the screenshot below.
https://laynehansen.github.io/password_generator/
I simply ask the user how many characters they need in their password, between 8 and 128. I then ask "Your Password includes? You must select at least one option:". I included this last statement to signal the format the user must use in order to obtain their password. They they check the boxes associate with the character types they prefer/need. Once their number is entered in the box, and the character types are checked, they simply press the "Generate Password" button. The resultant password then appears in the window.
I learned four very important lessons.
-
Whatever you imagine, you can create using HTML, CSS, and Javascript. I tried to put myself in place of an everyday internet user. They want a simple application that is straightforward, easy to use, pleasant to look at, and easy to use. I then designed the front end of the application with these things in mind.
-
Javascript is a very difficult language, especially having just been introduced to it. I liken it to a very difficult spoken language that you've never heard before. That said, it is a robust language that allows programmers several approaches to solving the problems they've been given.
-
Pseudocoding is extremely important with Javascript. This point has been stressed. The impulse is to nod your head, say "yeah yeah" and then move forward with coding. However, a half hour to an hour of planning and sketching and designing in pseudocode can save you HOURS at the back end of your project. I did pseduocode before beginning the project; however, I strayed away from my plans and got stuck in certain parts, where I didn't know how to proceed.
-
Stick to the plan you've created. If your plan isn't good enough, make it better. This ties in to #3. As mentioned, it's much better to take more time mapping your plan and then taking the time to pseudocode it before writing a single line of code.
Much thanks to the TAs for this course. Chris Sannar, Andrew Tirpok, Mason Short (you're a beast), and Andi, who didn't specifically help me with this project, but convinced me to not take a sledgehammer to my computer. Lastly and not leastly are AJ, Collin, and especially Diego. Working together is the only way we're going to make it through. Thanks y'all.