Saturday, February 14, 2015
Book Review: The scorpion's sting, Antislavery and the coming of the civil war by James Oakes ISBN 9780393239935
Saturday, January 24, 2015
Book Review: Start-up Nation, The story of Israel's Economic Miracle by Den Senor and Saul Singer ISBN 9780446541466
- Geopolitical: Surrounded by Arab adversity
- Racial character: Jews individualistic and risk-taking culture
- Mandatory military drafting policy as a start-up incubator and entrepreneurial training ground
- Pro start-up investment environment
- Pro-immigration leads to inflow of new ideas and fostering bootstrapping mentality
- Expat community that support motherland's start-ups
Book Review: Thread of the silkworm 中国飞弹之父钱学森之谜 by Iris Chang 张定绮,许耀云译, ISBN 0465087167
Wednesday, December 31, 2014
Book review: Civilization, The west and the rest by Niall Ferguson ISBN 9781594203053
- Competition: a decentralization of political life, which created the launch-pad for both nation-states and capitalism
- Science
- Property rights
- Medicine
- The consumer society
- The work ethic
Monday, December 15, 2014
Book Review: The Emperor Far Away, Travels At the Edge of China by David Eimer ISBN 9781620403631
- Part 1: Xinjiang- The new frontier
- Part 2: Tibet - The wild west
- Part 3: Yunnan - Trouble in paradise
- Part 4: Dongbei - Pushing the boundaries
Book Review: "Lives of" series by Kathleen Krull
- Lives of the athletes : thrills, spills (and what the neighbors thought)
- Lives of the writers : comedies, tragedies (and what the neighbors thought)
- They saw the future : oracles, psychics, scientists, great thinkers, and pretty good guessers
- Lives of the musicians : good times, bad times (and what the neighbors thought)
- Lives of extraordinary women : rulers, rebels (and what the neighbors thought)
- Lives of the presidents : fame, shame (and what the neighbors thought)
- Lives of the scientists : experiments, explosions (and what the neighbors thought)
- The book of rock stars : 24 musical icons that shine through history
- Lives of the artists : masterpieces, messes (and what the neighbors thought)
Sunday, December 14, 2014
Book Review: Rouge Elephant, Harnessing the power of India's unruly democracy By Simon Denyer ISBN 9781620406083
Wednesday, December 03, 2014
Book Review: Dear Leader: Poet, Spy, Escapee- A look Inside North Korea by Jang Jin-sung ISBN9781476766553
Rating: 5 out of 5
Best for: History buff and North Korean Related book: Nothing to envyMonday, December 01, 2014
Wednesday, November 26, 2014
Tuesday, November 25, 2014
Book Review: The Nile, a journey downriver through Egypt's past & present by Toby Wilkinson ISBN 9780385351553
Monday, November 24, 2014
Book Review: To a Mountain in Tibet by Colin Thubron ISBN 9780061768262
Book Review: The Diet Fix, Why Diets Fail and How to Make Yours Work by Yoni Freedhoff ISBN 9780804137577
Wednesday, November 12, 2014
Book Review: How to read a book, a classic guide to intelligent reading by Mortimer J. Adler & Charles Van Doren ISBN 067121280X
- Why activity is essence of good reading, the more active reading is, the better is
- What is active reading: asking questions
- What questions must be asked of any book, and how those questions must be answered in different ways for different kind of books
- Four levels of reading, and how these are cumulative, earlier or lower levels being contained in later or higher ones
Book Review: Positioning: How to be seen and heard in the overcrowded marketplace By Al Ries and Jack Trout ISBN 0071373586
- This is the classic mistake made by the leader. The illusion that the power of the product is derived from the power of the organization. It is just the reverse. The power of the organization is derived from the power of the product, the position that the product owns in the prospect's mind.from Chapter 6
- .. words don't contain meanings. The meanings are not in the words. They are in the people using the words. from Chapter 25
- The big winners in business and in life are those people who have found open positions near the center of the spectrum. Not at the edge. from Chapter 25
- To repeat, the first rule of positioning is: To win the battle for the mind, you can't compete head-on against a company that has a strong, established position. You can go around, under or over, but never head to head. from Chapter 25, remind you of Steve Job's early days in his return to Apple, not to compete against Microsoft, and John Chen's current Blackberry days, not to compete with Apple in consumer market, but rather focusing on enterprise market.
- In our overcommunicated society, the name of the game today is positioning.
Monday, November 10, 2014
Books about Berlin to memorize 25th anniversary of fall of the Berlin wall
- Berlin Portrait of a city through the centuries by Rory MacLean
- Berlin Now The city after the wall by Peter Schneider
- The collapse The accidental opening of the Berlin wall by Mary Elise Sarotte
Saturday, November 08, 2014
Book Review: Amy for short by Laura Joffe Numeroff (ISBN 0027681807)
- If You Give a Pig a Pancake
- If You Give a Moose a Muffin
- If You Give a Dog a Donut
- If You Give a Mouse a Cookie
- If You Take a Mouse to the Movies
- If You Give a Cat a Cupcake
- If You Give a Pig a Party
- If You Take a Mouse to School
Thursday, November 06, 2014
Book Review: Age of Ambition, Chasing Fortune, Truth and Faith In the New China by Evan Osnos (ISBN 9780374280741)
Wednesday, October 08, 2014
For people who don't know what their passion are
Don't stop, keep moving along the trail
Take in the scene and be thankful
Rest assured you show up and your destiny will reveal
Thursday, September 25, 2014
Prep for Tibet trip
- Physical prep
- Lose weight to what level? Oxydized training or non-oxydized training?
- What to exercise for high altitude ?
- Dry run in North America, which mountains to climb?
- Financial
- How much $$ for how long? $$/day?
- Vacation planning
- How many vacation days needed? CF allowed carry over?
- What to look?
- How to get there?
- Partners
- How many?
- How many from China? How many from US?
Sunday, August 24, 2014
Book Review: Joha makes a wish, story by Eric A.Kimmel, illustrated by Omar Rayyan
Friday, March 14, 2014
How to be a best #N (N>1): Lessons from Sheryl Sandberg
Thursday, March 13, 2014
Fee-for-service business model is dead, time for fee-for-value
Tuesday, March 04, 2014
WhatsApp and NetFlix
Friday, February 21, 2014
The longest wait
Friday, November 29, 2013
One of the simplest and best precepts Katharine Graham got from his father Eugene Meyer for parents to live by
Sunday, November 24, 2013
Book review: The age of the unthinkable: Why the new world disorder constantly surprises us and what we can do about it by Joshua Cooper Ramo, ISBN9780316118088
- Eric von Hipppel Democratizing Innovation
- Ricardo Semler and his new management practice in his company Semco
- Per Bak and his self-organized criticality phenomenon
- Isaiah Berlin: Hedgehogs thinker vs fox thinker
- Masako Watanabe: Styles of reasoning in Japan and the United States: Logic of education in two cultures
- Richard Nisbett: The geography of thoughts
- Mike Moritz and secret of successful venture investment in Sequoia Capital
- Aharon Farkash's tenure at Israeli military intelligence unit IDF
- Shigeru Miyamoto's creation of Wii and revival of Nintendo
- Lucien-Victor Guirand de Scevola's invention of camouflage in World War I
- Dan Kaminsky's discovery of DNS flaw and innovative way of fixing it
- Anselm Kiefer's painting Deutschlands Geistesheldon
- Tony Moll's leading anti HIV efforts in South Africa and re-emergence of TB due to failure of patient education
- Gertrude Stein and her role in new art movement (Cubism) in 1910s
- David Kotz with Fred Weir Revolution from above: The demise of the Soviet System
- C.S Holling and Simon Levin: Two ecologists
- Bill Broweder's Russian investment strategy and his early detection of 2008 financial meltdown
Thursday, November 21, 2013
Security vs Privacy
"You can have security without privacy, but you can't have privacy without security" - Michael Howard
What separate a security amateur and security professional
Book review: The cod's tale by Mark Kurlansky and illustrated by S.D.Schindler, ISBN0399234764
Best for: Intermediate reader grade 3 to 5
Rating: 5 of 5
Review: A enchanting history of cod and cod fishing and cod trade masterfully told and illustrated. And the author threads the information about cod and its impact on history is subtle and brilliant. If all history and trade book can be written this beautifully ...
Book review: One witch by Laura Leuck and illustrated by S.D.Schindler ISBN0802788602
Wednesday, November 20, 2013
Book review: The discovery of the Americas by Betsy and Giulio Maestro, ISBN 0688068375
Monday, November 11, 2013
Friday, November 08, 2013
Vivek Ranadive: How to win anything
Three winning rules:
- Think out of the box
- Play by your own rule, not other people's rule
- Work harder than anybody else
Thursday, November 07, 2013
The tricky business of transforming a culture
For China, the unifying and stabilizing force and foundation is Confucian's concept of family. Family is not just the household, whole kingdom is a big family. Family is why China as a culture still maintains its sanity and dignity (although very vulnerable) after all the indignities suffered during last couple of centuries. And closeness and inward looking nature of family may also be the reason why China missed the opportunity for industrialization(outward exploration+open competition) and scientific advancement early in the twentieth century. And Chinese people realized that family may not be a good foundation for China to enter the world market and compete any more. China may need a new foundation to be able to catch up and lead.
The challenge is really in the transformation. While China is searching for new culture launchpad, we cannot throw away the current foundation (family) yet, otherwise the house will crumble down and collapse. We especially need a strong foundation during this time of great change. Chairman Mao tried to rid all the old and rebuild a new one from the ruin, and it led to twenty years of setback and chaos. Deng Xiaping learned the lesson and vouch to maintain Communist ruling as a stable foundation.
Wednesday, November 06, 2013
Tons of witches and bats and a bat girl
Tons of witches
There are lots of bats,arggg
And then there is a bat girl :-)
Thursday, October 31, 2013
Book Review: The Enlightenment: And Why It Still Matters by Anthony Pagden ASIN: B009Y4JPTA
[Update] Page 269 to page 292 alone is worth the cover price. This part of the book talks extensively about key figures of Enlightement especially Leibniz and Montesquieu opinion on China and Chinese culture.Montesquieu in his The Spirit of the Laws categorized Chinese government as despotism, a governance that is "one alone, without law and without rule, drags everything along by his will and his caprice". Montesquieu identified three possible types of government:
- Republics, either democratic or aristocratic, which the "people as a body or ionly a part of the people" exercise sovereign power
- Monarchies,where sovereignty is held by "one alone" in accordance with "fixed and established laws"
- Despotism, where "one alone, without law and without rule, drags everything along by his will and his caprice"
Book Review: My beloved world by Sonia Sotomayor ISBN 0307594882
- She is extremely talented. She got into Princeton under AA, but she graduated summa cum laude and awarded Moses Taylor Pyne Honor prize, the highest honor awarded to undergraduate. Undoubtedly she has a very high IQ.
- Although she came from a unprivileged upbringing and she experienced first hand such deficiency costed her, there was not a single trace of bitterness in the book. She definitely has a very high EQ too. This is a stark contrast to another book I read and reviewed on this blog Paper Daughter.
- She stays the course throughout her college and law school and didn't detour much. A supereme court justice is highest point of a law career and she made it to there in a very straight line.
Wednesday, October 30, 2013
To Bootstrap or not to Bootstrap
To knockout or not to knockout?
Tech gotcha of the day: kogrid needs knockoutjs version 2.2 and above
Thursday, October 10, 2013
Mentorship
Sunday, October 06, 2013
Thursday, October 03, 2013
Book Review: Worlds at war, the 2,500 year struggle between east and west by Anthony Pagden, ISBN 978-0199237432
What is this book about: This dome is 600+ pages long and ambitiously tried to cover a span of 2500 years history of conflicts between East (Asia) and West (Europe), starting from Persian invasion of Athens by Darius and continued to Alexander the Great conquer of Asia and goes all the way to America's invasion of Iraq in 2002. I am still long way to go to finish it, but just want to add some thoughts while I am still reading it.
1. The author seems to think East (Asia) always prefer despotism or oligarchy and West (Europe) prefers individualism and democracy. Not sure it is a widely held belief but looking back in Chinese history it seems the pattern holds.
2.In western history, there seems always be multiple power centers to check and balance each other. In Roman empire, Senate vs Caesar and church vs king post Rome, and in current days US, it is tri-power structure: White house, Senate and Congress, and then Superium court. On the contrary, in Eastern history there seems always a single controlling power: either it is king or it is Muslim religious leader. Is it due to geographic reason or homogeneous race?
3. In chapter 5 The coming of Islam, during 712 to 833, there was a period of "Arab Renaissance", when Muslim scholars(most notably among them were Muhammad ibn Ahmad al-Riruni, Ibn Sina, al-Farabi, Ibn Tufayl) translated and annotated many Greek and Roman(/Byzantium) scientific and philosophical writings. This period of "Arab Renaissance" precedes the later European Renaissance and provided European scholars insight into Greek era ideas and knowledge. So the big question is: Why can it happen? Why doesn't it happen again? One explanation from French theologian Ernest Renan is that Muslim derived their culture and education wholly from Islam, and he believes all the monotheistic religions (this include both Islam and Christian) are incompatible with the progress of modern sciences. And he believes "Arab Renaissance" was the result of non-Muslim scholars work during a rare moment of openness during Islamic rule in Euroasia.
4. In Chapter 8 Science Ascendant, religion provides 1st permanent settlement for for human race on the earth, ie. Islam for near east, Christianity for west and confucian for far east, and science provided human means to explore the surrounding of their settlement and help them find out where their home is and where they can go further.
5. Chapter 9 Enlightened Orientalism, Voltaire asked if the East had been "the nursery of all the arts, to which the Western would owes everything it now enjoys,", why was it that the nations of the West "seemed to have been born only yesterday ... now go further than any other people in more than one field?". Answer: Ownership society. Francois Bernier, who had spent 12 years as physician to the Mughal emperor Aurangzeb, in his book A New Division of the Earth According to the Difference Species or Races Which Inhabit It, states that Oriental despot did not rule over but actually owned the state (《诗经》『溥天之下,莫非王土;率土之滨,莫非王臣』). In the West the status and identity of an individual were to a great extent determined by his or her ability to own property. In the East, however, everything was owned by the sovereign, and it was this that lead to the same fate for all Oriental empires: tyranny, ruin and desolation.Only in the Orient did there exist what Montesquieu termed "political slavery", the absence of any freedom to act or express oneself independently of the sovereign's will. And the sovereign's will was enforced not through honour,as occurs in monarchies, nor through virtues, as is the case in republics, but through fear, which is why in despotic states, in particular those in Asia, religion is so important, for all religion is always "fear added fear". Oriental despotic societies resembled not states but large families (家天下). All the Eastern countries "had one thing in common: they were all, in their different ways, ruled by despots, enthralled to systems of government upheld by religious whose objectives was to persuade the masses that neither nature nor any of their gods offered them any other way of living. They were societies composed of hordes, not individuals. And as long as they remained immured behind their self-imposed walls of ignorance and apathy, nothing could help them. For them, time and progress had little meaning; the truth of everything, including what Europeans looked upon as science, could be established only by reference to the past". Think about North Korea and Cuba.
6. Chapter 12 Epilog , 启发民智,始于民生,吃饱穿暖,再谈民选,帝制压抑,积弱百年,自由民主,循序渐进,小民可教,需要时间
Monday, September 30, 2013
Book Review The Smartest Kids in the World: And How They Got That Way by Amanda Ripley ISBN 1451654421
Now back to our subject. The book is about 300 pages long, but excluding a lot of notes and references, it is a bout 180 pages. It is an enjoyable read about why American kids not faring well in PISA test and tracking three American high school exchange students experience in PISA superpowers Finland, Korea and Poland. If you are European parents or Asian parents living in America with high school kids at home and interested in education issue, you probably already had the same conclusion as the authors and there is really little gain reading the book.
Sunday, September 29, 2013
Bat queen and king
Can you guess who is queen and who is king?
Grasshopper
Here is a picture from another angle
Sunday, September 22, 2013
Book Review of The Cuckoo's Egg: Tracking a Spy Through the Maze of Computer Espionage
Friday, September 20, 2013
Saturday, September 14, 2013
书评: 《神权,民本, 民主: 二千五百年的竞赛》 郑楚材著 ISBN:978-957-41-4915-5
Thursday, September 12, 2013
Saturday, September 07, 2013
书评: 《被利益集团拖跨的王朝》
《被利益集团拖跨的王朝》是世界知识出版社出版的《同舟共进》杂志精华系列的一本,ISBN 978-5012-4105-7。这是一本文集, 文章评点中国历史成败兴亡, 借史喻今。启发很多, 容我分别道来。
网上国人每谈及中日历史纷争,算我在内, 很快就热血沸腾,杀气腾腾,情绪压制了冷静的思辨。李扬帆文<<中国近代之败,实为意识之败-两千年中日交往中的反思>>细数历史,结论:中国不了解日本,日本摸透中国,中国必败。记得小时候看李默然主演的〈甲午风云〉,心中不平,恨一颗鱼雷,击沉致远舰,似乎于日本的胜负全系于那一颗鱼雷上。后来又看冯小宁拍摄的电视剧《北洋水师》,约略明白甲午海战,中国不止输在那一颗鱼雷上。读了此文,终于明白,中国输在,我们中国人口口声称与日本是一衣带水的邻邦,却从没有认真的去了解我们这位邻居。日本有阿倍仲麻吕,高杉晋作,宗方小太郎, 长期居住中国,考科举,学中文,考察经济,社会,文化,把中国摸个底透;可我们中国人,却对日本一无所知,了解依然停留在日本是中国文明的分支,是小亲外戚。有多少中国人知道日本国策自丰臣秀吉到伊藤博文的演变?有多少中国人知道日本民族称雄世界(不只是东亚)的野心?日本人学习中国,是为了文化上独立于中国文化。此文对我最大的提醒是:日本有个思想家福泽谕吉,他比我们中国人更理解中国文化,也因次他提出日本“脱亚”,于西方各文明国家共进退。一旦看到日本文化的这个转变,你就会理解为什么日本对二战侵略罪行躲躲藏藏。因为他们认为自己是西方一分子,西方从未对亚洲认错,为什么你们让我日本认错?对我们这个邻居,在未来很长的时期,我们都无从避开,或合作,或对抗,但我们应该记住此文作者的警告: 请别漠视你的对手
Wednesday, September 04, 2013
Financial engineering: necessary evil
Tuesday, September 03, 2013
What drives an investment property value: demography
What sets a great Chinese entrepreneur apart from a great entrepreneur: Confucius ethics
Sunday, January 02, 2011
野性回归
中国人教育孩子, "吾日三省吾身", 讲究自我批评,自我反省. 最高境界是不卑不亢,不温不火. 不这不那, 那是什么呢? 似乎没人追究. 如同鹅阮石, 圆滑没棱角, 可以融入任何环境, 但自己站立起来, 就会不稳. 感觉上欠缺些野性.
Neel Kashkari, 2008 经济危机中美国财政部$7000亿解危资金的管理人, 当他在2009年底从那个高压力高风险的位子上下来后, 他减压的办法就是躲进北加州茫茫大山中, 砍柴, 打猎, 用自己的双手盖了一个小木屋 (http://www.washingtonpost.com/wp-dyn/content/article/2009/12/04/AR2009120402016.html?sid=ST2009120402037). 按中国人的人才观念, Neel Kashkari 是个全才. 他做过NASA的工程师, 后来又投身华尔街成为一名对冲基金的管理人. 可从他减压的办法可以看出, 他刻意定期回归自然, 保持一点野性.
另一个例子是Google. Larry Page 和Sergy Brin 在公司创业早期, 每年夏天都会放下工作, 去Nevada沙漠中去参加一个名叫Burning Man Festival(http://www.burningman.com/)的活动. 在一周的时间内, 住帐篷, 共用洗浴设施, 过简单的生活, 用双手创造艺术作品, 最后付之一炬. 换个活法, 放弃一会儿, 用另一种态度去生活一会儿. 尤其是用一种物质乏匮的方式, 用一种只靠双手的方式生活. 所吃所用, 皆源于双手, 回归我们的祖先.
物质的丰裕, 使人如同开水锅里的青蛙, 水在一点点沸腾, 我们却在舒适中不觉. 需要跳出去, 跳到寒冷的地上, 哆唆着清醒.
Sunday, March 07, 2010
Father-daughter chat series 1: Marshmallow test and danger of instant -gratification
There was a test conducted by Walter Mischel during 1960s at a preschool on the Stanford University campus. The researcher left a group of 4-year olds in a room with each one of them had one marshmallow with them. They were allowed to eat the marshmallow, but if they can wait 15 to 20 minutes until the researchers returned to the room, they can have two marshmallows for the treat.
The result: About one thirds of the 4-year olds waited until the researcher returns and got two marshmallows. A third or so didn't and ended up with only one marshmallow. What more striking is that when the same kids reached to high school graduation, the ones who couldn't wait had much lower SAT scores than those who could. In other words, by measuring your capability to resist instant gratification at early age we can predict your future success.
This is a test of self control, or what Walter Mischel described as "goal-directed self-imposed delay of gratification". It shows the importance of EQ or Emotional Intelligence to our success. And it is a better indicator of person's success than IQ.
Now imagine some other situations that need impulse control: abstinence, watching TV vs. reading a book, etc. With the temptation of instant-gratification, can you still maintain your control?
We live in an instant-gratification time; Internet ensures your gratification is met at speed of thought. Want that new movie in Blue-Ray? Several clicks through Amazon and it will show up at your doorstep a couple of days later. Can't wait to talk to the old friend face to face? Hop on MSN or AIM and turn on the webcam, you can talk to her or him right away. Now ask yourself as a parent: are you encouraging your kids into the activities that require delayed gratification? Would you take that computer or iPod away from kids and hand them the books and newspapers? Or even better, can you help your kids to divide the gratification into sub goals, make actionable plans to achieve these sub goals, and enjoy not only the final gratification but also every minute of the process?
Friday, February 26, 2010
Book Review: Paper Daughter A Memoir by M.Elaine Mar
From a perspective of an immigrant parent of an America born Chinese kid, reading the masterfully written Paper Daughter is a wake-up call. You see this talented little kid everybody loved back in Hong Kong struggled to fit in the life in America. Her parents worked like slave in restaurant, earned very little and spoke very little English. And they offered little help to little Elaine, as they themselves struggled to adjust life there too. This book offers an insight into the pain and struggle of an immigrant kid growing up in classed America.
The appearance: The author was born on Oct. 1st, 1966 in Hong Kong. She graduated from Harvard University in 1988.
The perception: Many Chinese parents would think the author's parents are a success. Having an Ivy league trained kid means a lot in Chinese culture. The facts: The author's father immigrated to US in 1969 with the help of his sister (who supposedly is a US citizen), and the author and her mother followed him in 1971. When in US, both parents worked in a restaurant kitchen. They don't speak English, and they made $18000 combined per year in 1980 (not sure about the poverty line then, but I would think they were very close to it). With low social economic status and compounded by the author's own language barrier in early years in the US, the author struggled to find her identity growing up. And from the book, it seems the scar never heals.
The problem: Usually Chinese kids tend to focus on building up their IQ in their education, but not much attention has been put on EQ (Emotional Intelligence). The fact that the author can get into Harvard from the low-education, low-income family she grew up from says a lot about her high IQ. Yet even with the success she had in the academics, she still sheds a more negative light on her childhood. Glass is half empty here. Contrast to another book Big Russ and Me by Tim Russert, who also grew up in a family where parents are low-educated and medium-income(Russert's father is a city employee in upper New York city of Buffalo). In Russert's book, he painted a brighter picture of his mother and father, even though in reality his father and mother divorced. Glass is half full there.
Chinese parents tend to pay a lot more attention to kid's IQ development, and the high percentage of Chinese kids in IVY league school attest to this effort. But life, no matter how smart you are, is not a fair game. Things you deserve may not come to you and you have to take it and move on. How we Chinese parents better develop our kid's EQ while maintain our investment in IQ is going to be question we have to answer as the kid grows.
Saturday, July 26, 2008
Using ASP.NET Application Services
MSDN has a very good walkthrough on exposing and using ASP.NET Application services at this link. Unfortunately, it is marred by several technical mistakes and lack of cautionary notes on connection issues commonly encountered in distributed system.
- When creating services mapping files(.svc) for Authentication, Profile and Role application services to the web site, instead of
<%@ ServiceHost Service="System.Web.ApplicationServices.AuthenticationService" ServiceHosting="System.Web.ApplicationServices.ApplicationServicesHostFactory" %>,
it should be
<%@ ServiceHost Service="System.Web.ApplicationServices.AuthenticationService" Factory="System.Web.ApplicationServices.ApplicationServicesHostFactory" %>.
Without this change, when you point to http://localhost:8080/YourWebAppName/AuthenticationService.svc, you will get a server error, like this one:

- In the walkthrough, the application services client is a windows console application. In GetProfileInfo() method, ProfileService proxy is instantiated like this:
ProfileServiceClient profileSvc = new
ProfileServiceClient();It should be like this:
BasicHttpBinding binding = new
BasicHttpBinding();
string ProfileUri =
@"http://localhost:8080/AppServicesWalkthrough/ProfileService.svc?wsdl";
ProfileServiceClient profileSvc = new
ProfileServiceClient(binding, new
EndpointAddress(ProfileUri));
In GetUserRole() method, RoleService proxy is instantiated like this:
RoleServiceClient roleSvc = new
RoleServiceClient();It should be like this:
BasicHttpBinding binding = new
BasicHttpBinding();
string RoleUri =
@"http://localhost:8080/AppServicesWalkthrough/RoleService.svc?wsdl";
RoleServiceClient roleSvc = new
RoleServiceClient(binding, new
EndpointAddress(RoleUri));Essentially, without specifying binding info and service URI, the proxy will fail and generate the error like this one when you run the client and try to connect to application service:

- To test the client, another thing you need to do but the document fails to mention is to disable firewall. If you don't you will bump into this error:

Monday, July 14, 2008
Learning AJAX and JavaScript(part 1):
Why learn JavaScript now?
Rich internet application(RIA) fattens the web UI considerably. HTML sprinkled with JavaScript event module won't cut it any longer. Before Silverlight and Air matures to a level that can seamlessly migrate current web app, JavaScript is the only option available.
Can't we rely on server technology such as ASP.NET/Google Web Toolkit to generate JavaScript for us(also referred as indirect Ajax programming)? Good question, and all these players are trying hard and they are getting there. But there still be the rare and critical situation in your project that you need to rollup your sleeves and do it yourself without help of tools. And I also think there are just too many indirection involved when using these tools. UI rendering requires a lot of trial and error iteration, and if tools add more steps in the middle, you may need to rethink about using them. Also Ajax as a web app pattern, there are still a lot to be explored and to explore we will need JavaScript as a tool to gain finer control of the whole HTTP communication process.
Cookbook approach to pick up JavaScript
- How to do drag and drop?
- How to create pop-up panel?
- How to enable bookmark in Ajax app? (Google map uses "add a link" link to solve this)
Some patterns in JavaScript based fat UI
Browser-side templating(BST
and this link
- HTML Message (HTM) and this link
Comparison of Ajax library
- ASP.NET Ajax library comparison
http://www.daniel-zeiss.de/AJAXComparison/Results.htm
- OSS Ajax library comparison
http://www.sitepoint.com/article/javascript-library
Monday, July 07, 2008
Office Programming: Two Namespaces for navigation Package
There are two namespaces to leverage on when developing office application
- System.IO.Packaging in WindowsBase assembly and it is part of .NET framework 3.0 and 3.5
- DocumentFormat.OpenXml.Packaging is in DocumentFormat.OpenXml assembly which is part of OpenXml SDK
Eric White has a very good post on the difference of the two namespaces
The two namespaces serve the same purpose as to provide API to navigate within OpenXml document package, the difference is that DocumentFormat.OpenXml.Packaging provides strongly typed classes ie. WordProcessingDocument, SpreadSheetDocument, PresentationDocument, while System.IO.Packaging doesn't.
Resources for System.IO.Packaging
- Word 2007 Content Control Toolkit, this is a handy tool written by Matt Scott for listing and adding content control to word if you want to bind them to custom Xml data source, it is provided with source code which also serves as a nontrivial sample of using System.IO.Packaging to customize Word.
- Manipulating Content in a WordProcessingML document, MSDN tutorial that uses System.IO.Packaging and LINQ to Xml to program word
Resources for DocumentFormat.OpenXml.Packaging
Customize Office 2007 Ribbon using Visual Studio 2008(Part 2)
In part 1 of the series, I posted a question as where are the Office Add-In built by VS 2008 saved, and today I somewhat find out an answer (though it is not complete answer yet) with help of this blog
The AddIn is physically located at C:\YourAddInDir\Bin\Debug, and when Office application starts, it looks into following registry location for custom AddIns developed by user
- HKCU\Software\Microsoft\Office\<App>\AddIns
To see it, open a PowerShell window, and do the following
- cd Registry:: HKCU\Software\Microsoft\Office\Word\AddIns
- dir
- get-itemproperty WordSearch format-list
Still some questions remain:
- How many places the Office app look during its startup?
- Where are all the MS built-in customizations located?
Sunday, July 06, 2008
Book Review: The Bug A Novel by Ellen Ullman
How do I know about it: I was looking at Daemon reader comments, and one of the comment recommended this one. And as it happens, local library has a copy.
What I like: As a developer myself, I feel "real" about the story. The novel is about software developer and omnipresent bug fixing in software development process. A psychological drama with considerable twist of technical adventure, if you can appreciate some quite psudo code and C code. The author comes from a developer background as evidenced in the explanation of the bug and famous Game of Life by John Horton Conway. And its depiction of professional developer's daily life is realistic and truthful. It talked about the software development in early eighties, but the relevance still holds. I would give it 3 stars out of 5. People in software business will be able to appreciate it much better.
What I don't like: The book cannot be categorized as techno thriller. As exciting as bug finding and fixing is to brainy kids and developers, it just cannot stir the same excitement as true techno thriller. I am still looking forward to my shipment of Daemon from Amazon. Also a little too much algorithms explanation and coding deciphering in the book for non-software people.
Thursday, July 03, 2008
Customize Office 2007 Ribbon using Visual Studio 2008(Part 1)
This link provides a good walk through on Ribbon customization using Visual Studio 2008.
Displaying a Directory Search Custom Task Pane from the 2007 Office Ribbon
The question is : Where are the new customization saved in ? normal.dotm? But inside it, I don't see a customUI.xml file.
Q&A: How to find all the idMso for Office applications
Q: Office 2007 comes with a new Ribbon user interface, and all the built-in controls on it have id, these ids are special id called idMso. For example, File Save button's idMso ="FileSave", Developer tab's idMso="TabDeveloper". To customize Ribbon UI, many times you need to know idMso for the built-in controls you want to customize. But how to find what all idMso are for Word, Excel, Access and Outlook?
A: According to Customizing the 2007 Office Fluent Ribbon for Developers (Part 3), here is how:
- Click the Microsoft Office Button, and then click Application Options.
- Click Customize, and then select the item you want information about.
- Move the pointer over the item. The dialog box displays the control's idMso value in a ScreenTip, in parentheses.
Wednesday, July 02, 2008
Vista: Search can be tricky
One of the most talked about features of Vista is its search capability. You can search from search bar on start menu, or you can search from Windows Explorer search box. But you can be tricked by search results. I was trying to search a customUI.xsd file that I pretty sure exist on my machine, but search bar on start menu said no.

I was a little taken aback. So I went to Windows Explorer and navigated to the directory where I believe the file exists, and did a search right there using Windows Explorer search box, Voila! This time search finds it, as shown in the picture below:

So the trick is to add the more locations to Vista search indexer. To add more locations, in Windows Explorer, type something random in search box to turn on the Search Tools option and set the index locations from there, as shown in picture below:
Tuesday, July 01, 2008
LINQ to XML: Use it with Office 2007 documents
Last couple of months I have been focusing on learning Language Integrated Query (LINQ). One flavor of LINQ is LINQ to XML, an extremely powerful XML API to query and transform XML data. One problem I had when learning LINQ to XML is that simple XML data like <Customer><Name>John Smith</Name></Customer> can only get you so far. Eric White mentioned in his blog that OpenXML(which is the underlying format for Office 2007) is a good source and provided some very good samples on using LINQ to XML to manipulate Office 2007 documents. With vast amount of data parking in Office documents, LINQ to XML should be a good tool for mining this valuable data source.
Here are some other good LINQ to XML tutorials:
- Query XML tree
- Pure functional transformation of XML
- How to retrieve Value of Element
- How to project Anonymous type
- How to filter an optional Element
Migration to Visual Studio 2008 and .NET 3.5
Being a procrastinator, I finally take the dive and migrate to Visual Studio 2008 and .NET 3.5 platform today. By migration, I mean installing Visual Studio 2008 and converting all the VS 2005 projects to VS 2008. And uninstall Visual Studio 2005 completely from my hard drive. Part of the reason for the switch is that I have been learning LINQ for last couple of months on the VS08 installed on my laptop, and I feel comfortable enough now to upgrade my workhorse desktop setup to the VS2008. All things seem go well, the project I have been working on migrated well too. Everything compiles, including the website, WinForm application, DAL, BLL and all the goodies. And after a quick run-through, everything seems to work too. Next step: refactoring some of the code to more functional style and LINQish. Keep tuned.
Monday, June 30, 2008
Q&A: How to change file extension in Vista
Q: In Vista, how can I change a file named like FileWithWrongExtension.docx to FileWithWrongExtension.zip?
A: Open an Explorer window, click Organize dropdown on Ribbon bar, then select Folder and Search Options. This will bring up Folder Options window with General/View/Seach tabs. Click View tab, uncheck Hide extensions for known file types in Advanced Settings section. This will enable the Explorer to show file extension. Now you can change the file extension right there in the Explorer.
Saturday, June 28, 2008
How to get ahead
Recently, due to the unexpected changes in life as it always is, I am out of job and find a lot of time on my hand. So I take advantage of it and start to check off the ever-growing To-Read/To-Do list that get accumulated during my hectic working days, lot of them new technologies that I found relevant yet didn't have time to explore. And also I a lot of catch up with all blogs I subscribe to and my own blogs.
Then it hits me that all those bloggers are working professionals too. Just like myself when I was employed, they have products to deliver and they have family and kids and they cannot always sit in front of the computer during their spare time. How could they find time to enrich themselves? How could they grow their skill and advance their career while serving the needs of their employer? Where did they find the time to research and blog about their research ?
Then I ran into this statement by Juval Lowy, a highly respected developer:
I think you have to be a professional developer. I think you have to understand that you have spent part of your time honing your skills, it's an ongoing life goal. It doesn't stop because you learn one thing, there is going to be changes. You should also search for a more nourishing business environment -- if they don't let you learn on the job [then] it's probably not the best place to work for.
Seriously I mean, the rate of change today is such that learning is part of the job. No ifs, no buts, that's the way it is.
Hah! That's it. If the place you work for just doesn't allow you to explore new things, you just won't get it. And if the culture in the workplace is against exploring new things, the innovation just won't thrive and all your poor souls just going to wither out like dry lily.
FIND A RIGHT PLACE TO WORK THAT IS HOW YOU GET AHEAD.
But how?
- Only join a company that seeks to hire best. Even if you don't think you are the best, by all means, give it a try. When you work day in and day out with the best, you grow every day. Human beings are products of environment.
- Only join a company that is the best in its niche. Good won't cut it. It has to be the great.
Wednesday, June 04, 2008
Book Review Peopleware: Productive project and teams by Tom DeMarco and Timothy Lister
How do I know about it: Joel Spolsky gave the booka glowing recommendation on his blog. Being a fan of Joel, I bought a copy.
Content:
The book is divided into five parts. Part 1: Managing the human resources, there are six chapters. Chapter 1: Somewhere today, a project is failing. Chapter 2: Make a cheeseburger, sell a cheeseburger. Chapter 3: Vienna waits for you. Chapter 4: Quality-If time permits. Chapter 5: Parkison's law revisited. Chapter 6: laetrile. Part 2: The office environment has seven chapters and one intermezzo. Chapter 7: The furniture police. Chapter 8: "You never get anything done around here". Chapter 9: Saving money on space. Intermezzo(according to the book,"an intermezzo is a fanciful digression inserted between the pages of an otherwise serious work"): Productivity measurement and unidentified flying objects. Chapter 10: Brain time versus body time. Chapter 11: The telephone. Chapter 12: Bring back the door. Chapter 13: Taking umbrella steps. Part 3: The right people has four chapters. Chapter 14: The hornblower factor. Chapter 15: Hiring a juggler. Chapter 16: Happy to be here. Chapter 17: The self-healing system. Part 4: Growing productive teams has six chapters, chapter 18: The whole is greater than the sum of the parts. Chapter 19: The black team. Chapter 20: Teamicide. Chapter 21: A spaghetti dinner. Chapter 22: Open kimono. Chapter 23: Chemistry for team formation. Part 5: It is supposed to be fun to work here has three chapters, chapter 24: Chaos and order. Chapter 25: Free electrons, chapter 26: Holgar Dansk.
What I like: It is a small book, with total of 188 pages and twenty six chapters. That puts average of 7 pages per chapter. The longest chapter is 12 pages and shortest one is 3. With short chapter, it is easier on readers concentration span. On the other hand, it puts high demands on author to deliver points efficiently. Overall, this book delivers. I feel I take home a clear message from each chapter. In terms of content, the book brought back a lot of dreaded memory of my previous project experience and shed a light on them. One now-defunct start-up I worked for before, the CTO went through a product design meeting with us engineers and wrote down the time needed on the whiteboard, then set a deadline that reduced the development time by one fifth. Guess what, the product was delivered overdue with a lot of bugs in them, and the whole engineering team had to be brought to the support side to fix the problem (at meantime making more bugs along the way). And years after the company imploded, I found the answer in the book.
What I dislike: None.
Quotables: "Quality, far beyond that required by the end user, is a means to higher productivity." "Quality is free, but only to those who are willing to pay heavily for it." "The one thing that all the best organization shares is a preoccupation with being the best." And I especially like the authors quoting of "Vienna waits for you" by Billy Joel, oh, those good old days J
Sunday, October 01, 2006
Book Review: The 7 Habits of Highly Effective People by Stephen R.Covey
I just lost a close family member to chronic disease, and also lost my job due to my immigration status, I am short on goals but abundant in time for the first time in my adult life. And this book falls into my hand naturally.
What is the book all about?
Here are the 7 habits the book talks about, my translation in parenthesis:
1. Be proactive (You need to be in control of your life)
2. Begin with end in mind (Find out the things that matter most in your life)
3. Put first things first (How to manage your time)
4. Think Win/Win (How to manage your interpersonal relationship)
5. Seek first to understand, then to be understood ( How to communicate with people)
6. Synergize ( How to manage team work )
7. Sharpen the saw ( How to renew yourself )
What I like?
All. It is not just a how-to type of time management book, it dives to the core of an effective life style: principle-centered, value-driven approach. It asks you to think about long-term life goals and from there find out your life principles, and based on those principles to organize and manage your life. It wrinkled with examples from author’s teaching and training experience. A thought provoking book. On top of that, the author also provides suggestions to implement and practice the 7 habits in your life. Very practical book too.
What I dislike?
The author coined P/C and P throughout the book, yet the definition of them are not easily found. The index doesn’t help with finding either. So just you know, P/C means Production Capacity, P means Production.
Conclusion
Highly recommend.
Wednesday, June 07, 2006
What difference does it make to be born in America(Continued)
Tuesday, May 23, 2006
What difference does it make to be born in America(By Daddy again)
(To be continued ...)
Sunday, May 21, 2006
Thinking vs Talking(by Dad)
The question is how to effectively guide her thinking and talking so that the thinking process move forward and move fast. In other words, ask her good questions.



