5 ms·
I've declined PRs in the past (and had mine declined) over boolean flag args, magic numbers etc. When you work in a team readability is an important factor. St
by xbpx 5y ago
I've declined PRs in the past (and had mine declined) over boolean flag args, magic numbers etc. When you work in a team readability is an important factor.
Still, I do wince sometimes at the Everest sized heaps created in JS to do even the most trivial of tasks. 10s of thousands or hundreds of thousands of objects being generated in a smallish React app.
It's fast enough, the VM is obscenely optimized, and it's readable. But what is all that stuff really _doing_?
It reminds me I recently had a company ship me a laptop with Win on it. I turned it on and logged in and the CPU was just a madhouse with Edge and 2 tabs open. What is the CPU even _doing_??? Does the company mine crypto on company laptops for cash flow... or, what?
- heavyset_go 5y ago> It reminds me I recently had a company ship me a laptop with Win on it. I turned it on and logged in and the CPU was just a madhouse with Edge and 2 tabs open. What is the CPU even _doing_??? Does the company mine crypto on company laptops for cash flow... or, what? Even in a VM, Windows is constantly doing things in the background, whether it's touching the disk, burning CPU cycles, or making network connections. The background services are both numerous and opaque, so who knows what it's actually doing.
- ev1 5y agoWith corporations it's more like DLP, antivirus, firewall, and nonstop keylogging.
- xbpx 5y agoI've been running Arch Linux for about a decade to avoid exactly that. I mean, I put up with some crap... GPU drivers, Alsa to Pulse to Pipewire, terrible or non existent Slack, Teams, Zoom apps, bizarre overlapping partially redundant X configuration, Xorg to Wayland, building emacs from SRC to get it to load faster... Endless crap really. But man, it only loads services I know about and it's sooooo fast. And best of all it shuts up when I stop working :)
- heavyset_go 5y agoYeah, I'm coming from Linux where it's easier to know what's doing what.
- cgdub 5y agoIf you use a sufficiently smart JS optimizer, it will optimize the object creation and destructuring away. For example, Google Closure Compiler can take function hello({name}) { alert('Hello, ' + name); } hello({name: 'World'}); and compile it into alert("Hello, World");
- cnasc 5y agoAn alternate universe where Closure Compiler became the preferred way to build JS projects would be interesting. Clojurescript made that choice, though in retrospect it kind of seems like they backed the wrong horse.
- solarkraft 5y ago> It's fast enough ... for the developer with the latest, highest-specced machine and only an IDE their app open.
- cyanydeez 5y agoi believe my company pcs "protection" constantly scans and uploads objects to the cloud. thats what i assume