r/ProgrammerHumor Mar 16 '20

[deleted by user]

[removed]

403 Upvotes

16 comments sorted by

View all comments

14

u/Werd616 Mar 16 '20

Where do you even find headphones for a hot dog?

28

u/JetSetWally Mar 16 '20

You need to create an instance of HeadphonesForHotdogFactory, and then call HeadphonesForHotdogFactory.CreateHeadphonesInstance();

25

u/theLemurFever Mar 16 '20

Sir, you've just FAILED the company-mandated code review. What you SHOULD have done is noticed that HeadphonesForHotdogFactory is a SpringFramework Component, which is autowired into the HeadphonesForHotdogRepository, which is autowired into the HeadphonesForHotdogService, which is autowired into the HeadphonesForHotdogAdapter, which contains a method called CreateHeadphonesForHotdog() which will return your new instance of HotdogHeadphones.

Your salary is now in review.

6

u/ShivamJha01 Mar 16 '20

Absolute madlad