Today's Progress: I added more code to my solution for the problem from yesterday, getting further and further into the logic of the initial solution that I planned on implementing and checking if each part was doing what I wanted it to do.
Thoughts: This program uses repetitive syntax and for loops. I'll clean it up once I figure out the solution.
Today's Progress: My OCD kicked in and I ended up cleaning my code ahead of time. While I was in the cleaning process, the screen flashed that I passed this certification project. I wasn't even finished cleaning. So now I am on Caesars Cipher.
Thoughts: I wonder if the last project will be extremely difficult.
Today's Progress: I returned to freeCodeCamp last night and finished Caesars Cipher. Now I am on Telephone Number Validator. I have five bugs left to fix. The regex is the bug lord, I might have to cut it up into each of its parts.
Thoughts: I think my code needs cleaning up, but I still get confused with the reduce method and its variations. And switch statements will add more lines of code.
Today's Progress: I didn't cut up the regex, I just turned it into an array. Still, I don't delete the regex just in case it would still be useful (because the array caused an additional bug). I'll delete it once I'm sure that it's no longer needed. By the way, I'm getting used to the .every() method.
Thoughts: This is becoming like my website, when fixing one side of the problem creates errors at the other side. The difference is that it doesn't bother me anymore. I'm wondering if I'm developing a kind of numbness to the pain of programming.
Today's Progress: I finally finished Telephone Number Validator. I remembered that if-else statements stopped running as soon as a condition was met. Some of the bugs were caused by me putting conditions within many identical conditions, the program wasn't reaching the lower conditions because it already stopped in a higher condition. Now I have only one project left to finish before I finish the whole course.
Thoughts: I feel ashamed of my code for Telephone Number Validator, it looks so messy. 🙈 At least, my .every() method actually works. I felt embarrassed at first when it wasn't working, but I learned later on that it was the fault of the identical conditions.
Today's Progress: I started working on Cash Register. I created my first object. Meaning, I created it as my own idea and without guidance from freeCodeCamp. I have three bugs left to fix.
Thoughts: I was scared when I thought that this project might involve objects. Object are some of those things that I always fear, but once I start working with them, I find them easy to work with. I wonder why. 🤔
Today's Progress: I started working on one of the three bugs. I ended up creating three arrays, adding around five loops, and then deleting most of the loops. In the image above, I was writing a sort of pseudocode within the program. I will include it into the program when I get back.
Thoughts: I hope the complete-code version of my semi-pseudocode will work. Anyway, I got lost in my own program earlier because I had given my variables silly names. So I changed "pieces" to "billsAndCoins" and "piece" to "namesOfCurrency". Programming books always advised to make obvious variable names, but I liked to be original. I will obey the programming books from now on.
Link to work: My freeCodeCamp progress
No comments:
Post a Comment