CS 373 Spring 2021 Week 8: Amy Ouyang

Amy Ouyang
CS 373 Software Engineering
2 min readMar 15, 2021

--

Welcome to Week 8 of my Software Engineering blog!

  1. What did you do this past week?

My team and I got a headstart on Phase II; we’ve mostly been working on user stories and data collection, specifically extracting and organizing data from external APIs. We also ran into a major roadblock so we’ve been hard at work coming up with ways in which we could best resolve it.

2. What’s in your way?

There’s a lot of work I plan on getting done over Spring Break. There are so many things that I want to explore and gain experience in, and not enough time to do so.

3. What will you do next week?

For this project, I plan on working on fixing the major issue our team ran into, as well as API endpoint testing, data scraping, and setting up the SQL database.

4. If you read it, what did you think of the Liskov Substitution Principle?

The Liskov Substitution Principle is an extension of the Open-Closed Principle from last week. Both principles help developers write more maintainable, reusable, and robust code. The Liskov Substitution Principle helps developers understand when a class can and cannot be derived from a parent class since code that uses objects from the base class must also be able to conform to objects of a derived class without explicitly knowing so. qualifies that code should be open for extension only if the child's behavior can conform to the parent’s behavior without substantial modification. In summary, as a wise programmer once said, “model your classes based on behaviours not on properties; model your data based on properties and not on behaviours”.

5. What was your experience of iteration, comprehensions, generators, and digits iterator?

Python has many built-in functions, such as map(), filter(), reduce()and zip(), that offer greater efficiency when working with iterables (e.g: lists, strings, tuples, sets, dictionaries). List comprehensions provide compact syntax for deriving a list from another list. Generators return a lazy iterator. These features all improve code concision. Digits iterator was a simple exercise highlighting the features of an iterator — all iterators are exhaustible, and an iterator returns itself when iter() is called.

6. What made you happy this week?

Start of spring break!

7. What’s your pick-of-the-week or tip-of-the-week?

Here’s a simple graphic that clearly illustrates the structure of a Python list comprehension which gets the square (using the power of operator **) of multiples of 3 from 0 to 50.

Source: Dev.to

--

--