Chen Jian

Notes on XP — No.11: Business People V.S. Technical People

No side should dictate.    If biz people are in charge, there will be missions impossible.    If tech people are in charge, they will do a lot of things for fun(cool tools, technology, etc.), which are risky. Let the biz people tell what they want, and let the tech people tell what the price …

Notes on XP — No.11: Business People V.S. Technical People Read More »

Notes on XP — No.10: Practices (2)

Pair Programming Collective Ownership — Everybody can change any part of the system, via Pair Programming Continuous Integration — hour-basis 40-Hour Week — If you are not fresh or rested, you can’t perform other practices well On-Site Customer — He can help you development software better and sonner. The advantage of this will outweight of …

Notes on XP — No.10: Practices (2) Read More »

SQL编程中的曳光弹

有本书里提到了“曳光弹”这个东西。它让你在暗夜开枪时,除了靠你的本事命中目标之外,同时还会帮你把子弹的轨迹在夜空里展现出来。 在JAVA编程时,一种典型的曳光弹就是日志。 在SQL编程时,也可以用到曳光弹这个技巧。 一个例子就是:找出所有 A.a = B.a 的 A.c 记录集。我们在写这个SQL时,除了 select A.c之外,也可以同时select出 A.a 和 B.a,然后就可以用肉眼检查一下A.a和B.a是否相等,这样可以帮助保证SQL程序的质量。 另外一个例子是:找出所有符合某个条件的记录集,然后对它们进行批量更新。对这种问题,我们可也直接写一条 update + where全部搞定,但也可以先把符合条件的记录集插到一种临时表中,然后再按临时表去更新实际的记录。当你回头去看临时表时,你就可以切实地看到哪些记录被修改,可以检查这些记录是否符合修改条件,从而也更加保证了SQL程序的质量。

Notes on XP — No.6: Four Values

There are Four core values for XP    1. Communication         The more you communicate, the less you make a mistake    2. Simplicity         The simpler the system is, the less you have to communicate    3. Feedback         a. Feedback from tests         b. Feedback from people         The more feedback you have,the …

Notes on XP — No.6: Four Values Read More »

Notes on XP — No.5: Software process is like driving a car

" Driving is about constantly paying attention, making a little correction this way, a little correction that way", said Kent Beck’s mum. Note that the driver of a software project is the customer. The customer should keep his eyes on the road, that is the system under developing. So what do we programmers do? We …

Notes on XP — No.5: Software process is like driving a car Read More »

PowerMock 下,调用JAR包中的Class的getResourceAsStream()会出问题

  If     1. a JUnit test is run with PowerMock,     2. and this test calls "this.getClass().getResourceAsStream()",     3. and this test class is loaded in a jar file, instead of being loaded as a single file   Then     A "java.net.MalformedURLException" will be thrown at this.getClass().getResourceAsStream() when this test is invoked.