Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a lot of times where you know that something needs to be extensible, but you only know the immediate requirement.

From Martin's example, the team needs to support storm risk, and think they need piracy risk in the future. I'd suggest that they are 100% sure they need to support multiple risk calculations, they just only have the requirements for the first type now.

It's at this point you have several options, but by choosing something that is a bit more generic than the base case but without being an over-architected mess will save you a lot of time in the future.



Except "over-architected mess" is what any generic thing is, if you don't need it.

It's very, very easy to convince yourself that a particular extensibility point is "obviously" going to be needed down the road. It's very, very easy to be wrong about this, and extraordinarily common to find out that your attempt at making it generic now makes it harder to extend in the way you actually need it extended.

It turns out if you make things bone-dumb to begin with, they're never really that hard to extend later on. Anyone can refactor really ridiculously simple stuff.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: