Web, Mobile, IoT: all JS things since 00's - opinions are my own ™ Principal SW Engineer @anacondainc working on OSS stack 🦄

Milan, Italy
Filter
Exclude
Time range
-
Minimum likes
not sure anyone needs this reminder but QA means Quality Assurance so that, if anything, he’s going to improve quality and reduce slop, logically speaking, right? 🤔
1
171
Btw, for my own projects yes, I do handcraft my code, it’s the only way to grant it’s small, fast, RAM friendly and so on … code AI has been trained on rarely matches that these days … if nobody produces better code, we’re doomed 😇
66
No but I review it, and finding slop as anti patterns ain’t that pleasant 😅
1
65
a quick and simple concrete example: if (state & ALLOW_ALL) doStuff(); VS if (state.field1 && state.field2 && state.fieldX) doStuff(); that also lets you: if (state & ALLOW_WRITE) writeStuff(); VS if (state.owner && state.allowedWrites && state.canWrite) writeStuff(); 👋
1
1
63
Replying to @mjmawa
I hope so, it's really easy to grasp (so I've been told) and bitwise are way less scary than RegExp so if you can read RegExp, you can read bitwise ... promoting illiteral coders, on the other side, can't bring better software, so once again: "use the right tool for the job" 😉
1
1
62
Replying to @mjmawa
‘cause you still read code? 😅 anyway, “use the right tool for the job” is the message, we all kinda understand files privileges in a system (read/write/own) and we can’t sum up privileges fields in a program? The OP link is to explain/simplify that 🥳
1
1
57
my latest post around this topic is in here and I urge you to have a read: it's just how permission works but it scales to any amount of operations dev.to/webreflection/about-b…
3
141
I honestly don't understand why most software ship with dozen+ boolean flags when bitwise operations would carry a single summary of the whole state and make everything easier/faster to reason about. if you mention "only 31 options to deal with" I remind you BigInt works too 🤷
5
3
767
Replying to @undafiend
floats are "huge" (8 bytes) and clunky in JS though, un/signed integers (4 bytes) that automatically start from scratch are cheaper by all means. for anything catastrophic I have already next-resolver which guards all unresolved IDs over time webreflection.github.io/util…
11
Replying to @tarwin
I use it in coincident, each .field is a remote proxy call, everything driven on main from a worker uses the promise with unique id, thousand ops per second but it’s the principle behind that holds, not the stats for specific use cases, a simple solution for them all.
1
14
Replying to @trq212
plan with frontier (expensive) implement with good enough cheaper models … win?
3
169
Replying to @undafiend
It’s not a standard API, if you read my solution there’s no need for non standard APIs?
1
23
Basic example: if every AI has to reimplement bash utilities or SQLite we’ll be effectively the dumbest era ever around software programming/delivery … unfortunately I already see this trend around repeat the code all over, and that’s not good, imho
4
119
Replying to @arvidkahl
Primitives and libraries that do the right thing in the best possible way are still needed, if not essential to avoid wasting tokens, time, money, or tests coverage, in the long term. If we stop producing those, nobody wins here 🤷
1
3
1,045
Replying to @undafiend
what’s nextUp() ???
1
26
wanna try a concrete example? there we go: let id = Number.MAX_SAFE_INTEGER; ++id === ++id; goodbye program from that time on 🤷
2
119
I know that 9007199254740991 feels like a big number, but if you think about it, are you designing software that will eventually break/explode or you believe your logic could run for hours, weeks, years without ever breaking? the ++id on integers is great until it's not in JS 👋
2
2
217
this is how I've solved possible ID saturation on most of my projects: don't just id++ if you want to be sure that such id is unique, use Int32Array or Uint32Array instead to let the ID cap and reset without issues, granting safety against MAX_SAFE_INTEGER github.com/tarwin/tinyjsapp/…
2
3
397
Replying to @matteocollina
Agreed *and* OSS is the reason we’re here? It’s complicated, but if it’ll die, so will die innovation too 🤷
2
190