News for hackers. Stuff that matters.
Re:Show HN: I made a spaced repetition tool to master coding... by ammasant on Saturday April 27, 2024 @12:17AM (#40177173)
Learning the concepts and using SRS are not only not mutually exclusive, they're complementary. There's no quicker way to "grok" a deep technical or mathematical insight than to simply expose yourself to it in a diversity of cognitive contexts. SRS works incredibly well because it generates this diversity as a function of regularly scheduled time. Think of it as entropy generation coupled with heavy reinforcement.
Re:Show HN: I made a spaced repetition tool to master coding... by Mc91 on Saturday April 27, 2024 @12:50AM (#40177335)
Right. I learned what binary trees were in college and didn't directly use them much afterward. Since interviews sometimes ask about trees, I started my practice of solving tree problems by practicing how to invert a binary tree. I practiced it so much that I can invert a binary tree from memory now, so that I won't get bounced from an interview like the inventor of Homebrew was from a Google interview.

Most of the concepts I learned, although I don't remember learning Kadane's algorithm for solving the maximum subarray problem in school, so I've learned some things like that. I can also implement a solution for an associated Leetcode problem in one line of code, so I wound up memorizing that too.

OP says "If you master the methods and ideas, you should be able to derive the answers on the spot", but I hear from a lot of people that does not happen, even (implicitly) in this thread. Any how, even if I use OPs method, if I do the same problem over and over and over again I'm going to wind up memorizing it any how.

Re:Show HN: I made a spaced repetition tool to master coding... by eru on Saturday April 27, 2024 @04:24AM (#40178301)
> [...] so that I won't get bounced from an interview like the inventor of Homebrew was from a Google interview.

Just for the record, that never actually happened. It's just a thing the homebrew guy made up.

(I know, the rest of your points are unaffected by this. I just feel annoyed when we casually warm up old myths.)

Re:Show HN: I made a spaced repetition tool to master coding... by luc4sdreyer on Saturday April 27, 2024 @05:41AM (#40178674)
He admitted to lying about it? Do you have a source for that? I couldn't find anything.
Re:Show HN: I made a spaced repetition tool to master coding... by eru on Sunday April 28, 2024 @01:10AM (#40186166)
I was at Google when that happened, and had some inside sources (ie gossip from the guys who interviewed him, who said they didn't even ask any tree questions, and memegen).

I tried to find some outside sources, but nothing about Howell admitting his 'artistic license' outright. So take my fallible memory with a large pinch of salt.

See https://news.ycombinator.com/item?id=15713801 for some discussion, and to see how 'invert a binary tree' wasn't even an established term that anyone at Google would have used.

Re:Show HN: I made a spaced repetition tool to master coding... by ffsm8 on Saturday April 27, 2024 @02:06AM (#40177673)
Learning is like nutrition. There is no ”one true way", instead there are lots of people and each one has their own approach to learning.

Some people are closer to each other, and upon realizing that they believe they've found a pattern. But it's like when people tell you that you need to supplement x in your diet. It's possible that x helped you. And it's even possible that you'll find other people with the same nutritional deficit, creating the illusion that everyone would benefit from supplementing. But that's just what it is: a premature extrapolation from anecdotes

Re:Show HN: I made a spaced repetition tool to master coding... by hardlianotion on Saturday April 27, 2024 @07:34AM (#40179173)
What is inverting a binary tree? I don't think I have ever known what that means.
Re:Show HN: I made a spaced repetition tool to master coding... by Mc91 on Saturday April 27, 2024 @10:21AM (#40180175)
You can find the problem described here. It also has a link to solutions in different languages.

https://leetcode.com/problems/invert-binary-tree/

Re:Show HN: I made a spaced repetition tool to master coding... by bdowling on Saturday April 27, 2024 @04:49PM (#40183390)
So, inverting is just swapping the left and right pointers for the entire tree? Why would you ever do that? That will flip the ordering of the tree and none of your search or balancing functions will work anymore. Shut up! Don't ask questions! Uh, ok.
Re:Show HN: I made a spaced repetition tool to master coding... by hardlianotion on Sunday April 28, 2024 @03:28AM (#40186744)
Oh thanks - I forgot I asked this! So an efficient way to invert would be to abstract out the ordering relation and make it swappable.