5 ms·
Put down the abstract factory and get something done
- shutter 18y agoThe general idea is worthwhile, but not to the extreme the author suggests: > Maintainability isn't a factor. Best practices don't > matter. Design patterns don't matter. All that matters > is getting things done. Naturally, you must find a happy medium. Go for maintainability and best practices wherever possible, but don't lose sight of your goal: create your product. That said, the author did acknowledge the need for moderation toward the end. Best practices are thusly named for a reason.
- timf 18y agoAgreed. Another thing the author does not mention is that many of these things you can make very habitual and even into zero cost macros (especially if using a mature IDE). A habitual extra 15 seconds spent minding something that requires no 'real thought' because you do it all the time can have an enormous long-term organizational impact.
- brl 18y agoEverybody writes shit code when they implement something new to get it working as quickly as possible. What matters is spending an extra 10-30 minutes before checking your code in to turn that sloppy code into a work of art. It's really that easy.
- timf 18y agoEveryone does that? Then I'm having some kind of Russell's paradox situation with your comment :-)
- brl 18y agoYes, I mean it's not unusual to take the shortcuts described in the article to produce working code. Even the very best programmers who turn in immaculately maintainable software do not just sit down at their desk and type perfect code into their editor. First you write a really bad version that mostly works. Then you go back and fix that abomination before anybody else sees it. You don't want everybody else to think you suck at programming, right? :)
- russell 18y agoHe is a bit over the top. Use best practices, but dont create an interface for only one class dont create an abstract class for only one subclass, dont create a data only class where a HashMap will work. All this extra code has to be maintained by someone. In fact the essence of maintainability is to have less code.
- deleted 18y ago[deleted]
- brl 18y agoThis is a terrible attitude. If you don't write maintainable code then the price you pay for it later is that your project eventually ends up permanently stuck in the mud. There is a line that you can cross where no amount of refactoring will rescue you from the mountain of technical debt you've accumulated. Once you're on the other side of that line, your project is 'bankrupt' and other than putting out fires you're never going to get anything done ever again.