Comment by simpaticoder
3 days ago
In undergrad I took an abstract algebra class. It was very difficult and one of the things the teacher did was have us memorize proofs. In fact, all of his tests were the same format: reproduce a well-known proof from memory, and then complete a novel proof. At first I was aghast at this rote memorization - I maybe even found it offensive. But an amazing thing happened - I realized that it was impossible to memorize a proof without understanding it! Moreover, producing the novel proofs required the same kinds of "components" and now because they were "installed" in my brain I could use them more intuitively. (Looking back I'd say it enabled an efficient search of a tree of sequences of steps).
Memorization is not a panacea. I never found memorizing l33t code problems to be edifying. I think it's because those kinds of tight, self-referential, clever programs are far removed from the activity of writing applications. Most working programmers do not run into a novel algorithm problem but once or twice a career. Application programming has more the flavor of a human-mediated graph-traversal, where the human has access to a node's local state and they improvise movement and mutation using only that local state plus some rapidly decaying stack. That is, there is no well-defined sequence for any given real-world problem, only heuristics.
Memorizing is a super power / skill. I work in a ridiculously complex environment and have to learn and know so much. Memorizing and spaced repetition are like little islands my brain can start building bridges between. I used to think memorizing was anti-first principles, but it is just good. Our brains can memorize so much if we make them. And then we can connect and pattern matching using higher order thinking.
There's this [1] which is one of my favorite articles on that topic; definitely worth a read.
[1] https://www.pearlleff.com/in-praise-of-memorization
Recognizing the patterns and applying patterned solutions is where I see success in my niche of healthcare interoperability. So much of my time is spent watching people do things,process and how they use data. It's amazing how much people remember to do their job, but me coming in and be able to bridge the doctor and the lab to share data easier is like Im an alchemist. It's really not a problem I've been able to see ai solve without suggesting solutions that are too simple or too costly and in that goldilocks zone everyone will be happy with
What's even better about memorization is that you have an objective method to test your own understanding. It is so easy to believe you understand something when you don't! But, at least with math, I think if you can reproduce the proof from memory you can be very confident that you aren't deluding yourself.
In education, I have heard it called “fluency”.
Hmmm... It's the other way around for me. I find it hard to memorise things I don't actually understand.
I remember being given a proof of why RSA encryption is secure. All the other students just regurgitated it. It made superficial sense I guess.
However, I could not understand the proof and felt quite stupid. Eventually I went to my professor for help. He admitted the proof he had given was incomplete (and showed me why it still worked). He also said he hadn't expected anyone to notice it wasn't a complete proof.
> Hmmm... It's the other way around for me. I find it hard to memorise things I don't actually understand.
I think you two are agreeing. GP said that they found they couldn't memorize something until they actually understood it
You're correct, I read it the wrong way!
1 reply →
>> I realized that it was impossible to memorize a proof without understanding it!
> I find it hard to memorise things I don't actually understand.
Isn't it the parent's point?
Yep, I misread the parent post.
> I remember being given a proof of why RSA encryption is secure
With what assumptions?
Mostly just integer factorisation of large numbers is hard.
There are some other things you have to worry about practically, e.g Coppersmith's attack, and padding schemes (although that wasn't part of the proof I was given)
But, is it proven that RSA is secure? Wouldn't that also prove P != NP?
Haha, well it does depend on the assumption that integer factorisation is hard. Although I'm not sure that being able to do it implies P = NP.
During my elementary school years, there was a teacher who told me that I didn't need to memorize it as long as I understand them. I taught he was the coolest guy ever.
Only when I got late twenties, I realized how wrong he was. Memorization and understanding go hand in hand, but if one of them has to come first than it's memorization. He probably said that because that was what kids (who were forced to do rote memorization) wanted to hear.
You could argue this is just moving the memorization to meta-facts, but I found all throughout school that if you understand some slightly higher level key thing, memorization at the level you're supposed to be working in becomes at best a slight shortcut for some things. You can derive it all on the fly.
Sort of like how most of the trigonometric identities that kids are made to memorize fall out immediately from e^iθ = cosθ+isinθ (could be taken as the definitions of cos,sin), e^ae^b=e^(a+b) (a fact they knew before learning trig), and a little bit of basic algebraic fiddling.
Or like how inverse Fourier transforms are just the obvious extension of the idea behind writing a 2-d vector as a sum of its x and y projections. If you get the 2d thing, accept that it works the exact same in n-d (including n infinite), accept integrals are just generalized sums, and functions are vectors, and I guess remember that e^iwt are the basis you want, you can reason through what the formula must be immediately.
> you can reason through what the formula must be immediately.
At least up to various factors of 2π ;-)
1 reply →
Probably. I hated memorization when I was a student too, because it was boring. But as soon as I did some teaching, my attitude changed to, "Just memorize it, it'll make your life so much easier." It's rough watching kids try to multiply when they don't have their times tables memorized, or translate a language when they haven't memorized the vocabulary words in the lesson so they have to look up each one.
There's things that you need to know (2*2 = 4) and there are things that you need to understand (multiplication rules). Both can happen with practice, but they're not that related.
Memorization is more like a shortcut. You don't need to go through the problem solving process to know the result. But with understanding, you master the heuristic factors needed to know when to take the shortcut and when to go through the problem solving route.
The Dreyfus Skill Model [0] is a good explanation. Novice typically have to memorize, then as they master the subject, their decision making becomes more heuristic based.
LLMs don't do well with heuristics, and by the times you've nailed down all the problems data, you could have been done. What they excels at is memorization, but all the formulaic stuff have been extracted into frameworks and libraries for the most popular languages.
[0]: https://en.wikipedia.org/wiki/Dreyfus_model_of_skill_acquisi...
1 reply →
I never memorized multiplication tables and was always one of those "good in math" kids. An attempt to memorize that stuff ended with me confusing results and being unable to guess when I did something wrong. Knowing "tricks" and understanding how multiplication works makes life easier.
> "Just memorize it, it'll make your life so much easier."
That is because you evaluate cost of memorization to 0, because someone else is paying it. And you evaluate the cost of making mistakes due to constantly forgetting and being unable to correct to 0, because simply the kid gets blamed for not having perfect memory.
> or translate a language when they haven't memorized the vocabulary words in the lesson so they have to look up each one
Teaching language by having people translate a lot is an outdated pedagogy - it simply did not produced people capable to understand and produce the language. If the kids are translating sentences word by word, there was something going on wrongly before.
> It's rough watching kids try to multiply when they don't have their times tables memorized
As someone who never learned my multiplication tables – it’s fine. I have a few cached lookups and my brain is fast at factoring.
8*6? Oh that’s just 4*2*6= 4*12 = 48. Easy :)
1 reply →
It's a lot easier to memorize things when it's your job i find.
maybe they pay hits a reward centre in my brain.
As with most things, it depends. If you truly do understand something, then you can derive a required result from first principles. _Given sufficient time_. Often in an exam situation you are time-constrained, and having memorized a shortcut cut be beneficial. Not to mention retaining is much easier when you understand the topic, so memorization becomes easier.
Probably the best example of this I can think of (for me at least) from mathematics is calculating combinations. I have it burned into my memory that (n choose r) = (n permute r) / (r permute r), and (n permute r) = n! / (n - r)!
Can I derive these from first principles? Sure, but after not seeing it for years, it might take me 10+ minutes to think through everything and correct any mistakes I make in the derivation.
But if I start with the formula? Takes me 5 seconds to sanity check the combination formula, and maybe 20 to sanity check the permutation formula. Just reading it to myself in English slowly is enough because the justification kind of just falls right out of the formula and definition.
So, yeah, they go hand in hand. You want to understand it but you sure as heck want to memorize the important stuff instead of relying on your ability to prove everything from ZFC...
It is waaaay easier to remember when you understand. The professor had it exactly right - if you learn to understand, you frequently end up remembering. But, memorization does not lead to understanding at all.
I think we memorize the understanding. For me it also works better understanding how something works than memoryzing results. I remember in high school, in maths trigonometrics, there were a list of 20 something formulas derived from a single one. Everyboby was memorizing the whole list of formulas; i just had to memorize a simple formula and the underdtanding of how to derive the others from the fundamental one on the fly.
You don't need to memorize to understand. You can rederive it every time.
You need to memorize it to use it subconsciously while solving more complex problems. Other ways you won't fit more complex solutions into your working memory,vso whole classes of problems will be too hard for you.
Ish? I never ever memorized the multiplication tables. To this day, I don't think I know them fully. I still did quite well in math by knowing how to quiz the various equations. Not just know them, but how to ask questions about moving terms and such.
My controversial education hot take: Pointless rote memorization is bad and frustrating, but early education could use more directed memorization.
As you discovered: A properly structured memorization of carefully selected real world material forces you to come up with tricks and techniques to remember things. With structured information (proofs in your case) you start learning that the most efficient way to memorize is to understand, which then reduces the memorization problem into one of categorizing the proof and understanding the logical steps to get from one step to another. In doing so, you are forced to learn and understand the material.
Another controversial take (for HN, anyway) is that this is what happens when programmers study LeetCode. There’s a meme that the way to interview prep is to “memorize LeetCode”. You can tell who hasn’t done much LeetCode interviewing if they think memorizing a lot of problems is a viable way to pass interviews. People who attempt this discover that there are far too many questions to memorize and the best jobs have already written their own questions that aren’t out of LeetCode. Even if you do get a direct LeetCode problem in an interview, a good interview will expect you to explain your logic, describe how you arrived at the solution, and might introduce a change if they suspect you’re regurgitating memorized answers.
Instead, the strategy that actually works is to learn the categories of LeetCode style questions, understand the much smaller number of algorithms, and learn how to apply them to new problems. It’s far easier to memorize the dozen or so patterns used in LeetCode problems (binary search, two pointers, greedy, backtracking, and so on) and then learn how to apply those. By practicing you’re not memorizing the specific problems, you’re teaching yourself how to apply algorithms.
Side note: I’m not advocating for or against LeetCode, I’m trying to explain a viable strategy for today’s interview format.
Exactly. I agree with the leetcode part. A lot of problems in the world are composite of simpler smaller problems. Leetcode should teach you the basic patterns and how to combine them to solve real world problems. How will you ever solve a real world problem without knowing a few algorithms beforehand. For example, my brother was talking about how a Roomba would map a room. He was imagining 0 to represent free space and 1 as inaccessible points. This quickly reminded me of Number of Islands problem from leetcode. Yeah, there might be a lot of changes required to that problem but one could simple represent it as two problems.
1. Represent different objects in the room as some form of machine understandable form in a matrix 2. Find the number of Islands or find the Islands themselves.
This is the approach algomonster use. They give you a way to categorise the problem and what pattern is likely to solve it:
https://algo.monster/flowchart
Memorization of, like, multiplication tables gives us a poor view of the more interesting type of memorization. Remembering types of problems we’ve seen. Remembering landmarks and paths, vs just remembering what’s in every cell of a big grid.
I still don’t like leetcode, though.
> Memorization of, like, multiplication tables gives us a poor view of the more interesting type of memorization.
Memorizing multiplication tables is the first place many children encounter this strategy: The teacher shows you that you could try to memorize all of the combinations, or you could start learning some of the patterns and techniques. When multiplying by 5 the answer will end in 0 or 5. When multiplying by 2 the answer will be an even number, and so on.
1 reply →
Fortunately that was not my experience in abstract algebra. The tests and homework were novel proofs that we hadn't seen in class. It was one of my favorite classes / subjects. Someone did tell me in college that they did the memorization thing in German Universities.
Code-wise, I spent a lot of time in college reading other people's code. But no memorization. I remember David Betz advsys, Tim Budd's "Little Smalltalk", and Matt Dillon's "DME Editor" and C compiler.
Another advsys enjoyer! Did you ever write a game with it?
I would wager some folks can memorize without understanding? I do think memorization is underrated, though.
There is also something to the practice of reproducing something. I always took this as a form of "machine learning" for us. Just as you get better at juggling by actually juggling, you get better at thinking about math by thinking about math.
Rote memorization is essentially that, yes.
Interesting I had the same problem and suffered in grades back in school simply because I couldn't memorize much without understanding. However, I seemed to be the only one because every single other student, including those with top grades, were happy to memorize and regurgitate. I wonder how they're doing now.
My abstract algebra class had it exactly backwards. It started with a lot of needless formalism culminating in galois theory. This was boring to most students as they had no clue why the formalism was invented in the first place.
Instead, I wished it showed how the sausage was actually made in the original writings of galois [1]. This would have been far more interesting to students, as it showed the struggles that went into making the product - not to mention the colorful personality of the founder.
The history of how concepts were invented for the problems faced is far more motivating to students to build a mental model than canned capsules of knowledge.
[1] https://www.ams.org/notices/201207/rtx120700912p.pdf
> This was boring to most students as they had no clue why the formalism was invented in the first place.
> The history of how concepts were invented for the problems faced is far more motivating to students to build a mental model than canned capsules of knowledge.
That's something I really like about 3blue1brown, and he says it straight up [0]:
> My goal is for you to come away feeling like you could have invented calculus yourself. That is, cover all those core ideas, but in a way that makes clear where they actually come from, and what they really mean, using an all-around visual approach.
[0]: https://www.youtube.com/watch?v=WUvTyaaNkzM
Depends on the subject - I can remember multiple subjects where the teacher would give you a formula to memorise without explaining why or where it came from. You had to take it as an axiom. The teachers also didn't say - hey, if you want to know why did we arrive to this, have a read here, no, it was just given.
Ofc you could also say that's for the student to find out, but I've had other things on my mind
>Memorization is not a panacea.
It is What you memorize that is important, you can't have a good discussion about a topic if you don't have the facts and logic of the topic in memory. On the other hand using memory to paper over bad design instead of simplifying or properly modularizing it, leads to that 'the worst code I have seen is code I wrote six months ago' feeling.
Your comment about memorizing as part of understanding makes a lot of sense to me, especially as one possible technique to get get unstuck in grasping a concept.
If it doesn’t work for you on l33t code problems, what techniques are you finding more effective in that case?
I was part of an ACM programming team in college. We would review classes of problems based on the type of solution necessary, and learn those techniques for solving them. We were permitted a notebook, and ours was full of the general outline of each of these classes and techniques. Along with specific examples of the more common algorithms we might encounter.
As a concrete example, there is a class of problems that are well served by dynamic programming. So we would review specific examples like Dijkstra's algorithm for shortest path. Or Wagner–Fischer algorithm for Levenshtein-style string editing. But we would also learn, often via these concrete examples, of how to classify and structure a problem into a dynamic programming solution.
I have no idea if this is what is meant by "l33t code solutions", but I thought it would be a helpful response anyway. But the bottom line is that these are not common in industry, because hard computer science is not necessary for typical business problems. The same way you don't require material sciences advancements to build a typical house. Instead it flows the other way, where advancements in materials sciences will trickle down to changing what the typical house build looks like.
>If it doesn’t work for you on l33t code problems, what techniques are you finding more effective in that case?
Memorization of l33t code DOES work well as prep for l33t code tests. I just don't think l33t code has much to do with application programming. I've long felt that "computer science" is physics for computers, low on the abstraction ladder, and there are missing labels for the higher complexity subjects built on it. Imagine if all physical sciences were called "physics" and so in order to get a job as a biologist you should expect to be asked questions about the Schroedinger equation and the standard model. We desperately need "application engineering" to be a distinct subject taught at the university level.
You mean like to Software Engineering?
That's a real major that's been around for a couple of decades which focuses on software development (testing, version control, design patterns) with less focus on the more theoretical parts of computer science? There are even specialties within the Software Engineering major that focus specifically on databases or embedded systems.
What I understand from the GP is that memorizing l33t code won't help you learn anything useful. Not that understanding the solutions won't help you memorize them.
Is it the memorisation that had the desired effect or the having to come up with the novel proofs? Many schools seem to do the memorising part, but not the creating part.
Indeed, not just math. Biology requires immense amounts of memorization. Nature is littered with exceptions.
I find it's helpful to have context to frame what I'm memorizing to help me understand the value.
> But an amazing thing happened - I realized that it was impossible to memorize a proof without understanding it!
This may be true of mathematical proofs, but it surely must not be true in general. Memorizing long strings of digits of pi probably isn’t much easier if you understand geometry. Memorizing famous speeches probably isn’t much easier if you understand the historical context.
> Memorizing famous speeches probably isn’t much easier if you understand the historical context.
Not commenting on the merits of critical thinking vs memorization either way, but I think it would be meaningfully easier to memorize famous speeches if you understand the historical context.
For memorizing a speech word-for-word, I don't think so. Knowing the years of the signing of the Declaration of Independence and the Gettysburg Address aren't gonna help you nail the exact wording of the first sentence.
Right, isn't building up a (imaginary) context how people memorize pi?
It's funny, because I had the exact opposite experience with abstract algebra.
The professor explained things, we did proofs in class, we had problem sets, and then he gave us open-book semi-open-professor take-home exams that took us most of a week to do.
Proof classes were mostly fine. Boring, sometimes ridiculously shit[0], but mostly fine. Being told we have a week for this exam that will kick our ass was significantly better for synthesizing things we'd learned. I used the proofs we had. I used sections of the textbook we hadn't covered. I traded some points on the exam for hints. And it was significantly more engaging than any other class' exams.
[0] Coming up with novel things to prove that don't require some unrelated leap of intuition that only one student gets is really hard to do. Damn you Dr. B, needing to figure out that you have to define a third equation h(x) as (f(x) - g(x))/(f(x) + g(x)) as the first step of a proof isn't reasonable in a 60 minute exam.
memorization + application = comprehension. Rinse and repeat.
Whether leet code or anything else.
Mathematics pedagogy today is in a pretty sorrowful state due to bad actors and willful blindness at all levels that require public trust.
A dominant majority in public schools starting late 1970s seems to follow the "Lying to Children" approach which is often mistakenly recognized as by-rote teaching but are based in Paulo Freire's works that are in turn based on Mao's torture discoveries from the 1950s.
This approach contrary to classical approaches leverages torturous process which seems to be purposefully built to fracture and weed out the intelligent individual from useful fields, imposing sufficient thresholds of stress to impose PTSD or psychosis, selecting for and filtering in favor of those who can flexibly/willfully blind/corrupt themselves.
Such sequences include Algebra->Geometry->Trigonometry where gimmicks in undisclosed changes to grading cause circular trauma loops with the abandonment of Math-dependent careers thereafter, similar structures are also found in Uni, for Economics, Business, and Physics which utilize similar fail-scenarios burning bridges where you can't go back when the failure lagged from the first sequence, and you passed the second unrelated sequence. No help occurs, inducing confusion and frustration to PTSD levels, before the teacher offers the Alice in Wonderland Technique, "If you aren't able to do these things, perhaps you shouldn't go into a field that uses it". (ref Kubark Report, Declassified CIA Manual)
Have you been able to discern whether these "patterns" as you've called them aren't just the practical reversion to the classical approach (Trivium/Quadrivium)? Also known as the first-principles approach after all the filtering has been done.
To compare: Classical approaches start with nothing but a useful real system and observations which don't entrench false assumptions as truth, which are then reduced to components and relationships to form a model. The model is then checked for accuracy against current data to separate truth from false in those relationships/assertions in an iterative process with the end goal being to predict future events in similar systems accurately. The approach uses both a priori and a posteriori components to reasoning.
Lying to Children reverses and bastardizes this process. It starts with a single useless system which contains equal parts true and false principles (as misleading assumptions) which are tested and must be learned to competency (growing those neurons close together). Upon the next iteration one must unlearn the false parts while relearning the true parts (but we can't really unlearn, we can only strengthen or weaken) which in turn creates inconsistent mental states imposing stress (torture). This is repeated in an ongoing basis often circular in nature (structuring), and leveraging psychological blindspots (clustering), with several purposefully structured failings (elements) to gatekeep math through torturous process which is the basis for science and other risky subject matter. As the student progresses towards mastery (gnosis), the systems become increasingly more useful. One must repeatedly struggle in their sessions to learn, with the basis being if you aren't struggling you aren't learning. This mostly uses a faux a priori reasoning without properties of metaphysical objectivity (tied to objective measure, at least not until the very end).
If you don't recognize this, an example would be the electrical water pipe pressure analogy. Diffusion of charge in-like materials, with Intensity (Current) towards the outermost layer was the first-principled approach pre-1978 (I=V/R). The Water Analogy fails when the naive student tries to relate the behavior to pressure equations that ends up being contradictory at points in the system in a number of places introducing stumbling blocks that must be unlearned.
Torture being the purposefully directed imposition of psychological stress beyond a individuals capacity to cope towards physiological stages of heightened suggestability and mental breakdown (where rational thought is reduced or non-existent in the intelligent).
It is often recognized by its characteristic subgroups of Elements (cognitive dissonance, a lack of agency to remove oneself and coercion/compulsion with real or perceived loss or the threat thereof), Structuring (circular patterns of strictness followed by leniency in a loop, fractionation), and Clustering (psychological blindspots).
Wait, the electrical pipe water analogy is actually a very good one and it's quite difficult to find edge cases where it breaks down in a way that would confuse a student. There are some (for example, there's no electrical equivalent of Reynold's number or turbulence, and flow resistance varies differently with pipe diameter than wire diameter, and no good equivalent for Faraday's law) but I don't think these are likely to cause confusion. It even captures nuance like inductance, capacitance, and transmission line behaviour.
As I recall, my systems dynamics textbook even explicitly drew parallels between different domains like electricity and hydrodynamics. You're right that the counterparts aren't generally perfect especially at the edges but the analogies are often pretty good.
Intuitively it fails in making an equivalence to area which is an unrelated dimensional unit, as two lengths multiplied together equaling resistance, as well as the skin-effect related to Intensity/Current which is why insulation/isolation of wires are incredibly important.
The classical approach used charge diffusion iirc, and you can find classical examples of this in Oliver Heaviside's published works (archive.org iirc). He's the one that simplified Maxwell's 20+ equations down to the small number we use today.
> Lying to Children reverses and bastardizes this process. It starts with a single useless system which contains equal parts true and false principles (as misleading assumptions) which are tested and must be learned to competency (growing those neurons close together).
Can you provide some concrete examples of it?
Not OP, and it was a couple decades ago, but I certainly remember professors and teachers saying things like "this isn't really how X works, but we will use the approximation for now in order to teach you this other thing". That is if you were lucky, most just taught you the wrong (or incomplete) formula.
I think there is validity to the approach but sciences would be much, much improved if taught more like history lessons. Here is how we used to think about gravity, here's the formula and it kind of worked, except... Here is planetary orbits that we used to use when we assumed they had to be circles. Here's how the data looked and here's how they accounted for it...
This would accomplish two goals - learning the wrong way for immediate use (build on sand) and building an innate understanding of how science actually progresses. Too little focus is on how we always create magic numbers and vague concepts (dark matter, for instance) to account for structural problems we have no good answer for.
Being able to "sniff the fudge" would be a super power when deciding what to write a PhD on, for instance. How much better would science be if everyone strengthened this muscle throughout their educatuon?
I included the water pipe analogy for electric theory, that is one specific example.
Also, In Algebra I've seen a flawed version of mathematical operations being taught that breaks down with negative numbers under multiplication (when the correct way is closed over multiplication). The tests were supposedly randomized (but seemed to target low-income demographics). The process is nearly identical, but the answers ultimately not correct. The teachers graded on the work to the exclusion of the correct answer. So long as you showed the correct process expected in Algebra you passed without getting the right answer. Geometry was distinct and unrelated, and by Trigonometry the class required correct process and answer. You don't find out there is a problem until Trigonometry, and the teacher either doesn't know where the person is failing comprehension, or isn't paid to reteach a class they aren't paid for but you can't go back.
I've seen and heard horror stories of students where they'd failed Trig 7+ times at the college level, and wouldn't have progressed if not for a devoted teacher helping them after-hours (basically correcting and reteaching Algebra). These kids literally would break out in a cold PTSD sweat just hearing the associated words related to math.
1 reply →
I'd love an example too, and an example of the classical system that this replaced. I'm willing to believe the worst of the school system, but I'd like to understand why.
3 replies →