5 ms·
Back in the day people coded lightweight because it wouldn't run otherwise, and speed mattered in single core sub-GHz CPUs. We don't have that same constraint t
by mysterydip 5y ago
Back in the day people coded lightweight because it wouldn't run otherwise, and speed mattered in single core sub-GHz CPUs. We don't have that same constraint today, how do we get people to write more efficient code?
- jstummbillig 5y agoPeople around here seem to really struggle with the miracle that is getting into soft dev from nothing and then actually being employable in the capitalist sense after 6 or so month. Of course it's a trade off! We enabled this miracle by training people that have a very focused, narrow understanding of not even a field but a particular tech. Electron is basically the perfect fit for this type of education. It enables someone to build something where previously they could build nothing. It makes getting from 0 to 1 that much easier. From a business standpoint, it's simply smart to be wasteful with resources that are abundant (average computing power on personal devices), when it helps you save on resources that are not (dev time). But of course, there is much not to like about the side effects.
- FpUser 5y ago>"It enables someone to build something where previously they could build nothing. It makes getting from 0 to 1 that much easier." Making GUI apps using Electron tech for front end is no less time consuming than doing GUI in Lazarus for example. But the end result is way more frugal in the latter case.
- l30n4da5 5y ago> Making GUI apps using Electron tech for front end is no less time consuming than doing GUI in Lazarus for example It is a lot faster if you already know web tech stack, and you would have to learn Lazarus/pascal
- Spivak 5y agoAnd since you have to know the web stack to exist at all on browsers that box is checked for basically everyone. Break the dominance on the DOM and JS in browsers and you open the door to better cross-platform toolkits.
- FpUser 5y agoThe original statement assumes that someone does not know nothing and has to start from scratch. In any way I am all in for the type of developers that know how to screw size 8 bolt into size 8 nut and the rest be damned. It keeps some healthy niche and remuneration for little more versatile types.
- deleted 5y ago[deleted]
- goodpoint 5y ago> employable in the capitalist sense after 6 or so month Bad developers, bloated software and technical debt go hand in hand and eventually bite back. The world needs more good developers, not just more developers.
- rattlesnakedave 5y agoPeople still write efficient code where it counts. There is a trade off between development velocity vs efficiency & reliability. In most consumer software the advantages of building and shipping more frequently largely outweigh saving on compute, memory, or disk, which is historically cheap.
- lkxijlewlf 5y agoGet them to stop pushing developer productivity above everything else.
- kitsunesoba 5y agoOperating systems should being pointing fingers at egregiously heavy apps. It’s not perfect but the battery menu on macOS pointing out apps consuming a lot of energy has inspired a good amount of efficiency work for macOS ports of things because users see it and gripe at developers about it. I would like to see that taken a step further. Something like the system showing a notification banner saying something to the effect of, “BadApp is consuming excessive amounts of energy. Quitting it will increase your battery life by approximately 3 hours and 15 minutes.” I believe quantifying the loss that the user is suffering as a result of the developer’s laziness will go a long way to inspire displeasure in users, who will then apply pressure on developers to fix it and opens up space for competitors who sell themselves with better efficiency.
- fabiospampinato 5y agoI think this is a great point. The delta in performance must be visible for people to even care about, and that's not obvious even for technical people (if something takes 15ms or 0.15ms to render the difference is massive, but probably you can't even perceive it with your eyes). Energy usage is a proxy for that that anybody can understand, and care about on a portable machine.
- kvark 5y agoPower optimization doesn’t improve memory footprint. In fact, it can do the opposite and increase memory allocation. Think tradeoffs between memory and processing, e.g. caching of intermediate results.
- kitsunesoba 5y agoSure, but that’s just a single facet of optimization, and I think it could be argued that just requiring developers to take a closer look at their usage could in many cases free up enough memory to cancel out intentional increases memory usage, meaning in many cases memory usage is nearly unchanged while other facets of performance are improved. It’s still an overall win.
- goodpoint 5y ago
- burlesona 5y agoYou can't. Humans are lazy and working within constraints requires discipline and effort. Waste expands to fill the available space. The only thing that made old software efficient is that it wouldn't run if it wasn't efficient enough. And BTW there was crappy old software that made your computer chug back then too, it just looks better now because computers have gotten so much faster that apps can be a lot sloppier before users notice.
- vidarh 5y agoYou look for places where a potential customer base is unhappy about the slowness, and see if provides an opportunity to compete. There's little else until/unless people see enough well performing applications that they start complaining or move away from the slow ones.
- mehdix 5y agoEnvironment should be the new constraint. Inefficient apps collectively consume energy that otherwise would have been saved and therefore contribute to global warming.
- kaba0 5y agoWill you also wipe out every old-generation CPU in usage as well? Because a CPU using 4x the energy compared to a modern mobile one will be much more detrimental to the environment than that application running for 2 hours using up 10% more energy.
- staticassertion 5y agoWho says using a ton of RAM isn't efficient? Unless your system OOMs what's the downside of having a bunch of allocated memory? Especially if it isn't even paged in.
- mysterydip 5y agoThe things you pointed out are the problem. On RAM-heavy machines you're right, it's not noticeable and can even be a performance boost. The problem is that same app is run on machines with all kinds of capacities and system loads.
- staticassertion 5y agoPhones have gigabytes of RAM. It's a relatively niche situation where someone is running Chrome on < 1GB of RAM, which is less than what modern OS's require to begin with. Besides, memory usage is hard to measure. Lots of memory may never get paged in.
- Karunamon 5y agoI do, because your program isn't the only thing running on my system. Low free RAM means paging, and generalized slowdowns when something else RAM-hungry, like a game or a web browser, is invoked. Memory is a limited resource to be used judiciously, not an all-you-can-eat buffet.
- thawkins 5y agowhat's the point of having a bunch of ram sitting around doing nothing, I would rather have a system that had zero free ram but managed its address space well, so that changing ram usage was painless. why pay good money to have hardware sitting idle?.
- Karunamon 5y agoThe same reason I refill my car's gas tank long before it hits zero; low/no resource problems range from irritating to catastrophic. Unused RAM isn't wasted, it's headroom.
- alcover 5y agoI think eventually energy price may sort this out.