A repository for solving and summarizing coding problems in preparation for technical interviews. I explore different facets of study aids for coding interviews and document the process for the struggling code-monkey I am, but could be a style suitable for the next primordial programmer.
-
SPACED REPETITION
-
a method where the subject is asked to remember a certain fact with the time intervals increasing each time the fact is presented or said. If the subject is able to recall the information correctly the time is doubled to further help them keep the information fresh in their mind to recall in the future. With this method, the patient is able to place the information in their long-term memory. If they are unable to remember the information they go back to the previous step and continue to practice to help make the technique lasting
Vance, D. E.; Farr, K. F. (September 2007). "Spaced Retrieval for Enhancing Memory: Implications for Nursing Practice and Research". Journal of Gerontological Nursing. 33 (9): 46–52. doi:10.3928/00989134-20070901-08. ISSN 0098-9134. PMID 17900000.
-
-
GRADUAL TRAINING
-
This is certainly the best way to grow one's confidence in their ability, by taking one step at a time and conforming to this prerequisite of being disciplined in thought and memory.
-
Just as the ocean has a gradual shelf, a gradual slope, a gradual inclination, with a sudden drop-off only after a long stretch, in the same way this discipline of Dhamma (dhamma-vinaya) has a gradual training (anupubbasikkhā), a gradual performance (anupubbakiriyā), a gradual progression (anupubbapatipadā), with a penetration to gnosis only after a long stretch.
Udana 5.5 (p. 231)
-
-
PLIANCY
-
One of the eight antidotes to the five faults in meditation, specifically the fault of laziness.
- Pliancy (Tib. shin jang; Wyl. shin sbyang) in the psychological sense is the quality of being able to see changes and nuances in a situation or principle and adjust to them accordingly.
it is essential prerequisite for reaching the preparatory stage of the dhyana levels, deep meditative state or absorption characterized by lucid awareness and achieved by focusing the mind on a single object, and for the practice of vipashyana, insight into the true nature of reality
https://www.tibetanbuddhistencyclopedia.com/en/index.php?title=Flexibility ‘One should be capable, straightforward, very straightforward, easy to speak to, flexible and modest.’ (Sn.143). In the Jātaka he said: ‘Bend like a bow and be as pliant as bamboo, and then you will not be at odds with anyone.’ (Ja.VI,295). Intellectual flexibility (cittamudutā) is important also (Dhs.45). To have views and opinions but without being pedantic, dogmatic or rigid about them is an important aspect of detachment. Sogyal Rinpoche says: "The Tibetan word for ‘pliancy’ or ‘flexibility’, shin jang, means that you have some sense of how to ride your own mind. At first, you learn how to tame your mind. Having tamed your mind, you learn how to make friends with it. And having made friends with it, you learn how to make use of it. This is riding your mind. Shin jang is a very important term. It is often referred to as the fruition, or the complete accomplishment of shamatha. At that level you begin to develop what you could call ‘big shin jang’: your mind is soothed, your body is completely relaxed. But here, shin jang as an antidote is what you could call ‘early’ shin jang, not ‘final’ shin jang. Here, you are simply learning to make friends with yourself. You have some sense of relaxation and some sense of trust in yourself. You have become less paranoid about your own mind. You realize that your mind is workable and that there is an end to suffering from your mind, of your mind, with your mind, and by your mind."
-
-
BORING VARIATIONS
-
It is important to practice different variations of a problem, because you want to have more than one angle or perspective of the problem's definition and the solution structure.
- One can incoporate episodic frequency and priming of information but it is important to not contribute to misattribution in doing so.
- The contextual interference will increase long-term retention (without amassing practice sessions) and change in context/concept will inform's one's own subjective experience.
Quotes from Larry Bird "As a kid, I always thought I was behind, and I needed that extra hour to catch up. Jim Jones once told me, 'No matter how many shots you take, somewhere there's a kid out there taking one more. If you dribble a million times a day, someone is dribbling a million and one... Whenever I'd get ready to call it a day, I'd think about that other kid. There are many times when you're better off practicing than playing, but most people just don't understand that... You can make all the excuses you want, but if you're not mentally tough, you're not prepared to play every night, you're not going to win."
- Larry holds a candle to the truth that simply doing practice alone is not enough.
- Of course Larry is an athlete, and we're focused improving proficiency of thought and memory whilst coding.
- What Larry is talking about is conditioning one's self to win a championship.
- You may not need to win a championship, merely just a software engineering job, or any accomplishment.
- But the nerves (when its 'go-time') are the same and the only way to have insight to the reality is through the conditioning of the concentrated mind and fluent retrieval of the object/subject of interest.
- You may not need to win a championship, merely just a software engineering job, or any accomplishment.
- What Larry is talking about is conditioning one's self to win a championship.
- Of course Larry is an athlete, and we're focused improving proficiency of thought and memory whilst coding.
- One can incoporate episodic frequency and priming of information but it is important to not contribute to misattribution in doing so.
-
- FAMILIARITY: recognizing flows, mental models, and patterns
- COMPREHENSION: discussing the patterns
- CONSCIOUS EFFORT: experimenting and learning through trying everything
- CONSCIOUS ACTION: mastering the pattterns by knowing what to try
- PROFICIENT: finding and manipulating unseen patterns
- UNCONSCIOUS COMPETENCE: simple
What are we to do with what we have written down? Certainly, at first, we will produce mostly garbage.
But we have been educated to expect something useful from our activities and soon lose confidence if nothing useful seems to result.
We should, therefore, reflect on whether and how we arrange our notes so that they are available for later access.
- Hypertext is text displayed on a medium with references to other mediums that the reader can immediately access.
- Zettelkasten automatically scales itself to the size of the problem you are note-taking through a 'bottom-up' technique.
- The heterarchy of Zettelkasten is built organically from “bottom-up” via gradual forming of links between the notes.
- If you want to replicate the functionality of Luhmann’s Zettelkasten, you would have to create a hypertext and limit your entry into it via the most central pages on a topic, from which you would continue by following links.
Zettelkasten notes are atomic and autonomous.
Per David Clear:
- The principle of atomicity: The term was coined by Christian Tietze. It means that each note should contain one idea and one idea only. This makes it possible to link ideas with a laser focus.
- The principle of autonomy: Each note should be autonomous, meaning it should be self-contained and comprehensible on its own. This allows notes to be moved, processed, separated, and concatenated independently of its neighbors. It also ensures that notes remain useful even if the original source of information disappears.
Taken from Neuron Zettelkasten
I sought out some reviews of the flash card softwares out there because I find the manual handwriting of flash cards to be unproductive, especially since the actual coding is done on a screen! Fortunately white board technology has been invented to aid in handwriting concepts much easier, but we lose the repetition quality the flash cards offer. This repetition is better known as spaced repetition, learning technique based on increasing intervals of time between subsequent review of the learned material.
- SuperMemo (from "Super Memory") is a learning method and software package developed by SuperMemo World and SuperMemo R&D with Piotr Woźniak in Poland from 1985 to the present.
- They have archived a lovely list of bullet points chronologically depicting the History of SuperMemo, which reads from Hermann Ebbinghaus's Forgetting curve (1885) => Robert Bjork's theory of disuse (1969) => to finally Piotr Wozniak's computational spaced repetition, i.e. the technique in which knowledge is reviewed in optimum intervals that are determined by a computer with the goal of reaching a desired level of knowledge retention.
Misattributions unconscious influences Interpreting the subjective sense of perceptual fluency or familiarity poses a challenge of sorts for the
learner. Prior exposures to stimuli can have long-term priming effects that influence not only the objective speed and/or accuracy of our ability to
perceive or identify those stimuli, but also our subjective sense of fluency or familiarity... We are susceptible, therefore, to unconscious influences of
prior events, which can take the form of our misaHributing the source or cause of our sense of perceptual fluency.
...
Our level of learning or knowledge, however, is only one of a number of possible contributors to fluent retrieval. In their analysis, Benjamin and Bjork
( 1996) distinguish four other "determinants11 of fluent retrieval: frequency and recency of usage, episodic distinctiveness, cue sufficiency, and priming.
Frequency and recency of usage play an important role because the ad of retrieval is itself a learning event, in that the retrieval of information makes
that information more retrievable in the future. An item of information that has been accessed frequently will tend to be characterized by fluent retrieval
at the current point in time. Episodic distinctiveness refers to the collectio of factors, such as salience, emotionality, and temporal isolation, that makes
events distinct, hence more readily recallable. Cue sufficiency denotes the effectiveness of the cues guiding the retrieval of desired facts, information, or
procedures. To the extent that those cues are underspecified-that is, associated with multiple items in memory-retrieval of any one item will be
slowed, made less reliable, or both, owing to the competitive dynamics that characterize retrieval processes in human memory
(cf. the cue overload principle; e.g., Watkins and Watkins 1975). Finally, as in the discussion of perceptual fluency, priming, refers to the
effects of mere prior exposure of some target item. There is now abundant evidence that prior presentation of an item, even in a context nominally unrelated
to some current task of interest, can increase the speed or likelihood that the item, among other possible items, is retrieved in response to a cue of some kind.
...
There are two reasons, then, why it is important to create desirable difficulties for the learner during training. One reason is that manipulations such
as varying the conditions of practice, reducing feedback to the learner, sequencing materials and tasks to be learned in ways that cause "contextual
interference," and spacing rather than massing practice sessions, enhance long-term retention and transfer. The other reason is that such manipulations
also have the potential to inform the learners' own subjective experiences. In the context of the total training experience, such manipulations give learners
the opportunity to experience the forgetting, errors, and mistakes that result from changes in task or contextual cues, from interference owing to interpolated
or prior learning, from reduced feedback, and so forth. In an optimal training environment, the learners' successes become more informative as well-that is,
become a more valid basis for confidence because they constitute more reliable evidence that skills and knowledge will remain accessible over time and in altered circumstances.
-
For a detailed description of the first SM algorithm see: Using SuperMemo without a computer
-
Anki is a free and open-source flashcard program and implements the SM-2 algorithm, read more on the SuperMemo algorithm (SM-2),
- The SM-2 algorithm in Anki been modified to allow priorities on cards and to show flashcards in order of their urgency. Anki 23.10+ also has a native implementation of the Free Spaced Repetition Scheduler (FSRS) algorithm, which allows for more optimal spacing of card repetitions.
So which is software and algorithm implementation is better?
- SuperMemo currently uses SM-18 and its hard to find a definitive answer due to the nature of the validity for metrics of proving one's ability for retrieval and retention (but there is a technical comparison for SM-17 vs. older SuperMemos).
Below is a graph of the result of simulation that SM-17 is better than SM-2
(pulled from https://www.masterhowtolearn.com/2018-11-11-my-comparison-between-anki-and-supermemo/)
"The least squares metric for Alg SM-2 equals ~54% as compared to ~37% for Algorithm SM-17. This does not sound like a lot, but it may easily double or triple the review workload (esp. for shorter intervals).”
- Based on this we can say in the long-term SuperMemo is superior, although it simply locked to Windows making it hard access and manage on my GNU/Linux Desktop. I will be using Anki (on Ubuntu 22.04) with a modern spaced-repetition scheduler, which you can check out here at FSRS4Anki.