Live data from Hacker News

Fucking Color Picker

tonymccoy.me

61–70 of 140 posts

Re: Fucking Color Picker

#61

Earlier quoted context omitted.

> Developer time has been more expensive than hardware for a decade now. How about developer time of 1 person vs. hardware (and electricity, CO2 emissions...) of 1 million users?

> vs. hardware (and electricity, CO2 emissions...) of 1 million users? Do you actually have a million users? Can that developer time be spent saving even more hardware or human costs elsewhere?

> Do you actually have a million users?

Everybody who works on a cross-platform version of a generic utility has potentially many millions of users.

> Can that developer time be spent saving even more hardware or human costs elsewhere?

Nobody knows. But it's obvious that wasting resources like this is going to scale with every user - even non-users who just download out of curiosity.

Re: Fucking Color Picker

#62

Earlier quoted context omitted.

Is it actually faster to develop in Electron than with QT and C++? It has been over a decade, but I remember it being both straight-forward and pleasant to support Linux, Windows, and MacOS. I vaguely recall supporting Solaris too.

Web developers using Electron probably count in the time to learn C++ vs the fact that they already know web stack. ;)

I just realized this morning that JavaScript is the new Java.

js targets the browser (angular, React...), the back-end (node), the desktop (Electron) and mobile (React native). Just like the Java of old with applets, javax, JME, and of course weblogic and friends, js today allows you to code anything, as long as you don’t mind doing it badly, insecurely and/or wastefully.

Due to this ubiquity, a large majority of job openings list js in one form or another as a prerequisite (remember when entreprise code was synonymous with Java?)

Once you know enough js to be dangerous, there’s little incentive to pick up another programming language.

Re: Fucking Color Picker

#63
post #50

A dev missed some feature of their usual OS and so wrote a cross platform version open source in their spare time. Who cares that they used the “wrong” language or framework, or could have solved it another way or “who need this functionality anyway”. Isn’t this supposed to be what the dev spirit is about?

This

Re: Fucking Color Picker

#64
In total, the app is 122 MiB large.

Of which the runtime is about 120.3 MiB. There is even a copy of ffmpeg (2 MB) for the rare occasion when you want to play back an mp4 video in your color picker.

The actual app itself is in the resources directory which is 1.8 MiB large.

This directory contains files electron.asar (214 KiB), app.js (1.7 KiB), package.json (727B), and directories static (152 KiB) and node_modules (1.4 MiB).

The actual content created by the author is in app.js, package.json and static, which together take 160 KiB, of which 52 KiB is the logo (would have been much smaller as SVG) and 68.8 KiB a bundled font.

In the node_modules directory major contributors for size that I see are:

* node_modules/tinycolor2/demo (288 KiB; largest contributor here is a jquery copy)

* node_modules/tinycolor2/docs (228 KiB)

* node_modules/tinycolor2/test (116 KiB)

* node_modules/electron-settings/node_modules/fs-extra/docs (96 KiB)

* node_modules/electron-settings/node_modules/fs-extra/CHANGELOG.md (56 KiB)

* node_modules/user-media-screenshot/.idea/ (44 KiB)

All of the stuff I listed above is quite redundant for the users who just want to run the app. If you remove them, the 1.8 MiB become 764 KiB for the entire app and I'm pretty sure that minifiers, bundlers etc. could make it even smaller.

The runtime could be provided by the OS. I think it's definitely possible to create apps < 500 KiB with web technology, it's just the deployment patterns that turn this into a major download of 122 MiB. As for the RAM usage, idk about that. I guess if the runtime is provided by the OS, it would be the same electron binary so the OS could share that one at least.

Re: Fucking Color Picker

#66

Wow, this is waaaay too big for my taste. I'm absolutely sure it is possible to write the same cross-platform app for less than 500KBytes and no dependencies.

Yes, this 450 line program could have been written in whatever native language you want with probably 3x the code and time spent, but why would you? Developer time has been more expensive than hardware for a decade now. Everyone here loves to virtue signal about how horrible programs that take 0.01% of the space of a normal SSD and 1% of the RAM are, but the fact is that it does not matter at all, and you wouldn't ev…

Why is everybody always so concerned with developer time, but never with user time? The author of this tool even complains about the startup time of photoshop, but somehow has no problem with building a tiny tool on Electron. The irony is quite strong here.

Re: Fucking Color Picker

#67

Wow, this is waaaay too big for my taste. I'm absolutely sure it is possible to write the same cross-platform app for less than 500KBytes and no dependencies.

Well, for one, you could skip writing it for Mac OS because it already has a fucking color picker.

This is an answer without a real problem, for Mac users anyway.

Re: Fucking Color Picker

#68
post #37

> So I wondered... why didn't Windows just have a fucking color picker? Color Picker for Windows (500KB) (1.6MB unzipped): http://instant-eyedropper.com Significantly smaller than the Electron app and works across Windows XP to 10.

I use this and couldn't recommend it more

Re: Fucking Color Picker

#69
post #50

A dev missed some feature of their usual OS and so wrote a cross platform version open source in their spare time. Who cares that they used the “wrong” language or framework, or could have solved it another way or “who need this functionality anyway”. Isn’t this supposed to be what the dev spirit is about?

100%. HN comments can be so perfectionist which is ironic given the name.

Someone spent their free time to give the world something free, shame on them it's not perfect.

Re: Fucking Color Picker

#70
post #64

In total, the app is 122 MiB large. Of which the runtime is about 120.3 MiB. There is even a copy of ffmpeg (2 MB) for the rare occasion when you want to play back an mp4 video in your color picker. The actual app itself is in the resources directory which is 1.8 MiB large. This directory contains files electron.asar (214 KiB), app.js (1.7 KiB), package.json (727B), and directories static (152 KiB) and node_modules (…

Thanks for the wonderfully detailed breakdown. I wish every electron app could get this.

I don't hate web technology, I just hate electron's distribution model. There are so many frameworks to get around this.

Post reply on HN