I decided to skip one week of CS50 since I wanted to focus more on my Research Proposal and "prepare" for the Financial Econometrics test. After two weeks, I'm back. This time, with an introduction to Memory, Pointers, and Files. I remember that this was the thing that I had difficulty understanding, and I still do.
The part on Memory was quite easy to understand, and I think I have a better understanding of Pointers now, but I'm still not comfortable with Files. While doing the Problem Set 4 Recover, I had to make notes and rewatch some parts of the walkthrough several times, because I wasn't sure how and at which part of the codes to use it.
Well... here it is... my progress.
Overall, I think Filter was a lot easier than Recover, despite having more to do. But it didn't mean that I got everything correct on the first go. Like, for the Blur subsection of Filter, I made a bug while writing the codes. I didn't realise that my output would produce wrong answers because I was using altered values for Red Green Blue pixels as part of producing a new blurred image when I shouldn't. I thought that I did something wrong for the algebra, but I didn't. It was just a bug that I had to fix by creating a temporary image or a copy of the original image, that I can alter without having problems using the wrong sets of Red Green Blue pixels by using the values of the original picture, and not those of the copy.
As for Recover, after getting several Segmentation faults and blank images, reading through Stack Exhange and Reddit to find out what's wrong with my codes, I managed to get everything correct eventually, though upon checking my gradebook, I realised that I didn't get full marks for both Filter and Recover due to style.
After checking my submissions on Style50, I found the reason for the non-full marks. Apparently, for Filter it was because I was writing really long lines of codes, and I could've made it shorter by using the command for "Enter" using '\n' and that wouldn't affect my codes. This is something that I should use in the next problem sets if I need it.
But I'm not sure about the style in Recover. Maybe this all happened because I kept copying and pasting stuffs around, so the gaps are all around the place. Although visually, I see gaps, but the computer doesn't, so I guess this was inevitable.
Okay, so that was it for Problem Set 4. I will be back for next week's materials, InShaAllah.