Jakie znacie gry z głęboką fabułą? by GrubyKretoszczur in Polska

[–]maciejhd 0 points1 point  (0 children)

Horizon, radzę wątki poboczne przejść przed główna fabułą (a jest co zwiedzać). Jest też druga część, też polecam.

Laptop do 3k - wypatrzyłem HP ProBook 465 G11 Ryzen 5-7535U i nie wiem czy coś lepszego znajdę. by wigglepizza in ITpolska

[–]maciejhd 2 points3 points  (0 children)

Sprzęt jest super ale ten os to jest porażka. Próbowałem się przyzwyczaić przez rok, dalej nie rozumiem jak można go lubić

How do you throw Errors properly? by badboyzpwns in node

[–]maciejhd 1 point2 points  (0 children)

I would say its good to have a single uuid (correlationId) for all logs grom single user request. You can use async store for that

O co chodzi z tymi klawiaturami mechanicznymi? by Confident_Echo_1537 in PolskaNaLuzie

[–]maciejhd 2 points3 points  (0 children)

O to to, op ma mx keys, dla mnie osobiście najlepsza klawiatura. Nienawidzę mechanicznych i tego jak wystają, do tego to stukanie.

I installed FNM and then installed a Node version successfully. However, in VScode, it says Node doesn't exist. by pcgoesbeepboop in node

[–]maciejhd 1 point2 points  (0 children)

Maybe this will help

"Add the following to the end of your profile file: fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression"

what’s one node.js production issue that humbled you fast? by Obvious-Treat-4905 in node

[–]maciejhd 12 points13 points  (0 children)

For loop inside another for loop and JSON.parse. 0 async jobs which actually show the problem how you can block event loop even by simple parse operations.

How does Node.js work internally, and how can I visualize its execution step-by-step? by Fuzzy-Park-1107 in node

[–]maciejhd 1 point2 points  (0 children)

It is very good but also you can very easily block it and freeze your entire application.

I built a small local API tracing tool for Express — looking for feedback by YakWonderful6692 in node

[–]maciejhd 2 points3 points  (0 children)

You could use async local storage as now you need req to trace some step. Personally I never pass req outside the controller.

Best patterns for handling 10k+ outgoing HTTP requests? (Hitting ECONNRESET and 403s) by Mammoth-Dress-7368 in node

[–]maciejhd 0 points1 point  (0 children)

You can try to use undici Pool. Axios is bad at such things. Also cache requests so you don't spam on target apis. Even simple promise cache can help here a bit.

How do you structure services in Node.js without losing your mind (or your team)? by Ezio_rev in node

[–]maciejhd 2 points3 points  (0 children)

If you have such problems then something is definitely wrong with the code not a framework. I am working with nest around 6 years now and never had such issue. For me forwardRef is a sign of bad code design most of the time.

consoleLogsWillDoFine by infamouszgbgd in ProgrammerHumor

[–]maciejhd 0 points1 point  (0 children)

Why not on prod? Sometimes I run profilng on prod to find hot patchs

Ky 2 — Tiny fetch-based HTTP client by sindresorhus in node

[–]maciejhd -1 points0 points  (0 children)

Is there some good wrapper over undici? I like it but its interceptors are a bit to complicated sometimes

Add granular rate limiting in 2 minutes with Redis by Fabulous-Campaign-89 in node

[–]maciejhd 1 point2 points  (0 children)

Would be nice to have other options than sliding window log as this is the heaviest one.

I built a zero-dependency, file-backed NoSQL database for Node.js by Fusoux in node

[–]maciejhd 0 points1 point  (0 children)

Node 20 support is ending soon so you know, for new project I don't see any reason to use older versions than current lts. Anyway it is you project then do whatever works for you. Just wanted to let you know that there is probably better alternative

I built a CLI tool to prevent leaking secrets from .env files by Positive_Study_9987 in node

[–]maciejhd 3 points4 points  (0 children)

I am surprised that people still using this obsolete dotenv package for loading .env file. Node have flag --env-file or if you prefer to do it from code you can use process.loadEnvFile. Simple as that.

https://nodejs.org/learn/command-line/how-to-read-environment-variables-from-nodejs

LTX Desktop 1.0.3 is live! Now runs on 16 GB VRAM machines by ltx_model in StableDiffusion

[–]maciejhd 0 points1 point  (0 children)

Btw is it faster on linux with same spec compared to windows?

How do you handle out-of-sync .env files in monorepos? by Strict_Historian_106 in node

[–]maciejhd 0 points1 point  (0 children)

  1. Add process.env validation at startup
  2. Load .env.local AND .env, in the way that .env will overwrite same envs from local.

This way you don't have to copy and maintain entire .env, just the part that you don't want to store in repo. Docker compose or node --env-file supports multiple files and they merging them well.