badlydrawnrob / anki

Learn to code with Anki — flashcards and themes for all learning levels. Master your programming language of choice!
MIT License
718 stars 61 forks source link

Draw! #50

Open badlydrawnrob opened 5 years ago

badlydrawnrob commented 5 years ago

Some ideas are too complex for a simple flashcard. For example, the HTDP game code or a stonking great glob of code from a program. How can this be broken down to make reviews sane? Should only a handful of snippets from the code base be added?

Initial thoughts on sketching out ideas

Stop! Draw it out. Test design routes. When faced with a difficult problem:

  1. do part of it & try again, or
  2. do a similar problem and try again.

When writing a function or programme, there'll be many routes. Each will have it's pros and cons, some will lead to shorter (or easier) code — having visuals of design decisions could come in handy when reviewing cards.

  1. Do the simplest thing possible
    • Pull out the nugget of the idea
    • Start with the most basic unit of data
  2. How much time do you have to explore?
  3. Could it benefit from some research first?
  4. Draw out potential routes
    • See here and here for examples (simple and hard)
  5. Filter the useful one(s) (try not to satisfice)
    • It might be useful to note down the answer you didn't use (wrong answer, needlessly complex idea)
    • You'll have it stored for next time you tackle a similar problem
  6. Start writing code with confidence

See also hammock driven development for thinking about a problem, and ideally a non-maths version of "How to Solve it" if one exists. Some problems will need context, or step-by-step drawings, but where possible get to the nugget of the issue without adding a ton of code (this could be handled with simple drawings or explanations).

See the below comment, and my Head First SQL book notes as an example of where Anki might not be necessary. Here I've pulled out key ideas in a document for reference, and it only makes sense to add an Anki card on bits you routinely get stuck on.

If you come back to your notes and a section is too hard to understand, it's probably a good candidate for a simpler Anki card.

Image occlusions in Anki

Image Occlusions are another area to explore. The only downside is you must add annotations via Anki to validate the card. An example here on building your own.

Screenshot 2023-11-26 at 22 49 45

Some things are hard to visualise

How to design programs function mental model is pretty good, if it could be visualised somehow. Also interesting is this article on meaning, context, and flow of a program.

A difficult example in Racket

Some concepts are really hard (or really dry) to grasp, so it's sometimes easier to draw out in a conceptual, abstract way.

Programming terminology can be dense

An argot: the language used by a particular type or group of people

Programming deals with precision for commanding a computer, so they can be hard to understand for the beginner. There's also the question of depth of understanding — and how to explain a thing depending on that student's knowledge reference points. A great example of this is Richard Feinman's explanation of magnets, and why they repel.

Some languages are easier to understand than others. It would be helpful to have a glossary for all the jargon out there!

Some other helpful examples

badlydrawnrob commented 5 years ago

Using the simple card, a basic example:

testing-draw need-more-context
badlydrawnrob commented 5 years ago

If the question isn't short and sweet, it may be too complicated ... but, potential issues with current fields are:

badlydrawnrob commented 5 years ago

Any ideas or examples, please send them along!

badlydrawnrob commented 9 months ago

Look up more information on Image Occlusions plugin and this post which goes into detail on building your own ...