CS 373 Spring 2021: Blog #9
2 min readApr 4, 2021
- What did you do this past week?
Tuesday was the deadline for phase 2, and I spent all my time after class working on testing and refining the documentation. After that, I took a break until today to start phase 3. I worked about 3 hours today to switch from using flask_restless to create APIs to using custom APIs, with which we can specify all the details. Having this transition will prepare us to add sorting and filtering features later on. - What’s in your way?
For now, phase 2 grades are not released, so we cannot update our database to include some modifications on data that we plan to include in phase 3. Hopefully, all grades will be released by tomorrow and we can have all freedom to work on the project. - What will you do next week?
I have a midterm on Tuesday and another one on Thursday, so I will be working less on the project until Friday. In the meanwhile, I will work on some simple backend features. - If you read it, what did you think of the Dependency Inversion Principle?
It makes sense to me to separate policy, mechanism, and details into three files. I will try to use this in my projects. - What was your experience of +, *, ** and decorators?
It took me multiple attempts in the exercise to understand how to use *, **, and decorators. But I think mastering them will be very useful as a software developer using python. - What made you happy this week?
I finally got all 3 reference letters required for the 5-year integrated BSMS program! - What’s your pick-of-the-week or tip-of-the-week?
My team used flask_restless for our backend in phase 2. However we later realized the APIs were very inflexible, so it will be hard and ugly to implement filtering and sorting features for phase 3. So we decided to switch back to custom APIs. While looking through the documentation, I noticed there are .filter and .order_by methods within Flask. Although I haven’t try to implement them, I think it will be a good start to try to use them to implement the filtering and sorting features.
https://flask-sqlalchemy.palletsprojects.com/en/2.x/queries/