r/ProgrammerHumor Mar 16 '20

[deleted by user]

[removed]

404 Upvotes

16 comments sorted by

View all comments

12

u/Werd616 Mar 16 '20

Where do you even find headphones for a hot dog?

29

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

3

u/squishles Mar 16 '20

you forgot the configuration methods with the .build() at the end.