tag:blogger.com,1999:blog-58046529117887639952024-02-19T05:28:22.704-08:00Graduate JeremyJeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-5804652911788763995.post-6295409458743207462009-04-24T12:03:00.000-07:002009-04-24T12:21:00.113-07:00GMAT Study Materials<p>
I wrote the GMAT recently. I had used a couple of books for a few days as study aids.</p>
<p>
I was really disappointed in how they advised you to study. It was all teaching for the test type stuff. The math sections in particular advised you to not solve algebra problems, but to just plug in numbers, or to work backwards from each given answer. It works (mostly) because the test is multiple choice, so you can verify guesses quickly. I found that I could do the algebra faster than I could do arithmetic, so I didn't follow that advice. The thought of using a number to verify an algebra theorem really irked me as a mathematician. Proof by example is never acceptable.</p>
<p>
I ended up writing a practice test before any study at all, just to get a feel for it (and for what the questions were asking). Then I studied section by section, iterating through the advice of each of the books per section. The three treatments of each test section reinforced each other. I did practice questions when I felt I needed to, but that wasn't very often. After finishing all the sections, I did another practice test to see how I was doing.</p>
<p>
<a href="http://ipac3.vpl.ca/ipac20/ipac.jsp?session=1FF05994F9691.80030&menu=search&aspect=subtab13&npp=10&ipp=20&spp=20&profile=pac&ri=18&source=~!horizon&index=.TW&term=gmat+comprehensive&x=0&y=0&aspect=subtab13">Kaplan's GMAT comprehensive program</a> had the best strategy and primers for each section of the test. <a href="http://ipac3.vpl.ca/ipac20/ipac.jsp?session=1FF05994F9691.80030&menu=search&aspect=subtab13&npp=10&ipp=20&spp=20&profile=pac&ri=17&source=~!horizon&index=.TW&term=gmat+800&x=0&y=0&aspect=subtab13">Kaplan's GMAT 800</a> was a little more condensed and offered a good summary of the other book. <a href="http://ipac3.vpl.ca/ipac20/ipac.jsp?session=1FF05994F9691.80030&profile=pac&source=~!horizon&view=subscriptionsummary&uri=full=3100001~!654263~!0&ri=16&aspect=subtab13&menu=search&ipp=20&spp=20&staffonly=&term=official+gmat&index=.TW&uindex=&aspect=subtab13&menu=search&ri=16">The Official guide for GMAT review</a> offered me my last pieces of advice before moving on to the next section of the test.</p>
<p>
There may be better books out there, but these three did fine for me. Although none of them were particularly helpful for the "sentence correction" part of the test.</p>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-21390888070964684632009-04-23T14:17:00.000-07:002009-04-24T11:52:21.995-07:00Where are the Customer's Yachts? (1940)<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuraedkA4LROivMOg9RazXHt-XmRa6Zefl-rILo7u2CgKPfx2kCEUcAicDPpYyqZvi7XLEFqxCZv5aEqQ9BHAeyit-vbS-N-IdxMvWCPfwuG6APfZmlMFKawGSnC-wZEC5CqPdfJSliFQ/s1600-h/where_customers_yachts.jpg"><img style="float:right; margin:0 10px 10px 0;width: 125px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuraedkA4LROivMOg9RazXHt-XmRa6Zefl-rILo7u2CgKPfx2kCEUcAicDPpYyqZvi7XLEFqxCZv5aEqQ9BHAeyit-vbS-N-IdxMvWCPfwuG6APfZmlMFKawGSnC-wZEC5CqPdfJSliFQ/s200/where_customers_yachts.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5328011459735099122" /></a>
<p>
I'm starting a financial reading list. It's got a lot of books on it, so I have decided to read them in chronological order of publication. I figure I will get the most out of them if I follow along on how one was built on top of another. The first book is the oldest one that I could find referenced from multiple recommendations.</p>
<p>
<u>Where are the Customer's Yachts</u> was published as a commentary on the financial industry in 1940. It was written by a guy working in finance during the roaring '20s, and who got out after the crash of '29. [The crash of '29 was precipitated by a large amount or margin buying and exacerbated by subsequent margin calls.]</p>
<p>
I got the following major observations from the book:</p>
<ol>
<li>The financial industry is set up to make bankers and brokers rich, not consumers. This is mainly done through fees / commissions.</li>
<li>Bankers like consumers to get rich, because then they are more likely to invest more and generate more fees.</li>
<li>Consumers like to think that bankers and brokers can predict the future, though they cant. Bankers and brokers like to think that they can predict the future, as a way to justify to themselves the fees that they collect.</li>
<li>Consumers who lose money by following the advice of bankers and brokers only have themselves to blame.</li>
</ol>
<p>
Basically, the main idea is that bankers and brokers are not the great advisers as they would have you believe, and consumers are foolish for thinking that they are. A rich broker is only rich because he is a good salesman, not because he can predict the future or make customers rich. The industry is set up to "extract rents" [note: this phrase does not appear in the book, I learned it when I was debating taking the <a href="https://www.csi.ca/student/en_ca/courses/csi/csc.xhtml">CSC</a>] from customers through fees, spreads, charges, commissions, ratios, etc.</p>
<p>
There is more detail about particular financial people and practices, and why they are clearly not as great as they seem, but it's all filler around the major points.</p>
<p>
The thesis of the book is contained in the title, and there is a story to explain it more:</p>
<blockquote><p>
Once in the dear dead days beyond recall, an out-of-town visitor was being shown the wonders of the New York financial district. When the party arrived at the Battery, one of his guides indicated some handsome ships riding at anchor. He said,</p>
<p>
"Look, those are the bankers' and brokers' yachts."</p>
<p>
"Where are the customers' yachts?" asked the naive visitor.</p>
[preface]</blockquote>
<p>
I wasn't paying attention for great quotes, but these two towards the end of the book caught my attention:</p>
<blockquote>The burnt customers certainly prefers to believe that he has been robbed rather than that he has been a fool on the advice of fools. Even Wall Street men themselves tend to encourage the idea. ... Faced with the huge losses "investors" have suffered, their egos subconsciously suggest to them that it is better to be regarded as a Machiavelli than as one who has spent his adult life engaged in mumbo-jumbo. [pg 196]</blockquote>
<blockquote>The specialist, as you know, is the man who keeps the "book" in a stock. On the left-hand page of his book he enters the buy orders that are placed with him, and on the right-hand page the sell orders. Whenever the orders of a buyer and a seller come together he executes the transaction and collects a commission for doing it. This part of his duties is quite all right, and perhaps a machine could be invented to do the same thing. [pg 200]</blockquote>
<p>
There was also a story about a "coin flipping contest" to describe how when enough people try to win at something, a fair number of them will succeed purely by chance. These expert coin flippers will start getting media attention due to their expertise at coin flipping, then they will start to publish publish books, newsletters, and tip-lines to offer advice on how to be an expert coin flipper. I didn't note the page that it is on, but there is a similar story online: <a href="http://www.investorhome.com/coinflip.htm">Coin-Flipping & Graham-and-Doddsville</a>.</p>
<ul>
<li><a href="http://books.google.ca/books?q=where are the customers yachts">Where are the Customer's Yachts? - Google Books</a></li>
<li><a href="http://ipac2.vpl.ca/ipac20/ipac.jsp?session=12N0P22H42281.20331&profile=pac&uri=link=3100023~!6244906~!3100023~!3100002&aspect=subtab97&menu=search&ri=1&source=~!horizon&term=Where+are+the+customer%27s+yachts%3F+%3A+or%2C+A+good+hard+look+at+Wall+Street+%2F&index=ALLTITL">Where are the Customer's Yachts? - VPL</a></li>
<li><a href="http://www.efficientmarket.ca/staticpages/index/FredSchwed">Where are the Customer's Yachts? - efficientmarket.ca</a></li>
<li><a href="http://beginnersinvest.about.com/b/2008/04/26/257149.htm">Where are the Customers' Yachts? - Timeless Advice from 1920's Wall Street</a></li>
<li><a href="http://ca.wiley.com/WileyCDA/WileyTitle/productCd-0471770892.html">Where Are the Customers' Yachts?: or A Good Hard Look at Wall Street</a></li>
<li><a href="http://www.four-pillars.ca/2007/05/27/%E2%80%9Cwhere-are-the-customers-yacht%E2%80%99s%E2%80%9D-book-review/">“Where are the Customers Yacht’s?” - Four Pillars</a></li>
</ul>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-76816048807452304482009-04-21T12:08:00.000-07:002009-04-21T12:13:10.640-07:00Why Old Media is Dead<blockquote><p>Briefly stated, the Gell-Mann Amnesia effect works as follows. You open the newspaper to an article on some subject you know well. In Murray's case, physics. In mine, show business. You read the article and see the journalist has absolutely no understanding of either the facts or the issues. Often, the article is so wrong it actually presents the story backward-reversing cause and effect. I call these the "wet streets cause rain" stories. Paper's full of them.</p>
<p>
In any case, you read with exasperation or amusement the multiple errors in a story-and then turn the page to national or international affairs, and read with renewed interest as if the rest of the newspaper was somehow more accurate about far-off Palestine than it was about the story you just read. You turn the page, and forget what you know.</p></blockquote>
--"<a href="http://www.crichton-official.com/speech-whyspeculate.html">Why Speculate</a>." Michael Crichton, 2002Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-54934526049750913982009-04-20T14:51:00.000-07:002009-04-21T12:12:16.377-07:00Why You Should Never Talk to the Police<embed id="VideoPlayback" src="http://video.google.ca/googleplayer.swf?docid=8167533318153586646&hl=en&fs=true" style="width:400px;height:326px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"> </embed>
<ol>
<li>There is no way it can help. (Any beneficial statements are hearsay.)</li>
<li>If you are guilty (and even if you are innocent) you may admit your guilt with no benefit in return.</li>
<li>Even if you are innocent and deny your guilt and mostly tell the truth, you may get carried away and tell some little lie or make some little mistake that will hang you.</li>
<li>Even if you are innocent and only tell the truth, you will always give the police some information that can be used to help convict you.</li>
<li>Even if you are innocent and only tell the truth, and do not tell the police anything incriminating, there is still a chance that your answers can be used against you if the police do not recall your testimony with 100% accuracy.</li>
<li>Even if you are innocent and only tell the truth and do not tell the police anything incriminating and the entire interview is videotaped, your answers can still be used against you if the police have any evidence, even mistaken or unreliable evidence, indicating that any of you statements are false.</li>
</ol>
<ol>
<li>You are not innocent of everything.</li>
<li>People are inherently honest.</li>
<li>People are stupid.</li>
<li>People like to tell their story.</li>
<li>Police are experts at interviews (you are going to lose).</li>
<li>Police are expert witnesses.</li>
</ol>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-945036015530216812009-02-23T02:33:00.000-08:002009-04-20T14:53:04.954-07:00Podcasts<p>
I started listening to real (amateur) podcasts... these people need to learn brevity and how to be succinct. The last one that I listened to was 40 minutes long and only made 3 points.</p>
<p>
I've noticed the same thing on call-in podcasts. Callers go on and on and on to say something that could have taken one sentence.</p>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-10700131508264914612009-02-08T02:45:00.000-08:002009-04-20T14:45:15.678-07:00The Paradox of Choice: Why More Is Less<p>
Two effects of too much choice: produces paralysis, less satisfaction.</p>
<p>
Best example: there used to be only one kind of blue jeans. Now there are hundreds. If you pick one, it will be better than the old style. But you will feel bad about it because the new jeans are not perfect.</p>
<blockquote>With all of these options available, my expectation about how good a pair of jeans went up. ... Adding options to peoples lives can't help but increase the expectations people have about how good those options will be, and what that's going to produce is less satisfaction with results, even when they are good results. Nobody in the world of marketing knows this.</blockquote>
<blockquote>The secret to happiness is low expectations.</blockquote>
<p>
When there is no (or little choice) and you are dissatisfied with the result, who is responsible? The world is.</p>
<p>
When there is much choice and you are dissatisfied with the result, who is responsible? You are. You could have done better. With so much choice, there is no excuse for failure. People met with this blame themselves. High standards lead to disappointment, disappointment leads to self blame.</p>
Why choice makes people miserable:<ol>
<li>Regret and anticipated regret</li>
<li>Opportunity costs</li>
<li>Escalation of expectations</li>
<li>Self-blame</li>
</ol>
<ul>
<li><a href="http://www.ted.com/index.php/talks/barry_schwartz_on_the_paradox_of_choice.html">TED: Barry Schwartz: The paradox of choice</a></li>
<li><a href="http://video.google.com/videoplay?docid=6127548813950043200">Google TechTalks April 27, 2006 Barry Schwartz </a></li>
<li><a href="http://en.wikipedia.org/wiki/The_Paradox_of_Choice">Wiki: The Paradox of Choice: Why More Is Less</a></li>
<li><a href="http://ipac3.vpl.ca/ipac20/ipac.jsp?session=1B3O0899896K1.11101&profile=pac&source=~!horizon&view=subscriptionsummary&uri=full=3100001~!1087013~!0&ri=2&aspect=subtab13&menu=search&ipp=20&spp=20&staffonly=&term=The+Paradox+of+Choice&index=.TW&uindex=&aspect=subtab13&menu=search&ri=2">VPL: The paradox of choice : why more is less / Barry Schwartz.</a></li>
</ul>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-86425981603842545842008-11-06T22:00:00.000-08:002009-04-24T11:54:01.623-07:00Agile Vancouver Notes<p>
Notes from <a href="http://agilevancouver.ca/?p2=/modules/agilevancouver/conference.jsp&id=3">Agile Vancouver: Much Ado About Agile III (2008)</a></p>
<h3>User Stories (née Use Cases) Template</h3>
<pre>
As a ROLE
I want FEATURE
So that BENEFIT</pre>
<h4>Abuse Stories</h4>
<pre>
As a hacker
I want to steal credit card numbers
So that I can make fraudulent purchases</pre>
<h3>Acceptance Test Templates</h3>
<pre>
Test: business rule
Given: initial condition
When: event
Then: outcome</pre>
<p>
See <a href="http://dannorth.net/whats-in-a-story">What’s in a Story?</a></p>
<h3>David Hussman</h3>
<p>
I was impressed by <a href="http://www.devjam.com/">David Hussman</a>, unfortunately his website is barren. There are some links to <a href="http://www.devjam.com/presentations/">presentations</a> if you hunt for them.</p>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-85105105104414623932008-06-17T14:23:00.000-07:002010-01-22T19:50:06.887-08:00Firefox 3 Settings<h3>Plugins</h3>
<ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/1865">Adblock Plus</a>
<ul>
<li><a href="http://www.cs.ubc.ca/%7Ejthillik/mozilla/adblock.txt">block list</a> (<a href="abp://subscribe/?location=http%3A%2F%2Fwww.cs.ubc.ca%2F%7Ejthillik%2Fmozilla%2Fadblock.txt&title=Jeremy%27s">subscribe</a>)</li>
<li><a href="http://www.cs.ubc.ca/%7Ejthillik/mozilla/adblock_class.txt">block list (by class)</a> (<a href="abp://subscribe/?location=http%3A%2F%2Fwww.cs.ubc.ca%2F%7Ejthillik%2Fmozilla%2Fadblock_class.txt&title=Jeremy%27s%20by%20class">subscribe</a>)</li>
</ul></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/3006">DownloadHelper</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/201">DownThemAll!</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/3336">ErrorZilla Mod</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/2109/">FEBE</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/398">Forecastfox</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/5673">FxIF</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/3863">iMacros</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/139">Image Zoom</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/3829">Live HTTP headers</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/636">PDF Download</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/8376">RDown - Rapidshare Downloader</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/2275">Torbutton</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/5890">Tree Style Tab</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/59">User Agent Switcher</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/748">Greasemonkey</a>
<ul>
<li><a href="http://www.cs.ubc.ca/~jthillik/mozilla/googleimagessafesearchoff.user.js">GoogleImagesSafesearchOff</a></li>
<li><a href="http://www.cs.ubc.ca/~jthillik/mozilla/securesite.user.js">SecureSite</a></li>
<li><a href="http://userscripts.org/scripts/show/1431">Blogger large post editor</a></li>
<li><a href="http://userscripts.org/scripts/show/2012">Flickr Link Original Images</a></li>
<li><a href="http://userstyles.org/styles/6897">Gmail: highlighted rows</a></li>
<li><a href="http://userstyles.org/styles/3958">Gmail: attachment icons</a></li>
<li><a href="http://arend-von-reinersdorff.com/folders4gmail/">Gmail: folders for gmail</a></li>
</ul></li>
</ul>
<h3>Themes</h3>
<ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/7">Qute</a></li>
</ul>
<h3><a href="http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries">about:config</a></h3>
<table><tr>
<td>browser.download.useDownloadDir</td>
<td>false</td>
</tr><tr>
<td>intl.accept_languages</td>
<td>en-ca,en-us,en</td>
</tr><tr>
<td>network.cookie.lifetimePolicy</td>
<td>2</td>
</tr><tr>
<td>browser.tabs.closeButtons</td>
<td>3</td>
</tr><tr>
<td>browser.chrome.toolbar_tips</td>
<td>false</td>
</tr><tr>
<td>layout.spellcheckDefault</td>
<td>2</td>
</tr><tr>
<td>network.http.sendRefererHeader</td>
<td>1</td>
</tr></table>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-62915526445344256402008-01-09T03:00:00.001-08:002009-02-08T02:42:23.502-08:00How to Drive Your Competition Crazy<p>
This was a great little marketing book for entrepreneurs. It detailed how to choose and position your product for maximal effect.</p>
The major points of the book (70%) of the content were:
<ol>
<li>Know your market<br/>
<a href="http://www.brainyquote.com/quotes/quotes/s/suntzu155752.html">"If you know the enemy and know yourself you need not fear the results of a hundred battles."</a><br/>
<a href="http://www.brainyquote.com/quotes/quotes/s/suntzu384543.html">"If ignorant both of your enemy and yourself, you are certain to be in peril."</a></li>
<li>Do what is best for your customers<br/>
<a href="http://www.brainyquote.com/quotes/quotes/s/suntzu123498.html">"The good fighters of old first put themselves beyond the possibility of defeat, and then waited for an opportunity of defeating the enemy."</a></li>
<li>Choose your battles (and enemies) to ensure you are always winning<br/>
<a href="http://www.brainyquote.com/quotes/quotes/s/suntzu387509.html">"Victorious warriors win first and then go to war, while defeated warriors go to war first and then seek to win."</a><br/>
<a href="http://www.brainyquote.com/quotes/quotes/s/suntzu383904.html">"He who knows when he can fight and when he cannot, will be victorious."</a>
</li>
</ol>
There were marginal points (15%) about:
<ul>
<li>Motivating employees and customers to become evangelists (These were really side-effect of #2 and #3)<br/>
<a href="http://www.brainyquote.com/quotes/quotes/s/suntzu402522.html">"Regard your soldiers as your children, and they will follow you into the deepest valleys; look on them as your own beloved sons, and they will stand by you even unto death."</a></li>
<li>Starting small (with focus)<br/>
<a href="http://www.brainyquote.com/quotes/quotes/s/suntzu103725.html">"Opportunities multiply as they are seized."</a><br/>
<a href="http://www.brainyquote.com/quotes/quotes/s/suntzu138178.html">"Pretend inferiority and encourage his arrogance."</a></li>
</ul>
<p>
There was some other minor points, but the above points account for ~85% of the book.</p>
<p>
They seem obvious, but most companies don't follow point #2 and get bogged down in something. I see it mostly when customers are treated as post-sale liability, instead of as a relationship asset. Others get stuck in creeping feature-ism, spending time and effort making sure that they have some check-boxes filled in for their product, even though it doesn't matter to the end user.</p>
<p>
I found point #3 to be interesting. By being an upstart, you can define your success on your own terms, and you can use your victories as motivation to improve.</p>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-58094872431736824092007-12-24T15:56:00.000-08:002009-02-08T02:40:58.961-08:00The Costs of Living: How Market Freedom Erodes the Best Things in Life<p>
I have to admit that I never finished reading this book. It was taken out of my hands by <a href="http://www.cbc.ca/canada/british-columbia/story/2007/06/25/bc-strike.html">the great library strike of '07</a>. I made it about half-way, but I found that the book had lost steam and was only throwing out an interesting anecdote every dozen pages by the middle. If you are curious about it, around 50% of the book's ideas are in the first chapter (or the second, I can't remember); the rest is just fodder for interest.</p>
<p>
The thesis was that market freedoms erode utility.</p>
<p>
In a free market, buyers vote with their dollars to signal to sellers what they want. If consumers want baggy pants, then sellers who make baggy pants get rewarded. If one seller makes the baggiest pants, then they will sell more, because consumers want the baggiest pants. If one seller can make baggy pants for less, they earn more profit either by selling more baggy pants because their's have a lower price, or by retaining more profit per (g-)unit.</p>
<p>
This all works pretty well, but micro-economics is built on a couple of major assumptions:</p>
<ul>
<li>Rationality: a consumer chooses between alternatives to maximize utility assuming:<ul>
<li>perfect knowledge: aware of all alternatives and their trade-offs in utility and price</li>
<li>competence: ability to evaluate alternatives</li>
<li>transitivity: if a=b and b=c then a=c</li>
</ul></li>
<li>Ordinality: choices can be ranked by level of utility</li>
</ul>
<p>
Swartz doesn't addresses these assumptions directly, but it's an underlying theme that some of them are false throughout his work.</p>
<p>
Perfect knowledge is perhaps the simplest assumption to attack. Consumers simply do not have perfect knowledge, and produces regularly take advantage of this (otherwise their would be no need for advertising). The clearest example in the book was about restaurant kitchens. Imagine two restaurants where they appear identically equal in utility, except for the fact that one has a spotless kitchen, and the other has a dirty one. The cost of maintaining the clean kitchen puts the one restaurant at a disadvantage. Customers don't see the kitchen, so they don't know about it. Over time, the restaurant with the dirty kitchen will be more successful since it doesn't have the associated cleaning cost.</p>
<p>
Bruce Schneier talked about lack of rationality (and asymmetrical information theory and <A href="http://en.wikipedia.org/wiki/The_Market_for_Lemons">The Market for Lemons</a>) and how it relates to computer security in <a href="http://www.schneier.com/blog/archives/2007/04/a_security_mark.html">A Security Market for Lemons</a> -- companies that spend R&D time on real security products get undercut by ones who don't because the consumers can't tell the difference.</p>
<p>
The lack of rationality of consumers leads to a situation where economic profit becomes the only driver for producers. Making the best product doesn't matter if consumers don't have knowledge and if they can't competently evaluate alternatives. It becomes a game of who can convince consumer that they offer the best utility while cutting as many corners as possible. Ultimately, the market rewards whomever makes the most money, not who serves consumers best, so the producers race to the bottom.</p>
<blockquote>The pursuit and exploitation of individual advantage in the service of profit is built into the ideology of the market. Those who fail to capitalize on their advantages will earn less money, or be fired by their bosses, or be driven out of business by their competitors.</blockquote>
<p>
You can see this in <a href="http://en.wikipedia.org/wiki/2007_pet_food_recalls">poisoned pet foods</a> and <a href="http://www.cbc.ca/consumer/story/2007/09/26/toys-recall.html?ref=rss">leaded childrens' toys</a>. Brands have become little more than advertising as everything is manufactured by outsourced low-cost producers.</p>
<p>
The early part of the book focuses on attacking the application of market theory to social institutions. It argues that schooling, medicine and even baseball are debased when they are understood in terms of profit-making.</p>
<p>
The medicine example is fairly long, but the gist of it was that doctors set up HMOs to serve their patients better. These got perverted by business types in the race to the bottom (the ones who didn't race went out of business because they weren't cost competitive with the ones that did), and they are left with the disaster of a health care system in the U.S. I don't remember the sport example.</p>
<p>
Education is probably easier to explain. It talks about how the desire to quantify education has forced a market mentality into it. The need to quantify lead to metrics, and those metrics became twisted from being diagnostics to being the end goal. It goes like this: we need a standard test to asses education levels, then there is talk about evaluating teachers (and schools) based on how their students' score on the test (which was not its intent), so the teachers (and admin) respond by teaching to the test to maximize scores instead of working on general education. In the end, the standardized test score becomes the only thing that matters. This happened a lot at my old University in its quest to stay on top of the Macleans' University Rankings.</p>
<p>
Another unfortunate example is how these metrics can extinguish the point of the activities. Students get rewarded based on number of books read, or something, so reading more (quantity) becomes the only goal. Students pick short books -- ones that are easy to read -- and read them as fast as possible. They don't think about what they read, they don't enjoy it, they don't reflect. They just read as fast as they can. The extrinsic reward, whatever it is, ultimately extinguishes the intrinsic motivation of the student.</p>
<p>
Joel Spolsky talked about <a href="http://www.joelonsoftware.com/items/2006/08/09.html">The Econ 101 Management Method</a> to say the same things about software project management. Extrinsic motivation destroys intrinsic motivation, and what's worse is that your metric is never the thing that you really care about, but your employees end up only caring about the metric (since that's how they are measured).</p>
<blockquote>Robert Austin, in his book Measuring and Managing Performance in Organizations, says there are two phases when you introduce new performance metrics. At first, you actually get what you wanted, because nobody has figured out how to cheat. In the second phase, you actually get something worse, as everyone figures out the trick to maximizing the thing that you’re measuring, even at the cost of ruining the company.</blockquote>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-48243375902103640422007-02-01T20:11:00.000-08:002007-02-01T20:21:52.014-08:00Unicode Mathematical Operator Entities<script>
function range(start, end) {
document.write("<table><tr><th>U</th>");
for(var i = 0x00; i <= 0x0f; i++) {
document.write("<th> " + i.toString(16) + " </th>");
}
document.write("</tr>");
for( ; start <= end; start += 0x10 ) {
document.write("<tr><th>" + start.toString(16) + "\n");
for(var j = 0x00; j <= 0x0f; j++) {
document.write("<td> &#x" + (start+j).toString(16) + "; </td>");
}
document.write("</tr>");
}
document.write("</table>");
}
</script>
<h3>Math Symbols</h3>
<script>
range(0x2200, 0x22ff);
</script>
<h3>Greek Letters</h3>
<script>
range(0x0390, 0x03CF);
</script>
<h3>References</h3>
<ul>
<li><a href="http://www.fileformat.info/info/unicode/block/mathematical_operators/list.htm">Unicode Characters in the Mathematical Operators Block</a></li>
<li><a href="http://en.wikipedia.org/wiki/Unicode_Mathematical_Operators">Unicode Mathematical Operators</a></li>
<li><a href="http://www.dionysia.org/html/entities/symbols.html">HTML Entities for symbols, mathematical symbols, and Greek letters</a></li>
<li><a href="http://www.blooberry.com/indexdot/html/tagpages/entities/math.htm">Unicode character entities: Mathematical Operators</a></li>
<li><a href="http://www.w3.org/TR/REC-html40/sgml/entities.html">Character entity references in HTML 4</a></li>
</ul>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-16542718970862389192007-01-07T13:19:00.000-08:002007-01-16T11:57:28.846-08:00Why Double-Checked Locking Doesn't Work<p>
Consider a singleton:</p>
<pre><code>public class Singleton {
private static Singleton instance;
private final Object important;
protected Singleton() {
important = Object.class; // or something important
}
public static Singleton instance() {
if(instance == null) {
instance = new Singleton();
}
return instance;
}
public Object getImportant() { return important; }
}</code></pre>
<p>
This works well for a single threaded program, but there's a race in the <code>instance()</code> method. If one thread evaluates the <code>if(instance == null)</code> test and starts the <code>Singleton()</code> constructor, but is then pre-emepted, another thread can run the test again and evaluate it to false, and also run the constructor, breaking the singleton pattern.</p>
<p>
A solution is to synchronize the <code>instance()</code> method.</p>
<pre><code> public static synchronized Singleton instance() {
if(instance == null) {
instance = new Singleton();
}
return instance;
}</code></pre>
<p>
This eliminates the race (only one thread can be within a synchronized block), but making a synchronized call is expensive -- on the order of 100 times more than a regular call. The proposed solution to this problem is to use a double-checked lock:</p>
<pre><code> public static Singleton instance() {
if(instance == null) {
synchronized(this) {
if(instance == null) {
instance = new Singleton();
}
}
}
return instance;
}</code></pre>
<p>
Here, an inexpensive test is preformed before execution of the synchronized block. If the singleton has already been initialized, then the synchronized block does not execute, saving the synchronization overhead and maintaining the singleton pattern.</p>
<p>
The problem with the double-checked lock is that it doesn't work without a strictly enforced memory model. Most systems do not have a strict enough memory model for it to work. A compiler (or VM, or whatever) can (and will) re-order instructions that it feels that it can reorder to improve performance, and the double-checked lock will fall victim to the reordering.</p>
<p>
Without reordering, we expect execution to occur as it is written:</p>
<pre><code>if(assigned to null) {
synchronize
if(assigned to null)
initialize object
assign object's memory location
un-synchronize
return</code></pre>
<p>
But with reordering, the scheme can be broken:</p>
<pre><code>if(assigned to null) {
synchronize
if(assigned to null)
assign object's memory location
initialize object
un-synchronize
return</code></pre>
<p>
The difference is subtle. It's fine in a single-threaded context (which is why the compiler thinks that it can re-order), but it breaks the lock when multi-threaded. A thread can be pre-empted between the assignment and the initialization. Another thread can come and run the outer test, discover that the reference has been assigned a non-null value, and continue executing with a reference to an un-initialized object. This causes undefined (bad) behaviour in the second thread.</p>
<p>
The best solution to this problem is to simply not use lazy initialization. Lazy initialization is sexy because it defers construction until it's needed. It saves memory (for a while) and delays execution (for a while), but the memory cost and execution time is paid eventually. If you statically initialize the singleton, it will all be paid for on the first reference to the class. This will make your start-up more expensive, but those costs (in space and time) would have been paid eventually.</p>
<p>
A common objection to this is that with lazy initialization, you only pay for the init if the singleton is used. Static initialization still retains this property. The initialization will only occur if the class is loaded by the classloader (or linked by the linker, or loaded by the page-fault handler), and is therefore going to be in use. The prescribed (and preferred in most cases) solution is:</p>
<pre><code>public class Singleton {
private static Singleton instance = new Singleton();
private final Object important;
protected Singleton() {
important = Object.class; // or something important
}
public static Singleton instance() {
return instance;
}
public Object getImportant() { return important; }
}</code></pre>
<p>
The second solution is to enforce the ordering of the instructions. As of Java 1.5, the <code>volatile</code> keyword prevents the reordering of reads/writes to a variable in relation to other variables (in addition to preventing local copies of variables). [The old behaviour was to enforce ordering on the variable itself, without respect to other variables, allowing the singleton to be assigned before its non-volatile instance variables were initialized.] Putting the <code>volatile</code> keyword on the singleton instance will prevent the variable from being assigned before its non-volatile instance variables are initialized:</p>
<pre><code> private volatile static Singleton instance;
public static Singleton instance() {
if(instance == null) {
synchronized(this) {
if(instance == null) {
instance = new Singleton();
}
}
}
return instance;
}</code></pre>
<p>
Using the <code>volatile</code> keyword in itself is expensive. It forces the the thread to use the main-memory copy of any variables, preventing them from being stored in CPU registers, in non-coherent caches, and a host of other optimizations. If there is no thread contention for the resource, using volatile may cost as much as a lock (since there would be no signaling by the semaphore). In the <code>volatile</code> solution, this cost is paid for every method call, not just when locking is required. If there is low thread contention, it may cost as much as locking on every call.</p>
<p>
Most developers are not familiar with the <code>volatile</code> keyword. It was mostly ignored pre-Java-1.5 by VM makers, and it didn't work as advertised. Even if it had worked, it's old semantics were not very useful. Accordingly, the development community largely ignored it. Relying on it for your singletons will risk naive developers from removing it, or following the double-checked lock pattern but missing the <code>volatile</code> keyword, or deploying the pattern to a pre-1.5 VM where it will not work. It should be avoided in favor of the statically initialized singleton.</p>
<p>
[Aside: these arguments apply to C/C++ and other languages as well as Java.]</p>
<h3>References</h3>
<ul>
<li><a href="http://www-128.ibm.com/developerworks/java/library/j-dcl.html">Double-checked locking and the Singleton pattern</a></li>
<li><a href="http://www-128.ibm.com/developerworks/library/j-jtp03304/">Java theory and practice: Fixing the Java Memory Model, Part 2</a></li>
<li><a href="http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html">The "Double-Checked Locking is Broken" Declaration</a></li>
</ul>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-43992854658081971312007-01-02T16:53:00.000-08:002007-01-08T13:28:42.322-08:00SoftReference vs WeakReference<p>
The difference between the a SoftReference and a WeakReference is how aggressively they are garbage collected. A WeakReference is GC'ed whenever the object becomes weakly reachable. A SoftReferenec is GC'ed when an object is softly reachable <b>and</b> the heap is full. Accordingly, WeakReferences are only useful as canonical mappings, and SoftReferences are most useful in memory-sensitive caches.</p>
<p>
The WeakHashMap is used as a canonical map. Its <i>keys</i> are weakly held, not its values. There is no corresponding SoftHashMap to implement a cache included in the core API.</p>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-73948763433427975912006-11-25T16:37:00.000-08:002006-11-25T18:23:08.927-08:00Subversion Quickstart<h4>Repository Set-Up</h4>
<code>
mkdir -p ~/.SVNroot/proj/;
svnadmin create ~/.SVNroot/proj/;
mkdir -p ~/proj/trunk/ ~/proj/branches/ ~/proj/tags/;
### [set-up initial trunk in ~/proj/trunk];
svn import ~/proj/ file://$home/.SVNroot/proj/ -m "initial trunk";
</code>
<h4>Initial Checkout, local filesystem</h4>
<code>
rm -R ~/proj/; mkdir ~/proj/;
svn checkout file://$home/.SVNroot/proj/trunk/ ~/proj/;
</code>
<h4>Initial Checkout, remote filesystem</h4>
<code>
svn checkout svn+ssh://host/$home/.SVNroot/proj/trunk/ ~/proj/;
</code>
<h3>References</h3>
<ul>
<li><a href="http://subversion.tigris.org/">Subversion</a></li>
<li><a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a></li>
<li><a href="http://www.developer.com/java/other/article.php/3499816">A Crash Course in Subversion</a></li>
<li><a href="http://www.nedbatchelder.com/text/quicksvn.html">Subversion on Windows</a></li>
<li><a href="http://svnbook.red-bean.com/">Version Control with Subversion</a><ul>
<li><a href="http://svnbook.red-bean.com/nightly/en/svn.intro.quickstart.html">Quick Start</a>
</ul></li>
</ul>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-80276628301453816572006-11-23T14:31:00.000-08:002009-04-22T13:14:00.947-07:00Firefox 2.0 add-ons<h3>Plugins</h3>
<ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/1865">Adblock Plus</a><ul>
<li><a href="http://www.cs.ubc.ca/~jthillik/mozilla/adblock.txt">block list</a> (<a href="abp://subscribe/?location=http%3A%2F%2Fwww.cs.ubc.ca%2F~jthillik%2Fmozilla%2Fadblock.txt&title=Jeremy%27s">subscribe</a>)</li>
<li><a href="http://www.cs.ubc.ca/~jthillik/mozilla/adblock_class.txt">block list (by class)</a> (<a href="abp://subscribe/?location=http%3A%2F%2Fwww.cs.ubc.ca%2F~jthillik%2Fmozilla%2Fadblock_class.txt&title=Jeremy%27s%20by%20class">subscribe</a>)</li>
<li><a href="http://www.cs.ubc.ca/~jthillik/mozilla/adblock_facebook.txt">block list (for facebook)</a> (<a href="abp://subscribe/?location=http%3A%2F%2Fwww.cs.ubc.ca%2F~jthillik%2Fmozilla%2Fadblock_facebook.txt&title=Jeremy%27s%20for%20facebook">subscribe</a>)</li>
</ul></li>
<li><a href="https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&id=134">Copy Plain Text</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/201">DownThemAll!</a></li>
<li><a href="https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&id=398">ForecastFox</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/139">Image Zoom</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/636">PDF Download</a></li>
<li><a href="https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&id=60">Web Developer</a></li>
<li><a href="http://greasemonkey.mozdev.org/">Greasemonkey</a><ul>
<li><a href="http://userscripts.org/scripts/show/1431">Blogger Large Post Editor</a></li>
<li><a href="http://userscripts.org/scripts/show/2012">Flickr Link Original Images</a></li>
<li><a href="http://userscripts.org/scripts/show/4375">Usercash header remover</a></li>
<li><a href="http://userscripts.org/scripts/show/3183">Hotmail Not Today</a></li>
<li><s><a href="http://jeffpalm.com/craigslist/">craigslist inline</a></s></li>
<li><s><a href="http://www.jeremyh.com/mozilla/googlethumbnails.user.js">Google Thumbnails</a> (written by me)</s></li>
<li><a href="http://www.cs.ubc.ca/~jthillik/mozilla/googleimagessafesearchoff.user.js">GoogleImagesSafesearchOff</a> (written by me)</li>
<li><a href="http://www.cs.ubc.ca/~jthillik/mozilla/securesite.user.js">SecureSite</a> (written by me)</li>
</ul></li>
</ul>
<h3>Themes</h3>
<ul>
<li><a href="https://addons.update.mozilla.org/themes/moreinfo.php?application=firefox&id=7">Qute 3</a></li>
</ul>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0tag:blogger.com,1999:blog-5804652911788763995.post-68883567340753607042006-11-23T00:39:00.000-08:002009-04-22T13:13:51.759-07:00Firefox 2.0 Config Settings<h3><a href="http://kb.mozillazine.org/About:config_entries">about:config</a></h3>
<table><tbody><tr>
<td><a href="http://kb.mozillazine.org/Browser.tabs.tabMinWidth">browser.tabs.tabMinWidth</a></td>
<td>60</td>
</tr><tr>
<td><a href="http://kb.mozillazine.org/Browser.tabs.closeButtons">browser.tabs.closeButtons</a></td>
<td>3</td>
</tr><tr>
<td>browser.chrome.toolbar_tips</td>
<td>false</td>
</tr><tr>
<td>browser.urlbar.hideGoButton</td>
<td>true</td>
</tr><tr>
<td><a href="http://kb.mozillazine.org/Layout.spellcheckDefault">layout.spellcheckDefault</a></td>
<td>2</td>
</tr><tr>
<td><a href="http://kb.mozillazine.org/Network.http.sendRefererHeader">network.http.sendRefererHeader</a></td>
<td>1</td>
</tr><tr>
<td>intl.accept_languages</td>
<td>en-ca,en,en-us</td>
</tr></tbody></table>
<h3>References</h3>
<ul>
<li><a href="http://kenrose.org/blog/2006/10/23/firefox-and-its-go-button/">Ken Rose</a></li>
<li><a href="http://www.lifehacker.com/software/firefox-2/geek-to-live-top-firefox-2-config-tweaks-209941.php">Life Hacker</a></li>
<li><a href="http://kb.mozillazine.org/About:config_entries">about:config</a></li>
</ul>Jeremy Hhttp://www.blogger.com/profile/03549304318485464635noreply@blogger.com0