Tagged “cleancode”
-
TIL not obsessively trying to be DRY cleancode dry
Quite often, DRY is applied to any duplication, rather than specifically to the duplication of business rules and knowledge. This is often made worse by automated code analysis tools, which will often highlight any duplication as a code smell.
-
TIL ways to organize eventListeners cleancode naming
Some code spaghetti I made recently was creating a lot of eventListeners for multiple buttons, and then forgot what they all connected to.
-
TIL Very Efficient Code cleancode bigo
This is a great solution. Easy to understand. Executes really fast. No real-time string concatenation. No over-engineering. String appearance is easily customized.
-
TIL more clean code principles cleancode principles
Functions should either answer something or do something, but not both. If you use third-party libraries, wrap them. Throw errors.
-
TIL Cleaner data structures cleancode data patterns
Avoid unnecessary contexts, optional chaining, better error handling, avoid using flags
-
TIL Cleaner Functions cleancode functions patterns
tl;dr - Limit the number of arguments, Avoid executing multiple actions in a function, Avoid mutation, Avoiding non-negatives, Return Early
-
TIL about this work of beautiful code cleancode javascript readability
I'm a strong believer in writing code for tomorrow's developer. I'm incredibly anti-code-golf. (It's a beautiful art form, but keep it out of production code!)
-
TIL about the 11,000 line file devstory cleancode horror
At work, I discovered a core project file that is almost 4,000 lines of code. Code flowed from top to bottom. I thought this is what nightmares are made from.
-
TIL of a guide for naming things dev cleancode
Naming is hard. Naming is important because '.imgFloatLeft' no longer is accurate when we switch to 'ltr' format.
-
TIL trailing commas in Javascript mdn linter cleancode
JavaScript has allowed trailing commas in array literals since the beginning, and later added them to object literals, and more recently, to function parameters and to named imports and named exports.
-
TIL Grouping Event Handlers cleancode event-handlers javascript
Group your event handlers together for that sweet cleaner, fresher code.
-
TIL writing cleaner If statements javascript cleancode ifstatements
Graphs and visual flow of various if-else statements
-
TIL more about destructuring javascript cleancode
Destructuring allows us to extract values from arrays and objects and store them in variables with a more convenient syntax.
-
TIL functions should only do one thing cleancode javascript
The most important rule of programming is - break your code into tiny bite-sized pieces. That makes it easier to compose, test, and add it.
See all tags.