Skip to main content
6 events
when toggle format what by license comment
Feb 8, 2013 at 16:47 comment added Eran Medan Thanks, I like the one verb rule of thumb, the issue is that too often keeping rules of thumb gets harder than it may seem, the rules are meant to serve us, 90% of time they do, those 10% of time they don't is what troubles me, when figuring out the "right" way of doing it is not in line with "getting it done and shipping it". Not always clear what is better... I had developers that were much less productive because they had to do everything "right", on the other hand, others were productive but hard to maintain their code, the golden path in the middle is hard to find...
Feb 8, 2013 at 14:48 vote accept Eran Medan
Feb 8, 2013 at 8:08 comment added David 'the bald ginger' +1 For adequately explaining the need to have one purpose per function. @DocBrown The one-purpouse rule is also very important to make your code readable and maintainable, especially if you may not end up being the only maintainer of the code for its lifespan.
Feb 8, 2013 at 7:07 comment added Jon Purdy @DocBrown: Fair enough. I’ve never actually come across an optimisation case where I had to break that particular rule of thumb. Usually optimisations involve changing data representations, eliminating indirections, caching, that sort of thing. You can kill a lot of extra abstraction before you have to start manually inlining functions!
Feb 8, 2013 at 7:02 comment added Doc Brown +1, your proposed changes are ok and may do the trick - in this case. But beware, when it comes to performance optimization, the "function should serve one purpose" rule does not always apply.
Feb 8, 2013 at 6:49 history answered Jon Purdy CC BY-SA 3.0