10 ms·
maybe he was a Java programmer? all joking aside, the reason he's doing classes seems to be an intention towards making a FooStep (and/or a BarStep) which coul
by naringas 7y ago
maybe he was a Java programmer?
all joking aside, the reason he's doing classes seems to be an intention towards making a FooStep (and/or a BarStep) which could then maybe handle generic Foo stuff (authentication comes to mind) in the future?
- epr 7y ago"maybe"..."in the future" is the root of much object oriented evil
- shareIdeas 7y agoI don't think there is a correct answer, but I like that a developer has foresight.
- mattnewton 7y agoThe problem is you get more information in the future, but all this boilerplate is has been written before that information so the first instinct / seemingly least-resistance thing to do is to fit the new information into the old boilerplate / hierarchy. Lots of people have OO scar tissue from getting weird impedance mismatches on newish OO systems designed this way.
- sullyj3 7y agoReal foresight is understanding the cost of unnecessary technical debt.
- kissgyorgy 7y agoThis is a pretty common misconception. I have yet to see a bit of perfect abstraction that has been written before the problem occured.
- w23j 7y agoWell... that is certainly correct in 99.99% of cases. But does it really apply when you write a "Do Nothing Script"(!) with the intention of automating the steps later? If you follow the "rules" to the end you just end up deleting the file after writing it, because it has no effect.
- ardani 7y agoOnly if your intention encompasses as much detail as you're leaving out in advance. It's baggage and comes with nigh certainty of wasting your willpower.
- pytester 7y ago"maybe in the future" are four words I've learned to dread hearing from any developer. YAGNI goes much, much deeper than most people realize.
- dillonmckay 7y agoYAGNI
- barbecue_sauce 7y agoYAGNI for thee, but not for me.
- rzzzt 7y agoYou Are Going to Need It
- ori_b 7y ago> Do not put code in your program that might be used. Do not leave hooks on which you can hang extensions. The things you might want to do are infinite; that means that each has 0 probability of realization. If you need an extension later, you can code it later and probably do a better job than if you did it now. And if someone else adds the extension, will he notice the hooks you left? Will you document this aspect of your program? From http://wiki.c2.com/?PrematureGeneralization http://wiki.c2.com/?PrematureGeneralization