活动采购变得简单

tl;dr: Event Sourcing is to data what Git is to code. We’ve implemented a minimal event sourcing framework at Kickstarter to power d.rip. It’s simple and it has made our life so much better! Read on!

tl;dr: 事件源对于数据来说就像Git对于代码一样。我们在Kickstarter实施了一个最小的事件源框架来支持d.rip。这很简单,它让我们的生活变得更加美好继续阅读!

Most software developers use a tool to keep track of code history. Git is a fantastic example that’s used widely across the industry. Type git log and you can see all the changes made to a codebase. Who made the change, when it happened, what the change was (that’s the commit title), why the change was made (that’s a good commit description) and how the change was performed (well, that’s the diff). Git is also a time machine, that allows you to go back in time and see what the code looked like back then (git checkout @{12.days.ago}). You can also replay history and play what-if scenarios: go back in time, checkout a new branch, commit a change, and replay all the events commits that happened after that. When something goes wrong, you can find how a bug happened and when it was introduced. And thanks to all that, you can generate useful reports: number of commits per month, hotspots… and superb visualizations:

大多数软件开发者都使用一种工具来跟踪代码历史。Git是一个神奇的例子,在整个行业中被广泛使用。输入git log,你可以看到对代码库所做的所有修改。做了修改,什么时候发生的,修改了什么(这就是提交标题),为什么做了修改(这是一个好的提交描述),以及如何进行修改(嗯,这就是差异)。Git 也是一台时间机器,它允许你回到过去,看看当时的代码是什么样子的(git checkout @{12.days.ago})。你还可以回放历史,玩玩 "假设 "的游戏:回到过去,签出一个新的分支,提交一个改动,然后回放之后发生的所有事件的提交。当出现问题时,你可以找到错误是如何发生的,以及它是何时被引入的。由于这些,你可以生成有用的报告:每月的提交数量、热点......以及极好的可视化。

Rails contributions animated with gource.

gource将Rails的贡献做成动画。

Think a second about how life would be (and was) without Source Version Control (git, svn, cvs, mercurial…). We would have to annotate files by hand, copy files to have some sort of backups and share code via… ftp?

想一想,如果没有源码版本控制(git、svn、cvs、mercurial......),生活会是什么样子(过去也是)。我们将不得不手工注释文件,复制文件以获得某种备份,并通过......ftp共享代码?

Looks painful. Not fun.

看起来很痛苦。不好玩。

Could you work without a tool managing code history? Nope.

没有管理代码 历史的工具你能工作吗?不可以。

...
开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-24 12:33
浙ICP备14020137号-1 $访客地图$