CS373 Fall 2021: Week 6

Ethan Tan
2 min readOct 4, 2021

Week 6

What did you do this past week?

There was quite a bit of homework and projects to do! I was fairly busy, and our group didn’t get as far as we’d like for our project. I do think we’ve made good progress though, and the rest seems pretty simple to complete.

What’s in your way?

My current workload has me pretty stressed, which I find tends to make me less productive. Funny how that works.

What will you do next week?

The busyness from this week carries over, and I also have an exam. I’m not too worried though; a few more days of hard work and then hopefully a bit of a break.

If you read it, what did you think of Paper #6: Single Responsibility Principle?

While the principle seems sound, there’s so many different situations where it may or may not apply that it seems rather useless in helping design software. When does it make the code rigid to couple things? When does SRP introduce needless complexity? Rather, I think that knowing when and how to apply the single responsibility principle is something that just comes with experience designing software. So it may be a useful thing to keep in mind, but not reliably.

What was your experience of factorial, reduce, and operators?

The different implementations of factorial really show off how Python supports multiple programming paradigms (except recursion, I want my TCO). Reduce is something that I find extremely useful in other languages, especially functional languages like Haskell or Lisp. In Haskell, it’s the foldl class of functions, which can be used to great effect in doing a variety of things. It’s always nice to see languages support high-level constructs like these that can simplify code tremendously.

Operators are cool, and overloading operators is cool too. The differences between Python and C++ operators was pretty enlightening, although the real fun begins when you can define your own (well, kind of — in Haskell, operators are really just infix functions, and you can make your own infix functions).

You can tell I’m really showing my biases here.

What made you happy this week?

I bought some tea, and it’s very nice! Smells amazing, I’ve had it every day since I got it.

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

learnxinyminutes.com/ is a nice resource for picking up new languages and tools pretty quickly. I used it to kickstart my Go lab for Concurrency, and it contains quite a wide variety of other things to learn. Unfortunately, I didn’t find anything about React.