lijenyan / tdd_hw01 Goto Github PK
View Code? Open in Web Editor NEWTDD 上課 Day 1作業
TDD 上課 Day 1作業
API 的設計很不錯,用 generic lambda 是一個很有彈性,讓使用端很好用的方式。幾個建議:
如果設計成針對 IEnumerable<T>
的 extension method, 在測試案例的描述上,API的使用上,會比現在再方便一些。
DoAggregate()
如果是回傳 IEnumerable<T>
而不是放到 property 上,就可以用 yield return 來處理回傳結果,寫起來會比目前的 production code 更簡潔。
可以參考一下我的 sample code: https://gist.github.com/hatelove/f5a4c2591293828b637f#file-getsumbypagesize_v2-cs
重點 focus 在下列幾點:
這個 homework 基本上有四種方式來實作,也考驗著對 C# 的熟悉程度。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.