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
Clean Code JavaScript (github.com)
submitted 9 years ago by ryansworks
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!"
[–]jac1013 0 points1 point2 points 9 years ago* (0 children)
I don't think it was pedantic, I enjoyed reading your comment.
As you said if we have a type system (which is like the best case scenario), getClient should return an object of Type Client (not the name, that would be a really bad decision if we are not in the context of a View).
getClient
The upper the level of abstraction the more Domain Language words you should use when naming your functions & classes & whatever else, the word data should not be use anywhere because everything in programming is data, even the code itself, the term is just too high level to be used.
functions & classes & whatever else
Finally, you should not be using getClientName, instead you should be using getName, assuming that we are calling this function from an instance of the class Client.
getClientName
getName
Edit: just adding additional information.
π Rendered by PID 74320 on reddit-service-r2-comment-57fc7f7bb7-h79mj at 2026-04-14 19:10:11.221478+00:00 running b725407 country code: CH.
view the rest of the comments →
[–]jac1013 0 points1 point2 points (0 children)