[-] madeindjs@programming.dev 3 points 3 weeks ago

I don't get why the RFC show an example returning 403 with body "You do not have enough credit." although there is a dedicated status code " 402 Payment Required". Isn't more correct to use 402 in this situation?

[-] madeindjs@programming.dev 3 points 1 month ago

My top 3 (as mainly JS dev) would be:

  1. Number overflow. It happens when you're backend send big number ID serialized in a JSON. The solution is to wrap the number into a string when you know that can happens.
JSON.parse('{"n": 123456789123456789012.0}').n
// => 123456789123456800000
  1. Mutating an Object by ref (now I use Object.freeze a lot). Something like:
const CONFIGURATION = { conf: { enabled: false } }
// setup a "copy"
let currentConfiguration = { ...CONFIGURATION }
currentConfiguration.conf.enabled  = true
// try to reset the conf
currentConfiguration = { ...CONFIGURATION }
// => { conf: { enabled: true } }
  1. Assignation instead of comparison (now my IDE warn me)
if (foo = false) {
  // do something
}
[-] madeindjs@programming.dev 4 points 1 month ago

I tried Helix but my muscle memory around Vim movements was a non - starter for me. Also , Helix wasn't working out of the box with Vue.JS (it needs to be tweaked a bit.

So I gave a try to LazyVIM and everything works almost as is. I'll never look back.

[-] madeindjs@programming.dev 5 points 1 month ago

The video mentions some "de facto" standard libraries like Lodash or Underscore. But there is also Bun which try to promote their standard library like their test runner, their HTTP server, etc..

I like Deno's approach, since they try to make their “Standard library” also available for other platform. But only few of them are compatible with Node.js.

For instance, @std/cli is only available for Deno. So I'll stick with commander which is more standard for CLI tools, and it works with Deno, Bun & Node.js.

[-] madeindjs@programming.dev 2 points 1 month ago

Really helpful, thanks. Just curios, does this list apply also for LineageOS + MicroG ?

[-] madeindjs@programming.dev 3 points 1 month ago

Congrat. How long did it take to build this game ?

[-] madeindjs@programming.dev 6 points 1 month ago

my two cents,

I personally buy some music from Bandcamp, and I'm pretty sure those songs don't exist on the Apple Music catalog. So I don't want to handle multiple apps to listen what I want.

Also, streaming platforms have the internet constraints. Sometimes, like when I'm driving, I don't have a stable internet connection

[-] madeindjs@programming.dev 5 points 1 month ago

Recompress to a lossless format (...) There is very little reason for you to do this

I though there are no reasons at all to do it. What could be a valid use case for this ?

[-] madeindjs@programming.dev 13 points 1 month ago

It did, in september 2023.

[-] madeindjs@programming.dev 2 points 7 months ago

It works on my machine ™

view more: next ›

madeindjs

joined 9 months ago