Remix.run Logo
DHRicoF 2 days ago

For your example, if both lists are small enough, the constant factor on the cost of creating the hashmap eliminates any advantage you could have. Anyway, it's not like most places were I've seen a nested loop used for search the developer had cared. Today I am in a bad mood.

I have to touch some of the most unnerving modules in a legacy project and everything is a trap. Lot's of similar repeated code with ugly patterns and some big brain trying to hide the ugliness with layers and layers of indirections and inheritance, and calling it clean because there is a factory class. The biggest joke? each implementation have a different interface for key methods, so later you to check what instance got created.

I want to keel myself. Anyone could assist me in a seppuku?

sureglymop 2 days ago | parent [-]

Don't kill yourself. Stop and leave. Every day you will build up a tiny bit more resentment and then first you will become more cynical but eventually you will burn out. Be proactive and leave this behind, move on with life.