Wiki: Software Punk: examining controversial ideas in Software Development
For agents: Markdown version · Wiki index · Explore
- Speaker: Lior Bar-On
- Event: Reversim Summit 2016
- Video: https://www.youtube.com/watch?v=D9vFLE3lR-0
- Transcript: /transcripts/2016/12-D9vFLE3lR-0.md
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: Software Engineering, Technical Debt, Architecture, Testing
Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.
Summary
The speaker challenges several deeply ingrained dogma and accepted best practices in software development, comparing them to the punk movement’s rebellious spirit. The talk examines the hidden flaws of inheritance, the gradual rotting of complex abstractions, and the limits of strict unit testing. By critically analyzing these core concepts, the speaker encourages developers to weigh costs versus benefits and consider simpler alternatives like composition, code duplication, and testing in production.
Key points
- 1:12 Inheritance can break object encapsulation by creating hidden dependencies between methods across parent and child classes.
- 4:20 Real-world systems are rarely purely hierarchical, making class inheritance a restrictive tool for modeling complex domains compared to composition.
- 13:38 The strong emphasis on keeping code dry can lead to over-engineering and abstractions that slowly rot as parameters and flags accumulate.
- 28:24 When an abstraction becomes bloated and rotten, developers should consider reverting to simpler code with controlled code duplication.
- 39:24 Isolated unit testing excels at verifying pure business logic and algorithms, but struggles with mundane integration code.
- 43:24 Integration tests and even carefully monitored testing in production can sometimes provide a better cost-benefit ratio than forcing 100% unit test coverage.
Takeaways
- Favor composition over inheritance to model complex domains and protect encapsulation.
- Accept minor code duplication when the alternative is a convoluted, heavily parameterized abstraction.
- Match your testing strategy to the type of code, using unit tests for logic and integration or production monitoring for complex flows.
Questions this talk answers
- Why is inheritance considered a violation of object-oriented principles?
- How can you identify when an abstraction has become harmful?
- When is it appropriate to bypass unit tests and test in production?
Technologies
Java, Ruby
Tags
best practices, code quality, object-oriented programming, refactoring, software architecture, testing strategies