CS343 Blog 10

Ryanarifin
CS373 Software Engineering
4 min readApr 4, 2021
  1. What did you do this past week?

This past week, I started back up some old habits!

Habit number one: started working out again. After the Grand Canyon, I took a week or so off — it was physically grueling, and my body was absolutely pooped. It felt great getting back in the groove (although I was insanely sore after). Mount Everest here I come!

Habit number two: started working on my startup idea again! The past couple of weeks have been pretty busy, so I wasn’t able to work on my project as much as I wanted to. Last week, I got to get back on it!

Although my idea is in the very beginnings (like literally, I’m just researching and talking to people right now), it felt great to make some forward progress on that!

2. What’s in your way?

Selenium tests in CI!!! I’m so close to getting it to work — I can almost taste it.

I’ve debugged the pipeline and have made sure that the BE and React FE server is running correctly. I’ve also done my due diligence testing locally.

Testing locally with a Selenium setup similar to the setup in Gitlab CI, I’ve managed to replicated the errors from the CI pipeline. From this, I’ve tracked the problem down to some config issue with the selenium/standalone-chrome image I’m using.

Tonight, I’m going to take another swing to get this working. Hopefully, my suspicions are correct, and I can find an easy solution to this config error!

3. What will you do next week?

If all goes well and I can fix the Selenium tests in CI tonight, I want to do lots of FE programming!

I’m leaving it up to my group to get the backend implementations on Phase 3 working. In the mean time, I want to beautify our website and work on my website design skills. After they’re done with the backend implementation, I want to do lots of the Phase 3 frontend implementation!

I’m also going to plan some trips! My best friends and I are planning to go backpacking in Sequoia National Park early May. I also need to figure out where I’m going to backpack after I graduate, since Europe (which was the original plan) is definitely no longer an option.

4. If you read it, what did you think of the Dependency Inversion Principle?

I liked it! Like the paper said — a lot of the benefits of OOP really comes down to the Dependency Inversion Principle. You want to make high level modules depend on abstractions. These abstractions are implemented by child classes, where the child classes can implement it however it needs to.

However, like every design principle, I think engineers should use the DIP on a case by case basis. If a programmer can for-see that a certain class implements a generalizable abstraction that will be very likely to have multiple implementations in the future, I say go for DIP! This is the whole point of OOP.

However, if a programmer can’t see the object implementing a generalizable abstraction (with different implementations), I think the naive solution with direct dependencies between two (or more modules) is perfectly fine.

Overall — I think if you can’t see a possibility of a general abstraction with different implementations, it’s fine to start off with the “naive” object design. If in the future, the need comes where you realize an abstraction would be better, make the abstraction then. But I don’t think you should over-design and make unnecessary abstractions.

5. What was your experience of +, *, ** and decorators? (this question will vary, week to week)

The * and ** operators are super handy! Other languages have similar operators, but I’m pretty new to Python, so those took a while to get used to.

On a slight tangent, I enjoy learning about these different design details of Python — more than likely, other languages have something similar. So learning about how Python’s design works has taught me the kind of questions I should ask when programming in different languages!

Decorators made sense to me at first, but got confusing! I understood the debugging decorator (which wrapped functions with some logging for the arguments and output).

The Iterable container decorator is where it got confusing for me, but I think I understand now. “Decorators” are just a general design pattern that allows you to wrap anything with whatever you want. The initial example was wrapping some logging around functions. The more confusing example was wrapping an actual Iterable object in order for it to be non-exhaustible.

6. What made you happy this week?

Got to start working out again! Feels great to start being active again.

I also am SUPER pumped to get to Sequoia National Park! This place has some of the biggest trees in the world!!!!!! Like, what does a 3,200 year old tree even LOOK like? Literally older than most societies!!!

Also, my friend doesn’t have blood cancer!!!!!!!!!!!

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

Use selenium/standalone-chrome (or the Docker image for whatever browser you want) for your Selenium tests in CI! It is an image that contains the browser, the browser driver, and all dependencies you need for the tests. All you need to do is set up a Remote Driver in your tests talking to this container.

Granted, I don’t have it working yet.

BUT.

I’m almost there. Hopefully. Please pray for me.

--

--