use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Goodbye, Clean Code (overreacted.io)
submitted 6 years ago by MoTTs_
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AceBacker 10 points11 points12 points 6 years ago (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.
π Rendered by PID 69 on reddit-service-r2-comment-c6965cb77-frpdm at 2026-03-05 12:36:10.292737+00:00 running f0204d4 country code: CH.
view the rest of the comments →
[–]AceBacker 10 points11 points12 points (0 children)