DEV Community

Candace Eckels
Candace Eckels

Posted on

Futbol and a plain ruby project

Alright I have improved the code for my Futbol project. This project focused a lot on organization of a very basic ruby app. I learned a ton about modules and inheritance and when it is appropriate to apply one over the other.

I knew that the main difference is instantiation. A module does NOT need an object to be instantiated in order to use it. We are able to use them anywhere as long as the class has the module include syntax. This was helpful in this project for organization.

I didn't need to instantiate team_statistics objects in my opinion. I just wanted to be able to manage the behavior of the stat_tracker.

Inheritance modifies the attributes of an object. The best way to explain this is the you can inherit your parents eye color. On the other hand if you mom went to see Boys II Men at 16. Just because your mother is your parent doesn't guarantee that you will also go to see Boys II Men at 16.

This is an important distinction when we are trying to decide how to organize our code.

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay