A

  • 拉跨点

    R

    anki background chapter

    Anki is a program which makes remembering things easy. Because it is a lot more efficient than traditional study methods, you can either greatly decrease your time spent studying, or greatly increase the amount you learn.

    Anyone who needs to remember things in their daily life can benefit from Anki. Since it is content-agnostic and supports images, audio, videos and scientific markup (via LaTeX), the possibilities are endless. For example:

    • learning a language
    • studying for medical and law exams
    • memorizing people’s names and faces
    • brushing up on geography
    • mastering long poems
    • even practicing guitar chords!

    There are two simple concepts behind Anki: ‘active recall testing’ and ‘spaced repetition’. They are not known to most learners, despite having been written about in the scientific literature for many years. Understanding how they work will make you a more effective learner.

首先是吹

  • 一个程序
  • 让记忆变得容易
  • 比传统的学习方法更有效率(啥是传统的学习方法?指的背不下来就打?死记硬背?)
  • 减少学习时间上的花费
  • 学到更多的东西

直接说能干什么,但第一句还是吹:任何人都能从Anki中受益

又是anki的几个特点:

  • 内容无关
  • 所以多媒体的支持,甚至包括LaTeX(应该就是数学公式和符号了)
  • (吹嘘)无尽的可能
  • 举了几个栗子,这个都被一些文档忠实翻译了:
    • 学习一门外语
    • 准备医学和法律的考试
    • 记住人的名字和长相
    • 复习地理学
    • 掌握长诗
    • 甚至练习吉他和旋

最后终于说了点严肃得,提到Anki背后的原理是

  • active recall testing
  • spaced repetition

并且提到,这两个概念科学界已经广为流传多年,但在广大人民群众中则不为人知…

理解他们的原理将会使你成为一个更有效率的学习者,最后这句有一种活脱脱的传销既视感…

Active recall testing

‘Active recall testing’ means being asked a question and trying to remember the answer. This is in contrast to ‘passive study’, where we read, watch or listen to something without pausing to consider if we know the answer. Research has shown that active recall testing is far more effective at building strong memories than passive study. There are two reasons for this:

  • The act of recalling something ‘strengthens’ the memory, increasing the chances we’ll be able to remember it again.
  • When we’re unable to answer a question, it tells us we need to return to the material to review or relearn it.

You have probably encountered active recall testing in your school years without even realizing it. When good teachers give you a series of questions to answer after reading an article, or make you take weekly progress-check tests, they are not doing it simply to see if you understood the material or not. By testing you, they are increasing the chances you will be able to remember the material in the future.

A good way to integrate active recall testing into your own studies is to use ‘flashcards’. With traditional paper flashcards, you write a question on one side of a card, and the answer on the other side. By not turning the card over until you’ve thought about the answer, you can learn things more effectively than passive observation allows.

被动的学习和所谓的Active recall testing的区别,感觉还是输出,这种输出的形式还是问答的,说白了确实是testing

比如,我其实特别感兴趣有本书,叫做『伟大的博弈』,一直没看完,也是受困于我似乎有兴趣但是对书内的很多内容不敏感,比如每章它都会有一个历史事件年表,对照中西方那段时间重要历史事件的,看着很爽,但是由于没记住,看下一章时候也往往不能置身一个更宏大的历史感当中,所以越读越丧气的感觉

如果通过某种方式,让我记住了那个年表的内容,对这本书的响应应该更热烈一点吧

上面发散了,下面直译它提到的两点胜过passive study的理由:

  • recalling这种行为强化了记忆,增加了我们再次记住某样事物的机会
  • 当我们不能回答某个问题的时候,实际上就是告诉我们应该返回道学习材料中检查,甚至就是重学一遍…

然后一段就是提到,学校教育中的测验的合理性,其实就是active recall testing,当然阅读理解,读完一篇文章通过一些列问答也是这个道理,不是单纯的检查是不是理解了那些材料,通过测试,他们增加了我们在未来仍能记住这些材料的机会

然后是flashcards这总方法,传统是纸卡,一面是问题一面是答案。仔细的思考过答案之前不能翻过来看,这种方式比被动的看和听更有效率

总结一下感觉,其实就是通过提问的方式让大脑更多区域调动起来,也就是思考过的内容记忆起来更容易一点,但是为什么会这样,下一段应该是给的解释

Use it or Lost it

Our brains are efficient machines, and they rapidly discard information that doesn’t seem useful. Chances are that you don’t remember what you had for dinner on Monday two weeks ago, because this information is not usually useful. If you went to a fantastic restaurant that day and spent the last two weeks telling people about how great it was, however, you’re likely to still remember in vivid detail.

The brain’s “use it or lose it” policy applies to everything we learn. If you spend an afternoon memorizing some science terms, and then don’t think about that material for two weeks, you’ll probably have forgotten most of it. In fact, studies show we forget about 75% of material learnt within a 48 hour period. This can seem pretty depressing when you need to learn a lot of information.

The solution is simple, however: ‘review’. By reviewing newly-learnt information, we can greatly reduce forgetting.

The only problem is that traditionally review was not very practical. If you are using paper flashcards, it’s easy to flick through all of them if you only have 30 of them to review, but as the number grows to 300 or 3000, it quickly becomes unwieldy.

T

pmd的增量处理

  • 缘由可以share里面说
  • 一行

    1. git diff master --name-only | paste -d, -s | xargs $HOME/opt/pmd-bin-6.18.0/bin/run.sh pmd -R rulesets/java/quickstart.xml -f text -d

    细节

  • git diff master —name-only 就是这个commit里面(想象的应该是PR或MR)相对要合并的目标master的有变化的文件

  • paste 就是为了把diff的 —name-only 的列表形成逗号分割的一行
  • pmd本身似乎只有-d option起作用
    • 其他的option要么是它文档写错了,要么就是我没看懂
    • 也许我也受益于文档的错误,-d 文档本来就是目录的,结果现在传入要检查的文档列表
  • -R 要给出一个ruleset的xml

    • rulesets/java/quickstart.xml是内含在pmd的jar包中的,也因此 -R能接受classpath又能接受filepath的这种设计,不知应该是褒还是贬

      S

      pmd的增量检查

  • 人还可以无耻成这样…确实这里是要说一下缘由

  • 静态检查这个事情,我一直认为首先应该是工程师自己的洁癖
    • 很少有不用IDE写java的吧
    • 那么多warning什么的自己就不看下吗?
  • 如果要组织级的管理,首先得有一个充分讨论的,共识的convention
    • 从某种意义上说,体现的是工程师团队文化的倾向、细化,是共同的价值观
    • 基本上都能找到各种的推脱,比如,最容易发现最容易改,但是又是老大不掉的,代码行数,各种借口,都不忍细想下去
  • 但如果就放任不管,确实代码质量会很成问题
    • 并不是管了就一定能好成什么样子
    • 但是如果一个不自觉地团队,不管一定会出问题
    • 这是关系一个团队输出成果物下限的事情
  • 为了有底线,一定还是得搞
  • 但是又不能一刀切:明天一切代码都得给我遵守这个规则
    • 做不到,因为除了新增的代码,还要维护旧代码,可以认为得还债
    • 分期还会轻松一点
    • 所以对代码做增量的静态检查,是一个比较有操作性的做法
  • 增量的识别,与应对增量的识别
    • 新增的,都老老实实按规矩来
    • 变更的文件,也都要按规矩来
    • 不想按规矩来的,就别动
    • 这一些列规则也可以通过和兼容性变更设计同样的方法相近的方式来实现
      • 例如要改原来的一个类,就是要再增加一个方法,但是原来写成一坨翔
      • 要么就老老实实把一坨翔这次索性就粉饰干净,但往往时间不允许
      • 要么就完全不动原来的类文件,新写一个继承原来得类,扩展一个方法,新的部分按规矩来
      • 但是由于不能对原有文件做改动(必须freeze,要不就得立即改写翔),所以迁移做标记是个麻烦事,所以上面这种改动需求还可以用委托来实现,不是一行调用翔的方法,就是迁过来的,都钱过来了,原来的文件就可以删除了
    • 增量试别无它,就是git diff master —name-only
  • pmd也是个奇葩,明明说要—filelist这个option的,结果不知道为啥不同,改成-d倒好了,截图思考人生中:image.pngimage.png
  • 要不要豁免,豁免怎么做,其实也不是不行,可以等运维审批流平台那个做好了再开这个口子(其实完全没必要,如果按我上面设计那个方式来的话,但我估计,我传达出去,能听明白的或者说愿意听的吧,5个里面能有1个就不错了)

    forking workflow的回顾

  • asam这篇

  • 其实再看都很容易理解了
    • 这应该是一个很好的spaced repetition
  • 发现其实当时atlassian tutorial那篇没翻完啊,得补,但按新的标准吧