<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0ENRHY4cCp7ImA9WhVWEk8.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659</id><updated>2012-04-23T15:54:55.838-07:00</updated><category term="work" /><title>Optimizing the world</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.simonfl.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.simonfl.com/" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/OptimizingTheWorld" /><feedburner:info uri="optimizingtheworld" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>OptimizingTheWorld</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DUQDR3ozeip7ImA9WxRVFUg.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-3865315298322062855</id><published>2008-11-12T22:16:00.000-08:00</published><updated>2008-11-12T22:22:56.482-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-12T22:22:56.482-08:00</app:edited><title>Wikipedia wants you to be mauled by a bear</title><content type="html">&lt;div&gt;Holy cow, a post!  It's not at all what I usually write about, but it's better than nothing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_V2sbNmwFdKg/SRvHC0c8h0I/AAAAAAAAIj4/iqo9U5kbneg/s1600-h/wikipedia_hates_you.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 167px;" src="http://1.bp.blogspot.com/_V2sbNmwFdKg/SRvHC0c8h0I/AAAAAAAAIj4/iqo9U5kbneg/s400/wikipedia_hates_you.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5268023040393643842" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://en.wikipedia.org/wiki/List_of_fatal_bear_attacks_in_North_America_by_decade"&gt;List of fatal bear attacks in North America by decade&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/8358823616508684659-3865315298322062855?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/3865315298322062855/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=3865315298322062855" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3865315298322062855?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3865315298322062855?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/_PowKyQw_vo/wikipedia-wants-you-to-be-mauled-by.html" title="Wikipedia wants you to be mauled by a bear" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_V2sbNmwFdKg/SRvHC0c8h0I/AAAAAAAAIj4/iqo9U5kbneg/s72-c/wikipedia_hates_you.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://www.simonfl.com/2008/11/wikipedia-wants-you-to-be-mauled-by.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMHSH45fyp7ImA9WxdQGU4.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-3773244670270401787</id><published>2008-06-19T20:40:00.000-07:00</published><updated>2008-06-19T21:00:39.027-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-19T21:00:39.027-07:00</app:edited><title>Experiments on habits</title><content type="html">As you might have read in a &lt;a href="http://www.simonfl.com/2008/06/wondering-what-i-do-for-living.html#links"&gt;previous post&lt;/a&gt;, my company is able to innovate so quickly because we keep don't hesitate trying out new stuff.  If someone has an idea, it can go from a vague thought to running on live traffic in a matter of weeks.  If the numbers say that it's a good idea, we keep it.  If not, we throw it out, no regret.  My coworker has an interesting post about how we do some form of &lt;a href="http://insanecats.com/cgi-bin/single.py?month=jun08&amp;amp;msg=02"&gt;A/B testing&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Experimentation is at the very heart of science.  If you don't try anything new, you can't learn anything.  This is why I try to vary my habits from time to time to try something different.  Last November I spent the whole month without drinking caffeine.  I wanted to prove that "I can stop whenever I want to but I just don't want to" was true for me.  Also, I wanted to know if I would be more or less tired, sleep better, etc.  Overall, I found that after a few days of not consuming caffeine (coffee, tea, coke, etc.) I didn't really crave it at all and that it didn't affect my overall health level.&lt;br /&gt;&lt;br /&gt;Since last Monday I've started to eat vegetarian.  I've been talking about this for months and finally did it.  Well, I've actually been told that since I decided to eat seafood I'm rather a &lt;a href="http://en.wikipedia.org/wiki/Pescetarianism"&gt;pescetarian&lt;/a&gt;.  I'm not a very difficult person when it comes to food, I'll eat anything.  So it's been weird for me to start being picky about what I eat, I feel almost guilty.&lt;br /&gt;&lt;br /&gt;Thus far, I've been kind of hungry a lot.  I'm eating a lot Indian food because they have a lot of very tasty meals without meat.  That, salad and pasta. &lt;br /&gt;&lt;br /&gt;I haven't decided exactly how long I'm going to keep this up, at least until the end of June, maybe a few weeks longer, I'll see how it goes.  I have no intention of this becoming a permanent thing.&lt;br /&gt;&lt;br /&gt;P.S. I actually meant to start this last Friday.  I did, but then I accidentally eat a chicken caesar salad for dinner...  Not a very good start!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-3773244670270401787?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/3773244670270401787/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=3773244670270401787" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3773244670270401787?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3773244670270401787?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/AqyRBX381jU/experiments-on-habits.html" title="Experiments on habits" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>3</thr:total><feedburner:origLink>http://www.simonfl.com/2008/06/experiments-on-habits.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYBQns5cCp7ImA9WxdRGUs.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-8549282812899869449</id><published>2008-06-08T15:07:00.000-07:00</published><updated>2008-06-08T16:02:33.528-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-08T16:02:33.528-07:00</app:edited><title>How much do you value your life?</title><content type="html">Let's say you're asked how much a human life is worth.  To avoid weird looks in most circles you would answer that it's invaluable, we can't quantify something like that.  Of course, I don't hang out with what could be considered normal people so my follow up question would probably be "which life?" ;)&lt;br /&gt;&lt;br /&gt;Let's use our own life as an example, as it's the one we're all most familiar with.  We put a price on our life with our every day actions without realizing it.  When you decide to drive instead of taking the bus, you gamble your life away.  It's much more likely you'll die while driving than while taking the bus.  But you think that the time and comfort savings are worth the chances of you dying in a car crash, and so you take the car.  How about when you decide to buy more expensive fruits and vegetables.  The taste might be similar to cheaper ones but the more expensive organic fruits are generally better for your health, and thus more likely to increase your life span.&lt;br /&gt;&lt;br /&gt;Stanford professor Ronald Howard invented a concept called the &lt;span style="font-weight: bold;"&gt;micromort&lt;/span&gt;.  A micromort is a one in a million chance of death. In other words, it's the amount of money you would have to give to someone for them to risk a one in a million chance of death.  If someone's willing to receive (or, more likely, save) 20$ for a one in a million chance of death, then we can infer they value their life at 20 million dollars.&lt;br /&gt;&lt;br /&gt;There's this book I like called &lt;a href="http://www.makinggreatdecisions.com/"&gt;Making Great Decions in Business and Life&lt;/a&gt; where the authors use this concept to analyze a car purchasing decision.  They, previously in the book, penned the human life at an average of 10 millions, so 10$ for a micromort.  I'll quote from the book:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Consider buying a car.  For each million lighter cars--those weighing less than 2,500 pounds--that are on the roads, 109 people die each year.  For each million heavier cars--those weighing 3,500 pounds--that are on the road, only 53 people die each year.  If we use an average of 10,000 miles per year per vehicle, then each mile driven in a smaller car costs the driver 0.0109 micromorts while each mile in a larger car costs 0.0053 micromorts.  If you keep this car for 100,000 miles, then the smaller car has a safety cost of $10,900 (1,090 micromorts times $10 per micromorts) while the larger car has a safety cost of only $5,300 (530 micromorts times $10 per micromort).  The larger car undoubtedly costs more to purchase and operate, but given everything else equal--don't consider the smoother ride, the bigger trunk, or the worse mileage--it is worth $5,600 more purely on safety.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Think about this concept as you make trivial decisions  in your daily life and you'll be amazed at the amount of risks you take.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-8549282812899869449?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/8549282812899869449/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=8549282812899869449" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/8549282812899869449?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/8549282812899869449?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/LcpG7oGD0lA/how-much-do-you-value-your-life.html" title="How much do you value your life?" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>2</thr:total><feedburner:origLink>http://www.simonfl.com/2008/06/how-much-do-you-value-your-life.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUNSH84fCp7ImA9WxdRE0o.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-5218689127435815355</id><published>2008-06-01T20:33:00.001-07:00</published><updated>2008-06-01T20:44:59.134-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-01T20:44:59.134-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="work" /><title>Wondering what I do for a living?</title><content type="html">I know I haven't been writing anything lately and I apologize to whoever might read this blog (hi mom!).  I don't usually post work related things but there's an &lt;a href="http://www.nytimes.com/2008/06/02/technology/02google.html?pagewanted=all"&gt;interesting article&lt;/a&gt; in the NYT about my group at Google that might be of passing interest to people who know me.  Maybe you'll better understand why I think the way I do when you see the kind of people I spent my work weeks with.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That is all.  I've got a great post coming up, it's been in my head for months, I just need to put it down on paper... well, computer, whatever.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-5218689127435815355?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/5218689127435815355/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=5218689127435815355" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/5218689127435815355?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/5218689127435815355?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/ET0fSMaqxvc/wondering-what-i-do-for-living.html" title="Wondering what I do for a living?" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.simonfl.com/2008/06/wondering-what-i-do-for-living.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cEQXw5cCp7ImA9WxZbGEU.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-8808319765281358604</id><published>2008-04-22T09:13:00.000-07:00</published><updated>2008-04-22T09:16:40.228-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-22T09:16:40.228-07:00</app:edited><title>Male restroom etiquette</title><content type="html">I'd love to write a whole article about this, but the video covers everything that needs to be said.&lt;br /&gt;&lt;br /&gt;&lt;object height="355" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/IzO1mCAVyMw&amp;amp;hl=en"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/IzO1mCAVyMw&amp;amp;hl=en" type="application/x-shockwave-flash" wmode="transparent" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-8808319765281358604?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/8808319765281358604/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=8808319765281358604" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/8808319765281358604?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/8808319765281358604?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/EuTUF78JtAY/male-restroom-etiquette.html" title="Male restroom etiquette" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.simonfl.com/2008/04/male-restroom-etiquette.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8BQHs7cSp7ImA9WxZUGU8.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-9078792639141788807</id><published>2008-04-11T08:21:00.000-07:00</published><updated>2008-04-11T08:30:51.509-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-11T08:30:51.509-07:00</app:edited><title>So much for automated traffic cops</title><content type="html">Looks like a few cities couldn't resist the temptation of easy money from their constituents.  &lt;a href="http://www.leftlanenews.com/six-us-cities-tamper-with-traffic-cameras-for-profit.html"&gt;Six cities&lt;/a&gt; have been found to have &lt;span style="font-weight: bold;"&gt;shortened&lt;/span&gt; the yellow light duration after installing red light camera.  This has the effect of catching more people on red lights, at the cost of causing more accidents.&lt;br /&gt;&lt;br /&gt;What is wrong with those cities' government?  I thought they were supposed to serve the people, not get them read-ended.&lt;br /&gt;&lt;br /&gt;&lt;small style="font-style: italic;"&gt;Through &lt;a href="http://techdirt.com/articles/20080410/011257809.shtml"&gt;Techdirt&lt;/a&gt;&lt;/small&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-9078792639141788807?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/9078792639141788807/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=9078792639141788807" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/9078792639141788807?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/9078792639141788807?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/0BXMddRnt9U/so-much-for-automated-traffic-cops.html" title="So much for automated traffic cops" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>2</thr:total><feedburner:origLink>http://www.simonfl.com/2008/04/so-much-for-automated-traffic-cops.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4EQH84cCp7ImA9WxZVEUg.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-892744729204776798</id><published>2008-03-21T19:27:00.000-07:00</published><updated>2008-03-21T20:01:41.138-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-21T20:01:41.138-07:00</app:edited><title>Monte Carlo simulation</title><content type="html">Sometimes, figuring out something deterministically is hard.  Sometimes, it's just plain impossible.&lt;div&gt; &lt;/div&gt;&lt;div&gt;Let's say we have a model and we want to make sure that model is correct.  The best way to do that is to mathematically prove that it is correct.  This works well for simple model, but when you have insanely completed models it become a huge pain to try to prove it right.  What can you do to validate it?  We can use something called a &lt;a href="http://en.wikipedia.org/wiki/Monte_Carlo_method"&gt;Monte Carlo simulation&lt;/a&gt;.  This is also known as statistical sampling.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Here's how wikipedia describe the Monte Carlo method:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Define a domain of possible inputs.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Generate inputs randomly from the domain, and perform a deterministic computation on them.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Aggregate the results of the individual computations into the final result.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;I'll use the simplest of example to show how this can be done.  I want to write a test to know if a number is even or odd (told you it was going to be simple).  I'll write some code to test it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;def is_even(number):&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;  if number % 2 == 0:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;    return True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;  else:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;    return False&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;This is &lt;a href="http://www.python.org/"&gt;Python&lt;/a&gt; code by the way, but it should be simple enough even for non programmer.  It's a function called is_even that takes an integer and returns true if the number modulo 2 is 0 and false otherwise.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's run a monte carlo simulator on that function to make sure it's right.  We'll generate &lt;span class="Apple-style-span" style="font-style: italic;"&gt;n&lt;/span&gt; random integer between minus one billion and a billion and we expect that around 50% of them will be even.  We'll set &lt;span class="Apple-style-span" style="font-style: italic;"&gt;n&lt;/span&gt; at a reasonable 100 000 runs.  The higher the number of runs, the more accurate the result will be, or rather the higher the confidence in the results will be.  It should look like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;div&gt;import random&lt;/div&gt;&lt;div&gt;n = 100000&lt;/div&gt;&lt;div&gt;number_even = 0&lt;/div&gt;&lt;div&gt;for i in range(n):&lt;/div&gt;&lt;div&gt;  random_number = random.randint(-1000000000, 1000000000)&lt;/div&gt;&lt;div&gt;  if is_even(random_number):&lt;/div&gt;&lt;div&gt;    number_even = number_even + 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;print '%f%% of numbers are even' % (float(number_even) / float(n))&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When I run this I get this message back:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.501340% of numbers are even&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And without any kind of mathematical proof we have validated the model.  Though it's important to realize I haven't actually proved anything, I've simply shown that with a high probability (I'm too lazy here but we could actually find the &lt;a href="http://en.wikipedia.org/wiki/Confidence_interval"&gt;confidence interval&lt;/a&gt; relatively easily) the model acts a certain way.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This example was, of course, way too trivial.  But this kind of reasoning is very useful when a system has too many different components which makes it difficult to accurately predict, such as a traffic flow system (think about elevator planning for example).&lt;/div&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/8358823616508684659-892744729204776798?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/892744729204776798/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=892744729204776798" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/892744729204776798?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/892744729204776798?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/3tmxkuBvxeQ/monte-carlo-simulation.html" title="Monte Carlo simulation" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>2</thr:total><feedburner:origLink>http://www.simonfl.com/2008/03/monte-carlo-simulation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQNSXg5eyp7ImA9WxZVEU8.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-1794464952159987117</id><published>2008-03-21T10:49:00.001-07:00</published><updated>2008-03-21T11:16:38.623-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-21T11:16:38.623-07:00</app:edited><title>Red lights cameras</title><content type="html">Think &lt;a href="http://auto.howstuffworks.com/red-light-camera.htm"&gt;red lights cameras&lt;/a&gt; will pay for themselves with the fines they bring?  Think again.  It seems the city of Dallas has been &lt;a href="http://www.dallasnews.com/sharedcontent/dws/news/localnews/stories/DN-redlights_15met.ART.North.Edition1.468120d.html"&gt;having some issues&lt;/a&gt; with it's camera problem.&lt;br /&gt;&lt;br /&gt;They figured the cameras would bring in 14.8M$ in revenue last year but they only brought 6.2M$.  Why?  People figured out that going through a red light with an automated system that fined you wasn't a very good idea, and so they stopped doing it.&lt;br /&gt;&lt;br /&gt;What is Dallas doing?  They're shutting down some of the cameras because they're not bringing in as much money as expected.  This brings up an important issue: are the cameras there to increase public safety or are they there to increase revenue?&lt;br /&gt;&lt;br /&gt;They're also thinking about idling some of them.  An idle camera is very cheap to maintain and the desired safety effect will still be there (as long as they rotate which camera are idle).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(Found through &lt;/span&gt;&lt;a style="font-style: italic;" href="http://freakonomics.blogs.nytimes.com/2008/03/21/your-city-needs-you-to-blow-through-red-lights/"&gt;Freakonomics&lt;/a&gt;&lt;span style="font-style: italic;"&gt;.)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-1794464952159987117?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/1794464952159987117/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=1794464952159987117" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/1794464952159987117?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/1794464952159987117?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/arTz7uVb_Cw/red-lights-cameras.html" title="Red lights cameras" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.simonfl.com/2008/03/red-lights-cameras.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQBQ3o9fyp7ImA9WxZWGEw.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-3258441407693299798</id><published>2008-03-17T20:44:00.000-07:00</published><updated>2008-03-17T21:09:12.467-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-17T21:09:12.467-07:00</app:edited><title>Airplane boarding</title><content type="html">A year ago, I was 22 and I had only taken a plane once.  Since then, I've taken six trips using an airplane.  As an amateur optimizer, the whole process of boarding the plane always seemed inefficient to me.  But much work has been put into finding efficient boarding algorithm, this &lt;a href="http://www.public.asu.edu/%7Edbvan1/projects/boarding/boarding.htm"&gt;page&lt;/a&gt; seems to describe the different methods pretty clearly.&lt;br /&gt;&lt;br /&gt;So I won't talk about getting in the plane but rather about getting out.  Unfortunately, airline companies don't really have any kind of control over the passengers so the process is rather chaotic.  Let's examine how it work:&lt;br /&gt;&lt;br /&gt;People at the front row of the plane get up first and leave, followed by the people in the second row, third row, etc. until the plane is empty.  This is roughly how it goes.  The big problem here is the presence of overhead bins.  Let's use a plane with 3 seats on each side of the single aisle as an example.   Only the two persons on the aisle seats of each row can actually get up and access the overhead bins.  What that means is that when it's (finally) time for your row to leave the plane, four people will have to take the time to take their carry-on luggage from the overhead bins.&lt;br /&gt;&lt;br /&gt;Since the aisle space is the bottleneck here, every second you block it is a second t&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/B737-500.Economycabin.jpg/800px-B737-500.Economycabin.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px;" src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/B737-500.Economycabin.jpg/800px-B737-500.Economycabin.jpg" alt="" border="0" /&gt;&lt;/a&gt;hat everyone behind you lose.  When you're in the last row you lose a lot of time because of that!  Why is that happening?  It's pretty easy to understand.  If it takes you five seconds in the aisle to take your stuff out, that's only five seconds to you, even if it might be multiplied by the hundred people waiting behind you.  I guess it's the "I waited this long, now it's my turn, I'll take as much time as I want" phenomenon we can see in whatever other situation where there is a long wait time.  Once you're not waiting anymore you don't realize lots of other people are still waiting.&lt;br /&gt;&lt;br /&gt;What can you do to help?  Well, if you're in the aisle seat, offer to bring down other people's luggage from the bins.  That should help tremendously.  Otherwise, when it's your turn, try to avoid staying immobile in the aisle, try getting your stuff and then go back to a seat if you need to adjust your bag or whatnot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-3258441407693299798?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/3258441407693299798/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=3258441407693299798" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3258441407693299798?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3258441407693299798?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/CmsvI1wzw8A/airplane-boarding.html" title="Airplane boarding" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>3</thr:total><feedburner:origLink>http://www.simonfl.com/2008/03/airplane-boarding.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8BRH08fip7ImA9WxZSFks.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-1316955867556819555</id><published>2008-01-29T20:46:00.000-08:00</published><updated>2008-01-29T20:54:15.376-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-29T20:54:15.376-08:00</app:edited><title>Wait for the bus or walk?</title><content type="html">Another bus related question.&lt;br /&gt;&lt;br /&gt;You're waiting for the bus, it's late, it feels like it will never come.  Inaction is killing slowly making you angry, you wonder: should I just walk instead?  Unsurprisingly, you should choose the lazy option and wait, which is going to be optimal in almost all cases.&lt;br /&gt;&lt;br /&gt;This is what three mathematicians have found out in &lt;a href="http://arxiv.org/abs/0801.0297"&gt;this paper&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-1316955867556819555?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/1316955867556819555/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=1316955867556819555" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/1316955867556819555?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/1316955867556819555?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/qGW_OPWRE2k/wait-for-bus-or-walk.html" title="Wait for the bus or walk?" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.simonfl.com/2008/01/wait-for-bus-or-walk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MBQX0-fyp7ImA9WB9aFE8.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-4704397864758965860</id><published>2008-01-03T21:01:00.000-08:00</published><updated>2008-01-03T21:44:10.357-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-03T21:44:10.357-08:00</app:edited><title>Optimizing your nutrition</title><content type="html">I used to be completely oblivious to what I ate.  I would just eat whatever I wanted, whenever I wanted and never really worry about it.  I have good reasons though, I'm 5'10 and 130lbs, I don't really have anything to worry about.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But this all changed last March when I went to the &lt;a href="http://www.csgames.org/"&gt;Computer Science Games&lt;/a&gt; for the second straight year.  The CS Games, as it's called, is a week-end long competition where teams composed of undergrads from various universities fight in computer science related contests.  One of the competition involved generating the best diet possible for an athlete, given a list of food, with their associated nutrition information, and a set of guidelines.  I unfortunately don't have the exact problem anymore but the rules were of the type:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You need 2000 calories, you will lose one point for every calorie under or over that.&lt;/li&gt;&lt;li&gt;You lose 100 points for every gram of trans fat.&lt;/li&gt;&lt;li&gt;You lose 100 points if you don't have at least one green vegetable.&lt;/li&gt;&lt;li&gt;You need exactly 60g of sugar and will lose 5 points for every g under or over.&lt;/li&gt;&lt;li&gt;You need 100% of the daily intake of Vitamin A&lt;br /&gt;&lt;/li&gt;&lt;li&gt;etc.&lt;/li&gt;&lt;/ul&gt;It's a typical example of what is called &lt;a href="http://en.wikipedia.org/wiki/Combinatorial_optimization"&gt;combinatorial optimization&lt;/a&gt;.  This is when I realized that every thing you put in your mouth can be categorized and transformed into a set of numbers.  Ever since then I've been semi-obsessively looking at every nutrition label before eating something.  Not because I'm worried about my health or my weight, but simply because now that &lt;span style="font-style: italic;"&gt;I know they're there&lt;/span&gt; it's difficult to ignore them.&lt;br /&gt;&lt;br /&gt;Since there are people out there with degrees in nutrition, I won't try to pretend actually knowing a lot.  But here are the tips I picked up in the last nine months or so.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Make sure to look at the serving portion.  Since every number is per portion, if a company decides that their juice box has two portions in it, they can effectively halve everything, and some do.&lt;/li&gt;&lt;li&gt;Saturated fat, bad.  Trans fat, &lt;span style="font-weight: bold;"&gt;BAD&lt;/span&gt;!&lt;/li&gt;&lt;li&gt;People eat way too much sodium, especially if most of what you eat come from a box or a can.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You need a &lt;span style="font-weight: bold;"&gt;lot&lt;/span&gt; of physical exercise to burn calories so don't think you can eat as much as you want and you'll just work it off.  It'll take almost an hour of jogging to burn a cheeseburger.  Or if you go running for 30 minutes, come back and drink a can of soda to cool off, you've just "wasted" half your exercise.&lt;/li&gt;&lt;li&gt;There is an awful lot of sugar in soda, about 10 teaspoon of it.  Compare that to how much sugar you put in your coffee.  I used to drink a lot of Pepsi, not anymore.&lt;/li&gt;&lt;li&gt;Same thing with beer, lots of calories in them.  If you drink 24 beers on top of your regular diet, you will gain a pound.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Health Canada has a &lt;a href="http://www.hc-sc.gc.ca/fn-an/label-etiquet/nutrition/interactive/inl_main_e.html"&gt;guide&lt;/a&gt; to help you in understanding the labels.&lt;br /&gt;&lt;br /&gt;P.S. For the record, we solved the problem by writing an algorithm to find a very good solution, but got a bad score because we stupidly thought a "green pepper" was a "green vegetable".  Turns out the color isn't the only thing that makes a vegetable green...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-4704397864758965860?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/4704397864758965860/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=4704397864758965860" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/4704397864758965860?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/4704397864758965860?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/Zu3lY7yoU4A/optimizing-your-nutrition.html" title="Optimizing your nutrition" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.simonfl.com/2008/01/optimizing-your-nutrition.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QBRns9eip7ImA9WB9VFUo.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-402416730928801436</id><published>2007-12-01T22:00:00.001-08:00</published><updated>2007-12-01T22:02:37.562-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-01T22:02:37.562-08:00</app:edited><title>Phone calls in movies</title><content type="html">&lt;span style="font-style: italic;"&gt;Off-topic&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Anyone ever wondered how phone calls in movie always end weirdly?&lt;br /&gt;&lt;br /&gt;I don't know about you but I tend to end my phone call with a "Alright, talk to you later" or something like that.  Not with "Yes, it's bad, really bad, I'm not sure we can save her" and then close the phone without waiting for an answer.  Anyway...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-402416730928801436?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/402416730928801436/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=402416730928801436" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/402416730928801436?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/402416730928801436?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/AGEWoetBRQY/phone-calls-in-movies.html" title="Phone calls in movies" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.simonfl.com/2007/12/phone-calls-in-movies.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUNRHczeCp7ImA9WB9VE0U.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-3310855234628448128</id><published>2007-11-29T16:37:00.000-08:00</published><updated>2007-11-29T16:58:15.980-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-29T16:58:15.980-08:00</app:edited><title>Broken Windows theory, for software development</title><content type="html">The &lt;a href="http://en.wikipedia.org/wiki/Fixing_Broken_Windows"&gt;Broken Windows theory&lt;/a&gt; goes like this:&lt;br /&gt;&lt;blockquote&gt;    Consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more windows. Eventually, they may even break into the building, and if it's unoccupied, perhaps become squatters or light fires inside.&lt;br /&gt;&lt;br /&gt;  Or consider a sidewalk. Some litter accumulates. Soon, more litter accumulates. Eventually, people even start leaving bags of trash from take-out restaurants there or breaking into cars.&lt;/blockquote&gt;Basically, if some stuff is broken, then people will tend to break more stuff but if nothing is broken then people will be reluctant to break something.&lt;br /&gt;&lt;br /&gt;You'll say, what does that have to do with software development?  Beside the obvious joke about a certain operating system, it's a very important concept for software quality.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As any good software project, we, my team at work, have a set of unit tests and a regular build.  Since we have a lot of people outside our team adding to our codebase, we like for people to run the tests before they submit their change.  Here's where the Broken Windows effect come in.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;People are reluctant to break something that works, but not so much when it doesn't.&lt;span style="font-weight: bold;"&gt;  &lt;/span&gt;&lt;/span&gt;If the build is already broken, then people won't spend much time making sure &lt;span style="font-style: italic;"&gt;their&lt;/span&gt; change doesn't break it(well, break it further).  But if the build is pristine green, then they will be very careful about it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've had a recent example where I had a test which didn't work in certain client environment.  A developper made a change to our code, ran the tests but had some errors unrelated to his change.  He noticed it but was told it wouldn't cause any trouble.  He then came back later to make a second change and still had errors in the tests but since the tests were already broken for him, he didn't investigate any errors.  The obvious result?  Our build broke as a result of his changes.&lt;br /&gt;&lt;br /&gt;The lesson?  If you want don't want other people to break your build make sure they have an easy way to see if their modification is affecting it.  And also, make sure to make them feel guilty when they do break it!  ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-3310855234628448128?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/3310855234628448128/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=3310855234628448128" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3310855234628448128?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3310855234628448128?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/HUNJLHPe6IY/broken-windows-theory-for-software.html" title="Broken Windows theory, for software development" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>3</thr:total><feedburner:origLink>http://www.simonfl.com/2007/11/broken-windows-theory-for-software.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMGR3w-eCp7ImA9WB9QGE0.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-4369277381733363684</id><published>2007-10-30T22:00:00.000-07:00</published><updated>2007-10-30T22:27:06.250-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-30T22:27:06.250-07:00</app:edited><title>Opportunity cost and grad school</title><content type="html">I apologize in advance to everyone who knows this stuff, but I keep writing posts and then realize I need to make sure my audience is familiar with some concepts before posting it.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;The &lt;span style="font-style:italic;"&gt;opportunity cost&lt;/span&gt; is the cost of not doing something&lt;/span&gt;.  It is something that is widely ignored and it shouldn't be.&lt;br /&gt;&lt;br /&gt;Last June I received my undergraduate degree in Software Engineering.  I considered going to grad school but finally decided against it (but I might reconsider that in a few years, we'll see).  As I was looking into different universities, I was taken aback at the high cost of the private US colleges as opposed to the Canadian ones.  Grad school in Quebec cost about 5,000$ a year for every University.  At the MIT, for example, the cost is around 32,000$ a year.&lt;br /&gt;&lt;br /&gt;When you quickly look at those numbers, you might think that it would cost me about six times as much to go to the MIT compared to McGill.  Well, first of all we need to add in the cost of living, which we can estimate at 10,000$ a year in Montreal and 15,000 a year in Cambridge.  We're now at 15,000$ vs 47,000$, still a 3x difference.&lt;br /&gt;&lt;br /&gt;Now, let's add the opportunity cost.  To go to grad school, I would've had to give up my ability to work a full time job.  Let's say I was offered a job at 50000$ a year (after-tax), the cost of going to grad school would now be:&lt;br /&gt;McGill: 65,000$ / year&lt;br /&gt;MIT: 97,000$ / year&lt;br /&gt;&lt;br /&gt;The difference is now merely 1.5x.  Of course, in absolute term, the money I have to pony up is the same.  If you really want to go to a pricey, then don't let money be in the way.  The tuition cost will only be a small part of what you'll really pay anyway.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And something else to consider with these numbers.  How much do you think a masters or a doctoral degree is worth?  In this case, a masters degree at McGill will have to be worth at least 130,000$ to you before you decide to do it.&lt;br /&gt;&lt;br /&gt;For some people it is, for others it's not.&lt;br /&gt;&lt;br /&gt;P.S. No, I'm not a shill for the MIT, I've never been anywhere near Boston.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-4369277381733363684?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/4369277381733363684/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=4369277381733363684" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/4369277381733363684?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/4369277381733363684?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/NHe9iV5qwps/opportunity-cost-and-grad-school.html" title="Opportunity cost and grad school" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>5</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/opportunity-cost-and-grad-school.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4BQHs6cCp7ImA9WB9WEUU.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-852289853665339678</id><published>2007-10-30T21:47:00.000-07:00</published><updated>2007-11-15T20:39:11.518-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-15T20:39:11.518-08:00</app:edited><title>TCS: How to transform time into money</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm2.static.flickr.com/1337/876724673_ca4d28b467.jpg?v=0"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px;" src="http://farm2.static.flickr.com/1337/876724673_ca4d28b467.jpg?v=0" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let's make an assumption: If you wanted to, you could work 168 hours a week.  This isn't exactly true on several levels, but let's take it as a fact for now.  Let me convince you.  You might say: "But I have a 40 hours a week job, I can't do overtime".  To that I would say that you could find another job, I'm sure the nearest fast food are in need of people, or you could start your home business.  I don't know, you could assemble Ikea furniture for elderly people?  Buy and sell stuff on ebay?  Here's one anyone could do: &lt;a href="http://en.wikipedia.org/wiki/Farmer_%28gaming%29"&gt;farm gold&lt;/a&gt; on World of Warcraft.  Thus, every time you want to do something that doesn't involve making money, you have to factor in the &lt;a href="http://www.simonfl.com/2007/10/opportunity-cost-and-grad-school.html"&gt;opportunity cost&lt;/a&gt; of not working.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you think you could be making 10$/h and you decide to go see a movie instead, it's really costing you the 10$ entry price plus your time, 10$/h x 2h = 20$, so 30$ overall.&lt;br /&gt;&lt;br /&gt;We've now established how every hour in your life could be transformed into money, proving the good old adage &lt;span style="font-style:italic;"&gt;time is money&lt;/span&gt;.  We'll get into how every hour aren't born equal pretty soon.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:75%;" &gt;(Photo by &lt;a href="http://flickr.com/photos/lortica/"&gt;lortica&lt;/a&gt;)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-852289853665339678?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/852289853665339678/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=852289853665339678" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/852289853665339678?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/852289853665339678?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/l08sSaXpbtM/tcs-how-to-transform-time-into-money.html" title="TCS: How to transform time into money" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/tcs-how-to-transform-time-into-money.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUGQXg5fSp7ImA9WB9WF00.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-3174806433315975123</id><published>2007-10-27T12:22:00.000-07:00</published><updated>2007-11-21T21:10:20.625-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-21T21:10:20.625-08:00</app:edited><title>When should you ask for help</title><content type="html">Typical thread in a forum:&lt;br /&gt;&lt;br /&gt;A. "I can't make Product XYZ work"&lt;br /&gt;B. "Have you looked at the FAQ and the Manual?  Can you give us more info."&lt;br /&gt;A. "What's your problem?  I ask for help and you tell me too look in the manual?"&lt;br /&gt;&lt;br /&gt;We have a wonderful example of someone who values his time much more than the time of other people.&lt;br /&gt;&lt;br /&gt;There is a mailing list at work that is used for miscellaneous stuff and has a lots of subscriber.  People often send emails that make no sense when you consider the huge amount of readers.  Let's use TCS to try to figure out when to ask for help.&lt;br /&gt;&lt;br /&gt;There are about 3400 people subscribed to this mailing list.  Let's assume that half of those people read it.  That makes say 1700 people reading messages sent to it.&lt;br /&gt;Let's say employees costs my company an average of 40$/h.  That comes down to approximately 0.01$/s.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Whenever you send a message, it costs the company approximately 17$ for every second that message takes to read.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;TCS = 1700person * 0.01$/person*s = 17$/s&lt;/span&gt;&lt;br /&gt;If you send a message that takes an average of 10 seconds to read, then that message just cost the company 170$ in lost productivity.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;TCS = 17$/s * 10s = 170$&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Lets' say I send an email saying "Can someone give me a ride to &lt;span style="font-weight:bold;"&gt;xyz&lt;/span&gt;".  If you expect that message to take 5 seconds to read, then it's only a good idea if the taxi ride to &lt;span style="font-weight:bold;"&gt;xyz&lt;/span&gt; cost more than&lt;br /&gt;&lt;span style="font-style: italic;"&gt;TCS = 17$/s*5s = 85$&lt;/span&gt;&lt;br /&gt;Especially if you reply afterward saying "Thanks everyone, I've got someone", which might takes another 5s to process and raise the total cost to 170$.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Of course this implies that people would be working instead of reading your email, which isn't true in most cases.  Most people tend to look at those messages in their downtime, which destroy my case, but it's still interesting to look objectively at it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-3174806433315975123?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/3174806433315975123/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=3174806433315975123" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3174806433315975123?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3174806433315975123?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/PSLVhIX-6QY/when-should-you-ask-for-help.html" title="When should you ask for help" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/when-should-you-ask-for-help.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ENSX08eCp7ImA9WB9QEkk.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-8703387048287073962</id><published>2007-10-24T11:09:00.000-07:00</published><updated>2007-10-24T11:14:58.370-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-24T11:14:58.370-07:00</app:edited><title>Quantum Programming</title><content type="html">&lt;span style="font-weight: bold;"&gt;Quantum Programming&lt;/span&gt; happens when &lt;span style="font-style: italic;"&gt;your program only works when you run it step by step in a debugger.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:small;"&gt;Credit to Mike for bringing that up.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-8703387048287073962?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/8703387048287073962/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=8703387048287073962" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/8703387048287073962?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/8703387048287073962?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/yE3VUB-qJls/quantum-programming.html" title="Quantum Programming" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>4</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/quantum-programming.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMBR34_eyp7ImA9WB9QEUo.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-4749566154574365588</id><published>2007-10-23T15:07:00.000-07:00</published><updated>2007-10-23T15:27:36.043-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-23T15:27:36.043-07:00</app:edited><title>Someone call the nut house</title><content type="html">because we have a crazy mathematician on the loose!&lt;br /&gt;&lt;br /&gt;Some people have told me that my ideas are way too complicated for most people, and I tend to agree.  To some rare individuals, it seems that they are a gross oversimplification.  My good friend &lt;a href="http://www.blogger.com/profile/12093160365864375949"&gt;L.C.S.&lt;/a&gt;, who has a promising blog named &lt;a href="http://mathfou.blogspot.com/"&gt;Les aventures du mathématicien fou&lt;/a&gt;, had so much to say about my last post &lt;a href="http://www.simonfl.com/2007/10/why-is-bus-so-often-late.html"&gt;Why is the bus so often late&lt;/a&gt; in the comments that it would be a crime not to re-post it here.&lt;br /&gt;&lt;br /&gt;So there it is, his two posts:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;First Post&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That looks interesting. However, I do think your model neglects some important things. First, waiting &lt;i&gt;w&lt;/i&gt; for the runner causes not only the people in the bus to lose time, but also all other eventual passengers on the bus ride. Indeed, after waiting for the runner, the bus will be &lt;i&gt;w&lt;/i&gt; seconds late.&lt;br /&gt;&lt;br /&gt;Suppose we number the bus stops along the ride by 1, 2, ..., &lt;i&gt;N&lt;/i&gt;. We set &lt;i&gt;X_i&lt;/i&gt; to be the number of passengers in the bus between stop &lt;i&gt;i&lt;/i&gt;-1 and stop &lt;i&gt;i&lt;/i&gt;. Let &lt;i&gt;Y_i&lt;/i&gt; be the number of people waiting for the bus at stop &lt;i&gt;i&lt;/i&gt;. Then, if the runner is at stop &lt;i&gt;k&lt;/i&gt; we have the following TCS if we wait for the runner:&lt;br /&gt;&lt;br /&gt;TCS = &lt;i&gt;w&lt;/i&gt; * (sum{&lt;i&gt;Y_i&lt;/i&gt;, &lt;i&gt;i&lt;/i&gt; &gt; &lt;i&gt;k&lt;/i&gt;} + &lt;i&gt;X_k&lt;/i&gt;)&lt;br /&gt;&lt;br /&gt;Then, for it to be valuable to wait, we need:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;t&lt;/i&gt; &gt; &lt;i&gt;w&lt;/i&gt; * (sum{&lt;i&gt;Y_i&lt;/i&gt;, &lt;i&gt;i&lt;/i&gt; &gt; &lt;i&gt;k&lt;/i&gt;} + &lt;i&gt;X_k&lt;/i&gt;)&lt;br /&gt;&lt;br /&gt;Second, it would be very unfair to wait for the runner at stop &lt;i&gt;k&lt;/i&gt; but not for other runners. Thus, if we want to be fair, we need either to wait for all runners along the ride or for none of them.&lt;br /&gt;&lt;br /&gt;Let &lt;i&gt;w_i&lt;/i&gt; be the time to wait for the runner at stop &lt;i&gt;i&lt;/i&gt;. This time can be zero if no runner is present at stop &lt;i&gt;i&lt;/i&gt;. Then, if we do not wait for them, the TCS is:&lt;br /&gt;&lt;br /&gt;TCS = (&lt;i&gt;N&lt;/i&gt; - 1) * &lt;i&gt;t&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;If we do wait, we get:&lt;br /&gt;&lt;br /&gt;TCS = sum{&lt;i&gt;w_k&lt;/i&gt; * (sum{&lt;i&gt;Y_i&lt;/i&gt;, &lt;i&gt;i&lt;/i&gt; &gt; &lt;i&gt;k&lt;/i&gt;} + &lt;i&gt;X_k&lt;/i&gt;), &lt;i&gt;k&lt;/i&gt; = 1, 2, ..., &lt;i&gt;N&lt;/i&gt; - 1}&lt;br /&gt;&lt;br /&gt;Now, it is unreasonable to suppose we already know all &lt;i&gt;X_i&lt;/i&gt; and &lt;i&gt;Y_i&lt;/i&gt;. We should treat them as random variables with a given distribution (which can be found by sampling the commuters). Then we can make the calculation with the expectation of the TCS for waiting.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Second Post&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ok, I just realized I made an important mistake. If we do not wait for the runners, then the TCS is not necessarily (&lt;i&gt;N&lt;/i&gt; - 1) * &lt;i&gt;t&lt;/i&gt;. It is so if there is a runner at each bus stop. A more realistic TCS is given by&lt;br /&gt;TCS = &lt;i&gt;M&lt;/i&gt; * &lt;i&gt;t&lt;/i&gt;&lt;br /&gt;where &lt;i&gt;M&lt;/i&gt; is the number of runners.&lt;br /&gt;&lt;br /&gt;And the point you made is very important indeed, Simon. We need to define what "time" means in this context. If we consider an absolute time, then a "runner" at stop &lt;i&gt;i&lt;/i&gt;+1 that arrives &lt;i&gt;w&lt;/i&gt;_{&lt;i&gt;i&lt;/i&gt;+1} seconds late will not cause any problem if the bus has already more than that much time late. However, considering this is much more complicated.&lt;br /&gt;&lt;br /&gt;In my comment, I used a "relative" time, meaning that the &lt;i&gt;w_k&lt;/i&gt; were times measured relative to the arrival of the bus at stop &lt;i&gt;k&lt;/i&gt;. Similarly, I made the not so realistic assumption that the time between buses is alwats &lt;i&gt;t&lt;/i&gt;. So even if a bus is already late the runner that did not pick the bus will wait &lt;i&gt;t&lt;/i&gt;, not &lt;i&gt;t&lt;/i&gt; minus the amount of time the preceding bus was late...&lt;br /&gt;&lt;br /&gt;I think it is possible to formulate this problem in a more convenient way. Something like&lt;br /&gt;minimize TCS&lt;br /&gt; s.t. some constraints&lt;br /&gt;To do this, we need to find an expression for the TCS that includes both cases (waiting and not waiting). Then we could set the &lt;i&gt;w_k&lt;/i&gt; as variables an try to find what values give an optimal solution to that problem. I still need to figure how to do that. As soon as I found something, I will post it here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-4749566154574365588?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/4749566154574365588/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=4749566154574365588" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/4749566154574365588?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/4749566154574365588?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/UDbyt9Eb_rY/someone-call-nut-house.html" title="Someone call the nut house" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/someone-call-nut-house.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQDQ389eCp7ImA9WB9QEEw.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-6511517943220193424</id><published>2007-10-21T13:53:00.000-07:00</published><updated>2007-10-21T17:19:32.160-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-21T17:19:32.160-07:00</app:edited><title>Why is the bus so often late?</title><content type="html">How long should a bus driver wait for someone who's running to the stop?  Well, we've got this nice little tool called Total Cost to Society(TCS) that we can use.&lt;br /&gt;&lt;br /&gt;Let's lay down the variables:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;t&lt;/span&gt;: amount of time(in seconds) before the next bus&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;p&lt;/span&gt;: number of people in the bus&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;w&lt;/span&gt;: amount of time(in seconds) to wait for the running passenger&lt;br /&gt;&lt;br /&gt;Considering that the driver has no information about the passengers, we can assume that everyone's time is worth the same.&lt;br /&gt;&lt;br /&gt;Let's first see the two decisions and what their respective TCS are:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/80/223825007_7c74997eda.jpg?v=0"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 203px; height: 153px;" src="http://farm1.static.flickr.com/80/223825007_7c74997eda.jpg?v=0" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. The bus driver wait&lt;/span&gt;&lt;br /&gt;Consequence: Everyone in the bus has to wait for &lt;span style="font-style: italic;"&gt;w&lt;/span&gt; seconds.&lt;br /&gt;TCS = &lt;span style="font-style: italic;"&gt;w * p&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. The bus driver doesn't wait&lt;/span&gt;&lt;br /&gt;Consequence: The running passenger has to wait until the next bus&lt;br /&gt;TCS = &lt;span style="font-style: italic;"&gt;t&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So for it to be valuable to wait, we need:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;t &gt; w * p&lt;/span&gt;&lt;br /&gt;With a slight transformation we now have the magic formula of&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;font-size:150;" &gt;w &lt; t &amp;#47; p &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's look at an example.  There is a bus every 10 minutes (600 seconds) and that bus now contains 30 passengers.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;w &lt; t &amp;#47; p &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;w &lt; 600 &amp;#47; 30 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;w &lt; 20&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We learn that in this case, the TCS of waiting will be lower as long as the wait is less than 20 seconds.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:75;" &gt;(Photo by &lt;a href="http://flickr.com/photos/dennis/"&gt;dennis&lt;/a&gt;)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-6511517943220193424?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/6511517943220193424/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=6511517943220193424" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/6511517943220193424?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/6511517943220193424?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/0Ly3OU8ylt0/why-is-bus-so-often-late.html" title="Why is the bus so often late?" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>4</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/why-is-bus-so-often-late.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YDSHgyfSp7ImA9WB9RGU4.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-3733047715543965639</id><published>2007-10-20T13:35:00.000-07:00</published><updated>2007-10-20T20:59:39.695-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-20T20:59:39.695-07:00</app:edited><title>Total Cost to Society</title><content type="html">Life is full of choices.  Every day you're confronted with different paths that you must choose from.  These go from "should I do the dishes now or do it later" to "should I quit my job".  When you're about to make a decision it's important to be able to quantify each different outcomes.&lt;br /&gt;&lt;br /&gt;Now, there a tons of ways to quantify the effect of a decision but the ones I use most often are money and time, which some would argue is one and the same, simply because they're the easiest to work with.  Happiness would be a great quantity to measure but it's very difficult to do so, yet it can often be a used as a multiplier.&lt;br /&gt;&lt;br /&gt;It's often relatively easy to quantify how a simple decision will affect you, but it's harder to see how it affects other.  I guess it's part of being human, we always want to put out interests first.  So I've developed a system that I've been using for a long time in my head without ever formalizing it.  Well, now is the time to give it a name and purpose.&lt;br /&gt;&lt;br /&gt;I've decided to call it &lt;span style="font-weight:bold;"&gt;Total Cost to Society&lt;/span&gt;(TCS), which is a bit of misnomer because it's very individual-centered.  I reserve the right to change the name once I find something better.  &lt;span style="font-style:italic;"&gt;TCS aims give a certain measure of the effect of your actions on yourself and everyone else around you.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I expect it'll take a few posts before I can fully explain the concept but I'll ignore a lot and give a simple example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's assume everyone's time is worth exactly the same in every circumstances and there are no monetary costs to different options.&lt;br /&gt;&lt;br /&gt;I don't have a car, never have (though I'm thinking of buying one, I'll do the analysis soon, should be fun).  I'm going to a friend's place that is slightly far away.  By mass transit this'll take 30 minutes of subway and 60 minutes of bus, for a TCS of 90 minutes.  My other option is to ask my friend to come and pick me up (he, on the other hand, has a car).  It's a 35 minutes ride in a car, so my friend will take 30 minutes to come to my place, and then both he and I will take 35 minutes to go back to his, for a TCS of 105 minutes.&lt;br /&gt;&lt;br /&gt;In this case, it's clearly a better choice to take mass transit.  But we should look at other options.  After taking the subway, I'm now only 15 minutes away if I get a ride.  In this case the TCS becomes 75 minutes.  Great!  Of course I'm omitting tons of stuff such as the cost of public transport and gas, the relative value of everyone's time and much more.&lt;br /&gt;&lt;br /&gt;I hope to go over that example in more details as I go over several different concepts.&lt;br /&gt;&lt;br /&gt;Cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-3733047715543965639?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/3733047715543965639/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=3733047715543965639" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3733047715543965639?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/3733047715543965639?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/pWpyT0MN_ls/total-cost-to-society.html" title="Total Cost to Society" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/total-cost-to-society.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMDSHYzeSp7ImA9WB9RGUk.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-1746673589551647863</id><published>2007-10-18T23:37:00.001-07:00</published><updated>2007-10-20T22:27:59.881-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-20T22:27:59.881-07:00</app:edited><title>Reduce the amount of coins you keep</title><content type="html">I keep hearing people complain about having so much change in their pocket, especially people from my homeland of Canada where there are 1$ and 2$ coins and the smallest bill is a 5$.  I've never really had that problem, but I guess I'm not an average individual so I'll share how I do it, it's pretty simple.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;1: Know how much you're carrying.&lt;/span&gt;&lt;br /&gt;It's important to remember what you have in the deep ends of your pocket.  You might think that you have way too much change to remember that, but you'll see that's it's actually pretty easy once you start keeping your change to a minimum.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;2: Preemptively count your change.&lt;/span&gt;&lt;br /&gt;I guess this kind of conflicts with rule 1, but when you're waiting at a line to pay, now is the time to get all your change out and count it.  Most people I see in lines turn their brain off, look at those celebrity rags, and when they realize they have to pay 5.23$ they waste 10 seconds searching through their pockets for a quarter to avoid receiving a lot of change.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;3: Pre-compute the total&lt;/span&gt;&lt;br /&gt;This is a though one because it's not always realistically possible.  For example, if you're doing your groceries and you have 20 items, there's no way you can actually get an accurate amount.  If you can get the total up to the cents, then you're probably officially mad.  ;)  But most transaction seems to be one or two items, such as buying a coffee.  In that case you can probably know approximately how much it's going to cost after taxes and plan for it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;4: Giving the right amount&lt;/span&gt;&lt;br /&gt;Now comes the hardest part.  When you get the total and need to choose how much to give.  The objective is to minimize the amount of coins you have in your pocket.  You want every coin in your pocket to be the minimum amount you can have.  Let's state what that minimum is first.  This is in $CND, but just remove the 2$ coins and it works with $USD&lt;br /&gt;&lt;br /&gt;4 1¢&lt;br /&gt;2 10¢&lt;br /&gt;3 25¢&lt;br /&gt;2 2$&lt;br /&gt;&lt;br /&gt;It's pretty easy.  You never want more than 4 pennies.  Then, you don't want more than one 5¢, and never more than 25¢ in 10¢ and 5¢.  Then you don't want more than 3 25¢.  The rest is only for Canadian money.  You don't want more than one 1$, and never more than 4$ in 1$ and 2$.  In all cases the highest amount of coins you'll be carrying is 11, or 9 in $USD.&lt;br /&gt;&lt;br /&gt;Alright, so what can we do now to minimize that amount easily.  The easiest thing we can do first is try to get rid of pennies.  It's easy because most people (I hope...) can take a total and see how many pennies they need to give to not receive any (for my mathematically-oriented friend, the "total mod 5").&lt;br /&gt;Once you have that, the second easiest thing to do is reduce that to a multiple of 25¢.  Say, if the amount to pay if 6.43$, you want to lower that amount to a multiple of 25¢, and the closest one is 6.25$.  So you need to give 43¢-25¢=18¢ in coins.&lt;br /&gt;Now that you understand those two tricks, you can extend the logic to make sure you never have two 5¢ and never four 25¢.&lt;br /&gt;&lt;br /&gt;Let's look at an example.  Say I need to pay 6.43$, I might give 11.18$ so that I'll get 4.75$ back. So I got rid of 1 1$, 1 10c, 1 5c, 3 1c (6 coins) and got back 2 2$, 3 25c (5 coins), so I have 1 less coin. If I had simply given a 10$, I would've received 3.57 so 1 2$, 1 1$, 2 25c, 1 5c and 2 1c (7 coins). Everyone's happier! Just make sure to pre-calculate it so as not to waste the time of the people waiting in line behind you, you don't want to be the douchebag wasting everyone's time.&lt;br /&gt;&lt;br /&gt;I hope that helped.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-1746673589551647863?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/1746673589551647863/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=1746673589551647863" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/1746673589551647863?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/1746673589551647863?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/BMdmj3Cgnh8/reduce-amount-of-coins-you-keep.html" title="Reduce the amount of coins you keep" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>6</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/reduce-amount-of-coins-you-keep.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UAQ3czeip7ImA9WB9RF0U.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-2522485306384180098</id><published>2007-10-18T23:00:00.000-07:00</published><updated>2007-10-19T01:07:22.982-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-19T01:07:22.982-07:00</app:edited><title>New purpose</title><content type="html">Well, I think I've finally found something to write about.  After a participating in &lt;a href="http://www.dslreports.com/forum/r19247709-Canadian-Mint-Most-Favour-Getting-Rid-Of-The-Penny"&gt;this discussion&lt;/a&gt; on the dslreports forums, I realize I might have something to talk to people about.&lt;br /&gt;&lt;br /&gt;I've thus decided to call my blog "Optimizing the world".  I'll try to post ways to optimize your daily life without too much trouble.  I'll try not to post too many irrelevant stuff, but I can't promise anything.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-2522485306384180098?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/2522485306384180098/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=2522485306384180098" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/2522485306384180098?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/2522485306384180098?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/n9gtsBnbl6Y/new-purpose.html" title="New purpose" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.simonfl.com/2007/10/new-purpose.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cNRHw8cCp7ImA9WB9RF0U.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-5132487760062312927</id><published>2007-08-29T17:12:00.000-07:00</published><updated>2007-10-19T01:04:55.278-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-19T01:04:55.278-07:00</app:edited><title>IE rounds everything up it seems</title><content type="html">Look at this HTML/CSS&lt;br /&gt;&lt;br /&gt;&amp;lt;DIV STYLE="width:100px;height:50px"&amp;gt;&lt;br /&gt;&amp;lt;DIV STYLE="float:left;width:50%;height:100%;background:#AACCEE;overflow:hidden"&amp;gt;This is the first one of those divs&amp;lt;/DIV&amp;gt;&lt;br /&gt;&amp;lt;DIV STYLE="float:left;width:50%;height:100%;background:#EECCAA;overflow:hidden"&gt;And then the second one&amp;lt;/DIV&amp;gt;&lt;br /&gt;&amp;lt;/DIV&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, what does this look like in FF?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_V2sbNmwFdKg/Rt-hKLhepiI/AAAAAAAADPY/im3bdTmD3Ts/s1600-h/100pxff.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_V2sbNmwFdKg/Rt-hKLhepiI/AAAAAAAADPY/im3bdTmD3Ts/s320/100pxff.png" alt="" id="BLOGGER_PHOTO_ID_5106977698725406242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And in IE?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_V2sbNmwFdKg/Rt-imLhepjI/AAAAAAAADPg/ab4_oIVQNvE/s1600-h/100pxie.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_V2sbNmwFdKg/Rt-imLhepjI/AAAAAAAADPg/ab4_oIVQNvE/s320/100pxie.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5106979279273371186" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, it looks about right in IE.  At least it respects the outside DIV's width but not it's height (instead of being 50px it stretches to 95px).  But that's not my point.&lt;br /&gt;&lt;br /&gt;Now let's look at the same code, but instead of having a 100 pixels width, we'll have a 101 pixel width:&lt;br /&gt;&lt;br /&gt;&amp;lt;DIV STYLE="width:101px;height:50px"&amp;gt;&lt;br /&gt;&amp;lt;DIV STYLE="float:left;width:50%;height:100%;background:#AACCEE;overflow:hidden"&amp;gt;This is the first one of those divs&amp;lt;/DIV&amp;gt;&lt;br /&gt;&amp;lt;DIV STYLE="float:left;width:50%;height:100%;background:#EECCAA;overflow:hidden"&gt;And then the second one&amp;lt;/DIV&amp;gt;&lt;br /&gt;&amp;lt;/DIV&amp;gt;&lt;br /&gt;&lt;br /&gt;Now, let's look at FF:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_V2sbNmwFdKg/Rt-jULhepkI/AAAAAAAADPo/9TincmtrvGE/s1600-h/101pxff.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_V2sbNmwFdKg/Rt-jULhepkI/AAAAAAAADPo/9TincmtrvGE/s320/101pxff.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5106980069547353666" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, that looks pretty much the same as with 100 pixels, except that it's taking about 1 extra pixel, with the second (right-hand) div taking home the extra pixel.&lt;br /&gt;&lt;br /&gt;Now this is where I'm getting at.  Look at this behavior of IE:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_V2sbNmwFdKg/Rt-ki7heplI/AAAAAAAADPw/xec6L-xs3xI/s1600-h/101pxie.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_V2sbNmwFdKg/Rt-ki7heplI/AAAAAAAADPw/xec6L-xs3xI/s320/101pxie.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5106981422462051922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What the?  The outer div has stretched to 51x352 pixels...  See here that both inner divs have a width of 51 pixels.  My guess?  IE renders each one of them individually and round up the pixel value so that they both are 51 pixel wide, which mean that they don't fit in the same row inside 101 pixels, so they have to take 2 rows.&lt;br /&gt;&lt;br /&gt;If you want to see it more clearly, you can add in "border:1px solid;" just after the "STYLE=" in the outer div, you'll see even more clearly what I mean.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-5132487760062312927?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/5132487760062312927/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=5132487760062312927" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/5132487760062312927?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/5132487760062312927?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/3-3Tg8IS1jk/ie-rounds-everything-up-it-seems.html" title="IE rounds everything up it seems" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_V2sbNmwFdKg/Rt-hKLhepiI/AAAAAAAADPY/im3bdTmD3Ts/s72-c/100pxff.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://www.simonfl.com/2007/08/ie-rounds-everything-up-it-seems.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QHQHw_fCp7ImA9WB5QEk4.&quot;"><id>tag:blogger.com,1999:blog-8358823616508684659.post-2754635943518131392</id><published>2007-06-30T12:18:00.001-07:00</published><updated>2007-06-30T12:22:11.244-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-06-30T12:22:11.244-07:00</app:edited><title>Microsoft LifeChat LX-3000 and Skype</title><content type="html">I just bought a Microsoft LifeChat LX-3000 headset to use with mainly with Skype to talk with my friends and family.  But as soon as I began using them, after 10-30 seconds while on a call, the mute light would come up on the device and I couldn't remove it.  By ending the call and restarting it I could again talk 10-30 seconds.&lt;br /&gt;&lt;br /&gt;I found out the problem was that Skype was automatically adjusting the volume and it kept lowering it to zero for the audio in.&lt;br /&gt;&lt;br /&gt;Tools -&gt; Options -&gt; General -&gt; Audio Settings&lt;br /&gt;UNCHECK "Let Skype adjust my audio setttings"&lt;br /&gt;&lt;br /&gt;And that fixed my problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8358823616508684659-2754635943518131392?l=www.simonfl.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.simonfl.com/feeds/2754635943518131392/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8358823616508684659&amp;postID=2754635943518131392" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/2754635943518131392?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8358823616508684659/posts/default/2754635943518131392?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OptimizingTheWorld/~3/ySbaRB10p4w/microsoft-lifechat-lx-3000-and-skype.html" title="Microsoft LifeChat LX-3000 and Skype" /><author><name>simonfl</name><uri>http://www.blogger.com/profile/01710187988499098321</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp1.blogger.com/_V2sbNmwFdKg/R99kocCLM-I/AAAAAAAAEnY/YVBp-9OrtF4/S220/kewldoodsimon.png" /></author><thr:total>4</thr:total><feedburner:origLink>http://www.simonfl.com/2007/06/microsoft-lifechat-lx-3000-and-skype.html</feedburner:origLink></entry></feed>

