Skip to main content
5 events
when toggle format what by license comment
Nov 30, 2016 at 20:51 vote accept DNorthrup
Nov 30, 2016 at 20:20 comment added DNorthrup Do you see anything wrong with my refactored version? I actually checked in console and it's giving me the results I would expect, but with the gsub I'm no longer getting proper expectations (AKA The number is still being output, not the <I>)
Nov 30, 2016 at 20:01 comment added Jonah you could certainly go one level of abstraction higher and avoid all the repetition. my approach would be to start with the rewrite above, then re-evaluate after seeing the new code, and decide if the gain in compactness would be worth the cognitive overhead of the new abstraction. it's a good general principle when refactoring
Nov 30, 2016 at 19:35 comment added DNorthrup I actually like this. Still seems a bit repetitive, but isn't -nearly- as bad as my current usage. I'll try it out.
Nov 29, 2016 at 6:03 history answered Jonah CC BY-SA 3.0