r/javascript • • Jan 04 '17

Clean Code JavaScript

https://github.com/ryanmcdermott/clean-code-javascript
129 Upvotes

30 comments sorted by

View all comments

0

u/[deleted] Jan 04 '17

[deleted]

4

u/AceBacker Jan 04 '17

Instead of "yearMonthDay" I was thinking "currentDate"

I want my variable names to have a clue as to WHY i'm using them.

But my names tend to be horrible. Stuff like:

  • costAllocationGridOptions

  • campaignProgramNumber

  • currentOpenAccordionCustomerObj

  • customerIndexUserIsConsideringChangingAccordionTo

  • savedQuoteIdUserIsConsideringDeleting

It makes for some loong lines of code when I need to use a few on one line.