Skip to content

Commit

Permalink
fix: naming practices
Browse files Browse the repository at this point in the history
  • Loading branch information
andresin87 committed Feb 21, 2023
1 parent 00159bc commit fd05035
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions documentation/practices/Naming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { StoryHeading } from '@docs/helpers/StoryHeading'

<StoryHeading label="Naming" heading="h1" /> Write for reading

**Naming** increases the speed to comprehend code and reduces bugs through confusion.
**Naming** increases speed to comprehend code and reduces bugs through confusion.

-[Use english as universal naming standard language](#-use-english-as-universal-naming-standard-language)
-[Leverage names to reveal intent](#-leverage-names-to-reveal-intent)
-[Empathize with others](#-empathize-with-others)
-[Reuse established names for concepts](#-reuse-established-names-for-concepts)
Expand All @@ -21,10 +22,25 @@ import { StoryHeading } from '@docs/helpers/StoryHeading'
-[Pick names making only sense to you](#-pick-names-making-only-sense-to-you)
-[Be funny](#-be-funny)

<StoryHeading label="✅ Use english as universal naming standard language" heading="h2" />

English is the most used language on the internet.
Use it as a code naming convention in order to give universal readability and maintenance.

```js
const coche = '🚘' //
const car = '🚘' //

const animaux = '🐶🐭🦊🐻🐷🐮🦁🐯🐨🐵🐸🐼🐰🐹🐱' //
const animalium = '🐶🐭🦊🐻🐷🐮🦁🐯🐨🐵🐸🐼🐰🐹🐱' //
const tiere = '🐶🐭🦊🐻🐷🐮🦁🐯🐨🐵🐸🐼🐰🐹🐱' //
const animals = '🐶🐭🦊🐻🐷🐮🦁🐯🐨🐵🐸🐼🐰🐹🐱' //
```

<StoryHeading label="✅ Leverage names to reveal intent" heading="h2" />

```js
const think = '🍌' //
const thing = '🍌' //
const food = '🍌' //
const fruit = '🍌' //
const banana = '🍌' //
Expand Down

0 comments on commit fd05035

Please sign in to comment.