To node or not to node?
Anonymous Poll
53%
'node'.split('').sort().join('');
47%
'node'.split('').sort((a, b) => b === 'n' ? -1 : 1).reverse().join('');
🤷♂28😁15🤯10
Кстати, 16 октяюря не только Node.js 23 вышел (не станет LTS), но и Node v22.10.0 (будет LTS до 2027-04-30)
https://nodejs.org/en/blog/release/v22.10.0
https://nodejs.org/en/blog/release/v22.10.0
👍15🍾4🎉2
Есть идея ток-шоу с двумя чеченскими программистами, которых вы все хорошо знаете. Халилл Колбеков приносит свой запутанный код, а Массив Колбеков с легкостью решает все задачи асинхронного программирования.
🤣38👍5👎2💯2🔥1
Your project looks like:
Anonymous Poll
17%
🧠 Functional core and Imperative shell
23%
💪 Procedural core and OOP shell
33%
🫵 Crappy core and Crappy shell
27%
🙈 Why so difficult?
😁7❤5
🧩 Could you propose a code example to illustrate principles? (for colleges or interview)
Anonymous Poll
31%
Class composition
25%
Aggregation
22%
Delegation
51%
Single responsibility
36%
Open–closed
39%
Liskov substitution
31%
Interface segregation
38%
Dependency inversion
44%
Dependency injection
24%
Inversion of Control
— AI сможет создавать сложные кодовые базы с нуля // Дарио Амадей CEO Anthripic
— Мы бы волновались, если бы он смог создавать простой код и не с нуля, а через рефакторинг, а так... Сложные и с нуля все могут.
— Мы бы волновались, если бы он смог создавать простой код и не с нуля, а через рефакторинг, а так... Сложные и с нуля все могут.
😁44🤣18👍5💯5🔥2
🧩 Service Locator pattern
With OOP
With JavaScript
More: https://github.com/HowProgrammingWorks/ServiceLocator
With OOP
class ServiceLocator {
static #modules = new Map();
static get(moduleName) {
return ServiceLocator.#modules.get(moduleName);
}
static set(moduleName, exp) {
ServiceLocator.#modules.set(moduleName, exp);
}
}
module.exports = { ServiceLocator };
With JavaScript
module.exports = new Map();
More: https://github.com/HowProgrammingWorks/ServiceLocator
👀14👍8💩5❤3💯2
🧩 DIP: The Dependency Inversion Principle
Code examples: https://github.com/HowProgrammingWorks/DependencyInversion
Code examples: https://github.com/HowProgrammingWorks/DependencyInversion
❤9👍5
🧩 Тут две простейшие реализации языка LISP на JavaScript, одна ООП + паттерн Interpreter, а вторая на мультипарадигменном программировании, с тем же паттерном: https://github.com/HowProgrammingWorks/Interpreter/tree/main/JavaScript
GitHub
Interpreter/JavaScript at main · HowProgrammingWorks/Interpreter
GoF Interpreter Pattern. Contribute to HowProgrammingWorks/Interpreter development by creating an account on GitHub.
👍7❤4🔥1👀1
🧩 Вкратце, что думают функциональщики про GoF паттерны:
(GoF)(x) = G(F(x))
🤣15🔥4😁4🤯2👀1
🚀 The Node.js Undici Working Group is pleased to announce the release of Undici v7.
This release introduces stricter compliance with the fetch() specification, WebSocketStream, a groundbreaking caching implementation, and customizable interceptors to supercharge your HTTP workflows.
The team has also made several optimizations and improvements to align with upcoming Node.js releases.
In this blog, we will explore what makes this version a must-have upgrade.
https://blog.platformatic.dev/undici-v7-is-here
This release introduces stricter compliance with the fetch() specification, WebSocketStream, a groundbreaking caching implementation, and customizable interceptors to supercharge your HTTP workflows.
The team has also made several optimizations and improvements to align with upcoming Node.js releases.
In this blog, we will explore what makes this version a must-have upgrade.
https://blog.platformatic.dev/undici-v7-is-here
Platformatic Blog
Undici v7 is here
Originally released in 2018, the modern HTTP client library for Node.js—Undici—has seen remarkable growth in 2024. Downloads skyrocketed from over 189 million in 2023 to a staggering >437 million (January–November 2024), highlighting its critical rol...
🔥12👍2❤1💩1😎1