<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
 <title>www.thoughtworks.com aggregator</title>
 <link>http://www.thoughtworks.com/blogs/current</link>
 <description>www.thoughtworks.com - aggregated feeds in category Current ThoughtWorkers</description>
 <language>en</language>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PlanetTw" /><feedburner:info uri="planettw" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><item>
 <title>Jaco Pretorius: Presence of a substring in Ruby</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/LDDaA8_oeJs/presence-of-a-substring-in-ruby.html</link>
 <description>&lt;p&gt;I just watched the &lt;a href="http://rubyreloaded.com/trickshots/"&gt;&amp;lsquo;Ruby Trick Shots&amp;rsquo; video&lt;/a&gt;.  This video basically shows a bunch of very useful methods, libraries and techniques you might be unaware of.  If you&amp;rsquo;re a Ruby developer I would highly recommend it.&lt;/p&gt;
&lt;p&gt;One of the &amp;lsquo;tricks&amp;rsquo; I found particularly interesting was checking for a substring.  Let&amp;rsquo;s say we have the following string, and we want to check if it contains the word &amp;lsquo;test&amp;rsquo;.&lt;/p&gt;
&lt;pre class="brush: ruby;"&gt;
s = "this is a test"
&lt;/pre&gt;
&lt;p&gt;The normal way of doing this would be to use a Regular expression.&lt;/p&gt;
&lt;pre class="brush: ruby;"&gt;
if s =~ /test/
  puts "Found the substring"
end
&lt;/pre&gt;
&lt;p&gt;I know many developers absolutely &lt;em&gt;love&lt;/em&gt; Regular expressions, but I&amp;rsquo;m not a fan.  I find them difficult to maintain and not intuitive at all.  (This is perhaps a discussion for another day)  In any case, a nice and easy way of testing to see if a substring exists is with the following snippet.&lt;/p&gt;
&lt;pre class="brush: ruby;"&gt;
if s["test"]
  puts "Found the substring"
end
&lt;/pre&gt;
&lt;p&gt;Here we are actually calling the [] method on the string class &amp;ndash; which will simply return &lt;strong&gt;nil&lt;/strong&gt; if the specified string doesn&amp;rsquo;t exist.  As far as I can tell the only downside here is that we can&amp;rsquo;t ignore the case of the substring.  If we want to do that we&amp;rsquo;ll have to revert back to the Regular expression.&lt;/p&gt;
&lt;pre class="brush: ruby;"&gt;
if s =~ /Test/i
  puts "Found the substring"
end
&lt;/pre&gt;
&lt;p&gt;The [] method will happily accept a Regular expression, but I think it&amp;rsquo;s probably better to stick with this syntax.  Happy coding.&lt;/p&gt;</description>
 <pubDate>Fri, 10 Feb 2012 07:00:22 -0800</pubDate>
<feedburner:origLink>http://www.jacopretorius.net/2012/02/presence-of-a-substring-in-ruby.html</feedburner:origLink></item>
<item>
 <title>Sahana Chattopadhyay: Links for 2012-02-09 [del.icio.us]</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/rDWqqrgATc8/sahana2802</link>
 <description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.idealog.com/blog/aggregation-and-curation-two-concepts-that-explain-a-lot-about-digital-change"&gt;Aggregation and curation: two concepts that explain a lot about digital change &amp;ndash; The Shatzkin Files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.mindmeister.com/fr/134760952/news-discovery-tools-2012-by-robin-good"&gt;News Discovery Tools 2012 by Robin Good - MindMeister Mind Map&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/TyjW/~4/8tsZ6SZgwH0" height="1" width="1"/&gt;</description>
 <pubDate>Fri, 10 Feb 2012 00:00:00 -0800</pubDate>
<feedburner:origLink>http://feedproxy.google.com/~r/blogspot/TyjW/~3/8tsZ6SZgwH0/sahana2802</feedburner:origLink></item>
<item>
 <title>Chen Jinzhou: ThoughtWorks 六年随笔</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/NxB3TZZhPwA/</link>
 <description>&lt;p&gt;行政发来贺信，你在&lt;a href='http://www.thoughtworks.com'&gt;ThoughtWorks&lt;/a&gt;(以下简写TW)满六年啦，并告知有点小钱供你自己买年度礼物，算公司的。想起来过去的工作岁月，不禁恍然，原来我已经待了六年了，是之前的工作经历加起来的两倍还要多。&lt;/p&gt;

&lt;p&gt;回忆录很难写。多半因为TW是一个纯粹却又难以被外界很快了解的公司。广告词上说的那些标签，如国际化、挑战、激情、扁平组织是完全靠谱的，虽然外人看起来早已没什么感觉，身在其中六年，这些标签基本上都体会过。&lt;/p&gt;

&lt;p&gt;记一些小事吧。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;关于出差&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;07年公司由于业务的原因搬到北京去，然后就开始了疯狂出差的日子。我记得07-09年三年时间里，我每天背着一个US Polo的包。&lt;a href='http://www.niufish.com/'&gt;王大爷&lt;/a&gt;看着我的包从崭新变得破旧，每次见我总忍不住奚落两句。包里常年装着电脑（有段时间是两台，Dell和Mac），还装着鼠标、移动硬盘，U盘，几张Story Card，名片，钥匙，护照，港澳通行证，身份证，户口卡，学历学位⋯⋯基本上我所有的身份证明都在这个破烂不堪的包里面。那段时间经常到处跑，隔几个月就要办新的签证，就得需要各种材料。经常搬家，最后住到了霍营，这些材料也就随身带着了。奥运会期间街上到处都是警察，有一次回的晚了被拦住问要身份证，一时之间没找到，掏出护照（比较大）给警察叔叔，警察叔叔翻了翻，看了看拓满出入境戳的护照，同情的对我说，小伙子，这么能跑啊。&lt;/p&gt;

&lt;p&gt;总体来说长差要比短差容易。越短挑战越大。出差时间越短，容错越少，只有为数不多的机会把事情作对，也更能锻炼人。我不喜欢旅游，总觉得没什么目的到处晃悠傻的很。但出差给了到处跑一个很好的借口，那段时间到处跑，与各种肤色、国籍、口音、语言、性格不同的人一起工作，这种体验很难得的。&lt;/p&gt;

&lt;p&gt;总体来说我在一个地方待不了太长时间。上一家公司我做了16个月，做遍了所有角色之后最后还是跑路，空间太有限了。而TW的出差，一些人认为难以承受，对我而言却显得甘之如饴。不同的地方，不同的食物，陌生的感觉，不同环境之间的冲突产生的创新想法，对我而言，待在一个地方是不会有这些成就感的。&lt;/p&gt;

&lt;p&gt;当然也有不爽的时候。一次是08年的十一国庆。那段时间本来期待着好好休假，但项目上的事情使人不得不往香港去一次，那个星期工作也没什么感觉；还有一次刚从国外回来，周五的下午，刚到办公室喝上一口水，被告知立刻飞往深圳，参加一个售前的工作。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;关于沟通&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;刚进公司的还是很谦虚的——初来乍到嘛，低调一点总没什么坏处。在第一个项目工作的时候，有一些比较难的任务，没跟其他人说，自己就悄悄的做了，做完也就淡淡的说了几句。奇怪的是，这种个人英雄主义不但没有得到想象中的掌声，还得到了一个“反馈”：这是团队的任务，不是你一个人的，做之前要与团队沟通清楚，别人说不定有更好的想法一起来做。&lt;/p&gt;

&lt;p&gt;我开始明白TW这家公司骨子里对“沟通”、“反馈”的重视。刚进公司的前半年里，我感觉与其他同事（其实也没多少，就十多个）沟通很困难——他们动不动就问“为什么？”问完了一个还有一个，问到你喘不过气来。刚开始往往是回答不上来的，因为一向是被动的接受这些道听途说的信息（书上的，演讲中的）等等，很少考虑背后的原因。不服气之下，开始研究和进行结构化思考的练习，后来准备在抛出观点的时候准备好了被问好几个为什么的回答，沟通就顺畅多了。坊间流传TW的人能喷，这都是在内部被喷得灰头土脸练出来的啊。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;关于软件追求&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;许多人加入TW的主要原因是Martin Fowler, 软件开发的教父级人物。我也不例外。很少见到对软件质量妥协的人，如果某个团队的测试覆盖率低于一个百分比（如80%），会受到毫不留情的质疑。对于现存的不堪使用的软件，身边的同事们会毫不留情的在自己的空闲时间开发出更好的替代产品出来。Selenium, XStream, iBatis, PicoContainer, 各类Mock框架等等等等，这是&lt;a href='http://opensource.thoughtworks.com'&gt;比较出名&lt;/a&gt;的，还有无数不出名但是在每个项目发生作用的，都代表了对软件以及软件创造生产力的认同与热爱。&lt;/p&gt;

&lt;p&gt;PS. 许多人喜欢数据，以下是6年工作期间的不完全准确数据：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;参与的项目数量：17+&lt;/li&gt;

&lt;li&gt;最长的交付项目：18个月&lt;/li&gt;

&lt;li&gt;最短的项目：6周&lt;/li&gt;

&lt;li&gt;角色（非职位）：大多数时间Developer，Project Manager, Tech Lead, BA, 售前，咨询师，分公司负责人，Developer，创业者&lt;/li&gt;

&lt;li&gt;工作形态：编码，设计，咨询，教练(Coach)，管理，开会，销售，业务分析&lt;/li&gt;

&lt;li&gt;涉及的平台： JavaEE, .NET, Rails, iOS, Android&lt;/li&gt;

&lt;li&gt;用到较多的编程语言：Java, Ruby, C#, Python, Javascript/HTML/CSS&lt;/li&gt;

&lt;li&gt;用到的较少的编程语言： NodeJS, Clojure, C/C++, Scala, Objective-C - 行业：零售，投资银行，互联网，电信，贷款，房地产，电子商务&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;广告：&lt;/strong&gt; 这种生活看起来有点意思，来TW与我一起工作？没耐心的读完我们&lt;a href='http://companyadc.51job.com/companyads/2012/bj/site0206_8728wh/index.htm'&gt;很酷的招聘广告&lt;/a&gt;？邮件给我 mechiland@gmail.com。&lt;a href='/archives/379/'&gt;不需要准备复杂的简历&lt;/a&gt;。&lt;/p&gt;</description>
 <pubDate>Fri, 10 Feb 2012 00:00:00 -0800</pubDate>
<feedburner:origLink>http://michael.nona.name/archives/6-years-in-thoughtworks/</feedburner:origLink></item>
<item>
 <title>Paul Hammant: Client-Side-MVC applications : best practice (part 1)</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/Z10w9vgqHgI/</link>
 <description>&lt;p&gt;I&amp;#8217;ve made a quick game &amp;#8211; &amp;#8220;Whack a Mole &amp;#8211; &lt;i&gt;Angular Edition&lt;/i&gt;&amp;#8221;.  Try clicking on the moles or holes:&lt;/p&gt;
&lt;p&gt;&lt;iframe style="text-align:left; width:450px; height:340px; background-color:transparent;" src="http://paul-hammant.github.com/whack_a_mole_angular/"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Hmm, the mole image has some lasso artifacts after I &lt;a href="http://en.wikipedia.org/wiki/Mole_(animal)"&gt;reappropriated it from wikipedia&lt;/a&gt;. Damn you CorelPaint!&lt;/p&gt;
&lt;p&gt;Now, look at the source (it&amp;#8217;s in an iframe so you&amp;#8217;ll see the minimum amount of &lt;span class="caps"&gt;HTML&lt;/span&gt;). Of if you trust me not to do some sleight of hand, you can look at the &lt;a href="https://github.com/paul-hammant/whack_a_mole_angular/blob/gh-pages/index.html"&gt;github source for that&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Aside from the 2 &amp;#215; 2 &lt;span class="caps"&gt;JSON&lt;/span&gt; &amp;#8220;moles&amp;#8221; document with a not-so-random &amp;#8220;up&amp;#8221; versus &amp;#8220;down&amp;#8221; state, the angular magic is:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://paulhammant.com/images/wam_1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The thing I want folks to really grok right now, is that there are two images in the source apparently side by side within each of the TD elements.  Specifically &amp;#8220;mole up&amp;#8221; and &amp;#8220;mole down&amp;#8221;.  It is Angular that&amp;#8217;s making one one of the two show at any one moment in time.  Gecko and Webkit are fast enough to not make it apparent that there is momentarily two or none of the images visible for a cell.  Perhaps Angular has no such tweening state, and is even in charge of the browser repaints.  The &lt;code&gt;ng:click&lt;/code&gt; stuff is where the model gets changed &amp;#8211; or rather the &amp;#8220;up&amp;#8221; becomes &amp;#8220;down&amp;#8221; or vice versa. &lt;code&gt;ng:click&lt;/code&gt; is attachable to any meaningful element of course.&lt;/p&gt;
&lt;p&gt;Here is what the source looks like in DreamWeaver&amp;#8217;s &lt;span class="caps"&gt;WYSIWYG&lt;/span&gt; mode for the single apparent cell before Angular re-does the &lt;span class="caps"&gt;DOM&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://paulhammant.com/images/wam_dreamweaver.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Yes that&amp;#8217;s the mole both apparently &lt;b&gt;alive&lt;/b&gt; and &lt;b&gt;dead&lt;/b&gt; at the same time&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s an alternate way of doing the same thing without the two image and &lt;code&gt;ng:show&lt;/code&gt; &amp;amp; &lt;code&gt;ng:hide&lt;/code&gt; trick, that I would count as a refactoring:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://paulhammant.com/images/wam_2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Whichever way you do it, the model drives the view (no JavaScript to shuttle back and forth values).  And the view mutates the model &amp;#8211; in this case via expressions co-located with &lt;span class="caps"&gt;HTML&lt;/span&gt;.  The Angular guys suggest that these things are better done with real JavaScript functions that can touch the model, and they are right as far as testability is concerned.  But there&amp;#8217;s a &lt;a href="http://www.pretotyping.org/"&gt;preotyping&lt;/a&gt; community that&amp;#8217;s &lt;i&gt;really&lt;/i&gt; going to dig Angular.  There&amp;#8217;s also a the likes of User Experience (UX) and Business Analysts folks who may like to join in somewhat in the actual development of functionality.&lt;/p&gt;
&lt;h2&gt;Business apps&lt;/h2&gt;
&lt;p&gt;You&amp;#8217;re going to be able to compose larger applications fairly easily, and leverage plenty of model following UI changing activities.  You&amp;#8217;re principal duty is to keep the model supporting the view, and refactoring as appropriate to fit the growing vision.  The hard stuff, you will still do in JavaScript, but I think that&amp;#8217;s the exception rather than the rule, as the Angular makes it all pretty easy.&lt;/p&gt;
&lt;p&gt;Consider a table of fruit in a page:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://paulhammant.com/images/fruits_1.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If clicked, a line could expand a little to accommodate more text:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://paulhammant.com/images/fruits_2.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;HTML&amp;#8217;s &lt;b&gt;rowspan&lt;/b&gt; might be the Angular triggered UI trick to accommodate that, by the &lt;code&gt;ng:click&lt;/code&gt; would trigger an &lt;code&gt;'expanded = true'&lt;/code&gt; model change for the fruit in question. As retrieved from the database the fruit never had a &lt;code&gt;'expanded = false'&lt;/code&gt; node, let alone &lt;code&gt;'expanded = true'&lt;/code&gt;, but that does not matter as in the worse case scenario, your could ignore such properties when attempting to write the fruits back to the database (if they were editable in-situ).  Your &lt;i&gt;original&lt;/i&gt; &lt;span class="caps"&gt;JSON&lt;/span&gt; document to support the list of fruit might only have enough text to support the collapsed list of fruit.  If that&amp;#8217;s the case, you&amp;#8217;d do an &lt;span class="caps"&gt;AJAX&lt;/span&gt; wire call to get the expanded fruit description, and populate an &amp;#8216;expandedFruit&amp;#8217; object outside the &amp;#8216;fruits&amp;#8217; model.  Only one fruit is expanded at a time, so it could easily be a single field.  Judicious use of &lt;code&gt;ng:show&lt;/code&gt; again will make the right control of two show within the &amp;lt;td&amp;gt; .. &amp;lt;/td&amp;gt; elements.&lt;/p&gt;
&lt;p&gt;Or some form of overlay could happen:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://paulhammant.com/images/fruits_3.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The same backend model, &lt;span class="caps"&gt;AJAX&lt;/span&gt; fetch, and &lt;code&gt;expandedText&lt;/code&gt; field, but a different view still driven by &lt;code&gt;ng:show&lt;/code&gt;.  You could refactor from one design to the other.  Indeed the UX person could do so without developer help.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;All of a sudden, web apps became simpler to make (again).&lt;/b&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/paulhammant/~4/CFa1O2agbx8" height="1" width="1"/&gt;</description>
 <pubDate>Fri, 10 Feb 2012 00:00:00 -0800</pubDate>
<feedburner:origLink>http://feedproxy.google.com/~r/paulhammant/~3/CFa1O2agbx8/</feedburner:origLink></item>
<item>
 <title>Li Xiao: tail recursion in ruby</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/-mqothxyN8I/build-development-build-grid-by-dtr-003.html</link>
 <description>&lt;div&gt;&lt;div&gt;&lt;div&gt;Recently, I got asked what's the point to write a tail recursion in ruby. I actually didn't think about the details about TCO support when I wrote tail recursion version code. Basically, I like code perform fast, but I'm also like readable code. Tail recursion in most of case, I don't need care about stack overflow problem. It's the idea is important to me. I even write recursion code in lots of cases, because it's clean and clear.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyway, I did some google search about it, and wrote several versions of fibonacci function to test it out in ruby.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It turns out, ruby 1.9 has native TCO support, but it's not enabled by default, because TCO is a implementation details in ruby 1.9 and other platforms like JRuby does have trouble to implement it as a feature (not much time to find it out by Google).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I also found a blog (http://timelessrepo.com/tailin-ruby) has interesting details about tail recursion support, and Magnus (author of the blog) also showed code how to enable TCO in ruby 1.9.2.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Glad it's supported, and tested it with my fib function code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SystemStackError: stack level too deep&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Mmmm....&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I checked my code several times, it is definitely tail recursion, ran in ruby 1.9.2 and enabled TCO:&lt;/div&gt;&lt;pre&gt;def fib_tc(n)&lt;br /&gt;fib_tc_it(1, 1, n)&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;def fib_tc_it(n1, n2, c)&lt;br /&gt;case c&lt;br /&gt;when 1&lt;br /&gt;  n2&lt;br /&gt;when 2&lt;br /&gt;  n1&lt;br /&gt;else&lt;br /&gt;  fib_tc_it(n1 + n2, n1, c-1)&lt;br /&gt;end&lt;br /&gt;end&lt;/pre&gt;&lt;div&gt;So, what's the hack of TOC supporting ? OK, maybe there is bug?&lt;/div&gt;&lt;div&gt;Tried ruby 1.9.3, still same.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some time, OK, it always happen, it won't work if I just copied some code (I copied code of enable TCO in ruby from the blog I mentioned) when I try something.&lt;/div&gt;&lt;div&gt;So, let's copy the fib function too.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It works!&lt;/div&gt;&lt;div&gt;Damn, what's different?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It turns out, case/when/else doesn't work with TCO, if/elsif/else works.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, the following version works:&lt;/div&gt;&lt;pre&gt;def fib_tc_it(n1, n2, c)&lt;br /&gt;if c == 1&lt;br /&gt;  n2&lt;br /&gt;elsif c == 2&lt;br /&gt;  n1&lt;br /&gt;else&lt;br /&gt;  fib_tc_it(n1 + n2, n1, c-1)&lt;br /&gt;end&lt;br /&gt;end&lt;/pre&gt;&lt;div&gt;And, here we go, benchmark result:&lt;/div&gt;&lt;pre&gt;                              user     system    total      real&lt;br /&gt;fib_tail_recursion(10_000)   0.010000 0.000000 0.010000 ( 0.007669)&lt;br /&gt;fib_iterative(10_000)        0.010000 0.010000 0.020000 ( 0.008758)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5879990958708057129-761885355651405591?l=1234533dlh.blogspot.com' alt='' /&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 09 Feb 2012 22:25:00 -0800</pubDate>
<feedburner:origLink>http://1234533dlh.blogspot.com/2008/04/build-development-build-grid-by-dtr-003.html</feedburner:origLink></item>
<item>
 <title>Franklin Dattein: MongoDB: find duplicates in a field</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/APotLiYTomE/</link>
 <description>&lt;pre name="code" class="JavaScript"&gt;
m = function () {
    emit(this.my_field, 1);
}
r = function (k, vals) {
   return Array.sum(vals);
}
res = db.MyCollection.mapReduce(m,r, { out : "my_output" });
db[res.result].find({value: {$gt: 1}});
&lt;/pre&gt;
&lt;span class="fdPrintIncludeParentsPreviousSiblings"&gt;&lt;/span&gt;&lt;span class="fdPrintIncludeParentsChildren"&gt;&lt;/span&gt;</description>
 <pubDate>Thu, 09 Feb 2012 17:51:13 -0800</pubDate>
<feedburner:origLink>http://dattein.com/blog/mongodb-find-duplicates-in-a-field/</feedburner:origLink></item>
<item>
 <title>Jaco Pretorius: For vs Each in Ruby</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/Cg1T4IhlTV4/for-vs-each-in-ruby.html</link>
 <description>&lt;p&gt;One of the discussions I was involved in at &lt;a href="http://www.jacopretorius.net/2012/02/rubyfuza-2012.html"&gt;RubyFuza&lt;/a&gt; revolved around the difference between &lt;strong&gt;for&lt;/strong&gt; and &lt;strong&gt;each&lt;/strong&gt; in Ruby.  There is only a subtle difference around scoping, but I think it&amp;rsquo;s an important distinction because it reveals some important aspects of Ruby.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;for&lt;/strong&gt; loop is a syntax construct, similar to the &lt;strong&gt;if&lt;/strong&gt; statement.  Whatever variable you define in the &lt;strong&gt;for&lt;/strong&gt; loop will remain after the loop as well.&lt;/p&gt;
&lt;pre class="brush: ruby;"&gt;
list = %w{ google yahoo bing duckduckgo }

for engine in list
  # do something with engine
end
puts engine
# duckduckgo
&lt;/pre&gt;
&lt;p&gt;On the other hand, &lt;strong&gt;Enumerable#each&lt;/strong&gt; is a &lt;strong&gt;method&lt;/strong&gt; which receives a &lt;strong&gt;block&lt;/strong&gt;.  A block introduces a new lexical scope, so any variables we declare in the block will not be around after the block executes.&lt;/p&gt;
&lt;pre class="brush: ruby;"&gt;
list = %w{ google yahoo bing duckduckgo }

list.each do |engine|
  # do something with engine
end
puts engine
# NameError: undefined local variable or method ‘engine’
&lt;/pre&gt;
&lt;p&gt;The &lt;strong&gt;for&lt;/strong&gt; loop is very rarely used in Ruby.  I don&amp;rsquo;t think it&amp;rsquo;s &lt;em&gt;that&lt;/em&gt; bad to be using it, but the &lt;strong&gt;each&lt;/strong&gt; method does decrease the possibility of side effects.&lt;/p&gt;</description>
 <pubDate>Thu, 09 Feb 2012 07:00:42 -0800</pubDate>
<feedburner:origLink>http://www.jacopretorius.net/2012/02/for-vs-each-in-ruby.html</feedburner:origLink></item>
<item>
 <title>Martin Fowler: Bliki: PresentationSmells</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/Hb_zUASS7eo/PresentationSmells.html</link>
 <description>&lt;p&gt;I've given lots of presentations, and since I go to a lot of
  conferences I see a lot too. This means I see a lot of problems,
  where people are doing things that reduce the efficacy of their
  talks. I've not tried to come up with a comprehensive list, so the
  ones I'm raising here are just a few things off the top of my head.
  Like most smells, these aren't always wrong, but should always make
  you think.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Sentences on slides.&lt;/b&gt; I could say bullet points here, as
  that's the most common way to misuse slides by turning them into
  &lt;a href="http://martinfowler.com/bliki/Slideument.html"&gt;Slideuments&lt;/a&gt;. But I think the real rogue is the sentence. My approach
  with slides is to treat them as a &lt;a href="http://martinfowler.com/bliki/VisualChannel.html"&gt;VisualChannel&lt;/a&gt;,
  following this it's important that the audience is listening to the
  speaker for the flow of words. Reading sentences breaks that up.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Floodmarks.&lt;/b&gt; Lots of slides have repetitive elements on the
  slide master that show up on every slide, these include corporate
  logos, legal boilerplate (such as copyrights), occasionally even tag
  lines. The audience either tunes out the &lt;a href="http://presentationpatterns.com/glossary.html"&gt;floodmark&lt;/a&gt; (which
  makes them useless) or is distracted by them (which is worse). I
  recommend you only put logos and the like on the first and last
  slide, that's quite enough to get them noticed, but not enough to be
  distracting. You only need a copyright statement on one slide - and
  even then I'd argue you don't really need it.&lt;a href="#footnote-copyright"&gt;[1]&lt;/a&gt; Are your slides really so amazing that you'll lose a
  fortune if someone copies them?&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Repetitive Pointer Movement.&lt;/b&gt; It's wise to always carry
  a laser pointer when giving a talk - indeed I suggest a combined
  remote-clicker laser device. But if you find yourself pointing to
  the same sequence of things every time you give the talk, then you
  should put that pointer sequence into the slides themselves. This
  may be as simple as an arrow or a highlight on the existing slides,
  or it may be rethinking the slides themselves to help bring out the
  point better.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Backtracking Slides.&lt;/b&gt; If you find yourself going back to a
  previous slide, that indicates the slide sequence isn't right.
  Instead you should copy the slide so that you keep going forwards
  through the deck. Once you've copied it, you can then think about
  whether it should be a true copy, or whether it should look
  different when used again in order to highlight how you are using it
  in the further sequence.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Slide Titles&lt;/b&gt; It seems to be mandatory that every slide has
  a title - but ask yourself if the slide's title is really needed.
  I've found I've often improved the visual channel by consciously removing slide
  titles.&lt;/p&gt;

&lt;p&gt;Having said all this, the most important thing is your content.
  If the content isn't solid, or you don't really care about it, then
  even outstanding slidecraft isn't going to save you.
  Conversely an audience will forgive all sorts of crummy presentation
  techniques if you have interesting things to say. &lt;/p&gt;

&lt;div class="footnote-list"&gt;
&lt;div class="footnote-list-item" id="footnote-copyright"&gt;
&lt;p&gt;&lt;span class="num"&gt;1: &lt;/span&gt;
      In many places there is implied copyright, even if you don't
      have a statement on a document. Even so, it's wise to keep one
      on the document somewhere to make it easier should you need to
      enforce copyright. I have to say, however, that I haven't heard
      of anyone suing anyone over copyright infringement of a slide
      deck.
    &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
 <pubDate>Thu, 09 Feb 2012 05:16:00 -0800</pubDate>
<feedburner:origLink>http://martinfowler.com/bliki/PresentationSmells.html</feedburner:origLink></item>
<item>
 <title>Anand Vishwanath: Why you should care about experience design and continuous delivery as a project manager ?</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/FfhA3JqYfBo/why-you-should-care-about-experience.html</link>
 <description>I had written &lt;a href="http://blog.anandvishwanath.in/2011/09/try-not-to-be-yet-another-project.html"&gt;earlier&lt;/a&gt; about how a good project manager in a mature Agile team needs to go beyond managing scope, time and budget to be really effective in his/her role. The key is to understand the product and the tools and techniques used by the team to build it.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But there is more a project manager should do, which is, to provide the right direction to the team. The focus shifts from "&lt;b&gt;building the thing right&lt;/b&gt;" (i.e delivering within scope , time and budget) to "&lt;b&gt;building the right thing&lt;/b&gt;" (a product that fits the purpose the business and its users).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Building a delivery engine that can react quickly to market feedback and adapt needs focus in a few different areas than traditional project management. And this is where project managers should have a good understanding of experience design and continuous delivery.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From a continuous delivery perspective a PM should have a good understanding of&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;* The level of automated testing required to certify almost production quality builds in no time.&lt;/div&gt;&lt;div&gt;* The value of using a production like environment for testing and feedback.&lt;/div&gt;&lt;div&gt;* How automated deployments can help speed up time required to deploy to multiple environments and rollback quickly if the need arises.&lt;/div&gt;&lt;div&gt;* The need for real time monitoring of production systems for the team to quickly respond and fix production issues.&lt;/div&gt;&lt;div&gt;* How one can benefit from feature toggles v/s branching.&lt;/div&gt;&lt;div&gt;* The advantage of releasing quickly and minimising work in progress to shorten the feedback loop.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The main advantage of continuous delivery is not so much in reduction of deployment and maintenance costs. Instead it is in the capability it provides to validate and adapt the product being buit quickly based on end user testing and research. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is important , as a PM to know &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;* If we are doing enough user testing to validate what we are building at regular intervals ?&lt;/div&gt;&lt;div&gt;* Are we doing enough user research to provide critical user context data in the form of personas etc...?&lt;/div&gt;&lt;div&gt;* Do we have good analytics capability built in the product to profile usage patterns which can help us make informed decisions about the product?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;An insight into some of these aspects can really help a project manager steer the team towards building the right product which is way more valuable than someone who ensures the team is tracking to an outdated plan.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/768937308837168044-6040351649093588486?l=blog.anandvishwanath.in' alt='' /&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 09 Feb 2012 03:40:00 -0800</pubDate>
<feedburner:origLink>http://blog.anandvishwanath.in/2012/02/why-you-should-care-about-experience.html</feedburner:origLink></item>
<item>
 <title>Manoj Tharayil: Clearing all event logs</title>
 <link>http://feedproxy.google.com/~r/PlanetTw/~3/8cKRjY8ZB-E/clearing-all-event-logs.html</link>
 <description>&lt;p&gt;&lt;br&gt;Here is the code to clean up all event logs in the current machine/server.&lt;/p&gt; &lt;p&gt;The code is in power shell, as some people feel this is the best language to write scripts on Windows.&lt;/p&gt;&lt;pre&gt;strComputer = "." &lt;br /&gt;Set oWMIService = GetObject("winmgmts:" _ &lt;br /&gt;&amp;amp; "{impersonationLevel=impersonate,(Security)}!\\" &amp;amp; _ &lt;br /&gt;strComputer &amp;amp; "\root\cimv2" ) &lt;br /&gt;Set cLogFiles = oWMIService.ExecQuery _ &lt;br /&gt;("SELECT * FROM Win32_NTEventLogFile" ) &lt;br /&gt;For Each oLogfile in cLogFiles&lt;br /&gt;Wscript.echo("Clearing Logfile " + oLogFile.Name)&lt;br /&gt;oLogFile.ClearEventLog() &lt;br /&gt;Next&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36287248-8338252393353309365?l=manojtesting.blogspot.com' alt='' /&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 09 Feb 2012 01:06:00 -0800</pubDate>
<feedburner:origLink>http://manojtesting.blogspot.com/2012/02/clearing-all-event-logs.html</feedburner:origLink></item>
</channel>
</rss>

