4 ms·
I had a working mapreduce job that was 300 lines of fairly high level java code. Compact, terse, expressive, everything you don't see in most Java. I came back
by sitkack 15y ago
I had a working mapreduce job that was 300 lines of fairly high level java code. Compact, terse, expressive, everything you don't see in most Java. I came back over a the weekend and my boss/coworker made it 'configurable' which means he added 800 lines of code.
I fucking cried.
He was like, "I hoisted out some stuff that should have been behind interfaces." ... I didn't need an interface because I only had ONE and specifically made the API have a low surface area so this could occur IF IT NEEDED TO.
I sucked it up and took it in stride.
Jumping in and solving a problem is usually the last thing you want to do, but that character trait(flaw) is what people think of as a good leader. Someone who will take you over a cliff with conviction.
- lonnyk 15y ago>Compact, terse, expressive Does 'Compact' mean that you originally did: if( foo ) while( foo ){ do something } all on one line and the boss split them up into multiple lines? I ask because I worked a job where statements were combined on single lines for ease or reading and it was a nightmare.
- sitkack 15y agoBy compact I mean the domain logic was all in one place and not diluted like a fine mist across the code. You could read it like english and it made sense. Consistency in abstraction levels and not too much genericism.
- Arwill 15y ago"Adding interfaces" to improve is when i start to freak out too, also splitting a well-defined piece of code into multiple classes. I call that symptom "knowing object oriented programming principles too well".
- rdingwall 15y ago'Well-defined' piece of code or SRP-violating?
- ryanc 15y agoI've never met a class I didn't want to inherit.