DEV Community

Discussion on: 99 problems but Python ain't one!

Collapse
 
tux0r profile image
tux0r

People generally pay too much attention to "performance" anyway.

This claim is the very reason why modern web browsers and text editors require one half gigabyte of RAM doing nothing.

Thread Thread
 
erebos-manannan profile image
Erebos Manannán • Edited

Honestly I don't much care if my browser/IDE takes half a gig of RAM, even my laptop has 32GB. I'd rather buy RAM than waste programmer time, RAM is cheap, programmers are not.

(edit) Completely forgot to mention in my haste that you might not know that quite a lot of performance (read: time) optimization techniques depend on increased RAM usage - lookup maps, pre-caching, and various other things that reduce the CPU time necessary to calculate things.

Most of the time you can't have both, so pick the battle you want to argue about and stick to it. I'm sticking to programmer time.

Thread Thread
 
tux0r profile image
tux0r

even my laptop has 32GB

Congratulations, but just throwing more hardware at a problem is not the solution for everyone. Aside from the undeniable fact that hardware can't just multiply its power forever, that is.

Thread Thread
 
erebos-manannan profile image
Erebos Manannán

Sooo if you have significant CPU & RAM constraints, like when working in the embedded world, pick a tool that works for it (e.g. MicroPython, ha).

The fear of the unknown future is not a great argument against today's problems, we shouldn't write great programs faster because in the future we might not be able to just buy more RAM.

If you honestly want everyone to write everything in assembler and optimize both CPU & RAM use (which, as I explained earlier, is impossible) for everything written, you can expect the software world to not move anywhere.

There aren't enough working hours in the world to do that.

Sensible people pick the battles that are important and focus on those: Some specific bit is taking too much CPU/RAM on Python? Write that bit as a C extension for Python, write the bits that aren't that critical in plain Python.

Thread Thread
 
tux0r profile image
tux0r

I worked with a decent workstation laptop for seven years. It has 8 GB of RAM. Could you tell me which technical advantage I might have had from less free RAM with every upgrade? - And I am "wealthy" enough to buy a new machine every few years. Many people don't have this choice.

Spending less money to release an application faster that makes life for most people less bearable is not what I would call a positive achievement. I am too friendly for Python and Electron, I don't hate users enough.

Thread Thread
 
erebos-manannan profile image
Erebos Manannán

Your argument is quickly devolving into random ramblings.

8GB sounds like you had plenty of RAM to give a gig to your IDE and browser to make your life more convenient and faster. If you feel like your browser is taking too much RAM, switch to another one or uninstall the plugins that are wasting your RAM. Not really relevant to this discussion.

How did you come to the that makes life for most people less bearable conclusion? If I write my service faster, and all you will see is that it works and you got a new feature faster than if I had tried to write it doing premature useless optimization, how did it make your life less bearable? And it sure didn't make my life less bearable, I can focus on writing the next feature instead of worrying about how to optimize the code.

This of course does not mean "never optimize anything", that's just a stupid assumption. You optimize where it matters, when the CPU/RAM usage gets too high you optimize. It simply seems that the definition of "too high" for you is a cloud castle that you yourself fail to accept is impossible to reach - again, for quite a large number of problems CPU and RAM usage cannot both be optimized at the same time.

This thread is pointless for me to continue on, you're failing to bring relevant arguments to the table and ignoring every argument against your case.

Thread Thread
 
tux0r profile image
tux0r

how did it make your life less bearable?

Again, it does not matter for my life. I have enough money to throw new hardware at my software every few years because it requires more and more resources. I am not the majority though - and frankly, I'm not happy with that.