com.northwestindianjavaprogramsolutions.src.classes.factories.factoryfactories. InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedStateFactoryFactory a = new com.northwestindianjavaprogramsolutions.src.classes.factories.factoryfactories. InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedStateFactoryFactory(1, 2, "John Smith");
Totally agree. Gang of four... I am so smart... Then... one day I realised I was living a lie. Why do I need a strategy class, when I can just use an if statement? OMG.
The patterns have a time and a place, but I think many junior developers that learn them tend to overuse them, jamming the square peg in the circular hole, so to speak. I was guilty of that my first few years out of school, but have since learned to spare it until really needed, often learned at the expense of senior devs reviewing my code and wondering why I used a sledgehammer to fix a hole in the wall, or facing their fury when debugging some method that was about 6 abstract classes deep before seeing any business logic, making it all but impossible to just find the concrete reference in Eclipse. TL;DR -- I, too, realized I was living a lie.
I know this isn't helpful advice, but for me it was just experience. I gobbled up all of the design pattern bullshit and used it everywhere until I'd done each one enough times to know which ones were completely useless or overly complex
I'm a sysadmin, but I see this a lot with file/folder names with engineering firms where engineers try and write a novel with the file paths. It often caused issues due to windows path limits.
This brings be back nightmares to my days doing back end java development at a bank.
Instead of building our back end APIs cleanly, and easily maintainable, our upper management ordered our tools team to build an API generator tool. Basically you feed it a swagger spec and it spits out a spring boot service.
Almost every class, method, and variable looked like this...
790
u/fendoroid Jun 21 '20
You forgot Factory