结合上述的三个讨论:「抽取更多单元」、「集成测试配合单元测试」、「避免测试私有方法」的思想,我们能发现一种高效的 TDD 方式:
先写集成测试,覆盖原始的需求,确保最通用、最基础的逻辑能够正常工作。
重构时抽取私有方法,将逻辑分解到更小的方法(输入,解析,处理,输出)中去。
抽取、整理私有方法,成为新的、更小的单元,并进行单元测试。
在每个单元中覆盖到各种边界条件的处理,若这个单元开始变得复杂,那么它的单元测试又向集成测试发展,因此我们又能回到 1 重复整个流程。
先写集成测试,覆盖原始的需求,确保最通用、最基础的逻辑能够正常工作。
重构时抽取私有方法,将逻辑分解到更小的方法(输入,解析,处理,输出)中去。
抽取、整理私有方法,成为新的、更小的单元,并进行单元测试。
在每个单元中覆盖到各种边界条件的处理,若这个单元开始变得复杂,那么它的单元测试又向集成测试发展,因此我们又能回到 1 重复整个流程。
augustbradley 的 Youtube 视频
Knowledge Management System in Notion – Introducing Vaults
Knowledge Management System in Notion – Introducing Vaults
YouTube
Knowledge Management System in Notion – Introducing Vaults (Life OS)
In this video, I introduce an effective Knowledge Management system for our Notion Life OS. This is the Vaults section of the Pillars, Pipelines & Vaults organizational structure for Notion. It enables both Personal Knowledge Management as well as Team Knowledge…
Forwarded from Hacker News (yahnc_bot)
Building a self-updating profile README for GitHub https://simonwillison.net/2020/Jul/10/self-updating-profile-readme/
Simon Willison’s Weblog
Building a self-updating profile README for GitHub
GitHub quietly released a new feature at some point in the past few days: profile READMEs. Create a repository with the same name as your GitHub account (in my case …
Forwarded from Hacker News (yahnc_bot)
Do not remain nameless to yourself (1966) https://lettersofnote.com/2015/10/23/do-not-remain-nameless-to-yourself/
Forwarded from Hacker News (yahnc_bot)
Just Too Efficient https://www.tbray.org/ongoing/When/202x/2020/07/05/Too-Efficient
Forwarded from Hacker News (yahnc_bot)
Hosting your entire web application using S3 and CloudFront https://www.sankalpjonna.com/posts/hosting-your-entire-web-application-using-s3-cloudfront
Sankalpjonna
Hosting your entire web application using S3 + CloudFront | Blog
Leverage S3 and CloudFront to host your web app in an infinitely scalable way.
Forwarded from Hacker News (yahnc_bot)
WindowSwap: View someone's window somewhere in the world https://window-swap.com/
Window-Swap
WindowSwap
Open a new window somewhere in the world
Forwarded from Hacker News (yahnc_bot)
Website allows you to experience what it is like to live with dyslexia http://geon.github.io/programming/2016/03/03/dsxyliea
geon
Dsxyliea
A friend who has dyslexia described to me how she experiences reading. She can read, but it takes a lot of concentration, and the letters seems to “jump around”.
Forwarded from Hacker News (yahnc_bot)
Do We Need a Theory of Everything? http://backreaction.blogspot.com/2020/07/do-we-need-theory-of-everything.html
Blogspot
Do we need a Theory of Everything?
Science News, Physics, Science, Philosophy, Philosophy of Science
Forwarded from Hacker News (yahnc_bot)
Rust Is Surprisingly Good as a Server Language https://stu2b50.dev/posts/rust-is-surpris76171
Forwarded from Hacker News (yahnc_bot)
Pulsar – an open-source distributed pub-sub messaging platform https://github.com/apache/pulsar
GitHub
GitHub - apache/pulsar: Apache Pulsar - distributed pub-sub messaging system
Apache Pulsar - distributed pub-sub messaging system - apache/pulsar
Forwarded from Hacker News (yahnc_bot)
The Most Remarkable Legacy System I Have Seen https://thehftguy.com/2020/07/09/the-most-remarkable-legacy-system-i-have-seen/
The HFT Guy
The Most Remarkable Legacy System I Have Seen
There was one remarkable legacy system when I was working in a bank sometime back. This could be summarized as an internal AWS lambda equivalent. The offering was complete with full CI, CD, unit te…