site banner

Small-Scale Question Sunday for April 21, 2024

Do you have a dumb question that you're kind of embarrassed to ask in the main thread? Is there something you're just not sure about?

This is your opportunity to ask questions. No question too simple or too silly.

Culture war topics are accepted, and proposals for a better intro post are appreciated.

1
Jump in the discussion.

No email address required.

Does anybody like programming?

I have been hired as a sole and lead Python developer in a company. But my Python experience is mostly on Numpy, if anybody has some tips? It would be very appreciated!

Partly a response, partly hijacking this to ask a question of my own to everyone else: what are you using as a editor/compiler?

I programmed exclusively in Java for years, but my new boss wanted programs in Python so I've been doing that this past year. Using Eclipse, which is wonderful as an editor, since it lets me organize everything and highlights typos that I make and stuff.

Aside a whole lot of friction involving different conventions and abilities, I was annoyed that all of the Python editors people recommended seemed way less functional until I discovered that I can program Python in Eclipse if I do the right stuff. So I've been doing that.

I'm not sure what the general consensus is, because I'm mostly self-taught and program on my own, making mathematical models for research purposes that nobody else has to use or collaborate with, so I've probably got all sorts of weird habits that would make more sophisticated programmers cringe. So I can't tell how much of this is objective and how much is just me being used to Eclipse for so many years and having little experience with anything else. But I tentatively recommend looking into PyDev for Eclipse, because in my opinion it's nice.

Yeah, seconding both prongs, here: a) IDEs are important and b) Python IDEs near-universally suck. If you're in the Java sphere before, PyCharm is kinda the Intellij-for-Python, for better and worse, and there's a large faction that loves VSCode for eating all of their RAM handling multi-language projects reasonably, but for the love of god don't try to build class-ful python in IDLE.

((I'll generally advocate PyCharm for new programmers, as annoying some of the Intellijisms can be, but if you're more acclimatized to and have already set up Eclipse it's definitely not worth swapping.))

VSCode for eating all of their RAM

I don't know where this myth came from - usually bad extensions are the memory hogs.

this is my VSCode at the moment - 3gb ram - way less than my browsers. And 32 GB ram was baseline dev computer 8 years ago.

Image Commit (KB) Working Set (KB)
Code.exe 229,192 203,380
Code.exe 196,436 181,052
Code.exe 181,540 158,272
Code.exe 146,848 143,044
Code.exe 170,172 146,452
Code.exe 158,840 142,484
Code.exe 116,608 114,484
Code.exe 149,196 117,328
Code.exe 112,392 98,688
Code.exe 90,580 92,056
Code.exe 86,820 97,276
Code.exe 1,423,064 86,692
Code.exe 73,020 76,104
Code.exe 73,356 75,808
Code.exe 56,140 61,656
Code.exe 56,864 59,304
Code.exe 50,748 41,668
Code.exe 39,788 44,236
Code.exe 37,548 43,608
Code.exe 23,656 22,300
Code.exe 22,832 21,832
Code.exe 21,308 20,340
Code.exe 21,208 20,296
Code.exe 20,956 20,192
Code.exe 20,924 22,388
Code.exe 21,160 23,428
Code.exe 17,980 16,276
Code.exe 17,992 16,244
Code.exe 18,004 15,824
Code.exe 15,096 21,176
Code.exe 11,004 9,376

Ten years ago a brand-new processor would have been the Haswell- or Broadwell-era, and while you could get machines that could hold 32GB RAM, the H81 chipset only supported up to 16GB, going to 32GB would not have been standard, and it'd probably cost you upwards of 250 USD in RAM alone.

But more centrally, VSCode's linter and intellisense implementation is perfectly fine for mid-sized projects without a boatload of dependencies in certain languages. Get outside of those bounds, and its RAM usage can skyrocket. Python tends to get it hard (as does Java, tbf) because of popular libraries with massive and somewhat circular dependency graphs, but I've seen large C++ projects go absolutely tango uniform, with upwards of 10GB.

Yes, it is usually an extension problem, but given that you'll end up needing to install a few extensions for almost every language you work with just to get them compiling (nevermind debugging!), and that it's often even Microsoft-provided extensions (both vscode-cpptools and vscode-python have bitten me, personally) , that doesn't actually help a lot. Yes, you can solve it by finding the extension and disabling it, and sometimes there's even alternative extensions for the same task that do work.

The normal case isn't much worse, and sometimes is better, than alternatives like IntelliJ/PyCharm. But the worst cases are atrocious, and they're not just things hitting some rando on a github issue with some weird outlier use case.

going to 32GB would not have been standard, and it'd probably cost you upwards of 250 USD in RAM alone.

My PC built in 2016 with skylake (2015) had 64GB ram. My assembled in 2010 had 32. And with developer salaries being what it is - it was always affordable even in Eastern Europe.

32GB was possible on Sandy Bridge processors (technically 2011), but mid-range Westmere and Nehalim processors only supported 16GB(ish) for most of the consumer market, and even the high-end Bloomfield capped at 24GB. I'm not saying you didn't do it -- I've got a couple Xeon systems from that era floating around that could have -- but it was absolutely not a standard use case.

A more normal midrange system would be closer to 4GB, with 8GB as the splurge. You'd probably end up spending over 400 USD in RAM alone, plus needing to spec up your motherboard to support it (thanks, Intel for the fucky memory controller decision).

32GB was possible on Sandy Bridge processors (technically 2011),

So it probably was sandy bridge. It wasn't xeon with certainty. Too many years. I remember having core 2 duo 2006 or 7 with 8GB, I remember that the PC I built in 2016 had 64 (which I still hasn't changed, the performance growth in everything but the GPUs have been pathetic), and I remember that it replaced a PC with 32 - so it probably was early 2011. Also possible I build one in 2010 with 16 and then one in 2012 with 32.

Anyway RAM was peanuts compared to the payroll for developers so it didn't make any sense to not pump their workstations.