DEV Community

Cover image for CS50P Weeks 3 - 5
Haley Elder
Haley Elder

Posted on

CS50P Weeks 3 - 5

Github tracking repo -- here
Crossposted on my blog Craft && Code -- here

Did not expect to get to write another one of these so quick, but here we are: weeks 3 to 5 covering Exceptions, Libraries and Unit Testing. As expected, the learning curve for new topics and subjects grew with each new week and problem set to test our knowledge and how to approach and solve a problem programmatically.

I’ve noticed a possible trend of the send to last problem set has been the most difficult of the bunch, at least to me. For the week on exceptions, it was outdated.py FOR SURE. I’ve known the pain of working through timezones, formatting, and date types from a past JavaScript Slack bot projects but this was a whole new approach. Eventually got it, even had to write out the pseudocode on paper to process the flow since I was brainstuck trying to test directly in the editor. Took a few stabs over a couple days, but eventually got it, I was stoked! 😁

pseudocode python on notebook paper

For the libraries lecture, I knew of python packages before and the helpful power behind them, or past examples using node packages to limit ‘reinventing the wheel’ of work. There were the useful smaller ones to generate and sort random numbers or letters...or an ASCII cow or dino with speech bubbles 😂 Once again, second to last, ‘little professor’ was a pain problem for me! I admit I got impatient with a test case and moved on, the only one so far (more on this later) I have missed in this course.

The last bit of lecture and problems I recall from attempting to use during my watchlist data analysis to using API calls. The specifications for the final project was also posted during this time, and most likely, mine will be incorporating at least one API. Not quite sure what it’s going to be yet, but have some time before building it; there’s a note on my phone of random ideas :)

The last week was the shortest but the most rewarding. We had to take past problems, refactor them to pass unit tests that we wrote, and make sure those passed as well. One of these I knew I was going to dread redoing was plates.py from week 2; I had previously missed a test case because it felt too difficult at the time. Instead, went back to fix that test case, submit for 100%, and got through all unit tests as well! Double win 😁

It’s been a pretty busy month with full time work and keeping up with this course, things may slow down now that the weather is getting nicer to do outdoorsy things, updates may slow. Especially next week with taking a much needed week off to go do aforementioned outdoorsy things and relax!

– H

Top comments (0)