From 9e2e35f2fcb04e2c788a40173df52d64d7b4f322 Mon Sep 17 00:00:00 2001 From: Aziyat Murzamidinov <15@kross.kr> Date: Sat, 12 Aug 2023 11:13:27 +0900 Subject: [PATCH] tried to translate, hard-hard --- README.md | 57 ++++++++++++++++++------------------ node_modules/.yarn-integrity | 10 +++++++ yarn.lock | 4 +++ 3 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 node_modules/.yarn-integrity create mode 100644 yarn.lock diff --git a/README.md b/README.md index 1d12e49..4157c0f 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,9 @@ you shout when reading code](https://www.osnews.com/images/comics/wtfm.jpg) ## Variables -### Use meaningful variable names +### Маанилүү өзгөрмө аттарын колдонуңуз -Distinguish names in such a way that the reader knows what the differences offer. +Окуучу айырмачылыктар эмнени сунуштай турганын билгидей кылып аттарды айырмалаңыз.. **Жаман:** @@ -58,11 +58,11 @@ function between(value: T, left: T, right: T): boolean { **[⬆ back to top](#table-of-contents)** -### Use pronounceable variable names +### Жөнөкөй өзгөрмө аттарын колдонуңуз -If you can’t pronounce it, you can’t discuss it without sounding like an idiot. +Эгер аны айта албасаң, талкуулай албайсың. -**Bad:** +**Жаман:** ```ts type DtaRcrd102 = { @@ -72,7 +72,7 @@ type DtaRcrd102 = { } ``` -**Good:** +**жакшы:** ```ts type Customer = { @@ -84,9 +84,9 @@ type Customer = { **[⬆ back to top](#table-of-contents)** -### Use the same vocabulary for the same type of variable +### Ошол эле категориядагы лексиканы бир эле түрдөгү өзгөрмөлөр үчүн колдонуңуз -**Bad:** +**Жаман:** ```ts function getUserInfo(): User; @@ -94,7 +94,7 @@ function getUserDetails(): User; function getUserData(): User; ``` -**Good:** +**жакшы:** ```ts function getUser(): User; @@ -104,16 +104,16 @@ function getUser(): User; ### Use searchable names -We will read more code than we will ever write. It's important that the code we do write must be readable and searchable. By *not* naming variables that end up being meaningful for understanding our program, we hurt our readers. Make your names searchable. Tools like [ESLint](https://typescript-eslint.io/) can help identify unnamed constants (also known as magic strings and magic numbers). +Биз жазганга караганда көбүрөөк кодду окуйбуз. Биз жазган код окула турган жана изделе турган болушу маанилүү. Биздин программаны түшүнүү үчүн мааниге ээ болгон өзгөрмөлөрдү колдонуу керек, биздин кодду окуган адам оной тушуноо билуусу керек. [ESLint](https://typescript-eslint.io/). -**Bad:** +**Жаман:** ```ts // What the heck is 86400000 for? setTimeout(restart, 86400000); ``` -**Good:** +**жакшы:** ```ts // Declare them as capitalized named constants. @@ -122,11 +122,11 @@ const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000; // 86400000 setTimeout(restart, MILLISECONDS_PER_DAY); ``` -**[⬆ back to top](#table-of-contents)** +**[⬆ Башка баруу](#table-of-contents)** -### Use explanatory variables +### Тушунуктуу озгормо аттарын колдонунуз -**Bad:** +**Жаман:** ```ts declare const users: Map; @@ -136,7 +136,7 @@ for (const keyValue of users) { } ``` -**Good:** +**жакшы:** ```ts declare const users: Map; @@ -146,14 +146,13 @@ for (const [id, user] of users) { } ``` -**[⬆ back to top](#table-of-contents)** +**[⬆ Башка баруу](#table-of-contents)** ### Avoid Mental Mapping -Explicit is better than implicit. -*Clarity is king.* +Функциянын аты анын аткарган кызматына байланыштуу кылып коюнуз -**Bad:** +**Жаман:** ```ts const u = getUser(); @@ -161,7 +160,7 @@ const s = getSubscription(); const t = charge(u, s); ``` -**Good:** +**жакшы:** ```ts const user = getUser(); @@ -169,13 +168,13 @@ const subscription = getSubscription(); const transaction = charge(user, subscription); ``` -**[⬆ back to top](#table-of-contents)** +**[⬆ Башка баруу](#table-of-contents)** ### Don't add unneeded context -If your class/type/object name tells you something, don't repeat that in your variable name. +Класстын атын анын ичиндеги озгормолордун атын коюуда колдонбонуз, анын аткарган кызматын гана белгилоо жетиштуу -**Bad:** +**Жаман:** ```ts type Car = { @@ -189,7 +188,7 @@ function print(car: Car): void { } ``` -**Good:** +**жакшы:** ```ts type Car = { @@ -203,13 +202,13 @@ function print(car: Car): void { } ``` -**[⬆ back to top](#table-of-contents)** +**[⬆ Башка баруу](#table-of-contents)** ### Use default arguments instead of short circuiting or conditionals Default arguments are often cleaner than short circuiting. -**Bad:** +**Жаман:** ```ts function loadPages(count?: number) { @@ -218,7 +217,7 @@ function loadPages(count?: number) { } ``` -**Good:** +**жакшы:** ```ts function loadPages(count: number = 10) { @@ -233,7 +232,7 @@ function loadPages(count: number = 10) { Enums can help you document the intent of the code. For example when we are concerned about values being different rather than the exact value of those. -**Bad:** +**Жаман:** ```ts const GENRE = { diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 0000000..9937b9e --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1,10 @@ +{ + "systemParams": "darwin-arm64-93", + "modulesFolders": [], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [], + "lockfileEntries": {}, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +