<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>海鱼</title>
	<atom:link href="http://yyh.im/feed" rel="self" type="application/rss+xml" />
	<link>http://yyh.im</link>
	<description>像外行一样思考，像专家一般实践</description>
	<lastBuildDate>Wed, 16 May 2012 08:36:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://yyh.im/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>zz NoSQL 数据建模技术</title>
		<link>http://yyh.im/zz-the-nosql-data-modeling-techniques</link>
		<comments>http://yyh.im/zz-the-nosql-data-modeling-techniques#comments</comments>
		<pubDate>Wed, 16 May 2012 08:36:58 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://yyh.im/zz-the-nosql-data-modeling-techniques</guid>
		<description><![CDATA[转自 酷壳coolshell.cn http://coolshell.cn/articles/7270.html#jtss-tsina 全文译自墙外文章“NoSQL Data Modeling Techniques”，译得不好，还请见谅。这篇文章看完之后，你可能会对NoSQL的数据结构会有些感觉。我的感觉是，关系型数据库想把一致性，完整性，索引，CRUD都干好，NoSQL只干某一种事，但是牺牲了很多别的东西。总体来说，我觉得NoSQL更适合做Cache。下面是正文—— NoSQL 数据库经常被用作很多非功能性的地方，如，扩展性，性能和一致性的地方。这些NoSQL的特性在理论和实践中都正在被大众广泛地研究着，研究的热点正是那些和性能分布式相关的非功能性的东西，我们都知道 CAP 理论被很好地应用于了 NoSQL 系统中（陈皓注：CAP即，一致性(Consistency)， 可用性(Availability)， 分区容忍性(Partition tolerance)，在分布式系统中，这三个要素最多只能同时实现两个，而NoSQL一般放弃的是一致性）。但在另一方面，NoSQL的数据建模技术却因为缺乏像关系型数据库那样的基础理论没有被世人很好地研究。这篇文章从数据建模方面对NoSQL家族进行了比较，并讨论几个常见的数据建模技术。 要开始讨论数据建模技术，我们不得不或多或少地先系统地看一下NoSQL数据模型的成长的趋势，以此我们可以了解一些他们内在的联系。下图是NoSQL家族的进化图，我们可以看到这样的进化：Key-Value时代，BigTable时代，Document时代，全文搜索时代，和Graph数据库时代：（陈皓注：注意图中SQL说的那句话，NoSQL再这样发展下去就是SQL了，哈哈。） NoSQL Data Models 首先，我们需要注意的是SQL和关系型数据模型已存在了很长的时间，这种面向用户的自然性意味着： 最终用户一般更感兴趣于数据的聚合显示，而不是分离的数据，这主要通过SQL来完成。 我们无法通过人手工控制数据的并发性，完整性，一致性，或是数据类型校验这些东西的。这就是为什么SQL需要在事务，二维表结构（schema）和外表联合上做很多事。 另一方面，SQL可以让软件应用程序在很多情况下不需要关心数据库的数据聚合，和数据完整性和有效性进行控制。而如果我们去除了数据一致性，完整性这些东西，会对性能和分布存储有着重的帮助。正因为如此，我们才有数据模型的进化： Key-Value 键值对存储是非常简单而强大的。下面的很多技术基本上都是基于这个技术开始发展的。但是，Key-Value有一个非常致命的问题，那就是如果我们需要查找一段范围内的key。（陈皓注：学过hash-table数据结构的人都应该知道，hash-table是非序列容器，其并不像数组，链接，队列这些有序容器，我们可以控制数据存储的顺序）。于是，有序键值 （Ordered Key-Value） 数据模型被设计出来解决这一限制，来从根本上提高数据集的问题。 Ordered Key-Value 有序键值模型也非常强大，但是，其也没有对Value提供某种数据模型。通常来说，Value的模型可以由应用负责解析和存取。这种很不方便，于是出现了 BigTable类型的数据库，这个数据模型其实就是map里有map，map里再套map，一层一层套下去，也就是层层嵌套的key-value（value里又是一个key-value），这种数据库的Value主要通过“列族”（column families），列，和时间戳来控制版本。（陈皓注：关于时间戳来对数据的版本控制主要是解决数据存储并发问题，也就是所谓的乐观锁，详见《多版本并发控制(MVCC)在分布式系统中的应用》） Document databases 文档数据库 改进了 BigTable 模型，并提供了两个有意义的改善。第一个是允许Value中有主观的模式（scheme），而不是map套map。第二个是索引。 Full Text Search Engines 全文搜索引擎可以被看作是文档数据库的一个变种，他们可以提供灵活的可变的数据模式（scheme）以及自动索引。他们之间的不同点主要是，文档数据库用字段名做索引，而全文搜索引擎用字段值做索引。 Graph data models 图式数据库 可以被认为是这个进化过程中从 Ordered Key-Value 数据库发展过来的一个分支。图式数据库允许构建议图结构的数据模型。它和文档数据库有关系的原因是，它的很多实现允许value可以是一个map或是一个document。 NoSQL 数据模型摘要 <a href='http://yyh.im/zz-the-nosql-data-modeling-techniques'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>转自 酷壳coolshell.cn <a href="http://coolshell.cn/articles/7270.html#jtss-tsina">http://coolshell.cn/articles/7270.html#jtss-tsina</a></p>
<p>全文译自墙外文章“<a href="http://highlyscalable.wordpress.com/2012/03/01/nosql-data-modeling-techniques/">NoSQL Data Modeling Techniques</a>”，译得不好，还请见谅。这篇文章看完之后，你可能会对NoSQL的数据结构会有些感觉。我的感觉是，关系型数据库想把一致性，完整性，索引，CRUD都干好，NoSQL只干某一种事，但是牺牲了很多别的东西。总体来说，我觉得NoSQL更适合做Cache。下面是正文——</p>
<p>NoSQL 数据库经常被用作很多非功能性的地方，如，扩展性，性能和一致性的地方。这些NoSQL的特性在理论和实践中都正在被大众广泛地研究着，研究的热点正是那些和性能分布式相关的非功能性的东西，我们都知道 <a href="http://en.wikipedia.org/wiki/CAP_theorem">CAP 理论</a>被很好地应用于了 NoSQL 系统中（陈皓注：CAP即，一致性(Consistency)， 可用性(Availability)， 分区容忍性(Partition tolerance)，在分布式系统中，这三个要素最多只能同时实现两个，而NoSQL一般放弃的是一致性）。但在另一方面，NoSQL的数据建模技术却因为缺乏像关系型数据库那样的基础理论没有被世人很好地研究。这篇文章从数据建模方面对NoSQL家族进行了比较，并讨论几个常见的数据建模技术。</p>
<p>要开始讨论数据建模技术，我们不得不或多或少地先系统地看一下NoSQL数据模型的成长的趋势，以此我们可以了解一些他们内在的联系。下图是NoSQL家族的进化图，我们可以看到这样的进化：Key-Value时代，BigTable时代，Document时代，全文搜索时代，和Graph数据库时代：（陈皓注：注意图中SQL说的那句话，NoSQL再这样发展下去就是SQL了，哈哈。）</p>
<p><img src="http://coolshell.cn/wp-content/uploads/2012/05/overview2.png?w=594&amp;h=699" />    <br />NoSQL Data Models</p>
<p>首先，我们需要注意的是SQL和关系型数据模型已存在了很长的时间，这种面向用户的自然性意味着：</p>
<ul>
<li>最终用户一般更感兴趣于数据的聚合显示，而不是分离的数据，这主要通过SQL来完成。 </li>
<li>我们无法通过人手工控制数据的并发性，完整性，一致性，或是数据类型校验这些东西的。这就是为什么SQL需要在事务，二维表结构（schema）和外表联合上做很多事。 </li>
</ul>
<p>另一方面，SQL可以让软件应用程序在很多情况下不需要关心数据库的数据聚合，和数据完整性和有效性进行控制。而如果我们去除了数据一致性，完整性这些东西，会对性能和分布存储有着重的帮助。正因为如此，我们才有数据模型的进化：</p>
<ul>
<li><strong>Key-Value 键值对存储</strong>是非常简单而强大的。下面的很多技术基本上都是基于这个技术开始发展的。但是，Key-Value有一个非常致命的问题，那就是如果我们需要查找一段范围内的key。（陈皓注：学过hash-table数据结构的人都应该知道，hash-table是非序列容器，其并不像数组，链接，队列这些有序容器，我们可以控制数据存储的顺序）。于是，有序键值 （Ordered Key-Value） 数据模型被设计出来解决这一限制，来从根本上提高数据集的问题。 </li>
</ul>
<ul>
<li><strong>Ordered Key-Value 有序键值</strong>模型也非常强大，但是，其也没有对Value提供某种数据模型。通常来说，Value的模型可以由应用负责解析和存取。这种很不方便，于是出现了 BigTable类型的数据库，这个数据模型其实就是map里有map，map里再套map，一层一层套下去，也就是层层嵌套的key-value（value里又是一个key-value），这种数据库的Value主要通过“列族”（column families），列，和时间戳来控制版本。（陈皓注：关于时间戳来对数据的版本控制主要是解决数据存储并发问题，也就是所谓的乐观锁，详见《<a href="http://coolshell.cn/articles/6790.html">多版本并发控制(MVCC)在分布式系统中的应用</a>》） </li>
</ul>
<ul>
<li><strong>Document databases 文档数据库</strong> 改进了 BigTable 模型，并提供了两个有意义的改善。第一个是允许Value中有主观的模式（scheme），而不是map套map。第二个是索引。 <strong>Full Text Search Engines 全文搜索引擎</strong>可以被看作是文档数据库的一个变种，他们可以提供灵活的可变的数据模式（scheme）以及自动索引。他们之间的不同点主要是，文档数据库用字段名做索引，而全文搜索引擎用字段值做索引。 </li>
</ul>
<ul>
<li><strong>Graph data models 图式数据库</strong> 可以被认为是这个进化过程中从 Ordered Key-Value 数据库发展过来的一个分支。图式数据库允许构建议图结构的数据模型。它和文档数据库有关系的原因是，它的很多实现允许value可以是一个map或是一个document。 </li>
</ul>
<h6>NoSQL 数据模型摘要</h6>
<p>本文剩下的章节将向你介绍数据建模的技术实现和相关模式。但是，在介绍这些技术之前，先来一段序言：</p>
<ul>
<li>NoSQL 数据模型设计一般从业务应用的具体数据查询入手，而不是数据间的关系：
<ul>
<li>关系型的数据模型基本上是分析数据间的结构和关系。其设计理念是： ”<strong>What answers do I have?”</strong><em></em> </li>
<li>NoSQL 数据模型基本上是从应用对数据的存取方式入手，如：我需要支持某种数据查询。其设计理念是<strong> ”What questions do I have?”</strong> </li>
</ul>
</li>
</ul>
<ul>
<li>NoSQL 数据模型设计比关系型数据库需要对数据结构和算法的更深的了解。在这篇文章中我会和大家说那些尽人皆知的数据结构，这些数据结构并不只是被NoSQL使用，但是对于NoSQL的数据模型却非常有帮助。 </li>
</ul>
<ul>
<li>数据冗余和反规格化是一等公民。 </li>
</ul>
<ul>
<li>关系型数据库对于处理层级数据和图式数据非常的不方便。NoSQL用来解决图式数据明显是一个非常好的解决方案，几乎所有的NoSQL数据库可以很强地解决此类问题。这就是为什么这篇文章专门拿出一章来说明层级数据模型。 </li>
</ul>
<p>下面是NoSQL的分类表，也是我用来写这篇文章时做实践的产品：</p>
<ul>
<li>Key-Value 存储: Oracle Coherence, Redis, Kyoto Cabinet </li>
<li>类BigTable存储: Apache HBase, Apache Cassandra </li>
<li>文档数据库: MongoDB, CouchDB </li>
<li>全文索引: Apache Lucene, Apache Solr </li>
<li>图数据库: neo4j, FlockDB </li>
</ul>
<h6>概念技术 Conceptual Techniques</h6>
<p>这一节主要介绍NoSQL数据模型的基本原则。</p>
<h6>(1) 反规格化 Denormalization</h6>
<p>反规格化 Denormalization 可以被认为是把相同的数据拷贝到不同的文档或是表中，这样就可以简化和优化查询，或是正好适合用户的某中特别的数据模型。这篇文章中所说的绝大多数技术都或多或少地导向了这一技术。</p>
<p>总体来说，反规格化需要权衡下面这些东西：</p>
<ul>
<li><strong><em>查询数据量 /查询IO </em></strong>VS&#160; <strong><em>总数据量</em></strong>。使用反规格化，一方面可以把一条查询语句所需要的所有数据组合起来放到一个地方存储。这意味着，其它不同不同查询所需要的相同的数据，需要放在别不同的地方。因此，这产生了很多冗余的数据，从而导致了数据量的增大。 </li>
</ul>
<ul>
<li><strong><em>处理复杂度 </em></strong>VS <strong><em>总数据量</em></strong>. 在符合范式的数据模式上进行表连接的查询，很显然会增加了查询处理的复杂度，尤其对于分布式系统来说更是。反规格化的数据模型允许我们以方便查询的方式来存构造数据结构以简化查询复杂度。 </li>
</ul>
<p><strong>适用性</strong>: Key-Value Store 键值对数据库， Document Databases文档数据库， BigTable风格的数据库。</p>
<h6>(2) 聚合 Aggregates</h6>
<p>所有类型的NoSQL数据库都会提供灵活的Schema（数据结构，对数据格式的限制）：</p>
<ul>
<li>Key-Value Stores 和 Graph Databases 基本上来说不会Value的形式，所以Value可以是任意格式。这样一来，这使得我们可以任意组合一个业务实体的keys。比如，我们有一个用户帐号的业务实体，其可以被如下这些key组合起来： <em>UserID_name, UserID_email, UserID_messages</em> 等等。如果一个用户没有email或message，那么相应也不会有这样的记录。 </li>
</ul>
<ul>
<li>BigTable 模型通过列集合来支持灵活的Schema，我们称之为列族（<em>column family</em>）。BigTable还可以在同一记录上出现不同的版本（通过时间戳）。 </li>
</ul>
<ul>
<li>Document databases 文档数据库是一种层级式的“去Schema”的存储，虽然有些这样的数据库允许检验需要保存的数据是否满足某种Schema。 </li>
</ul>
<p>灵活的Schema允许你可以用一种嵌套式的内部数据方式来存储一组有关联的业务实体（陈皓注：类似于JSON这样的数据封装格式）。这样可以为我们带来两个好处。</p>
<ul>
<li>最小化“一对多”关系——可以通过嵌套式的方式来存储实体，这样可以少一些表联结。 </li>
</ul>
<ul>
<li>可以让内部技术上的数据存储更接近于业务实体，特别是那种混合式的业务实体。可能存于一个文档集或是一张表中。 </li>
</ul>
<p>下图示意了这两种好处。图中描给了电子商务中的商品模型（陈皓注：我记得我在“<a href="http://coolshell.cn/articles/7048.html">挑战无处不在</a>”一文中说到过电商中产品分类数据库设计的挑战）</p>
<ul>
<li>首先，所有的商品Product都会有一个ID，Price 和 Description。 </li>
</ul>
<ul>
<li>然后，我们可以知道不同的类型的商品会有不同的属性。比如，作者是书的属性，长度是牛仔裤的属性。其些属性可能是“一对多”或是“多对多”的关系，如：唱片中的曲目。 </li>
</ul>
<ul>
<li>接下来，我们知道，某些业务实体不可能使用固定的类型。如：牛仔裤的属性并不是所有的牌子都有的，而且，有些名牌还会搞非常特别的属性。 </li>
</ul>
<p>对于关系型数据库来说，要设计这样的数据模型并不简单，而且设计出来的绝对离优雅很远很远。而我们NoSQL中灵活的Schema允许你使用一个聚合 Aggregate (product) 可以建出所有不同种类的商品和他们的不同的属性：</p>
<p><img src="http://coolshell.cn/wp-content/uploads/2012/05/soft-schema2.png?w=594&amp;h=439" /></p>
<p>Entity Aggregation</p>
<p>上图中我们可以比较关系型数据库和NoSQL的差别。<strong>但是我们可以看到在数据更新上，非规格化的数据存储在性能和一致性上会有很大的影响，这就是我们需要重点注意和不得不牺牲的地方</strong>。</p>
<p><strong>适用性</strong>: Key-Value Store 键值对数据库， Document Databases文档数据库， BigTable风格的数据库。</p>
<h6>(3) 应用层联结 Application Side Joins</h6>
<p>表联结基本上不被NoSQL支持。正如我们前面所说的，NoSQL是“面向问题”而不是“面向答案”的，不支持表联结就是“面向问题”的后果。表的联结是在设计时被构造出来的，而不是在执行时建造出来的。所以，表联结在运行时是有很大开销的（陈皓注：搞过SQL表联结的都知道笛卡尔积是什么东西，大可以在参看以前酷壳的“<a href="http://coolshell.cn/articles/3463.html">图解数据库表Joins</a>”），但是在使用了 Denormalization 和 Aggregates 技术后，我们基本不用进行表联结，如：你们使用嵌套式的数据实体。当然，如果你需要联结数据，你需要在应用层完成这个事。下面是几个主要的Use Case：</p>
<ul>
<li>多对多的数据实体关系——经常需要被连接或联结。 </li>
</ul>
<ul>
<li>聚合 Aggregates 并不适用于数据字段经常被改变的情况。对此，我们需要把那些经常被改变的字段分到另外的表中，而在查询时我们需要联结数据。例如，我们有个Message系统可以有一个User实体，其包括了一个内嵌的Message实体。但是，如果用户不断在附加 message，那么，最好把message拆分到另一个独立的实体，但在查询时联结这User和Message这两个实体。如下图： </li>
</ul>
<p><a href="http://highlyscalable.files.wordpress.com/2012/03/aggregates-joins.png" rel="lightbox[868]"><img title="aggregates-joins" alt="" src="http://highlyscalable.files.wordpress.com/2012/03/aggregates-joins.png?w=594" /></a></p>
<p><strong>适用性</strong>: Key-Value Store 键值对数据库， Document Databases文档数据库， BigTable风格的数据库， Graph Databases 图数据库。</p>
<h6>通用建模技术 General Modeling Techniques</h6>
<p>在本书中，我们将讨论NoSQL中各种不同的通用的数据建模技术。</p>
<h6>(4) 原子聚合 Atomic Aggregates</h6>
<p>很多NoSQL的数据库（并不是所有）在事务处理上都是短板。在某些情况下，他们可以通过分布式锁技术或是<a href="http://highlyscalable.wordpress.com/2012/01/07/mvcc-transactions-key-value/">应用层管理的MVCC技术</a>来实现其事务性（陈皓注：可参看本站的“<a href="http://coolshell.cn/articles/6790.html">多版本并发控制(MVCC)在分布式系统中的应用</a>”）但是，通常来说只能使用聚合Aggregates技术来保证一些ACID原则。</p>
<p>这就是为什么我们的关系型数据库需要有强大的事务处理机制——因为关系型数据库的数据是被规格化存放在了不同的地方。所以，Aggregates聚合允许我们把一个业务实体存成一个文档、存成一行，存成一个key-value，这样就可以原子式的更新了：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/atomic-aggregate1.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/atomic-aggregate1.png?w=594" />      <br /></a>Atomic Aggregates</p>
<p>当然，原子聚合 Atomic Aggregates 这种数据模型并不能实现完全意义上的事务处理，但是如果支持原子性，锁，或 test-and-set 指令，那么， Atomic Aggregates 是可以适用的。</p>
<p><strong><strong>适用性</strong>: </strong>Key-Value Store 键值对数据库， Document Databases文档数据库， BigTable风格的数据库。</p>
<h6>(5) 可枚举键 Enumerable Keys</h6>
<p>也许，对于无顺序的Key-Value最大的好处是业务实体可以被容易地hash以分区在多个服务器上。而排序了的key会把事情搞复杂，但是有些时候，一个应用能从排序key中获得很多好处，就算是数据库本身不提供这个功能。让我们来思考下email消息的数据模型：</p>
<ol>
<li>一些NoSQL的数据库提供原子计数器以允许生一些连续的ID。在这种情况下，我们可以使用 <em>userID_messageID</em> 来做为一个组合key。如果我们知道最新的message ID，就可以知道前一个message，也可能知道再前面和后面的Message。 </li>
<li>Messages可以被打包。比如，每天的邮件包。这样，我们就可以对邮件按指定的时间段来遍历。 </li>
</ol>
<p><strong><strong><strong>适用性</strong>: </strong></strong>Key-Value Store 键值对数据库<strong>。</strong></p>
<h6>(6) 降维 Dimensionality Reduction</h6>
<p>Dimensionality Reduction 降维是一种技术可以允许把一个多维的数据映射成一个Key-Value或是其它非多给的数据模型。</p>
<p>传统的地理位置信息系统使用一些如“四分树<a href="http://en.wikipedia.org/wiki/Quadtree">QuadTree</a>” 或 “<a href="http://en.wikipedia.org/wiki/R-tree">R-Tree</a>” 来做地理位置索引。这些数据结构的内容需要被在适当的位置更新，并且，如果数据量很大的话，操作成本会很高。另一个方法是我们可以遍历一个二维的数据结构并把其扁平化成一个列表。一个众所周知的例子是<a href="http://en.wikipedia.org/wiki/Geohash">Geohash</a>（地理哈希）。一个Geohash使用“之字形”的路线扫描一个2维的空间，而且遍历中的移动可以被简单地用0和1来表示其方向，然后在移动的过程中产生0/1串。下图展示了这一算法：（陈皓注：先把地图分成四份，经度为第一位，纬度为第二位，于是左边的经度是0，右边的是1，纬度也一样，上面是为1，下面的为0，这样，经纬度就可以组合成01，11，00，10这四个值，其标识了四块区域，我们可以如此不断的递归地对每个区域进行四分，然后可以得到一串1和0组成的字串，然后使用0-9，b-z 去掉（去掉a, i, l, o）这32个字母进行base32编码得到一个8个长度的编码，这就是Geohash的算法）</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/geohash-traversal1.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/geohash-traversal1.png?w=594" />      <br /></a>Geohash Index</p>
<p>Geohash的最强大的功能是使用简单的位操作就可以知道两个区域间的距离，就像图中所示（陈皓：proximity框着的那两个，这个很像IP地址了）。Geohash把一个二维的坐标生生地变成了一个一维的数据模型，这就是降维技术。BigTable的降维技术参看到文章后面的 [6.1]。更多的关于Geohash和其它技术可以参看 [6.2] 和 [6.3]。</p>
<p><strong><strong><strong>适用性</strong>:</strong></strong> Key-Value Store 键值对数据库， Document Databases文档数据库， BigTable风格的数据库。</p>
<h6>(7) 索引表 Index Table</h6>
<p>Index Table 索引表是一个非常直白的技术，其可以你在不支持索引的数据库中得到索引的好处。BigTable是这类最重要的数据库。这需要我们维护一个有相应存取模式的特别表。例如，我们有一个主表存着用户帐号，其可以被UserID存取。某查询需要查出某个城市里所有的用户，于是我们可以加入一张表，这张表用城市做主键，所有和这个城市相关的UserID是其Value，如下所示：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/index-table.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/index-table.png?w=594" />      <br /></a>Index Table Example</p>
<p>可见，城市索引表的需要和对主表用户表保持一致性，因此，主表的每一个更新可能需要对索引表进行更新，不然就是一个批处理更新。无论哪个方式，这都会损伤一些性能，因为需要保持一致性。</p>
<p>Index Table 索引表可以被认为是关系型数据库中的视图的等价物。</p>
<p><strong>适用性</strong>: BigTable 数据库。</p>
<h6>(8) 键组合索引 Composite Key Index</h6>
<p>Composite key 键组合是一个很常用的技术，对此，当我们的数据库支持键排序时能得到极大的好处。Composite key组合键的拼接成为第二排序字段可以让你构建出一种多维索引，这很像我们之前说过的 Dimensionality Reduction 降维技术。例如，我们需要存取用户统计。如果我们需要根据不同的地区来统计用户的分布情况，我们可以把Key设计成这样的格式 <em>(State:City:UserID)</em>，这样一来，就使得我们可以通过State到City来按组遍历用户，特别是我们的NoSQL数据库支持在key上按区查询（如：BigTable类的系统）：</p>
<p>1</p>
<p>2</p>
<p><code>SELECT</code> <code>Values</code> <code>WHERE</code> <code>state=</code><code>&quot;CA:*&quot;</code></p>
<p><code>SELECT</code> <code>Values</code> <code>WHERE</code> <code>city=</code><code>&quot;CA:San Francisco*&quot;</code></p>
<p><a href="http://highlyscalable.files.wordpress.com/2012/03/composite-key-index.png" rel="lightbox[868]"><img title="composite-key-index" alt="" src="http://highlyscalable.files.wordpress.com/2012/03/composite-key-index.png?w=594" />       <br /></a>Composite Key Index</p>
<p><strong><strong>适用性</strong>: </strong>BigTable 数据库。</p>
<h6>(9) 键组合聚合 Aggregation with Composite Keys</h6>
<p>Composite keys&#160; 键组合技术并不仅仅可以用来做索引，同样可以用来区分不用的类型的数据以支持数据分组。考虑一个例子，我们有一个海量的日志数组，这个日志记录了互联网上的用户的访问来源。我们需要计算从某一网站过来的独立访客的数量，在关系型数据库中，我们可能需要下面这样的SQL查询语句：</p>
<p>1</p>
<p><code>SELECT</code> <code>count</code><code>(</code><code>distinct</code><code>(user_id)) </code><code>FROM</code> <code>clicks </code><code>GROUP</code> <code>BY</code> <code>site</code></p>
<p>我们可以在NoSQL中建立如下的数据模型：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/composite-key-collating1.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/composite-key-collating1.png?w=594" />      <br /></a>Counting Unique Users using Composite Keys</p>
<p>这样，我们就可以把数据按UserID来排序，我们就可以很容易把同一个用户的数据（一个用户并不会产生太多的event）进行处理，去掉那些重复的站点（使用hash table或是别的什么）。另一个可选的技术是，我们可以对每一个用户建立一个数据实体，然后把其站点来源追加到这个数据实体中，当然，这样一来，数据的更新在性能相比之下会有一定损失。</p>
<p><strong><strong>适用性</strong>:</strong> Ordered Key-Value Store 排序键值对数据库， BigTable风格的数据库。</p>
<p><strong>     <br /></strong></p>
<h6>(10) 反转搜索 Inverted Search – 直接聚合 Direct Aggregation</h6>
<p>这个技术更多的是数据处理技术，而不是数据建模技术。尽管如此，这个技术还是会影响数据模型。这个技术最主要的想法是使用一个索引来找到满足某条件的数据，但是把数据聚合起需要使用全文搜索。还是让我们来说一个示例。还是用上面那个例子，我们有很多的日志，其中包括互联网用户和他们的访问来源。让我们假定每条记录都有一个UserID，还有用户的种类 (Men, Women, Bloggers, 等)，以及用户所在的城市，和访问过的站点。我们要干的事是，为每个用户种类找到满足某些条件（访问源，所在城市，等）的的独立用户。</p>
<p>很明显，我们需要搜索那些满足条件的用户，如果我们使用反转搜索，这会让我们把这事干得很容易，如： <em>{Category -&gt; [user IDs]}</em> 或 <em>{Site -&gt; [user IDs]}</em>。使用这样的索引， 我们可以取两个或多个UserID要的交集或并集（这个事很容易干，而且可以干得很快，如果这些UserID是排好序的）。但是，我们要按用户种类来生成报表会变得有点麻烦，因为我们用语句可能会像下面这样</p>
<p>1</p>
<p><code>SELECT</code> <code>count</code><code>(</code><code>distinct</code><code>(user_id)) ... </code><code>GROUP</code> <code>BY</code> <code>category</code></p>
<p>但这样的SQL很没有效率，因为category数据太多了。为了应对这个问题，我们可以建立一个直接索引 <em>{UserID -&gt; [Categories]}</em> 然后我们用它来生成报表：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/invert-direct1.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/invert-direct1.png?w=594&amp;h=438" />      <br /></a>Counting Unique Users using Inverse and Direct Indexes</p>
<p>最后，我们需要明白，对每个UserID的随机查询是很没有效率的。我们可以通过批查询处理来解决这个问题。这意味着，对于一些用户集，我们可以进行预处理（不同的查询条件）。</p>
<p><strong>适用性</strong>: Key-Value Store 键值对数据库， Document Databases文档数据库， BigTable风格的数据库。</p>
<h6>层级式模型 Hierarchy Modeling Techniques</h6>
<h6>(11) 树形聚合Tree Aggregation</h6>
<p>树形或是任意的图（需反规格化）可以被直接打成一条记录或文档存放。</p>
<ul>
<li>当树形结构被一次性取出时这会非常有效率（如：我们需要展示一个blog的树形评论） </li>
<li>搜索和任何存取这个实体都会存在问题。 </li>
<li>对于大多数NoSQL的实现来说，更新数据都是很不经济的（相比起独立结点来说） </li>
</ul>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/tree-aggregation.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/tree-aggregation.png?w=594" />      <br /></a>Tree Aggregation</p>
<p><strong>适用性</strong>: Key-Value 键值对数据库, Document Databases 文档数据库</p>
<h6>(12) 邻接列表 Adjacency Lists</h6>
<p>Adjacency Lists 邻接列表是一种图 – 每一个结点都是一个独立的记录，其包含了 所有的父结点或子结点。这样，我们就可以通过给定的父或子结点来进行搜索。当然，我们需要通过hop查询遍历图。这个技术在广度和深度查询，以及得到某个结点的子树上没有效率。</p>
<p><strong>适用性</strong>: Key-Value 键值对数据库, Document Databases 文档数据库</p>
<p><strong>     <br /></strong></p>
<h6>(13) Materialized Paths</h6>
<p>Materialized Paths 可以帮助避免递归遍历（如：树形结构）。这个技术也可以被认为是反规格化的一种变种。其想法是为每个结点加上父结点或子结点的标识属性，这样就可以不需要遍历就知道所有的后裔结点和祖先结点了：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/materialized-paths2.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/materialized-paths2.png?w=594" />      <br /></a>Materialized Paths for eShop Category Hierarchy</p>
<p>这个技术对于全文搜索引擎来说非常有帮助，因为其可以允许把一个层级结构转成一个文档。上面的示图中我们可以看到所有的商品或<em>Men’s Shoes</em>下的子分类可以被一条很短的查询语句处理——只需要给定个分类名。</p>
<p>Materialized Paths 可以存储一个ID的集合，或是一堆ID拼出的字符串。后者允许你通过一个正则表达式来搜索一个特定的分支路径。下图展示了这个技术（分支的路径包括了结点本身）：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/materialized-paths-2.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/materialized-paths-2.png?w=594" />      <br /></a>Query Materialized Paths using RegExp</p>
<p><strong>适用性</strong>: Key-Value 键值对数据库, Document Databases 文档数据, Search Engines 搜索引擎</p>
<h6>(14) 嵌套集 Nested Sets</h6>
<p><a href="http://en.wikipedia.org/wiki/Nested_set_model">Nested sets</a> 嵌套集是树形结构的标准技术。它被广泛地用在了关系性数据库中，它完全地适用于 Key-Value 键值对数据库 和 Document Databases 文档数据库。这个技术的想法是把叶子结点存储成一个数组，并通过使用索引的开始和结束来映射每一个非叶子结点到一个叶子结点集，就如下图所示一样：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/nested-sets.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/nested-sets.png?w=594" />      <br /></a>Modeling of eCommerce Catalog using Nested Sets</p>
<p>这样的数据结构对于immutable data不变的数据 有非常不错的效率，因为其点内存空间小，并且可以很快地找出所有的叶子结点而不需要树的遍历。尽管如此，在插入和更新上需要很高的性能成本，因为新的叶子结点需要大规模地更新索引。</p>
<p><strong>适用性</strong>: Key-Value Stores 键值数据库, Document Databases 文档数据库</p>
<h6>(15) 嵌套文档扁平化：有限的字段名 Nested Documents Flattening: Numbered Field Names</h6>
<p>搜索引擎基本上来说和扁平文档一同工作，如：每一个文档是一个扁平的字段和值的例表。这种数据模型的用来把业务实体映射到一个文本文档上，如果你的业务实体有很复杂的内部结构，这可能会变得很有挑战。一个典型的挑战是把一个有层级的文档映映射出来。例如，文档中嵌套另一个文档。让我们看看下面的示例：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/nested-documents-1.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/nested-documents-1.png?w=594" />      <br /></a>Nested Documents Problem</p>
<p>上面的每一个业务实体代码一种简历。其包括了人名和一个技能列表。我把这个层级文档映射成一个文本文档，一种方法是创建 <em>Skill</em> 和 <em>Level</em> 字段。这个模型可以通过技术或是等级来搜索一个人，而上图标注的那样的组合查询则会失败。（陈皓注：因为分不清Excellent是否是Math还是Poetry上的）</p>
<p>在引用中的 [4.6] 给出了一种解决方案。其为每个字段都标上数字 <em>Skill_i</em> 和 <em>Level_i</em>，这样就可以分开搜索每一个对（下图中使用了OR来遍历查找所有可能的字段）:</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/nested-documents-3.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/nested-documents-3.png?w=594" />      <br /></a>Nested Document Modeling using Numbered Field Names</p>
<p>这样的方式根本没有扩展性，对于一些复杂的问题来说只会让代码复杂度和维护工作变大。</p>
<p><strong>适用性</strong>: Search Engines 全文搜索</p>
<h6>(16)嵌套文档扁平化：邻近查询 Nested Documents Flattening: Proximity Queries</h6>
<p>在附录 [4.6]中给出了这个技术用来解决扁平层次文档。它用邻近的查询来限制可被查询的单词的范围。下图中，所有的技能和等级被放在一个字段中，叫 SkillAndLevel，查询中出现的 “Excellent” 和 “Poetry” 必需一个紧跟另一个：</p>
<p><a href="http://coolshell.cn/wp-content/uploads/2012/05/nested-documents-2.png" rel="lightbox[868]">&#160;<img src="http://coolshell.cn/wp-content/uploads/2012/05/nested-documents-2.png?w=594" />      <br /></a>Nested Document Modeling using Proximity Queries</p>
<p>附录 [4.3] 中讲述了这个技术被用在Solr中的一个成功案例。</p>
<p><strong>适用性</strong>: Search Engines 全文搜索</p>
<h6>(17) 图结构批处理 Batch Graph Processing</h6>
<p>Graph databases 图数据库，如 neo4j 是一个出众的图数据库，尤其是使用一个结点来探索邻居结点，或是探索两个或少量结点前的关系。但是处理大量的图数据是很没有效率的，因为图数据库的性能和扩展性并不是其目的。分布式的图数据处理可以被 MapReduce 和 Message Passing pattern 来处理。如： <a href="http://highlyscalable.wordpress.com/2012/02/01/mapreduce-patterns/">在我前一篇的文章中的那个示例</a>。这个方法可以让 Key-Value stores, Document databases, 和 BigTable-style databases 适合于处理大图。</p>
<p><strong>Applicability</strong>: Key-Value Stores, Document Databases, BigTable-style Databases</p>
<h6>参考</h6>
<p>Finally, I provide a list of useful links related to NoSQL data modeling:</p>
<ol>
<li>Key-Value Stores:
<ol>
<li><a href="http://www.devshed.com/c/a/MySQL/Database-Design-Using-KeyValue-Tables/">http://www.devshed.com/c/a/MySQL/Database-Design-Using-KeyValue-Tables/</a> </li>
<li><a href="http://antirez.com/post/Sorting-in-key-value-data-model.html">http://antirez.com/post/Sorting-in-key-value-data-model.htm</a>l </li>
<li><a href="http://stackoverflow.com/questions/3554169/difference-between-document-based-and-key-value-based-databases">http://stackoverflow.com/questions/3554169/difference-between-document-based-and-key-value-based-databases</a> </li>
<li><a href="http://dbmsmusings.blogspot.com/2010/03/distinguishing-two-major-types-of_29.html">http://dbmsmusings.blogspot.com/2010/03/distinguishing-two-major-types-of_29.html</a> </li>
</ol>
</li>
<li>BigTable-style Databases:
<ol>
<li><a href="http://www.slideshare.net/ebenhewitt/cassandra-datamodel-4985524">http://www.slideshare.net/ebenhewitt/cassandra-datamodel-4985524</a> </li>
<li><a href="http://www.slideshare.net/mattdennis/cassandra-data-modeling">http://www.slideshare.net/mattdennis/cassandra-data-modeling</a> </li>
<li><a href="http://nosql.mypopescu.com/post/17419074362/cassandra-data-modeling-examples-with-matthew-f-dennis">http://nosql.mypopescu.com/post/17419074362/cassandra-data-modeling-examples-with-matthew-f-dennis</a> </li>
<li><a href="http://s-expressions.com/2009/03/08/hbase-on-designing-schemas-for-column-oriented-data-stores/">http://s-expressions.com/2009/03/08/hbase-on-designing-schemas-for-column-oriented-data-stores/</a> </li>
<li><a href="http://jimbojw.com/wiki/index.php?title=Understanding_Hbase_and_BigTable">http://jimbojw.com/wiki/index.php?title=Understanding_Hbase_and_BigTable</a> </li>
</ol>
</li>
<li>Document Databases:
<ol>
<li><a href="http://www.slideshare.net/mongodb/mongodb-schema-design-richard-kreuters-mongo-berlin-preso">http://www.slideshare.net/mongodb/mongodb-schema-design-richard-kreuters-mongo-berlin-preso</a> </li>
<li><a href="http://www.michaelhamrah.com/blog/2011/08/data-modeling-at-scale-mongodb-mongoid-callbacks-and-denormalizing-data-for-efficiency/">http://www.michaelhamrah.com/blog/2011/08/data-modeling-at-scale-mongodb-mongoid-callbacks-and-denormalizing-data-for-efficiency/</a> </li>
<li><a href="http://seancribbs.com/tech/2009/09/28/modeling-a-tree-in-a-document-database/">http://seancribbs.com/tech/2009/09/28/modeling-a-tree-in-a-document-database/</a> </li>
<li><a href="http://www.mongodb.org/display/DOCS/Schema+Design">http://www.mongodb.org/display/DOCS/Schema+Design</a> </li>
<li><a href="http://www.mongodb.org/display/DOCS/Trees+in+MongoDB">http://www.mongodb.org/display/DOCS/Trees+in+MongoDB</a> </li>
<li><a href="http://blog.fiesta.cc/post/11319522700/walkthrough-mongodb-data-modeling">http://blog.fiesta.cc/post/11319522700/walkthrough-mongodb-data-modeling</a> </li>
</ol>
</li>
<li>Full Text Search Engines:
<ol>
<li><a href="http://www.searchworkings.org/blog/-/blogs/query-time-joining-in-lucene">http://www.searchworkings.org/blog/-/blogs/query-time-joining-in-lucene</a> </li>
<li><a href="http://www.lucidimagination.com/devzone/technical-articles/solr-and-rdbms-basics-designing-your-application-best-both">http://www.lucidimagination.com/devzone/technical-articles/solr-and-rdbms-basics-designing-your-application-best-both</a> </li>
<li><a href="http://blog.griddynamics.com/2011/07/solr-experience-search-parent-child.html">http://blog.griddynamics.com/2011/07/solr-experience-search-parent-child.html</a> </li>
<li><a href="http://www.lucidimagination.com/blog/2009/07/18/the-spanquery/">http://www.lucidimagination.com/blog/2009/07/18/the-spanquery/</a> </li>
<li><a href="http://blog.mgm-tp.com/2011/03/non-standard-ways-of-using-lucene/">http://blog.mgm-tp.com/2011/03/non-standard-ways-of-using-lucene/</a> </li>
<li><a href="http://www.slideshare.net/MarkHarwood/proposal-for-nested-document-support-in-lucene">http://www.slideshare.net/MarkHarwood/proposal-for-nested-document-support-in-lucene</a> </li>
<li><a href="http://mysolr.com/tips/denormalized-data-structure/">http://mysolr.com/tips/denormalized-data-structure/</a> </li>
<li><a href="http://sujitpal.blogspot.com/2010/10/denormalizing-maps-with-lucene-payloads.html">http://sujitpal.blogspot.com/2010/10/denormalizing-maps-with-lucene-payloads.html</a> </li>
<li><a href="http://java.dzone.com/articles/hibernate-search-mapping-entit">http://java.dzone.com/articles/hibernate-search-mapping-entit</a> </li>
</ol>
</li>
<li>Graph Databases:
<ol>
<li><a href="http://docs.neo4j.org/chunked/stable/tutorial-comparing-models.html">http://docs.neo4j.org/chunked/stable/tutorial-comparing-models.html</a> </li>
<li><a href="http://blog.neo4j.org/2010/03/modeling-categories-in-graph-database.html">http://blog.neo4j.org/2010/03/modeling-categories-in-graph-database.html</a> </li>
<li><a href="http://skillsmatter.com/podcast/nosql/graph-modelling">http://skillsmatter.com/podcast/nosql/graph-modelling</a> </li>
<li><a href="http://www.umiacs.umd.edu/~jimmylin/publications/Lin_Schatz_MLG2010.pdf">http://www.umiacs.umd.edu/~jimmylin/publications/Lin_Schatz_MLG2010.pdf</a> </li>
</ol>
</li>
<li>Demensionality Reduction:
<ol>
<li><a href="http://www.slideshare.net/mmalone/scaling-gis-data-in-nonrelational-data-stores">http://www.slideshare.net/mmalone/scaling-gis-data-in-nonrelational-data-stores</a> </li>
<li><a href="http://blog.notdot.net/2009/11/Damn-Cool-Algorithms-Spatial-indexing-with-Quadtrees-and-Hilbert-Curves">http://blog.notdot.net/2009/11/Damn-Cool-Algorithms-Spatial-indexing-with-Quadtrees-and-Hilbert-Curves</a> </li>
<li><a href="http://www.trisis.co.uk/blog/?p=1287">http://www.trisis.co.uk/blog/?p=1287</a> </li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/zz-the-nosql-data-modeling-techniques/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zz真心话大冒险各种变态惩</title>
		<link>http://yyh.im/zz-truth-or-dare-a-variety-of-abnormal-correctional</link>
		<comments>http://yyh.im/zz-truth-or-dare-a-variety-of-abnormal-correctional#comments</comments>
		<pubDate>Tue, 17 Apr 2012 15:35:49 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[玩法]]></category>

		<guid isPermaLink="false">http://yyh.im/zz-truth-or-dare-a-variety-of-abnormal-correctional</guid>
		<description><![CDATA[1、抓着铁门大喊,放我出去 2、随便抓个人说，我怀了你的孩子 3、找个同班的异性说，我没穿内裤，你能借我么？ 4、绕着旗杆跳钢管舞。。 5、绕操场跑一圈，边跑边喊，我再也不尿床了。。 6、买一瓶饮料（要有中奖活动的那种）然后拿着瓶子上的宣传问老板在要一瓶，（当然前提是没中奖）老板可定说你没种，然后就认真的说，上面不是写了开盖有奖，再来一瓶吗？ 7、做一个大家都满意的鬼脸 8、像一位异性表白3分钟 9、做自己最性感、最妩媚的表情或动作 10、吃下每个人为你夹得菜（如果是辣椒……） 11、跳草裙舞、脱衣舞（反正是冬天） 12、深情的吻墙10秒 13、模仿古代特殊职业女子拉客 14、模仿脑白金广告，边唱边跳 15、走到对面的包房坐下 然后猛然站起 走回来 囧！ 16、正面相隔做接吻陶醉状10秒； 17、对外大喊我是猪； 18、摆3个芙蓉姐姐S形； 19、跪地求婚状：如果我不向你求婚，我会后悔一辈子，因为你是我的惟一。（理察·基尔致朱丽叶·罗伯茨（在电影《逃跑的新娘》中）） 20、大喊 燃烧吧，小宇宙～ 21、表演希瑞：“我叫阿多拉，希曼的亲妹妹。这是顺风马，我的坐骑。我有一个不为人知的秘密，当我抽出剑叫道：“赐予我力量吧，我是希瑞！” 只有三个人知道这个秘密，他们是：希望之光，拉兹夫人，和考尔。我和其他的朋友们一道，为解救以希利亚，与罪恶的霍达克进行着战斗！” 22、选一个女生说 ：我将把你紧紧地搂在怀中，吻你亿万次，像在赤道上面那样炽烈的吻。（拿破仑致约瑟芬） 23、（男生）选一个男生 一边捶他的胸一边说： 你好讨厌哦 24、男生将女生逼角落，用&#34;调情式&#34;一手撑墙，两人深情对视10秒； 25、正面对着十指交扣，深情对视，深情朗诵骆宾王的《鹅》 26、情景剧：一男一女相遇，男生说：&#34;你好，我姓锄名禾，你呢？&#34;女生说：&#34;我名叫当午。&#34;男生女生同时说：&#34;哦！原来是锄禾日当午啊！&#34; 27、站起來,大喊&#34;我是超人,我要回家了！”； 28、男生摸自己胸说“唉太小了”； 29、对窗外大喊“我好寂寞啊”]]></description>
			<content:encoded><![CDATA[<p>1、抓着铁门大喊,放我出去 2、随便抓个人说，我怀了你的孩子 3、找个同班的异性说，我没穿内裤，你能借我么？ 4、绕着旗杆跳钢管舞。。 5、绕操场跑一圈，边跑边喊，我再也不尿床了。。 6、买一瓶饮料（要有中奖活动的那种）然后拿着瓶子上的宣传问老板在要一瓶，（当然前提是没中奖）老板可定说你没种，然后就认真的说，上面不是写了开盖有奖，再来一瓶吗？ 7、做一个大家都满意的鬼脸 8、像一位异性表白3分钟 9、做自己最性感、最妩媚的表情或动作 10、吃下每个人为你夹得菜（如果是辣椒……） 11、跳草裙舞、脱衣舞（反正是冬天） 12、深情的吻墙10秒 13、模仿古代特殊职业女子拉客 14、模仿脑白金广告，边唱边跳 15、走到对面的包房坐下 然后猛然站起 走回来 囧！ 16、正面相隔做接吻陶醉状10秒； 17、对外大喊我是猪； 18、摆3个芙蓉姐姐S形； 19、跪地求婚状：如果我不向你求婚，我会后悔一辈子，因为你是我的惟一。（理察·基尔致朱丽叶·罗伯茨（在电影《逃跑的新娘》中）） 20、大喊 燃烧吧，小宇宙～ 21、表演希瑞：“我叫阿多拉，希曼的亲妹妹。这是顺风马，我的坐骑。我有一个不为人知的秘密，当我抽出剑叫道：“赐予我力量吧，我是希瑞！” 只有三个人知道这个秘密，他们是：希望之光，拉兹夫人，和考尔。我和其他的朋友们一道，为解救以希利亚，与罪恶的霍达克进行着战斗！” 22、选一个女生说 ：我将把你紧紧地搂在怀中，吻你亿万次，像在赤道上面那样炽烈的吻。（拿破仑致约瑟芬） 23、（男生）选一个男生 一边捶他的胸一边说： 你好讨厌哦 24、男生将女生逼角落，用&quot;调情式&quot;一手撑墙，两人深情对视10秒； 25、正面对着十指交扣，深情对视，深情朗诵骆宾王的《鹅》 26、情景剧：一男一女相遇，男生说：&quot;你好，我姓锄名禾，你呢？&quot;女生说：&quot;我名叫当午。&quot;男生女生同时说：&quot;哦！原来是锄禾日当午啊！&quot; 27、站起來,大喊&quot;我是超人,我要回家了！”； 28、男生摸自己胸说“唉太小了”； 29、对窗外大喊“我好寂寞啊”</p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/zz-truth-or-dare-a-variety-of-abnormal-correctional/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>有人冒充我行骗借钱，手段高明，各位多加小心</title>
		<link>http://yyh.im/be-care-of-fraud</link>
		<comments>http://yyh.im/be-care-of-fraud#comments</comments>
		<pubDate>Tue, 20 Mar 2012 14:43:34 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://yyh.im/be-care-of-fraud</guid>
		<description><![CDATA[最近有人冒充我打电话给同学，号称手机换号了原号不使用，进而进行聊天，等对方属于防范后开始借钱。希望各位多加小心！因为有位同学被骗打了3000块进入骗子提供的银行卡。(其实聊了半小时没听出破绽也有点2.） 这骗子手段高明： 知道我名字 知道关系要好的朋友同学名字手机，互相的关系（知道是舍友，还能道出另外室友的名字），以及爱好（跟同学聊天谈篮球什么的） 知道我七月份毕业，知道我毕业后要在上海工作 知道我家乡，还特地买了张我家乡的手机卡 带广东口音 带鼻音，冒充感冒 跟几个同学打电话说换号码，叫他们打篮球，让他们放松警惕，然后向其中一个提出借钱 这是自去年夏天后第二次了，我如果向你借钱，一定会QQ邮件手机同时发消息确认，并且多提识别性高的问题，请各位多多警惕。当然，经过确认以后，还是要毫不犹豫慷慨解囊，熟悉了借钱给我的感觉，就不会被陌生人骗到了。]]></description>
			<content:encoded><![CDATA[<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://primericascam1.info/wp-content/uploads/2012/01/fraud.gif" /></p>
<p>最近有人冒充我打电话给同学，号称手机换号了原号不使用，进而进行聊天，等对方属于防范后开始借钱。希望各位多加小心！因为有位同学被骗打了3000块进入骗子提供的银行卡。(其实聊了半小时没听出破绽也有点2.）</p>
<p>这骗子手段高明：</p>
<ol>
<li>知道我名字</li>
<li>知道关系要好的朋友同学名字手机，互相的关系（知道是舍友，还能道出另外室友的名字），以及爱好（跟同学聊天谈篮球什么的）</li>
<li>知道我七月份毕业，知道我毕业后要在上海工作</li>
<li>知道我家乡，还特地买了张我家乡的手机卡</li>
<li>带广东口音</li>
<li>带鼻音，冒充感冒</li>
<li>跟几个同学打电话说换号码，叫他们打篮球，让他们放松警惕，然后向其中一个提出借钱</li>
</ol>
<p>这是自去年夏天后第二次了，我如果向你借钱，一定会QQ邮件手机同时发消息确认，并且多提识别性高的问题，请各位多多警惕。当然，经过确认以后，还是要<strong>毫不犹豫慷慨解囊</strong>，熟悉了借钱给我的感觉，就不会被陌生人骗到了。</p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/be-care-of-fraud/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>炒鸭子</title>
		<link>http://yyh.im/stir-fried-little-bobby-to-duck</link>
		<comments>http://yyh.im/stir-fried-little-bobby-to-duck#comments</comments>
		<pubDate>Sat, 03 Mar 2012 16:42:00 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[在地球的日子]]></category>
		<category><![CDATA[心情]]></category>
		<category><![CDATA[珍馐]]></category>
		<category><![CDATA[美食]]></category>

		<guid isPermaLink="false">http://yyh.im/stir-fried-little-bobby-to-duck</guid>
		<description><![CDATA[[记录于2011年7月17日] 今天打电话回家，妈说起昨天吃了炒鸭子，从这边市场买的鸭子是从丽岗抓出来的，吃谷不吃饲料，肉特别香。 炒鸭子不知道什么时候开始成为招牌了。以前印象最深刻的是无论上课还是假期，都很有兴致地和爸妈研究菜式，会尝试不同的配料成份和不同的烹饪方式。现在每次家庭聚餐都有的几个菜，高压锅杂菇火局鸡，蜂蜜咸猪手，葱蒜香炒鸭什么的，都是那时候试验出来的成功品。 到上海更加能体会到城市无美食。无论是在各种档次的饭店，还是自家买菜来烹饪，味道都比不上农村，因为鸡是吃饲料不是吃谷壳虫子走地放养的，因为蔬菜不是从地里拔起来洗干净就下锅的，因为鱼是冰过的不嫩…… 图：和xyq,王姐姐,foreveryg,xtx等人在一家隐藏于深巷里的上海菜馆觅食。]]></description>
			<content:encoded><![CDATA[<p>[记录于2011年7月17日]</p>
<p>今天打电话回家，妈说起昨天吃了炒鸭子，从这边市场买的鸭子是从丽岗抓出来的，吃谷不吃饲料，肉特别香。</p>
<p>炒鸭子不知道什么时候开始成为招牌了。以前印象最深刻的是无论上课还是假期，都很有兴致地和爸妈研究菜式，会尝试不同的配料成份和不同的烹饪方式。现在每次家庭聚餐都有的几个菜，高压锅杂菇火局鸡，蜂蜜咸猪手，葱蒜香炒鸭什么的，都是那时候试验出来的成功品。</p>
<p>到上海更加能体会到城市无美食。无论是在各种档次的饭店，还是自家买菜来烹饪，味道都比不上农村，因为鸡是吃饲料不是吃谷壳虫子走地放养的，因为蔬菜不是从地里拔起来洗干净就下锅的，因为鱼是冰过的不嫩……</p>
<p><img src="http://fmn.rrimg.com/fmn053/20110716/2110/p_large_dmZT_18770004211f5c70.jpg" /></p>
<p>图：和xyq,王姐姐,foreveryg,xtx等人在一家隐藏于深巷里的上海菜馆觅食。</p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/stir-fried-little-bobby-to-duck/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[read]:How Companies Learn Your Secrets</title>
		<link>http://yyh.im/zzhow-companies-learn-your-secrets</link>
		<comments>http://yyh.im/zzhow-companies-learn-your-secrets#comments</comments>
		<pubDate>Sun, 26 Feb 2012 08:21:00 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[Dataset Changes Mindset]]></category>
		<category><![CDATA[分享是美德]]></category>
		<category><![CDATA[数据]]></category>
		<category><![CDATA[杂汇]]></category>
		<category><![CDATA[习惯]]></category>
		<category><![CDATA[广告]]></category>
		<category><![CDATA[心理学]]></category>
		<category><![CDATA[数据分析]]></category>
		<category><![CDATA[电子商务]]></category>
		<category><![CDATA[神经学]]></category>
		<category><![CDATA[营销]]></category>
		<category><![CDATA[行为分析]]></category>

		<guid isPermaLink="false">http://yyh.im/zzhow-companies-learn-your-secrets</guid>
		<description><![CDATA[这是一篇很有意思的文章，从作者想消除一个每天下午吃巧克力饼干的习惯，引出描述习惯理论、用户购买行为分析以及二者的结合应用。 从这篇文章可以发散联想到有关电商的几个话题： 如何对用户购买习惯进行建模， 如何利用已有的数据进行分析， 需要从线下或者第三方购买什么样的数据来找到买家的life event， 如何利用买家的life event期间习惯的可塑性来培养购买习惯， 如何在利用好用户数据来分析习惯和营销同时消除用户的不安和反感。 Other notes: habit formation loop: cue, routine, reward. case: P&#38;G Febreze, shifting the routine rather than building new cues. most cues fit into one of five categories: location, time, emotional state, other people or the immediately preceding action &#160; &#160; &#160; 文章来源：http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?_r=2&#38;pagewanted=all Antonio Bolfo/Reportage for The <a href='http://yyh.im/zzhow-companies-learn-your-secrets'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>这是一篇很有意思的文章，从作者想消除一个每天下午吃巧克力饼干的习惯，引出描述习惯理论、用户购买行为分析以及二者的结合应用。</p>
<p>从这篇文章可以发散联想到有关电商的几个话题：</p>
<ul>
<li>如何对用户购买习惯进行建模，</li>
<li>如何利用已有的数据进行分析，</li>
<li>需要从线下或者第三方购买什么样的数据来找到买家的life event，</li>
<li>如何利用买家的life event期间习惯的可塑性来培养购买习惯，</li>
<li>如何在利用好用户数据来分析习惯和营销同时消除用户的不安和反感。</li>
</ul>
<p>Other notes:</p>
<ol>
<li>habit formation loop: cue, routine, reward.</li>
<li>case: P&amp;G Febreze, shifting the routine rather than building new cues.</li>
<li>most cues fit into one of five categories: location, time, emotional state, other people or the immediately preceding action</li>
</ol>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>文章来源：<a href="http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?_r=2&amp;pagewanted=all">http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?_r=2&amp;pagewanted=all</a></p>
<p><img border="0" alt="" src="http://graphics8.nytimes.com/images/2012/02/19/magazine/19target_span/19target_span-articleLarge.jpg" width="600" height="400" /></p>
<p>Antonio Bolfo/Reportage for The New York Times</p>
<h6>By <a href="http://topics.nytimes.com/top/reference/timestopics/people/d/charles_duhigg/index.html?inline=nyt-per">CHARLES DUHIGG</a></h6>
<h6>Published: February 16, 2012</h6>
<p>Andrew Pole had just started working as a statistician for Target in 2002, when two colleagues from the marketing department stopped by his desk to ask an odd question: “If we wanted to figure out if a customer is pregnant, even if she didn’t want us to know, can you do that? ”</p>
<h6>Multimedia</h6>
<p><img border="0" alt="" src="http://graphics8.nytimes.com/images/2012/02/17/magazine/video-tc-120216-duhigg/video-tc-120216-duhigg-thumbWide.jpg" width="190" height="126" /></p>
<h6><a href="http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?_r=2&amp;pagewanted=all#">TimesCast | Retailers&#8217; Predictions</a></h6>
<p><img border="0" alt="" src="http://graphics8.nytimes.com/images/2012/02/15/magazine/video-duhigg-habits/video-duhigg-habits-thumbWide.jpg" width="190" height="126" /></p>
<h6><a href="http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?_r=2&amp;pagewanted=all#">How to Break the Cookie Habit</a></h6>
<p>Pole has a master’s degree in statistics and another in economics, and has been obsessed with the intersection of data and human behavior most of his life. His parents were teachers in North Dakota, and while other kids were going to 4-H, Pole was doing algebra and writing computer programs. “The stereotype of a math nerd is true,” he told me when I spoke with him last year. “I kind of like going out and evangelizing analytics.”</p>
<p>As the marketers explained to Pole — and as Pole later explained to me, back when we were still speaking and before Target told him to stop — new parents are a retailer’s holy grail. Most shoppers don’t buy everything they need at one store. Instead, they buy groceries at the grocery store and toys at the toy store, and they visit Target only when they need certain items they associate with Target — cleaning supplies, say, or new socks or a six-month supply of toilet paper. But Target sells everything from milk to stuffed animals to lawn furniture to electronics, so one of the company’s primary goals is convincing customers that the only store they need is Target. But it’s a tough message to get across, even with the most ingenious ad campaigns, because once consumers’ shopping habits are ingrained, it’s incredibly difficult to change them.</p>
<p>There are, however, some brief periods in a person’s life when old routines fall apart and buying habits are suddenly in flux. One of those moments — <em>the</em> moment, really — is right around the birth of a child, when parents are exhausted and overwhelmed and their shopping patterns and brand loyalties are up for grabs. But as Target’s marketers explained to Pole, timing is everything. Because birth records are usually public, the moment a couple have a new baby, they are almost instantaneously barraged with offers and incentives and advertisements from all sorts of companies. Which means that the key is to reach them earlier, before any other retailers know a baby is on the way. Specifically, the marketers said they wanted to send specially designed ads to women in their second trimester, which is when most expectant mothers begin buying all sorts of new things, like prenatal vitamins and maternity clothing. “Can you give us a list?” the marketers asked.</p>
<p>“We knew that if we could identify them in their second trimester, there’s a good chance we could capture them for years,” Pole told me. “As soon as we get them buying diapers from us, they’re going to start buying everything else too. If you’re rushing through the store, looking for bottles, and you pass orange juice, you’ll grab a carton. Oh, and there’s that new DVD I want. Soon, you’ll be buying cereal and paper towels from us, and keep coming back.”</p>
<p>The desire to collect information on customers is not new for Target or any other large retailer, of course. For decades, Target has collected vast amounts of data on every person who regularly walks into one of its stores. Whenever possible, Target assigns each shopper a unique code — known internally as the Guest ID number — that keeps tabs on everything they buy. “If you use a credit card or a coupon, or fill out a survey, or mail in a refund, or call the customer help line, or open an e-mail we’ve sent you or visit our Web site, we’ll record it and link it to your Guest ID,” Pole said. “We want to know everything we can.”</p>
<p>Also linked to your Guest ID is demographic information like your age, whether you are married and have kids, which part of town you live in, how long it takes you to drive to the store, your estimated salary, whether you’ve moved recently, what credit cards you carry in your wallet and what Web sites you visit. Target can buy data about your ethnicity, job history, the magazines you read, if you’ve ever declared bankruptcy or got divorced, the year you bought (or lost) your house, where you went to college, what kinds of topics you talk about online, whether you prefer certain brands of coffee, paper towels, cereal or applesauce, your political leanings, reading habits, charitable giving and the number of cars you own. (In a statement, Target declined to identify what demographic information it collects or purchases.) All that information is meaningless, however, without someone to analyze and make sense of it. That’s where Andrew Pole and the dozens of other members of Target’s Guest Marketing Analytics department come in.</p>
<p>Almost every major retailer, from grocery chains to investment banks to the U.S. Postal Service, has a “predictive analytics” department devoted to understanding not just consumers’ shopping habits but also their personal habits, so as to more efficiently market to them. “But Target has always been one of the smartest at this,” says Eric Siegel, a consultant and the chairman of a conference called Predictive Analytics World. “We’re living through a golden age of behavioral research. It’s amazing how much we can figure out about how people think now.”</p>
<p>The reason Target can snoop on our shopping habits is that, over the past two decades, the science of habit formation has become a major field of research in neurology and psychology departments at hundreds of major medical centers and universities, as well as inside extremely well financed corporate labs. “It’s like an arms race to hire statisticians nowadays,” said Andreas Weigend, the former chief scientist at <a href="http://amazon.com/">Amazon.com</a>. “Mathematicians are suddenly sexy.” As the ability to analyze data has grown more and more fine-grained, the push to understand how daily habits influence our decisions has become one of the most exciting topics in clinical research, even though most of us are hardly aware those patterns exist. One study from Duke University estimated that habits, rather than conscious decision-making, shape 45 percent of the choices we make every day, and recent discoveries have begun to change everything from the way we think about dieting to how doctors conceive treatments for anxiety, depression and addictions.</p>
<p>This research is also transforming our understanding of how habits function across organizations and societies. A football coach named Tony Dungy propelled one of the worst teams in the N.F.L. to the Super Bowl by focusing on how his players habitually reacted to on-field cues. Before he became Treasury secretary, Paul O’Neill overhauled a stumbling conglomerate, Alcoa, and turned it into a top performer in the Dow Jones by relentlessly attacking one habit — a specific approach to worker safety — which in turn caused a companywide transformation. The Obama campaign has hired a habit specialist as its “chief scientist” to figure out how to trigger new voting patterns among different constituencies.</p>
<p>Researchers have figured out how to stop people from habitually overeating and biting their nails. They can explain why some of us automatically go for a jog every morning and are more productive at work, while others oversleep and procrastinate. There is a calculus, it turns out, for mastering our subconscious urges. For companies like Target, the exhaustive rendering of our conscious and unconscious patterns into data sets and algorithms has revolutionized what they know about us and, therefore, how precisely they can sell.</p>
<p><strong>Inside the brain-and-cognitive-sciences</strong> department of the <a href="http://topics.nytimes.com/top/reference/timestopics/organizations/m/massachusetts_institute_of_technology/index.html?inline=nyt-org">Massachusetts Institute of Technology</a> are what, to the casual observer, look like dollhouse versions of surgical theaters. There are rooms with tiny scalpels, small drills and miniature saws. Even the operating tables are petite, as if prepared for 7-year-old surgeons. Inside those shrunken O.R.’s, neurologists cut into the skulls of anesthetized rats, implanting tiny sensors that record the smallest changes in the activity of their brains.</p>
<p>An M.I.T. neuroscientist named Ann Graybiel told me that she and her colleagues began exploring habits more than a decade ago by putting their wired rats into a T-shaped maze with chocolate at one end. The maze was structured so that each animal was positioned behind a barrier that opened after a loud click. The first time a rat was placed in the maze, it would usually wander slowly up and down the center aisle after the barrier slid away, sniffing in corners and scratching at walls. It appeared to smell the chocolate but couldn’t figure out how to find it. There was no discernible pattern in the rat’s meanderings and no indication it was working hard to find the treat.</p>
<p>The probes in the rats’ heads, however, told a different story. While each animal wandered through the maze, its brain was working furiously. Every time a rat sniffed the air or scratched a wall, the neurosensors inside the animal’s head exploded with activity. As the scientists repeated the experiment, again and again, the rats eventually stopped sniffing corners and making wrong turns and began to zip through the maze with more and more speed. And within their brains, something unexpected occurred: as each rat learned how to complete the maze more quickly, its mental activity <em>decreased.</em> As the path became more and more automatic — as it became a habit — the rats started thinking less and less.</p>
<p>This process, in which the brain converts a sequence of actions into an automatic routine, is called “chunking.” There are dozens, if not hundreds, of behavioral chunks we rely on every day. Some are simple: you automatically put toothpaste on your toothbrush before sticking it in your mouth. Some, like making the kids’ lunch, are a little more complex. Still others are so complicated that it’s remarkable to realize that a habit could have emerged at all.</p>
<p>Take backing your car out of the driveway. When you first learned to drive, that act required a major dose of concentration, and for good reason: it involves peering into the rearview and side mirrors and checking for obstacles, putting your foot on the brake, moving the gearshift into reverse, removing your foot from the brake, estimating the distance between the garage and the street while keeping the wheels aligned, calculating how images in the mirrors translate into actual distances, all while applying differing amounts of pressure to the gas pedal and brake.</p>
<p>Now, you perform that series of actions every time you pull into the street without thinking very much. Your brain has chunked large parts of it. Left to its own devices, the brain will try to make almost any repeated behavior into a habit, because habits allow our minds to conserve effort. But conserving mental energy is tricky, because if our brains power down at the wrong moment, we might fail to notice something important, like a child riding her bike down the sidewalk or a speeding car coming down the street. So we’ve devised a clever system to determine when to let a habit take over. It’s something that happens whenever a chunk of behavior starts or ends — and it helps to explain why habits are so difficult to change once they’re formed, despite our best intentions.</p>
<p>To understand this a little more clearly, consider again the chocolate-seeking rats. What Graybiel and her colleagues found was that, as the ability to navigate the maze became habitual, there were two spikes in the rats’ brain activity — once at the beginning of the maze, when the rat heard the click right before the barrier slid away, and once at the end, when the rat found the chocolate. Those spikes show when the rats’ brains were fully engaged, and the dip in neural activity between the spikes showed when the habit took over. From behind the partition, the rat wasn’t sure what waited on the other side, until it heard the click, which it had come to associate with the maze. Once it heard that sound, it knew to use the “maze habit,” and its brain activity decreased. Then at the end of the routine, when the reward appeared, the brain shook itself awake again and the chocolate signaled to the rat that this particular habit was worth remembering, and the neurological pathway was carved that much deeper.</p>
<p><font style="background-color: #ffff00">The process within our brains that creates habits is a three-step loop. First, there is a cue, a trigger that tells your brain to go into automatic mode and which habit to use. Then there is the routine, which can be physical or mental or emotional. Finally, there is a reward, which helps your brain figure out if this particular loop is worth remembering for the future. Over time, this loop — cue, routine, reward; cue, routine, reward — becomes more and more automatic. The cue and reward become neurologically intertwined until a sense of craving emerges. What’s unique about cues and rewards, however, is how subtle they can be. Neurological studies like the ones in Graybiel’s lab have revealed that some cues span just milliseconds. And rewards can range from the obvious (like the sugar rush that a morning doughnut habit provides) to the infinitesimal (like the barely noticeable — but measurable — sense of relief the brain experiences after successfully navigating the driveway). Most cues and rewards, in fact, happen so quickly and are so slight that we are hardly aware of them at all. But our neural systems notice and use them to build automatic behaviors.</font></p>
<p><font style="background-color: #ffff00">Habits aren’t destiny — they can be ignored, changed or replaced. But it’s also true that once the loop is established and a habit emerges, your brain stops fully participating in decision-making. So unless you deliberately fight a habit — unless you find new cues and rewards — the old pattern will unfold automatically.</font></p>
<p>“We’ve done experiments where we trained rats to run down a maze until it was a habit, and then we extinguished the habit by changing the placement of the reward,” Graybiel told me. “Then one day, we’ll put the reward in the old place and put in the rat and, by golly, the old habit will re-emerge right away. Habits never really disappear.”</p>
<p><strong>Luckily, simply understanding</strong> how habits work makes them easier to control. Take, for instance, a series of studies conducted a few years ago at <a href="http://topics.nytimes.com/top/reference/timestopics/organizations/c/columbia_university/index.html?inline=nyt-org">Columbia University</a> and the University of Alberta. Researchers wanted to understand how exercise habits emerge. In one project, 256 members of a health-insurance plan were invited to classes stressing the importance of exercise. Half the participants received an extra lesson on the theories of habit formation (the structure of the habit loop) and were asked to identify cues and rewards that might help them develop exercise routines.</p>
<p>The results were dramatic. Over the next four months, those participants who deliberately identified cues and rewards spent twice as much time exercising as their peers. Other studies have yielded similar results. According to another recent paper, if you want to start running in the morning, it’s essential that you choose a simple cue (like always putting on your sneakers before breakfast or leaving your running clothes next to your bed) and a clear reward (like a midday treat or even the sense of accomplishment that comes from ritually recording your miles in a log book). After a while, your brain will start anticipating that reward — craving the treat or the feeling of accomplishment — and there will be a measurable neurological impulse to lace up your jogging shoes each morning.</p>
<p>Our relationship to e-mail operates on the same principle. When a computer chimes or a smartphone vibrates with a new message, the brain starts anticipating the neurological “pleasure” (even if we don’t recognize it as such) that clicking on the e-mail and reading it provides. That expectation, if unsatisfied, can build until you find yourself moved to distraction by the thought of an e-mail sitting there unread — even if you know, rationally, it’s most likely not important. On the other hand, once you remove the cue by disabling the buzzing of your phone or the chiming of your computer, the craving is never triggered, and you’ll find, over time, that you’re able to work productively for long stretches without checking your in-box.</p>
<p>Some of the most ambitious habit experiments have been conducted by corporate America. To understand why executives are so entranced by this science, consider how one of the world’s largest companies, Procter &amp; Gamble, used habit insights to turn a failing product into one of its biggest sellers. P.&amp; G. is the corporate behemoth behind a whole range of products, from Downy fabric softener to Bounty paper towels to Duracell batteries and dozens of other household brands. In the mid-1990s, P.&amp; G.’s executives began a secret project to create a new product that could eradicate bad smells. P.&amp; G. spent millions developing a colorless, cheap-to-manufacture liquid that could be sprayed on a smoky blouse, stinky couch, old jacket or stained car interior and make it odorless. In order to market the product — Febreze — the company formed a team that included a former Wall Street mathematician named Drake Stimson and habit specialists, whose job was to make sure the television commercials, which they tested in Phoenix, Salt Lake City and Boise, Idaho, accentuated the product’s cues and rewards just right.</p>
<p>The first ad showed a woman complaining about the smoking section of a restaurant. Whenever she eats there, she says, her jacket smells like smoke. A friend tells her that if she uses Febreze, it will eliminate the odor. The cue in the ad is clear: the harsh smell of cigarette smoke. The reward: odor eliminated from clothes. The second ad featured a woman worrying about her dog, Sophie, who always sits on the couch. “Sophie will always smell like Sophie,” she says, but with Febreze, “now my furniture doesn’t have to.” The ads were put in heavy rotation. Then the marketers sat back, anticipating how they would spend their bonuses. A week passed. Then two. A month. Two months. Sales started small and got smaller. Febreze was a dud.</p>
<p>The panicked marketing team canvassed consumers and conducted in-depth interviews to figure out what was going wrong, Stimson recalled. Their first inkling came when they visited a woman’s home outside Phoenix. The house was clean and organized. She was something of a neat freak, the woman explained. But when P.&amp; G.’s scientists walked into her living room, where her nine cats spent most of their time, the scent was so overpowering that one of them gagged.</p>
<p>According to Stimson, who led the Febreze team, a researcher asked the woman, “What do you do about the cat smell?”</p>
<p>“It’s usually not a problem,” she said.</p>
<p>“Do you smell it now?”</p>
<p>“No,” she said. “Isn’t it wonderful? They hardly smell at all!”</p>
<p>A similar scene played out in dozens of other smelly homes. The reason Febreze wasn’t selling, the marketers realized, was that people couldn’t detect most of the bad smells in their lives. If you live with nine cats, you become desensitized to their scents. If you smoke cigarettes, eventually you don’t smell smoke anymore. Even the strongest odors fade with constant exposure. That’s why Febreze was a failure. The product’s cue — the bad smells that were supposed to trigger daily use — was hidden from the people who needed it the most. And Febreze’s reward (an odorless home) was meaningless to someone who couldn’t smell offensive scents in the first place.</p>
<p>P.&amp; G. employed a Harvard Business School professor to analyze Febreze’s ad campaigns. They collected hours of footage of people cleaning their homes and watched tape after tape, looking for clues that might help them connect Febreze to people’s daily habits. When that didn’t reveal anything, they went into the field and conducted more interviews. A breakthrough came when they visited a woman in a suburb near Scottsdale, Ariz., who was in her 40s with four children. Her house was clean, though not compulsively tidy, and didn’t appear to have any odor problems; there were no pets or smokers. To the surprise of everyone, she loved Febreze.</p>
<p>“I use it every day,” she said.</p>
<p>“What smells are you trying to get rid of?” a researcher asked.</p>
<p>“I don’t really use it for specific smells,” the woman said. “I use it for normal cleaning — a couple of sprays when I’m done in a room.”</p>
<p>The researchers followed her around as she tidied the house. In the bedroom, she made her bed, tightened the sheet’s corners, then sprayed the comforter with Febreze. In the living room, she vacuumed, picked up the children’s shoes, straightened the coffee table, then sprayed Febreze on the freshly cleaned carpet.</p>
<p>“It’s nice, you know?” she said. “Spraying feels like a little minicelebration when I’m done with a room.” At the rate she was going, the team estimated, she would empty a bottle of Febreze every two weeks.</p>
<p>When they got back to P.&amp; G.’s headquarters, the researchers watched their videotapes again. Now they knew what to look for and saw their mistake in scene after scene. Cleaning has its own habit loops that already exist. In one video, when a woman walked into a dirty room (cue), she started sweeping and picking up toys (routine), then she examined the room and smiled when she was done (reward). In another, a woman scowled at her unmade bed (cue), proceeded to straighten the blankets and comforter (routine) and then sighed as she ran her hands over the freshly plumped pillows (reward). P.&amp; G. had been trying to create a whole new habit with Febreze, but what they really needed to do was piggyback on habit loops that were already in place. The marketers needed to position Febreze as something that came at the end of the cleaning ritual, the reward, rather than as a whole new cleaning routine.</p>
<p>The company printed new ads showing open windows and gusts of fresh air. More perfume was added to the Febreze formula, so that instead of merely neutralizing odors, the spray had its own distinct scent. Television commercials were filmed of women, having finished their cleaning routine, using Febreze to spritz freshly made beds and just-laundered clothing. Each ad was designed to appeal to the habit loop: when you see a freshly cleaned room (cue), pull out Febreze (routine) and enjoy a smell that says you’ve done a great job (reward). When you finish making a bed (cue), spritz Febreze (routine) and breathe a sweet, contented sigh (reward). Febreze, the ads implied, was a pleasant treat, not a reminder that your home stinks.</p>
<p>And so Febreze, a product originally conceived as a revolutionary way to destroy odors, became an air freshener used once things are already clean. The Febreze revamp occurred in the summer of 1998. Within two months, sales doubled. A year later, the product brought in $230 million. Since then Febreze has spawned dozens of spinoffs — air fresheners, candles and laundry detergents — that now account for sales of more than $1 billion a year. Eventually, P.&amp; G. began mentioning to customers that, in addition to smelling sweet, Febreze can actually kill bad odors. Today it’s one of the top-selling products in the world.</p>
<p><strong>Andrew Pole was hired</strong> by Target to use the same kinds of insights into consumers’ habits to expand Target’s sales. His assignment was to analyze all the cue-routine-reward loops among shoppers and help the company figure out how to exploit them. Much of his department’s work was straightforward: find the customers who have children and send them catalogs that feature toys before Christmas. Look for shoppers who habitually purchase swimsuits in April and send them coupons for sunscreen in July and diet books in December. But Pole’s most important assignment was to identify those unique moments in consumers’ lives when their shopping habits become particularly flexible and the right advertisement or coupon would cause them to begin spending in new ways.</p>
<p>In the 1980s, a team of researchers led by a U.C.L.A. professor named Alan Andreasen undertook a study of peoples’ most mundane purchases, like soap, toothpaste, trash bags and toilet paper. They learned that most shoppers paid almost no attention to how they bought these products, that the purchases occurred habitually, without any complex decision-making. Which meant it was hard for marketers, despite their displays and coupons and product promotions, to persuade shoppers to change.</p>
<p>But when some customers were going through a major life event, like graduating from college or getting a new job or moving to a new town, their shopping habits became flexible in ways that were both predictable and potential gold mines for retailers. The study found that when someone marries, he or she is more likely to start buying a new type of coffee. When a couple move into a new house, they’re more apt to purchase a different kind of cereal. When they divorce, there’s an increased chance they’ll start buying different brands of beer.</p>
<p>Consumers going through major life events often don’t notice, or care, that their shopping habits have shifted, but retailers notice, and they care quite a bit. At those unique moments, Andreasen wrote, customers are “vulnerable to intervention by marketers.” In other words, a precisely timed advertisement, sent to a recent divorcee or new homebuyer, can change someone’s shopping patterns for years.</p>
<p><font style="background-color: #ffff00"><strong>And among life events, none are more important than the arrival of a baby. At that moment, new parents’ habits are more flexible than at almost any other time in their adult lives. If companies can identify pregnant shoppers, they can earn millions.</strong></font></p>
<p>The only problem is that identifying pregnant customers is harder than it sounds. Target has a baby-shower registry, and Pole started there, observing how shopping habits changed as a woman approached her due date, which women on the registry had willingly disclosed. He ran test after test, analyzing the data, and before long some useful patterns emerged. Lotions, for example. Lots of people buy lotion, but one of Pole’s colleagues noticed that women on the baby registry were buying larger quantities of unscented lotion around the beginning of their second trimester. Another analyst noted that sometime in the first 20 weeks, pregnant women loaded up on supplements like calcium, magnesium and zinc. Many shoppers purchase soap and cotton balls, but when someone suddenly starts buying lots of scent-free soap and extra-big bags of cotton balls, in addition to hand sanitizers and washcloths, it signals they could be getting close to their delivery date.</p>
<p>As Pole’s computers crawled through the data, he was able to identify about 25 products that, when analyzed together, allowed him to assign each shopper a “pregnancy prediction” score. More important, he could also estimate her due date to within a small window, so Target could send coupons timed to very specific stages of her pregnancy.</p>
<p>One Target employee I spoke to provided a hypothetical example. Take a fictional Target shopper named Jenny Ward, who is 23, lives in Atlanta and in March bought cocoa-butter lotion, a purse large enough to double as a diaper bag, zinc and magnesium supplements and a bright blue rug. There’s, say, an 87 percent chance that she’s pregnant and that her delivery date is sometime in late August. What’s more, because of the data attached to her Guest ID number, Target knows how to trigger Jenny’s habits. They know that if she receives a coupon via e-mail, it will most likely cue her to buy online. They know that if she receives an ad in the mail on Friday, she frequently uses it on a weekend trip to the store. And they know that if they reward her with a printed receipt that entitles her to a free cup of Starbucks coffee, she’ll use it when she comes back again.</p>
<p>In the past, that knowledge had limited value. After all, Jenny purchased only cleaning supplies at Target, and there were only so many psychological buttons the company could push. But now that she is pregnant, everything is up for grabs. In addition to triggering Jenny’s habits to buy more cleaning products, they can also start including offers for an array of products, some more obvious than others, that a woman at her stage of pregnancy might need.</p>
<p>Pole applied his program to every regular female shopper in Target’s national database and soon had a list of tens of thousands of women who were most likely pregnant. If they could entice those women or their husbands to visit Target and buy baby-related products, the company’s cue-routine-reward calculators could kick in and start pushing them to buy groceries, bathing suits, toys and clothing, as well. When Pole shared his list with the marketers, he said, they were ecstatic. Soon, Pole was getting invited to meetings above his paygrade. Eventually his paygrade went up.</p>
<p>At which point someone asked an important question: How are women going to react when they figure out how much Target knows?</p>
<p>“If we send someone a catalog and say, ‘Congratulations on your first child!’ and they’ve never told us they’re pregnant, that’s going to make some people uncomfortable,” Pole told me. “We are very conservative about compliance with all privacy laws. But even if you’re following the law, you can do things where people get queasy.”</p>
<p>About a year after Pole created his pregnancy-prediction model, a man walked into a Target outside Minneapolis and demanded to see the manager. He was clutching coupons that had been sent to his daughter, and he was angry, according to an employee who participated in the conversation.</p>
<p>“My daughter got this in the mail!” he said. “She’s still in high school, and you’re sending her coupons for baby clothes and cribs? Are you trying to encourage her to get pregnant?”</p>
<p>The manager didn’t have any idea what the man was talking about. He looked at the mailer. Sure enough, it was addressed to the man’s daughter and contained advertisements for maternity clothing, nursery furniture and pictures of smiling infants. The manager apologized and then called a few days later to apologize again.</p>
<p>On the phone, though, the father was somewhat abashed. “I had a talk with my daughter,” he said. “It turns out there’s been some activities in my house I haven’t been completely aware of. She’s due in August. I owe you an apology.”</p>
<p>When I approached Target to discuss Pole’s work, its representatives declined to speak with me. “Our mission is to make Target the preferred shopping destination for our guests by delivering outstanding value, continuous innovation and exceptional guest experience,” the company wrote in a statement. “We’ve developed a number of research tools that allow us to gain insights into trends and preferences within different demographic segments of our guest population.” When I sent Target a complete summary of my reporting, the reply was more terse: “Almost all of your statements contain inaccurate information and publishing them would be misleading to the public. We do not intend to address each statement point by point.” The company declined to identify what was inaccurate. They did add, however, that Target “is in compliance with all federal and state laws, including those related to protected health information.”</p>
<p>When I offered to fly to Target’s headquarters to discuss its concerns, a spokeswoman e-mailed that no one would meet me. When I flew out anyway, I was told I was on a list of prohibited visitors. “I’ve been instructed not to give you access and to ask you to leave,” said a very nice security guard named Alex.</p>
<p>Using data to predict a woman’s pregnancy, Target realized soon after Pole perfected his model, could be a public-relations disaster. So the question became: how could they get their advertisements into expectant mothers’ hands without making it appear they were spying on them? How do you take advantage of someone’s habits without letting them know you’re studying their lives?</p>
<p><strong>Before I met Andrew Pole</strong>, before I even decided to write a book about the science of habit formation, I had another goal: I wanted to lose weight.</p>
<p>I had got into a bad habit of going to the cafeteria every afternoon and eating a chocolate-chip cookie, which contributed to my gaining a few pounds. Eight, to be precise. I put a Post-it note on my computer reading “NO MORE COOKIES.” But every afternoon, I managed to ignore that note, wander to the cafeteria, buy a cookie and eat it while chatting with colleagues. Tomorrow, I always promised myself, I’ll muster the willpower to resist.</p>
<p>Tomorrow, I ate another cookie.</p>
<p>When I started interviewing experts in habit formation, I concluded each interview by asking what I should do. The first step, they said, was to figure out my habit loop. The routine was simple: every afternoon, I walked to the cafeteria, bought a cookie and ate it while chatting with friends.</p>
<p>Next came some less obvious questions: What was the cue? Hunger? Boredom? Low blood sugar? And what was the reward? The taste of the cookie itself? The temporary distraction from my work? The chance to socialize with colleagues?</p>
<p>Rewards are powerful because they satisfy cravings, but we’re often not conscious of the urges driving our habits in the first place. So one day, when I felt a cookie impulse, I went outside and took a walk instead. The next day, I went to the cafeteria and bought a coffee. The next, I bought an apple and ate it while chatting with friends. You get the idea. I wanted to test different theories regarding what reward I was really craving. Was it hunger? (In which case the apple should have worked.) Was it the desire for a quick burst of energy? (If so, the coffee should suffice.) Or, as turned out to be the answer, was it that after several hours spent focused on work, I wanted to socialize, to make sure I was up to speed on office gossip, and the cookie was just a convenient excuse? When I walked to a colleague’s desk and chatted for a few minutes, it turned out, my cookie urge was gone.</p>
<p>All that was left was identifying the cue.</p>
<p>Deciphering cues is hard, however. Our lives often contain too much information to figure out what is triggering a particular behavior. Do you eat breakfast at a certain time because you’re hungry? Or because the morning news is on? Or because your kids have started eating? <font style="background-color: #ffff00"><strong>Experiments have shown that most cues fit into one of five categories: location, time, emotional state, other people or the immediately preceding action</strong>.</font> So to figure out the cue for my cookie habit, I wrote down five things the moment the urge hit:</p>
<p>Where are you? (Sitting at my desk.)</p>
<p>What time is it? (3:36 p.m.)</p>
<p>What’s your emotional state? (Bored.)</p>
<p>Who else is around? (No one.)</p>
<p>What action preceded the urge? (Answered an e-mail.)</p>
<p>The next day I did the same thing. And the next. Pretty soon, the cue was clear: I always felt an urge to snack around 3:30.</p>
<p>Once I figured out all the parts of the loop, it seemed fairly easy to change my habit. But the psychologists and neuroscientists warned me that, for my new behavior to stick, I needed to abide by the same principle that guided Procter &amp; Gamble in selling Febreze: To shift the routine — to socialize, rather than eat a cookie — I needed to piggyback on an existing habit. So now, every day around 3:30, I stand up, look around the newsroom for someone to talk to, spend 10 minutes gossiping, then go back to my desk. The cue and reward have stayed the same. Only the routine has shifted. It doesn’t feel like a decision, any more than the M.I.T. rats made a decision to run through the maze. It’s now a habit. I’ve lost 21 pounds since then (12 of them from changing my cookie ritual).</p>
<p><strong>After Andrew Pole</strong> built his pregnancy-prediction model, after he identified thousands of female shoppers who were most likely pregnant, after someone pointed out that some of those women might be a little upset if they received an advertisement making it obvious Target was studying their reproductive status, everyone decided to slow things down.</p>
<p>The marketing department conducted a few tests by choosing a small, random sample of women from Pole’s list and mailing them combinations of advertisements to see how they reacted.</p>
<p>“We have the capacity to send every customer an ad booklet, specifically designed for them, that says, ‘Here’s everything you bought last week and a coupon for it,’ ” one Target executive told me. “We do that for grocery products all the time.” But for pregnant women, Target’s goal was selling them baby items they didn’t even know they needed yet.</p>
<p>“With the pregnancy products, though, we learned that some women react badly,” the executive said. “Then we started mixing in all these ads for things we knew pregnant women would never buy, so the baby ads looked random. We’d put an ad for a lawn mower next to diapers. We’d put a coupon for wineglasses next to infant clothes. That way, it looked like all the products were chosen by chance.</p>
<p>“And we found out that as long as a pregnant woman thinks she hasn’t been spied on, she’ll use the coupons. She just assumes that everyone else on her block got the same mailer for diapers and cribs. As long as we don’t spook her, it works.”</p>
<p>In other words, if Target piggybacked on existing habits — the same cues and rewards they already knew got customers to buy cleaning supplies or socks — then they could insert a new routine: buying baby products, as well. There’s a cue (“Oh, a coupon for something I need!”) a routine (“Buy! Buy! Buy!”) and a reward (“I can take that off my list”). And once the shopper is inside the store, Target will hit her with cues and rewards to entice her to purchase everything she normally buys somewhere else. As long as Target camouflaged how much it knew, as long as the habit felt familiar, the new behavior took hold.</p>
<p>Soon after the new ad campaign began, Target’s Mom and Baby sales exploded. The company doesn’t break out figures for specific divisions, but between 2002 — when Pole was hired — and 2010, Target’s revenues grew from $44 billion to $67 billion. In 2005, the company’s president, Gregg Steinhafel, boasted to a room of investors about the company’s “heightened focus on items and categories that appeal to specific guest segments such as mom and baby.”</p>
<p>Pole was promoted. He has been invited to speak at conferences. “I never expected this would become such a big deal,” he told me the last time we spoke.</p>
<p><strong>A few weeks</strong> before this article went to press, I flew to Minneapolis to try and speak to Andrew Pole one last time. I hadn’t talked to him in more than a year. Back when we were still friendly, I mentioned that my wife was seven months pregnant. We shop at Target, I told him, and had given the company our address so we could start receiving coupons in the mail. As my wife’s pregnancy progressed, I noticed a subtle upswing in the number of advertisements for diapers and baby clothes arriving at our house.</p>
<p>Pole didn’t answer my e-mails or phone calls when I visited Minneapolis. I drove to his large home in a nice suburb, but no one answered the door. On my way back to the hotel, I stopped at a Target to pick up some deodorant, then also bought some T-shirts and a fancy hair gel. On a whim, I threw in some pacifiers, to see how the computers would react. Besides, our baby is now 9 months old. You can’t have too many pacifiers.</p>
<p>When I paid, I didn’t receive any sudden deals on diapers or formula, to my slight disappointment. It made sense, though: I was shopping in a city I never previously visited, at 9:45 p.m. on a weeknight, buying a random assortment of items. I was using a corporate credit card, and besides the pacifiers, hadn’t purchased any of the things that a parent needs. It was clear to Target’s computers that I was on a business trip. Pole’s prediction calculator took one look at me, ran the numbers and decided to bide its time. Back home, the offers would eventually come. As Pole told me the last time we spoke: “Just wait. We’ll be sending you coupons for things you want before you even know you want them.”</p>
<p><a href="mailto:caduhigg@gmail.com">Charles Duhigg</a> is a staff writer for The Times and author of &quot;<a href="http://www.thepowerofhabit.com/">The Power of Habit: Why We Do What We Do in Life and Business</a>,&quot; which will be published on Feb. 28. Follow him on <a href="https://twitter.com/cduhigg">Twitter</a> and on <a href="https://www.facebook.com/charlesduhigg">Facebook</a>.</p>
<p>Editor: <a href="mailto:j.lovell-MagGroup@nytimes.com">Joel Lovell</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/zzhow-companies-learn-your-secrets/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>生老病死</title>
		<link>http://yyh.im/lifecycle</link>
		<comments>http://yyh.im/lifecycle#comments</comments>
		<pubDate>Wed, 11 Jan 2012 03:31:00 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[在地球的日子]]></category>
		<category><![CDATA[心情]]></category>
		<category><![CDATA[人生]]></category>
		<category><![CDATA[医院]]></category>

		<guid isPermaLink="false">http://yyh.im/lifecycle</guid>
		<description><![CDATA[近日返还乡下，回到村里，爷爷见到我后，颤抖艰难地站起来，马上忍不住就哭了起来，讲话已经退化几乎听不出来是什么了。心里特别不是滋味，每次回家探望爷爷，逢过节日，想到这都有可能是最后一次和爷爷一起过了。相比之下死亡真不可怕，因为死亡接近而无可奈何的绝望心情才最令人生畏。 这几个月来听到的病例术语，知道的药，去医院的次数比以前这么多年都多，反而淡然起来。这段时间死亡论题摆在面前的，有自己的至亲，也有老友的挚亲，想要安慰的时候才发现无论说什么都是那么的无力的，能做的唯有更加珍惜自己，珍惜身边人，照顾好在意的人。 今天姐去医院了，昨晚奋战到今天，BB貌似知道冬天冷舍不得出来。家人都在忙活着，用还珠2紫薇的话来说，就是“又担心，又快乐，又害怕，又兴奋，又痛苦，又幸福”，那就“让我们来好好享受这一刻吧”！]]></description>
			<content:encoded><![CDATA[<p>近日返还乡下，回到村里，爷爷见到我后，颤抖艰难地站起来，马上忍不住就哭了起来，讲话已经退化几乎听不出来是什么了。心里特别不是滋味，每次回家探望爷爷，逢过节日，想到这都有可能是最后一次和爷爷一起过了。相比之下死亡真不可怕，因为死亡接近而无可奈何的绝望心情才最令人生畏。</p>
<p>这几个月来听到的病例术语，知道的药，去医院的次数比以前这么多年都多，反而淡然起来。这段时间死亡论题摆在面前的，有自己的至亲，也有老友的挚亲，想要安慰的时候才发现无论说什么都是那么的无力的，能做的唯有更加珍惜自己，珍惜身边人，照顾好在意的人。</p>
<p>今天姐去医院了，昨晚奋战到今天，BB貌似知道冬天冷舍不得出来。家人都在忙活着，用还珠2紫薇的话来说，就是“又担心，又快乐，又害怕，又兴奋，又痛苦，又幸福”，那就“让我们来好好享受这一刻吧”！</p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/lifecycle/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zz&#8220;品质在于构建过程&#8221;吗？</title>
		<link>http://yyh.im/zz-is-the-build-quality-of-the-process-of-do</link>
		<comments>http://yyh.im/zz-is-the-build-quality-of-the-process-of-do#comments</comments>
		<pubDate>Mon, 17 Oct 2011 03:17:00 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[分享是美德]]></category>
		<category><![CDATA[工程]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://yyh.im/zz-is-the-build-quality-of-the-process-of-do</guid>
		<description><![CDATA[程序员、架构师，技巧、感悟与职业分享 “品质在于构建过程”吗？ 注：本文转载自weidagang的博文 今天在微博上看到几位敏捷爱好者（本着讨论问题的态度故隐其名）探讨敏捷测试和质量保证问题，我忍不住也加入了讨论： Z先生原帖：我刚才看到一个大会演讲稿，谈到敏捷测试六大指导原则：1.仅靠测试人员不可能获得高质量的软件，质量是整个研发团队的责任；2. 场景是不可穷举的，测试活动必须是风险驱动的，关注于高风险的场景；3.分层自动化测试是唯一出路;4.在正确的位置进行恰当的测试是自动化的关键；【待续】 S先生回复：品质在于构建过程。检验贯穿构建过程，提供及时反馈。 我回复：什么样的构建过程才能出Unix这样的品质呢？迭代？快速反馈？TDD? S先生回复：据说stroustrup听到重构时的反应是，我们从七十年代就这样做了。推荐《UNIX编程环境》，了解大师的编程方式。 我回复：您偷换了概念。不能说大师用了重构，C++和UNIX的品质就是靠重构或某种构建过程得来的。厨师做菜用到了勺子，不等于菜好吃是因为勺子。 S先生回复：我没有概念。我们看到一个果，就问因是什么。其实是泛因果，无因果，一切是机缘凑巧。 我回复：“品质在于构建过程”难道不是一个明白的因果描述吗？ S先生回复：品质在于构建的人。我说话时没因果，你看到了因果。 我回复：欢迎敏捷爱好者围观！ 很高兴几个回合讨论下来S先生修正了先前“品质在于构建过程”的观点。什么重构、TDD、迭代、快速反馈等等构建过程都不是Unix品质的核心要素。我不但不认同“品质在于构建过程”、“测试是最好的设计方法”这类机械式的观点，而且也不满意把软件优劣归结于“人是根本”的简单回答。我们需要探索一个既非机械式的，也非简单地归结为某种理念的更深刻的答案。 像Unix这样优秀的软件，真正的核心要素到底是什么呢？我的答案是：模型，即人心中的软件。在看得见、摸得着之前，Unix的品质就已经存在于设计者的心中了，他们不会在Unix诞生后惊讶：“哇，Unix的稳定性这么好，7&#215;24小时运行，从来不蓝屏”。模型一定是设计者心中最美最自然的东西，为什么我们阅读操作系统源代码会像进入迷宫一般理不清头绪，而作者自己却觉得头头是道呢？因为作者心中早已依稀看到了那个美丽的作品，我们以为他几十万行代码敲很辛苦，实际上在他自己看来是自然地一步步向她靠近。 模型是软件的灵魂，存在于设计者的心中，而软件的构建过程正是心中的世界向现实世界逐渐投影。模型可以是完美的，而现实却非完美，或许有时候我们很幸运地到达了，或许有时候我们不得不向现实妥协，改变心中的世界。试图制造灯泡的爱迪生可能会一时找不到熔点极高的发光金属而止步不前，企图制造永动机的人则根本无法实现。在不完美的现实中，我们明明想的是a+b，却敲成了a-b；我们以为某个API可以很快返回，没想到却等了5秒钟，为了不阻塞用户不得不改成了异步。Review、测试等构建过程在一定程度上弥补了现实的不完美，并对模型给予了反馈，但它却无法决定软件的特质。Windows NT内核和Windows 3.1内核的品质差别不在于微软采用了两种不同的构建过程，而在于它们采用了不同的内核模型。灵魂与躯体的差别就在于此！虽然对于普通的软件开发通常有不少成熟的模型供选择，并不需要总是创造自己的模型，但理解模型间的差异，并在设计时选用恰当的模型仍然比采用某种构建过程更加重要。服务器架构采用Nginx似的异步IO模型，还是采用Apache似的每个请求一个线程的模型远比开发是否采用了TDD更为重要。 模型的产生是柔性的，主要源于灵感；过程的执行是刚性的，主要源于逻辑。苹果砸在牛顿的脑袋上能砸出万有引力模型，砸在我们脑袋上却只是“哎呦”一声；但一个苹果3元钱，两个苹果2*3=6元钱却在牛顿和我们面前是平等的。迷信灵感和迷信逻辑是两个错误的极端，孔子讲“天下国家可均也，爵禄可辞也，白刃可蹈也，中庸不可能也”，任何一项技能的高级阶段都是关于“度”的艺术。如同光具有波粒二象性，软件开发也具有艺术创作和工业生产的二象性，它包含了柔性的设计和刚性的过程。越是不成熟的前沿领域越表现出柔性特征；越是成熟的一般领域越表现出工业生产的特征。因此，一个以新产品为主的创业型公司应当更注重设计，更需要画家、诗人般的创造型人才；而业务成熟产品稳定的大公司应当更注重过程，更需要踏踏实实的生产线工人似的人才。但在当今这个瞬息万变的信息时代，即使是世界500强的大公司也越来越不稳定，越来越需要创新才能适应，所以即使大公司也不可忽视软件开发的柔性特征。同时，我们也不能迷信模型，过程同样可以成为企业的核心竞争力，比如：富士康。虚虚实实，实实虚虚，其妙无穷。老外做Nike品牌（虚），我们做代工生产（实），高额利润被老外拿走了；我们经营航空公司（虚），老外生产波音飞机（实）高价卖给我们，高额利润又被老外拿走了。靠虚取胜还是靠实取胜？这是个问题^_^ 或许我对于模型的描述不太让人满意，人们多习惯于那种有章可循的感觉，即便不是死板的知识，起码要找个“在某某思想的指导下”才觉得心里有着落。或许还有人说，模型的确重要，那么我们能不能有一个过程、模式或套路来推导出模型呢？比如，现在非常流行的从用户需求出发的分析模式，即“分析需求，抽象出共性，共性是本质的，本质是稳定的”，这类模式的特点符合人们希望找到套路的心理，一看就明白，容易操作，有成就感。我不否认这类模式的确可以得出可用的软件设计，沿用成熟的模型也未尝不可。但我们应该明白，心中的世界远比现实的世界更广大更美妙。世界是多元的，现有的东西（用户需求、成熟模型等）只代表了其中某几个维度的视图，设计者心中应当有更多的维度！用户需要一个文本编辑器，是设计者心中的世界决定了他交出的作品是Vi，还是Emacs，亦或是Notepad。亨利·福特说：“如果你问用户需要什么，他会告诉你一匹更快的马”。汽车源于福特心中的世界，这是一个比只有马的世界更多彩的世界。乔布斯是一个不重视市场调研的人，iPod，iPhone，iPad都不是发个问卷，做个市场调查看看用户需要什么的结果。Apple是乔布斯心中的世界在现实中的投影！所以，请打破“从用户需求出发”，“从模式出发”的迷信，释放你的想象力，让自己心中的世界去包容现实的世界吧！ 每个人心中都有一个属于自己的世界，牛顿运动定律是牛顿心中的世界，相对论是爱因斯坦心中的世界。哪一个才是本来的世界呢？有没有本来的世界呢？本来的世界是什么样子呢？… 老子给我们启示“道可道，非常道”，说得清，道得明，想得到的都不是永恒的真理，所以真理不可言说，对真理的探索永远没有止境……]]></description>
			<content:encoded><![CDATA[<h3>程序员、架构师，技巧、感悟与职业分享</h3>
<h6>“品质在于构建过程”吗？</h6>
<p> <strong> 注：<i>本文转载自<a href="http://www.cnblogs.com/weidagang2046/archive/2011/10/15/2213672.html">weidagang的博文</a></i>      <br /></strong> 今天在微博上看到几位敏捷爱好者（本着讨论问题的态度故隐其名）探讨敏捷测试和质量保证问题，我忍不住也加入了讨论：    <br /><b>Z先生原帖：</b>我刚才看到一个大会演讲稿，谈到敏捷测试六大指导原则：1.仅靠测试人员不可能获得高质量的软件，质量是整个研发团队的责任；2. 场景是不可穷举的，测试活动必须是风险驱动的，关注于高风险的场景；3.分层自动化测试是唯一出路;4.在正确的位置进行恰当的测试是自动化的关键；【待续】    <br /><b>S先生回复：</b>品质在于构建过程。检验贯穿构建过程，提供及时反馈。    <br /><b>我回复：</b>什么样的构建过程才能出Unix这样的品质呢？迭代？快速反馈？TDD?    <br /><b>S先生回复：</b>据说stroustrup听到重构时的反应是，我们从七十年代就这样做了。推荐《UNIX编程环境》，了解大师的编程方式。    <br /><b>我回复：</b>您偷换了概念。不能说大师用了重构，C++和UNIX的品质就是靠重构或某种构建过程得来的。厨师做菜用到了勺子，不等于菜好吃是因为勺子。    <br /><b>S先生回复：</b>我没有概念。我们看到一个果，就问因是什么。其实是泛因果，无因果，一切是机缘凑巧。    <br /><b>我回复：</b>“品质在于构建过程”难道不是一个明白的因果描述吗？    <br /><b>S先生回复：</b>品质在于构建的人。我说话时没因果，你看到了因果。    <br /><b>我回复：</b>欢迎敏捷爱好者围观！    <br /> 很高兴几个回合讨论下来S先生修正了先前“品质在于构建过程”的观点。什么重构、TDD、迭代、快速反馈等等构建过程都不是Unix品质的核心要素。我不但不认同“品质在于构建过程”、“测试是最好的设计方法”这类机械式的观点，而且也不满意把软件优劣归结于“人是根本”的简单回答。我们需要探索一个既非机械式的，也非简单地归结为某种理念的更深刻的答案。    <br /> 像Unix这样优秀的软件，真正的核心要素到底是什么呢？我的答案是：模型，即人心中的软件。在看得见、摸得着之前，Unix的品质就已经存在于设计者的心中了，他们不会在Unix诞生后惊讶：“哇，Unix的稳定性这么好，7&#215;24小时运行，从来不蓝屏”。模型一定是设计者心中最美最自然的东西，为什么我们阅读操作系统源代码会像进入迷宫一般理不清头绪，而作者自己却觉得头头是道呢？因为作者心中早已依稀看到了那个美丽的作品，我们以为他几十万行代码敲很辛苦，实际上在他自己看来是自然地一步步向她靠近。    <br /> 模型是软件的灵魂，存在于设计者的心中，而软件的构建过程正是心中的世界向现实世界逐渐投影。模型可以是完美的，而现实却非完美，或许有时候我们很幸运地到达了，或许有时候我们不得不向现实妥协，改变心中的世界。试图制造灯泡的爱迪生可能会一时找不到熔点极高的发光金属而止步不前，企图制造永动机的人则根本无法实现。在不完美的现实中，我们明明想的是a+b，却敲成了a-b；我们以为某个API可以很快返回，没想到却等了5秒钟，为了不阻塞用户不得不改成了异步。Review、测试等构建过程在一定程度上弥补了现实的不完美，并对模型给予了反馈，但它却无法决定软件的特质。Windows NT内核和Windows 3.1内核的品质差别不在于微软采用了两种不同的构建过程，而在于它们采用了不同的内核模型。灵魂与躯体的差别就在于此！虽然对于普通的软件开发通常有不少成熟的模型供选择，并不需要总是创造自己的模型，但理解模型间的差异，并在设计时选用恰当的模型仍然比采用某种构建过程更加重要。服务器架构采用Nginx似的异步IO模型，还是采用Apache似的每个请求一个线程的模型远比开发是否采用了TDD更为重要。    <br /> 模型的产生是柔性的，主要源于灵感；过程的执行是刚性的，主要源于逻辑。苹果砸在牛顿的脑袋上能砸出万有引力模型，砸在我们脑袋上却只是“哎呦”一声；但一个苹果3元钱，两个苹果2*3=6元钱却在牛顿和我们面前是平等的。迷信灵感和迷信逻辑是两个错误的极端，孔子讲“天下国家可均也，爵禄可辞也，白刃可蹈也，中庸不可能也”，任何一项技能的高级阶段都是关于“度”的艺术。如同光具有波粒二象性，软件开发也具有艺术创作和工业生产的二象性，它包含了柔性的设计和刚性的过程。越是不成熟的前沿领域越表现出柔性特征；越是成熟的一般领域越表现出工业生产的特征。因此，一个以新产品为主的创业型公司应当更注重设计，更需要画家、诗人般的创造型人才；而业务成熟产品稳定的大公司应当更注重过程，更需要踏踏实实的生产线工人似的人才。但在当今这个瞬息万变的信息时代，即使是世界500强的大公司也越来越不稳定，越来越需要创新才能适应，所以即使大公司也不可忽视软件开发的柔性特征。同时，我们也不能迷信模型，过程同样可以成为企业的核心竞争力，比如：富士康。虚虚实实，实实虚虚，其妙无穷。老外做Nike品牌（虚），我们做代工生产（实），高额利润被老外拿走了；我们经营航空公司（虚），老外生产波音飞机（实）高价卖给我们，高额利润又被老外拿走了。靠虚取胜还是靠实取胜？这是个问题^_^    <br /> 或许我对于模型的描述不太让人满意，人们多习惯于那种有章可循的感觉，即便不是死板的知识，起码要找个“在某某思想的指导下”才觉得心里有着落。或许还有人说，模型的确重要，那么我们能不能有一个过程、模式或套路来推导出模型呢？比如，现在非常流行的从用户需求出发的分析模式，即“分析需求，抽象出共性，共性是本质的，本质是稳定的”，这类模式的特点符合人们希望找到套路的心理，一看就明白，容易操作，有成就感。我不否认这类模式的确可以得出可用的软件设计，沿用成熟的模型也未尝不可。但我们应该明白，心中的世界远比现实的世界更广大更美妙。世界是多元的，现有的东西（用户需求、成熟模型等）只代表了其中某几个维度的视图，设计者心中应当有更多的维度！用户需要一个文本编辑器，是设计者心中的世界决定了他交出的作品是Vi，还是Emacs，亦或是Notepad。亨利·福特说：“如果你问用户需要什么，他会告诉你一匹更快的马”。汽车源于福特心中的世界，这是一个比只有马的世界更多彩的世界。乔布斯是一个不重视市场调研的人，iPod，iPhone，iPad都不是发个问卷，做个市场调查看看用户需要什么的结果。Apple是乔布斯心中的世界在现实中的投影！所以，请打破“从用户需求出发”，“从模式出发”的迷信，释放你的想象力，让自己心中的世界去包容现实的世界吧！    <br /> 每个人心中都有一个属于自己的世界，牛顿运动定律是牛顿心中的世界，相对论是爱因斯坦心中的世界。哪一个才是本来的世界呢？有没有本来的世界呢？本来的世界是什么样子呢？… 老子给我们启示“道可道，非常道”，说得清，道得明，想得到的都不是永恒的真理，所以真理不可言说，对真理的探索永远没有止境……</p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/zz-is-the-build-quality-of-the-process-of-do/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QQ网购上线3天不完全体验</title>
		<link>http://yyh.im/qq-on-line-three-days-online-shopping-experience-is-not-entirely</link>
		<comments>http://yyh.im/qq-on-line-three-days-online-shopping-experience-is-not-entirely#comments</comments>
		<pubDate>Wed, 12 Oct 2011 13:47:00 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[产品]]></category>
		<category><![CDATA[学无止境]]></category>
		<category><![CDATA[版本围观]]></category>
		<category><![CDATA[QQ网购]]></category>

		<guid isPermaLink="false">http://yyh.im/qq-on-line-three-days-online-shopping-experience-is-not-entirely</guid>
		<description><![CDATA[2011年10月11号buy.qq.com上线之后马上小体验了主要功能： 看点： 1）物流延迟补偿红包 2）商品主要来自易迅、一号店、好乐买、珂兰钻石等某个垂直类目的B2C商家，不会正品旗号卖假货 3）看到有广东用户上午下单下午送到，而且快递外包装是buy.qq.com，是对供应商快递包装做了要求？ 发现的问题： 1）网站前端细节问题较多。 例如商品描述直接生硬地从原商家进行文本和图片的复制然后进行排版，而没有对商品描述信息进行很好地组织；商品属性、参数、售后、注意事项等一股脑摆在一个页面导致查看不方便；商品评论和描述都直接留空（为什么不先隐藏等做好了再显示呢？）。如果能和供应商协议按照商品的category提供不同格式的数据并用Tab等形式改善展示就好了。11号一上线就下了个单，12号发现商品描述已经有改善，去掉了一些供应商专用的描述，动作好快（好想知道从发现问题到最终落实修改的流程。) 又如：优惠券的显示，显凌乱感且容易造成疑惑， 2）有些地方概念不一致，比如“全场免运费ing”其实只适用家电、金额大于阈值的超市订单等，而所有订单到支付流程前都显示运费“还没计算”“运费另算”，无论对实际要付运费还是不要付运费的买家来说都是一个misleading。 3）结算支付流程问题，体现在： 把流程分散在4个页面，完成交易至少要经历4次页面加载或刷新，如果要返回修改需要时间更长。（进度问题？） “选择付款方式”步骤只有两个选项（对于不支持货到付款的商品就只有“在线支付”一个选项），而在线支付最后还需要选一次银行或者财付通余额，若都放在一个页面的话平均点击1.5次可以减为1次。 “去结帐”按钮在前后不同阶段出现了两次，给人沮丧感 4）奇怪的文案：这次发布的范围不算小，应该做好基本的体验才大范围发布的，刚上线的QQ网购在进度和质量间的tradeoff做的不能让人满意。看到“我并不完美，尚不惊艳，没有出生含玉的荣华，我拥有的，是你的理解和包容”，从用户角度我看到了想说的是“早干嘛去了” &#160; 思考和疑问： 窃以为，QQ网购所谓B2B2C的模式，仅做了线上部分，对于线下最核心的仓储和物流环节介入很浅，通过合约方式来保证供应商的仓储物流售后质量？看起来很美，到后期斗供应链整合能力难道不会很吃力？跟京东的产业链开放、淘宝的商业开放平台相比，QQ网购后续优势在哪里？]]></description>
			<content:encoded><![CDATA[<p>2011年10月11号buy.qq.com上线之后马上小体验了主要功能：</p>
<p>看点：</p>
<p>1）物流延迟补偿红包</p>
<p>2）商品主要来自易迅、一号店、好乐买、珂兰钻石等某个垂直类目的B2C商家，不会正品旗号卖假货</p>
<p>3）看到有广东用户上午下单下午送到，而且快递外包装是buy.qq.com，是对供应商快递包装做了要求？</p>
<p>发现的问题：</p>
<p>1）网站前端细节问题较多。</p>
<p>例如商品描述直接生硬地从原商家进行文本和图片的复制然后进行排版，而没有对商品描述信息进行很好地组织；商品属性、参数、售后、注意事项等一股脑摆在一个页面导致查看不方便；商品评论和描述都直接留空（为什么不先隐藏等做好了再显示呢？）。如果能和供应商协议按照商品的category提供不同格式的数据并用Tab等形式改善展示就好了。11号一上线就下了个单，12号发现商品描述已经有改善，去掉了一些供应商专用的描述，动作好快（好想知道从发现问题到最终落实修改的流程。)</p>
<p>又如：优惠券的显示，显凌乱感且容易造成疑惑，</p>
<p><a href="http://yyh.im/wp-content/uploads/2011/10/image.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://yyh.im/wp-content/uploads/2011/10/image_thumb.png" width="702" height="457" /></a></p>
<p>2）有些地方概念不一致，比如“全场免运费ing”其实只适用家电、金额大于阈值的超市订单等，而所有订单到支付流程前都显示运费“还没计算”“运费另算”，无论对实际要付运费还是不要付运费的买家来说都是一个misleading。</p>
<p><a href="http://yyh.im/wp-content/uploads/2011/10/image1.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://yyh.im/wp-content/uploads/2011/10/image_thumb1.png" width="702" height="324" /></a></p>
<p>3）结算支付流程问题，体现在：</p>
<ul>
<li>把流程分散在4个页面，完成交易至少要经历4次页面加载或刷新，如果要返回修改需要时间更长。（进度问题？）</li>
<li>“选择付款方式”步骤只有两个选项（对于不支持货到付款的商品就只有“在线支付”一个选项），而在线支付最后还需要选一次银行或者财付通余额，若都放在一个页面的话平均点击1.5次可以减为1次。</li>
<li>“去结帐”按钮在前后不同阶段出现了两次，给人沮丧感</li>
</ul>
<p>4）奇怪的文案：这次发布的范围不算小，应该做好基本的体验才大范围发布的，刚上线的QQ网购在进度和质量间的tradeoff做的不能让人满意。看到“我并不完美，尚不惊艳，没有出生含玉的荣华，我拥有的，是<strong><font color="#ff0000">你</font></strong>的理解和包容”，从用户角度我看到了想说的是“早干嘛去了”</p>
<p><a href="http://yyh.im/wp-content/uploads/2011/10/image2.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://yyh.im/wp-content/uploads/2011/10/image_thumb2.png" width="702" height="372" /></a></p>
<p>&#160;</p>
<p>思考和疑问：</p>
<p>窃以为，QQ网购所谓B2B2C的模式，仅做了线上部分，对于线下最核心的仓储和物流环节介入很浅，通过合约方式来保证供应商的仓储物流售后质量？看起来很美，到后期斗供应链整合能力难道不会很吃力？跟京东的产业链开放、淘宝的商业开放平台相比，QQ网购后续优势在哪里？</p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/qq-on-line-three-days-online-shopping-experience-is-not-entirely/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kindle&amp;iDevices&amp;Nokia</title>
		<link>http://yyh.im/kindle-idevices-nokia</link>
		<comments>http://yyh.im/kindle-idevices-nokia#comments</comments>
		<pubDate>Fri, 07 Oct 2011 11:07:52 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[产品]]></category>
		<category><![CDATA[学无止境]]></category>
		<category><![CDATA[版本围观]]></category>
		<category><![CDATA[观点]]></category>
		<category><![CDATA[iphone4s]]></category>
		<category><![CDATA[kindle]]></category>
		<category><![CDATA[nokia]]></category>

		<guid isPermaLink="false">http://yyh.im/?p=846</guid>
		<description><![CDATA[1.Kindle. Kindle真是个很赞的产品，人性化，简单，专注，便宜。Wishpersync，E-INK，续航能力这三点就足以值得购买了。但是更值得学习的是Amazon卖互补品来盈利，甚至比盈利更多，说kindle实现了电子书对纸质书的超越，改变市场，培养用户习惯，也不为过。虽然idea很直观，交叉销售，但是执行起来并取得成效实在需要惊人的effort，值得敬佩。分享看过的两篇amazon的文章： 《IT经理世界》封面：亚马逊的三个顾客&#160; 《亚马逊三法则：改善 用户 数据》 2.iPhone 4S，开始还调侃说iPhone for ass,然后就是坏消息。4S 硬件的提升没有惊喜，但是最重要的两个更新是iCloud和Siri。开始可能觉得Siri有点吹，怀疑是不是vaporware，语音识别已经被煮烂了，voice action应用也不少，但是siri的门槛有2点，一是自然语言识别，可以根据语境，位置，时间，上下文来识别句子的语义；还有就是iPhone的整合能力，把APP们结合到siri的使用情景里，这也许是新的“入口”，抢的就不只是搜索的份额了。当然，因为对网络的要求，对于中文语音的自然语言识别也有更高的难度，在中国很可能成为鸡肋，何况在这篇神奇的大陆上还有个更加AI的产品，完全人工，绝对智能，那就是12580. 3.Nokia. 看百度手机行业数据报告，2010年关注度最高的前20个手机还有11个是诺基亚的，可是一年之间世道确实变了不少，尤其智能手机市场格局已如之前人们的预测一般。尽管如此，诺基亚无论是从中低端市场还是整个手机市场来看都还是一个巨头。诺基亚不死，你信还是不信，我反正信。10月份会出两款WP7手机，WP7的应用商店没有Apple app store和Android market那么有声有色如火如荼，但是winows phone 还是值得期待。移动设备本质价值比app们带来的要多的去，能提供ubiquitous computing服务，最有能力的当属微软。不被成功的商业模式绑架，才能真正的去发挥Mobile的无限空间。windows 8电脑+win8平板+windows phone+xbox，服务的整合提供的是体验，像不像《体验经济》说的那样？当然，前提是给点力啊。]]></description>
			<content:encoded><![CDATA[<p>1.Kindle. Kindle真是个很赞的产品，人性化，简单，专注，便宜。Wishpersync，E-INK，续航能力这三点就足以值得购买了。但是更值得学习的是Amazon卖互补品来盈利，甚至比盈利更多，说kindle实现了电子书对纸质书的超越，改变市场，培养用户习惯，也不为过。虽然idea很直观，交叉销售，但是执行起来并取得成效实在需要惊人的effort，值得敬佩。分享看过的两篇amazon的文章： <a href="http://news.ccw.com.cn/news2/worldIt/htm2011/20110421_924724_2.shtml" target="_blank"><u><strong>《IT经理世界》封面：亚马逊的三个顾客</strong></u></a>&#160; <a href="http://www.iceo.com.cn/shangye/36/2011/0402/214065.shtml" target="_blank"><strong><u>《亚马逊三法则：改善 用户 数据》</u></strong></a></p>
<p>2.iPhone 4S，开始还调侃说iPhone for ass,然后就是坏消息。4S 硬件的提升没有惊喜，但是最重要的两个更新是iCloud和Siri。开始可能觉得Siri有点吹，怀疑是不是vaporware，语音识别已经被煮烂了，voice action应用也不少，但是siri的门槛有2点，一是自然语言识别，可以根据语境，位置，时间，上下文来识别句子的语义；还有就是iPhone的整合能力，把APP们结合到siri的使用情景里，这也许是新的“入口”，抢的就不只是搜索的份额了。当然，因为对网络的要求，对于中文语音的自然语言识别也有更高的难度，在中国很可能成为鸡肋，何况在这篇神奇的大陆上还有个更加AI的产品，完全人工，绝对智能，那就是12580.</p>
<p>3.Nokia. 看百度手机行业数据报告，2010年关注度最高的前20个手机还有11个是诺基亚的，可是一年之间世道确实变了不少，尤其智能手机市场格局已如之前人们的预测一般。尽管如此，诺基亚无论是从中低端市场还是整个手机市场来看都还是一个巨头。诺基亚不死，你信还是不信，我反正信。10月份会出两款WP7手机，WP7的应用商店没有Apple app store和Android market那么有声有色如火如荼，但是winows phone 还是值得期待。移动设备本质价值比app们带来的要多的去，能提供ubiquitous computing服务，最有能力的当属微软。不被成功的商业模式绑架，才能真正的去发挥Mobile的无限空间。windows 8电脑+win8平板+windows phone+xbox，服务的整合提供的是体验，像不像《体验经济》说的那样？当然，前提是给点力啊。</p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/kindle-idevices-nokia/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>励志书籍:《秘密》&#8211;朗达拜恩</title>
		<link>http://yyh.im/the-secret</link>
		<comments>http://yyh.im/the-secret#comments</comments>
		<pubDate>Tue, 27 Sep 2011 13:08:59 +0000</pubDate>
		<dc:creator>海鱼</dc:creator>
				<category><![CDATA[天马在行空]]></category>
		<category><![CDATA[杂汇]]></category>
		<category><![CDATA[火花]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[secret]]></category>

		<guid isPermaLink="false">http://yyh.im/the-secret</guid>
		<description><![CDATA[&#160; 《秘密》by 朗达.拜恩。 主题：吸引力法则。你一直想的是什么，什么就会发生，不管好坏。 还有时间的可以往下拖—— 这书使用励志类心灵类书籍的多种常用手法： 1.重复，恒源祥式的重复，全书讲的话会重复多次以很高的相似度出现在每个章节，你就是会成功，你就是会xing福，一切都会好的，还没好吗？放心，一切都会好的，还没好吗？放心，一切都会好的，还没好吗？放心，一切都会好的，还没好吗？放心，一切都会好的，还没好吗？放心。。。。。。。 2.假前提，这个法则就是这样的，为什么？因为你想到的就会发生，不可能你想到的不发生，没想到的我偏偏要给你发生，这是不对的，因为这违反了吸引力法则呀！还不信？那我告诉你一个故事，从前有个什么家，他信了，后来他成功了。 当然，以上表述只是指出这本优秀书籍中微不足道的小瑕疵而已，甚至不能说是瑕疵，本身净化心灵的东西就是需要强调和重复才能体会，要不然和尚们都不诵经文了。抛开外在，我看到的是： 吸引力法则，你一直在想的就会发生。虽然作者很野蛮地告诉我们就是这样的就是这样的真的他妈就是这样的，但是还是可以解释的，1.心理暗示；2.一直在想着的事情，更容易意识到它的发生，也就是它不容易被错过了；3.把宇宙中除自己外的部分当成一个整体黑盒，自己对宇宙的影响总是趋向自己脑中所描述的，只是效果显著与否罢了，纵使我们一下子很难穷举各种所有的因果推导，有总比无要好。我们没有完全从生化科学的分析来解释良好心情对病患痊愈的积极作用，但效果确实存在。 吸引力法则应用，找到“”注意力转移物”，每当你看到这个东西，心情就会变好，可以是一件东西，可以是一个对自己很重要的人。“感恩”“爱”是最好用的两个转移物属性。 不沉溺抱怨，不去抵抗不希望的现实或者可能性，而从正面去支持希望得到的结果，少喷，多干，很有用。 “力量的真正秘密，就是去意识到力量的存在”——爱黙生 翻译一下就是，你不是没办法不2，你只是还没意识到你2而已。 视觉化。在脑袋里塑造你希望的东西或者场景，想得到就能做得到。没错，可以用两个字来概括了，那就是意淫。当然不是简单地把最后的结果白日梦出来，还需要更具体的可操作的过程。就像没有飞机前YY有只大鸟（niǎo）载着两兄弟，就像没有企鹅前YY出各种乱方便的功能，就好像鸡后来变成鸭鸭后来变成羊，羊后来变成牛牛后来就共产主义了。 谢谢三姑娘推荐。]]></description>
			<content:encoded><![CDATA[<p><a href="http://yyh.im/wp-content/uploads/2011/09/image25.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://yyh.im/wp-content/uploads/2011/09/image_thumb25.png" width="219" height="297" /></a></p>
<p>&#160;</p>
<p>《秘密》by 朗达.拜恩。</p>
<p>主题：吸引力法则。你一直想的是什么，什么就会发生，不管好坏。</p>
<p>还有时间的可以往下拖——</p>
<p>这书使用励志类心灵类书籍的多种常用手法：    <br />1.重复，恒源祥式的重复，全书讲的话会重复多次以很高的相似度出现在每个章节，你就是会成功，你就是会xing福，一切都会好的，还没好吗？放心，一切都会好的，还没好吗？放心，一切都会好的，还没好吗？放心，一切都会好的，还没好吗？放心，一切都会好的，还没好吗？放心。。。。。。。    <br />2.假前提，这个法则就是这样的，为什么？因为你想到的就会发生，不可能你想到的不发生，没想到的我偏偏要给你发生，这是不对的，因为这违反了吸引力法则呀！还不信？那我告诉你一个故事，从前有个什么家，他信了，后来他成功了。    </p>
<p>当然，以上表述只是指出这本优秀书籍中微不足道的小瑕疵而已，甚至不能说是瑕疵，本身净化心灵的东西就是需要强调和重复才能体会，要不然和尚们都不诵经文了。抛开外在，我看到的是：</p>
<ul>
<li>吸引力法则，你一直在想的就会发生。虽然作者很野蛮地告诉我们就是这样的就是这样的真的他妈就是这样的，但是还是可以解释的，1.心理暗示；2.一直在想着的事情，更容易意识到它的发生，也就是它不容易被错过了；3.把宇宙中除自己外的部分当成一个整体黑盒，自己对宇宙的影响总是趋向自己脑中所描述的，只是效果显著与否罢了，纵使我们一下子很难穷举各种所有的因果推导，有总比无要好。我们没有完全从生化科学的分析来解释良好心情对病患痊愈的积极作用，但效果确实存在。</li>
<li>吸引力法则应用，找到“”注意力转移物”，每当你看到这个东西，心情就会变好，可以是一件东西，可以是一个对自己很重要的人。“感恩”“爱”是最好用的两个转移物属性。</li>
<li>不沉溺抱怨，不去抵抗不希望的现实或者可能性，而从正面去支持希望得到的结果，少喷，多干，很有用。</li>
<li>“力量的真正秘密，就是去意识到力量的存在”——爱黙生     <br />翻译一下就是，你不是没办法不2，你只是还没意识到你2而已。</li>
<li>视觉化。在脑袋里塑造你希望的东西或者场景，想得到就能做得到。没错，可以用两个字来概括了，那就是意淫。当然不是简单地把最后的结果白日梦出来，还需要更具体的可操作的过程。就像没有飞机前YY有只大鸟（niǎo）载着两兄弟，就像没有企鹅前YY出各种乱方便的功能，就好像鸡后来变成鸭鸭后来变成羊，羊后来变成牛牛后来就共产主义了。</li>
</ul>
<p>谢谢三姑娘推荐。</p>
]]></content:encoded>
			<wfw:commentRss>http://yyh.im/the-secret/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

