DEV Community

Discussion on: How to Write Software: 5 Lessons Learned from Running Businesses

Collapse
 
daedtech profile image
Erik Dietrich

Regarding (2), I'm not sure that the only choices in your free time are a "character building" re-invention of the wheel or watching television. Instead of building the world's 90,000th compiler, but probably not as good, why not build a plugin or SaaS that someone might actually use in your spare time?

Regarding (3), I'm curious as to which SOLID principle calls for speculative abstraction. I've never seen an argument that SOLID and YAGNI are at odds. Usually, in my consulting travels, the sorts of clean-code-minded craftsman types that advised companies would tout both of these concepts together.

BTW, looks like you put a lot of thought into the responses here -- if I were you, I'd flesh them out into a post here :)

Collapse
 
tonyhicks20 profile image
Tony Hicks • Edited

2) Hahaha, yes I would think that it would be more useful. I'm not saying that you should go and martyr all your free time by redoing what has already been done, only that it's fine to do so if it's an exercise for you to learn something.

3) Maybe I should have clarified that what I was referring to specifically was this: "And interfaces. Interfaces everywhere.

Sure, today you might want it to sort MP3 files on disk, but maybe tomorrow you'll want it to be links in a relational database or blobs in a document store. If you interface all of your layers, you can swap out your entire persistence model without ever touching anything else!"

You seem to be speaking against the Interface segregation rule in SOLID here. I agree that arbitrarily abstracting away things for the sake of it or just to follow some "best practice" doesn't make any sense. But I think that having code that is flexible enough to swap out portions is pretty nifty. Not necessarily in order to change the implementation, but at least to be able to mock up concerns and do unit testing.

Thanks, maybe I will :)