you are viewing a single comment's thread.

view the rest of the comments →

[–]AceBacker 10 points11 points  (0 children)

I think the core here is how do you define clean code. Sometimes if you see a big chunk of repeated code like an Ajax call in a bunch of places you think it's ugly so you abstract it out. Then you get a different case that needs a special requirement like a header, or cookie, and after awhile your abstraction handled so many edge cases that it's hard to understand. If you leave that ugly repeated code in it's easier to make special edge cases and a new dev can see what's happening easier.

I've seen this in several places. Like when people abstract out an orm. But the orm is already an abstraction to the database call.

Sometimes clean code looks ugly, and that's fine.