Life of a Software Engineer (explained in programming terms)

Life of a Software Engineer (explained in programming terms)


The moment I implemented IJob interface on my Life’s base class, all my friend functions turned into virtual functions.

I didn’t want to at first, but when I tried to override those functions, I couldn’t.

It turned out, that the class Friendship is sealed and I cannot derive my LifeAfterJob class from it. :(

The only way I see is to create stubs for my Friend Functions and call them using some mocking framework such as FacebookMocks or SkypeMoq. The problem with this approach is that I have to hardcode their responses with a limited set (I am fine, How are You?, nothing special, and so on)

The sub routines like GetTogether() and EatOut() have been replaced with WorkLate() and TooTired().

If only I could call the garbage collector on objects like Boss, Timelines, and PerfomanceReviews, I would have enough space in the Memory to cache List<Buddy>



https://medium.com/@umair.habib.peracha/life-of-a-software-engineer-explained-in-programming-terms-ccc23c7296d8

GC works itself, if you will call it by your self it will also dispose some other objects like, Job.Salary. You will be able to override your friend function if friends also implement IJob Interface on the class of Life. Try to initialize the properties of your parent class.

Nicely done. Bravo!

Like
Reply

To view or add a comment, sign in

More articles by Umair H. Peracha

Explore content categories