Go to project: Crazy Jewish Mom detector
Do you know about the Instagram account Crazy Jewish Mom? I love it! Even though my mom is no where near that level, or maybe because she’s not, I laugh out loud every time I read a text conversation!
Anyways, the combination of JDs email project and the Crazy Jewish Mom account inspired me to do this project. It’s a tool for mothers who want’s to make sure that the texts they send their daughters/sons are safe and free from “crazy” words. This is just in good humor, I totally adore the Crazy Jewish Mom, and kinda wish she was mine.
Some of my lessons from today:
- Found out that in order to register the backspace event (and let the user correct their texts from red to yellow to green) I had to use the .keyup() and not the .keypressed().
- The BF helped me with the functionality of comparing the users text to the words in the array. Apparently, not as easy as I had imagined. I thought I would be able to use the .find(), but the BF said that, that function only registers IF the word is there, not how many times it’s there. So we had to figure out something else. First we converted all the usertext into lowercase (because the words in the array is lowercase). Then we had to remove everything that was NOT letters or spaces. There are more ways to do that, but the BF showed me something called a Regular Expression. Yeah. There’s nothing REGULAR about that expression, I tell ya. The most important thing is that it worked, and I kinda understood why. The final thing we did was to put all the words into an array, except the spaces. And from that I was able to compare the two arrays, and figure out how many crazy words were in the text.
- The rest was pretty straight forward. I actually managed to not panic about doing some of the script myself. When I got stuck I wrote some of the functionalities down. And then I just started. Maybe it was not totally correct order, but the BF said, that what I had done was correct! Yay!