Skip to content

Instantly share code, notes, and snippets.

😎
Born to code

liguangyi hh54188

😎
Born to code
Block or report user

Report or block hh54188

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 记 Friends 团队两次关于 API 设计的讨论.md

记 Friends 团队两次关于 API 设计的讨论

在过去的两周,我们 friends 经历两次关于 API 设计的讨论,但遗憾的事情是,在讨论的最后虽然方案确定下来了,但实际上最终并非达成一致,方案是妥协的结果,可想而知在讨论的过程中互相之间也没有足够的事实和依据说服对方。

所以我们通过邮件的形式将这个问题抛出来,希望得到大家的意见和建议,希望有更多的讨论和反馈。希望避免下一次再遇到相似问题时,陷入同样的讨论中。

接下来我将描述这两个 case,因为各位不一定有相关的业务知识,所以我会尽可能的简化和抽象这两个 case,著重于把主要矛盾点暴露出来。如果在省略业务知识之后有描述不准确甚至误导的地方,还请 friends 团队的各位同学以及了解上下文的同学指正和补充

问题一

View trie-tree.html
<html>
<head></head>
<body>
<script>
function isObject(o) {
return Object.prototype.toString.call(o) === "[object Object]";
}
function isArray(a) {
return Object.prototype.toString.call(a) === "[object Array]";
View promise_sequentially.js
// https://hackernoon.com/functional-javascript-resolving-promises-sequentially-7aac18c4431e
// https://decembersoft.com/posts/promises-in-serial-with-array-reduce/
function delay() {
return new Promise((resolve, reject) => {
setTimeout(() => {
console.log('RESOLVED')
resolve()
}, 1000 * 1)
})
}
View direct-promo.js
// http://a.tbcdn.cn/p/mall/2.0/js/direct-promo.js
/**
* 钻石平台定投广告
*
* @creator yubo@taobao.com
* @depends ks-core
*/
KISSY.use('core', function(S){
/**
You can’t perform that action at this time.