I was really having a hard time with the guessing numbers challenge as it took me a while to do all initializations. I had tons of errors by forgetting that I put double functions in my code, messing up an if-else statement and getting around and checking if all functions work well in different scenarios. What killed me the most was the fact that sometimes my output will be just a spam of INVALID INPUTs. It took me hours to finish the code. I had the most fun with the kitty kata challenge as it is the easiest out of the bunch and it was nostalgic for me since we also made a similar code for it. The cricket was a hard one too, but I had fun with it. Most of the errors for that were because of the compiler! For some reason, even though I enter a value of float/double it would end up as an integer. I then realized that the output was correct as it had indeed round of the value of my input. The leap year was a little bit easy, like the Kitty Kata challenge, though I like the other challenges far better! I look forward to more challenges
Collections of Data Challenge gave me a little bit more challenge than the first one. I finished the first three tasks for Part 1 with ease as it is similar to programs that I have done before but it introduced me to vectors which is in fact another term for a dynamic array. For the Program Within You part b and c, I did not put a validation function for the code as it was not indicated to do it. At first, I thought I could finish the challenge within the time period given but I was dead wrong when I got stuck at the second part of the challenge which has more requirements like the header file, the cpp file and the validation function. I was having a hard time to understand the concept for two days up until the deadline. I had some help from different people but I just can’t seem to make the code work even if they had given me some explanations and advice. I had no idea on what I was doing so I asked for an extension. The thing is, after a couple of hours pondering on what I could do, my boyfriend told me to rest up and sleep because I was sleep deprived and it’s not helping me solve it. After sleeping for a couple of hours, I woke up and I played a couple of games in DOTA 2. After my fourth game, I suddenly got the urge to code and I finally made it work! It’s possible that I have not been able to understand the concepts due to stress and information overload. I learned through this exercise that sometimes, you just have to rest up and quit on working for a while to solve problems efficiently with a clear mind. I would rate this challenge as a Medium but if I would do it again, it would be easier for next time.
The first three programs in the challenge were pretty fun. I had a little bit of a hard time solving the Randomized Grid but I was able to make it work! The reason why it was hard for me was because I didn’t know how I should code on how to make the draw function to stop from looping. Thankfully I got some help and I was able to do it with some minor tweaks in the code. As for the Pixel Batman, it roughly took me about a day or two to have it solved. I am not a fan of vectors and I am pretty much refreshing myself on the subject. I was able to get it done by figuring out that it’s okay to use squares (I thought that we were supposed to fill the grid which got me stuck). As for the Pixel Clicker, it was the most difficult one out of the bunch. I decided to not completely finish it because I would rather have some input on it instead of trying to perfect it. What I managed to do for the pixel clicker was I was able to add a grid unto the code which was also resizable like the batman pixel, I was able to have the boxes toggle from black to white (although you have to double click it instead of one because I did not use any storage/vectors for it and I think I would have to repeat my code if I had to do so). The only problems that I haven’t fixed is the part that I had to double click a grid just to have it to toggle from black to white. This is because I have only made a statement that if the mouse is pressed, it will toggle from white to black. This makes the square to toggle from white to black only if you are selecting the same box over and over again. If you select another box, it will not toggle unless you click it twice since the initial color for all the squares are white. I only didn’t tweak the app where if you resize it, it will reset to all white even if you have already have grids that are colored black. The last program had me up for days and sadly, I could not finish it. I will have to go back through the notes and lectures and will still continue to solve this during free time as a challenge to myself.
I had a hard time coding the second part of the challenge. I was confused as to how I will define the struct as a class in a header file so I just decided to implement what I learned from the first exercise to the second part. For me this was the hardest challenge for the whole class because I was not familiar with C++ and how classes and structs work. I would say that the first challenge is pretty easy, my code didn’t work because the vector I have created was wrong. After that fix, it worked well, finally! I have finished this challenge within 12 hours. I would read more of how they work once I have the free time after the Twin Stick project.