A Case for Composition

18-Sep-2016 3374

I’ve read way too many blog posts about inheritance versus composition. All of them revolving around the is-a versus has-a relationship. If that subtlety has left you scratching your head, here’s a real life example.

One of my first problems to solve at LendingHome was how to programmatically create reports for our investors. These reports would be used by investors to track a loan’s payment history, view loan information, and project loan performance across their portfolio. In total, I had three reports to create. All of them needed to be in CSV file format because, you know … finance folks love their excel.

Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle