News for hackers. Stuff that matters.
Re:What every programmer should know about memory, Part 1 (2... by dau on Monday January 25, 2021 @04:13PM (#25908976)
Actually no. As a programmer I do not need to know anything about exponential capacitor discarge curves and generally anything below VirtualAllocEx().
Re:What every programmer should know about memory, Part 1 (2... by ojnabieoot on Monday January 25, 2021 @04:39PM (#25909280)
What a silly comment.

a) “Why do we use DRAM instead of SRAM?” is a perfectly valid question from a programmer that is worth a paragraph of detail, including the capacitor discharge curves. It is not like this is a major focus of the article! It’s just a small detail in the overview of the hardware. Seems very strange to be so upset by this.

b) If you ever write software for something that isn’t a desktop or server (eg a printer, a robot, some new shiny tech) then the hardware details of RAM are absolutely relevant and can’t be abstracted away by a nice alloc API. I can understand not wanting to focus on areas like this (devices are not my cup of tea) but I can’t understand deciding it’s ipso facto irrelevant because you’re a programmer.

Re:What every programmer should know about memory, Part 1 (2... by optimuspaul on Monday January 25, 2021 @04:48PM (#25909401)
I think you are contorting the comment to mean something it doesn't mean. "every" is the keyword there. Not every programmer needs to know how memory works. Some programmers should know. I don't need to know for 99.99999999% of the work I do. But even that 0.00000001% it is debatable. I write code that runs on target systems. I can evaluate its performance on the target system. Now if I had to write software for a system and speed was critical and I could choose the type of memory to use, then you bet I would be reading up on this subject.
Re:What every programmer should know about memory, Part 1 (2... by wtallis on Monday January 25, 2021 @05:52PM (#25910045)
> I write code that runs on target systems. I can evaluate its performance on the target system. Now if I had to write software for a system and speed was critical and I could choose the type of memory to use, then you bet I would be reading up on this subject.

Differences between types of memory don't just matter when you're picking what hardware to purchase. It also matters greatly when trying to understand why your code achieves a certain level of performance. Understanding the characteristics of your memory matters even if you're targeting a single fixed hardware platform that you can profile your code on.

Re:What every programmer should know about memory, Part 1 (2... by optimuspaul on Tuesday January 26, 2021 @01:54PM (#25919717)
The why isn't very important. You only need to know the constraints of your system, you don't need to know why the constraints are what they are... maybe you want to, but not need.
Re:What every programmer should know about memory, Part 1 (2... by wtallis on Wednesday January 27, 2021 @06:48PM (#25935825)
The why does come into play, often quite unexpectedly if you don't really understand how your memory system works. I've seen StackOverflow questions about performance anomalies that could only be properly answered by digging into the details of not just cache line size, but also cache associativity.

Not understanding how the system works means that sometimes you'll have to settle for not being able to use the full performance of your hardware, and that your performance constraints will in practice be rather inscrutable and often unpredictable.

Re:What every programmer should know about memory, Part 1 (2... by yrimaxi on Monday January 25, 2021 @05:14PM (#25909673)
> but I can’t understand deciding it’s ipso facto irrelevant because you’re a programmer.

The negation of “everyone should know this” is not “no one should know this”. I can understand that someone would protest to a claim about how “everyone should X” by giving a blanket statement like “no I shouldn’t”, but I interpret that as hyperboly in this case.

Re:What every programmer should know about memory, Part 1 (2... by mhh__ on Monday January 25, 2021 @06:08PM (#25910210)
The later parts on caches are very relevant, though.

Also, should know and need to know are slightly different, no?

All of this boils down to knowing things because you cannot look some thing up that you don't know exists, like algorithms.

Re:What every programmer should know about memory, Part 1 (2... by idsout on Monday January 25, 2021 @04:23PM (#25909097)
Re:What every programmer should know about memory, Part 1 (2... by hinkley on Monday January 25, 2021 @04:34PM (#25909217)
Do you just have a bookmark list of clever video comebacks to silly questions?
Re:What every programmer should know about memory, Part 1 (2... by saagarjha on Monday January 25, 2021 @06:56PM (#25910625)
Perhaps they just have a decent memory?
Re:What every programmer should know about memory, Part 1 (2... by idsout on Tuesday January 26, 2021 @08:33AM (#25915559)
Haha nah. This one just really resonated with me.
Re:What every programmer should know about memory, Part 1 (2... by gspr on Monday January 25, 2021 @04:21PM (#25909067)
That depends a lot on what programming you do.
Re:What every programmer should know about memory, Part 1 (2... by ehutch79 on Monday January 25, 2021 @04:30PM (#25909187)
Then the word "every" is inappropriate.
Re:What every programmer should know about memory, Part 1 (2... by hinkley on Monday January 25, 2021 @04:35PM (#25909234)
"Every" Is usually tacked onto these sorts of statements by someone who either has to go around cleaning up after other people, or is just generally tired of dealing with the consequences of other people hiding behind ignorance like it's the best shield even invented.
Re:What every programmer should know about memory, Part 1 (2... by optimuspaul on Monday January 25, 2021 @04:42PM (#25909330)
doesn't make it right, they need therapy not lashing out with generalizations
Re:What every programmer should know about memory, Part 1 (2... by hinkley on Monday January 25, 2021 @04:47PM (#25909391)
Externalizing your problems to others isn't right either.

Being upset is one of the way we signal that social mores have been violated. Making statements about how it would be good if everyone behaves is another.

Rejecting them and saying 'not my problem' is part of the problem.

Re:What every programmer should know about memory, Part 1 (2... by optimuspaul on Tuesday January 26, 2021 @01:56PM (#25919741)
transferring specific violations to general violations is the problem in this case.
Re:What every programmer should know about memory, Part 1 (2... by gspr on Monday January 25, 2021 @04:34PM (#25909218)
Fair point. My bad for not getting it.
Re:What every programmer should know about memory, Part 1 (2... by jokab on Monday January 25, 2021 @04:37PM (#25909250)
As a LOB programmer who mainly puts forms over data