DEV Community

loading...

Discussion on: What are your guiding principles in software development?

Collapse
hoelzro profile image
Rob Hoelz

Premature optimization isn't just about speed/memory usage - it covers things like abstraction or thinking ahead for potential features, too. As Sandi Metz says:

duplication is far cheaper than the wrong abstraction

Obviously with features it gets tricky - you don't want to create a program that's hard to extend to add new things later! There's a lot of nuance involved, which brings me to my next point...

Don't be dogmatic; context is everything. Sometimes TDD is the right decision, sometimes it's not. Sometimes switching the team to deploy on Docker is the right decision, sometimes it's not. Sometimes rewriting a component in Rust is the right decision, sometime it's not.

A lot of blog posts don't cover the context behind the decision, which is like doing math problems without showing your work. And a lot of hard decisions never end up solidified in blog post form, because communicating that nuance and context is really hard!

This is something I've seen in a lot of blog posts recently (such as those written by Ted Kaminski), and I'm glad. I wish I had links to each of the ones I've read discussing this, but they're kind of hard to find in my history!

Collapse
de_maric profile image
Dejan Maric

A lot of blog posts don't cover the context behind the decision, which is like doing math problems without showing your work.

This is so true. Every year we developers come from our favourite conferences and are so geared up to completely rewrite our apps. Whether it was (or is) SOA, NoSQL, microservices, you name it, we jump the bandwagon without thinking whether we really need the technology. Just because Google/Facebook/Netflix/Spotify is doing it, doesn't mean you have to.