<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9455409</id><updated>2024-10-17T01:56:47.683-07:00</updated><category term="asp.net request queues threads threading"/><category term="asp.net threading optimum performance machine.config maxWorkerThreads minFreeThreads maxIOThreads maxConnection"/><category term="calendar control"/><category term="instance management"/><category term="wcf"/><category term="windows phone 7"/><category term="wp7"/><title type='text'>It works on my machine...</title><subtitle type='html'>A blog of my experiences with various technologies, mainly for my reference and hopefully for other developers who stumble upon this blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://maheshprasad.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9455409.post-1266664547931164650</id><published>2010-12-26T13:01:00.000-08:00</published><updated>2011-01-15T15:58:34.115-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="calendar control"/><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7"/><category scheme="http://www.blogger.com/atom/ns#" term="wp7"/><title type='text'>Calendar Control for Windows Phone 7 (WP7)</title><content type='html'>For my first WP7 application, &lt;a href=&quot;http://social.zune.net/redirect?type=phoneApp&amp;amp;id=7361af3a-230d-e011-9264-00237de2db9e&quot;&gt;Diabetes Manager&lt;/a&gt;, I needed a calendar control that would give users an easy way to enter their daily data. Unfortunately WP7 does not provide any calendar control; it does provide a Date and Time picker. But the picker control did not work for me as far as user experience is concerned. And since I did not find anything on the internet, I decided to write my own.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDUWDtETMiAZM1QXMIBId-p3KpRp3wr_knkAZGR5hHJ4Su_3vHuFof_5T8mxzknx11n-MnFQGg6S4CsY49Tix2NaBahBE4U3D-BxbHQDtH_ENiqDvCdveK4H6inEnE94PHVlvAGg/s1600/calendar.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDUWDtETMiAZM1QXMIBId-p3KpRp3wr_knkAZGR5hHJ4Su_3vHuFof_5T8mxzknx11n-MnFQGg6S4CsY49Tix2NaBahBE4U3D-BxbHQDtH_ENiqDvCdveK4H6inEnE94PHVlvAGg/s400/calendar.jpg&quot; width=&quot;248&quot; /&gt;&lt;/a&gt;&lt;/div&gt;My calendar control gives users a view of the entire month and&amp;nbsp; they can click on any day to enter data for that day. The control is made up of two sections :&lt;br /&gt;
&lt;br /&gt;
a) Month and Year selector at the top and&lt;br /&gt;
b) Grid of days at the bottom.&lt;br /&gt;
&lt;br /&gt;
Users can navigate between months by clicking on left/right buttons and selecting a day would launch a data entry form.&lt;br /&gt;
The calendar control also provides visual cues via color scheme. For instance dates with no data are indicated with default white color; whereas dates with data are indicated with yellow color. Current date is indicated by Orange color.&lt;br /&gt;
The rounded rectangles are achieved by using a combination of Rectangle Shape with rounded borders and transparent button (which makes it click able).&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;IMPORTANT:&lt;/b&gt;&lt;/u&gt;&amp;nbsp; To display the different color schemes (white, yellow, orange) for different states, I initially set the Foreground property of the Button. But it would always revert back to the original color (White in this case). The workaround is to define button styles for various states in XAML as shown here &lt;a href=&quot;http://pastie.org/1407164&quot;&gt;http://pastie.org/1407164&lt;/a&gt; and use it in the code as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;btn.Style = this.Resources[&quot;HasDataButtonStyle&quot;] as Style;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
I posted the entire source code for this control on Codeplex: &lt;a href=&quot;http://calendarcontrolwp7.codeplex.com/releases/view/58137&quot;&gt;http://calendarcontrolwp7.codeplex.com/releases/view/58137&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://maheshprasad.blogspot.com/feeds/1266664547931164650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9455409/1266664547931164650' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/1266664547931164650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/1266664547931164650'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/2010/12/calendar-control-for-windows-phone-7.html' title='Calendar Control for Windows Phone 7 (WP7)'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDUWDtETMiAZM1QXMIBId-p3KpRp3wr_knkAZGR5hHJ4Su_3vHuFof_5T8mxzknx11n-MnFQGg6S4CsY49Tix2NaBahBE4U3D-BxbHQDtH_ENiqDvCdveK4H6inEnE94PHVlvAGg/s72-c/calendar.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9455409.post-8689833831369574575</id><published>2010-11-29T11:43:00.000-08:00</published><updated>2011-01-15T16:32:41.272-08:00</updated><title type='text'>My first Windows Phone 7 App</title><content type='html'>&lt;a href=&quot;http://social.zune.net/redirect?type=phoneApp&amp;amp;id=7361af3a-230d-e011-9264-00237de2db9e&quot;&gt;Diabetes Manager&lt;/a&gt; is my first Windows Phone 7 App. It allows users to set target, track their daily blood glucose levels and also monitor progress.&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;300&quot; src=&quot;http://player.vimeo.com/video/18828281&quot; width=&quot;400&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;a href=&quot;http://vimeo.com/18828281&quot;&gt;WP7: Diabetes Manager App&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user5748889&quot;&gt;Collective Wisdom&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://maheshprasad.blogspot.com/feeds/8689833831369574575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9455409/8689833831369574575' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/8689833831369574575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/8689833831369574575'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/2010/11/my-first-windows-phone-7-app.html' title='My first Windows Phone 7 App'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9455409.post-5719507366029446403</id><published>2010-09-10T06:01:00.000-07:00</published><updated>2011-06-10T13:10:23.431-07:00</updated><title type='text'>Using WinDBG to debug .NET 2.0+ applications</title><content type='html'>To analyze memory dumps of applications using .NET 2.0 and above use the following command:&lt;br /&gt;
&quot;&lt;i&gt;.loadby sos mscorwks&lt;/i&gt;&quot;&lt;br /&gt;
&lt;br /&gt;
This command loads SOS for .NET Framework 2.0.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://geekswithblogs.net/.netonmymind/archive/2006/03/14/72262.aspx&quot;&gt;WinDBG/SOS Cheat Sheet&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Update 06/10/2011:&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
For .NET 4 use &quot;&lt;i&gt;.loadby sos clr&lt;/i&gt;&quot;&lt;br /&gt;
(source :&amp;nbsp;&lt;a href=&quot;http://stackoverflow.com/questions/4373683/unable-to-load-sos-in-windbg&quot;&gt;http://stackoverflow.com/questions/4373683/unable-to-load-sos-in-windbg&lt;/a&gt;)</content><link rel='replies' type='application/atom+xml' href='http://maheshprasad.blogspot.com/feeds/5719507366029446403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9455409/5719507366029446403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/5719507366029446403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/5719507366029446403'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/2010/09/using-windbg-to-debug-net-20.html' title='Using WinDBG to debug .NET 2.0+ applications'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9455409.post-4016479884818993049</id><published>2010-09-03T10:17:00.001-07:00</published><updated>2010-09-03T10:31:25.704-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="instance management"/><category scheme="http://www.blogger.com/atom/ns#" term="wcf"/><title type='text'>WCF InstanceManagement Summary</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;div style=&quot;margin-left: 5pt;&quot;&gt;In WCF, the service instance is a product of binding, contract configuration (SessionMode property on ServiceContract) and service behavior (InstanceContextMode on ServiceBehavior).&lt;/div&gt;&lt;div style=&quot;margin-left: 5pt;&quot;&gt;&lt;br /&gt;
The following table summarizes this:&lt;/div&gt;&lt;div style=&quot;margin-left: 5pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-left: 5pt;&quot;&gt;&lt;table border=&quot;0&quot; style=&quot;border-collapse: collapse;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 86px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 244px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 144px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 69px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 84px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: solid #a3a3a3 1.0pt; border-right: solid #a3a3a3 1.0pt; border-top: solid #a3a3a3 1.0pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Binding&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: solid #a3a3a3 1.0pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;ServiceContractAttribute.SessionMode&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: solid #a3a3a3 1.0pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;InstanceContextMode&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: solid #a3a3a3 1.0pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Async Dispose()&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: solid #a3a3a3 1.0pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Service Instance Mode&lt;br /&gt;
&lt;br /&gt;
(behavior of service instance)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: solid #a3a3a3 1.0pt; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;BasicHttp&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Allowed/NotAllowed&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerCall/PerSession&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Yes&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerCall&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: solid #a3a3a3 1.0pt; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;TCP, IPC&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Allowed/Required&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerCall&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;No&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerCall&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: solid #a3a3a3 1.0pt; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;TCP,IPC&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Allowed/Required&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerSession&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Yes&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerSession&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: solid #a3a3a3 1.0pt; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;WS (no security,no reliability)&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Allowed/NotAllowed&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerCall/PerSession&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Yes&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerCall&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: solid #a3a3a3 1.0pt; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;WS (with security or reliability)&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Allowed/Required&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerSession&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Yes&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerSession&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: solid #a3a3a3 1.0pt; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;WS (with security or reliability)&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;NotAllowed (setting valid because WS implements application level session)&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerCall/PerSession&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Yes&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;PerCall&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: solid #a3a3a3 1.0pt; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border-bottom: solid #a3a3a3 1.0pt; border-left: none; border-right: solid #a3a3a3 1.0pt; border-top: none; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;span xmlns=&quot;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://maheshprasad.blogspot.com/feeds/4016479884818993049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9455409/4016479884818993049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/4016479884818993049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/4016479884818993049'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/2010/09/wcf-instancemanagement-summary.html' title='WCF InstanceManagement Summary'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9455409.post-7769924626454436556</id><published>2007-05-12T06:41:00.000-07:00</published><updated>2007-10-30T10:56:50.326-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net request queues threads threading"/><title type='text'>The underlying connection was closed: The request was canceled.</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;u&gt;The Problem:&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;Couple of weeks back I was investigating a problem with an ASP.NET web application. During the course of normal day and under normal load the server would suddenly stop responding, shooting up the response time and ultimately causing timeouts for the end users. ASP.NET performance counters showed that at this time all the requests were getting queued up and the CPU usage dropped to zero!&lt;br /&gt;&lt;br /&gt;Now request queuing is not a bad thing if the CPU is being utilized properly - it just means that the server has reached it&#39;s capacity and we need to add more servers to scale the application. But in my case the CPU was not being used at all. This suggested that there was some kind of &quot;thread locking&quot;. All the threads were waiting on something to get released. This symptom lasted for 20-30 seconds and then the server recovered with request Queue reducing to 0 and CPU utulization going back to it&#39;s original 30%-40%.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;u&gt;Investigation:&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;A little background on our web application: It consists of a page made up of 4-5 sections which displays content from a variety of external sources (all web services). So on every request it was making about 4-5 XML/HTTP calls to external web services and then applied XSLT to generate HTML snippets and finally assemble the page.  As it involved multiple remote calls, the developer used asynchronous delegates to execute these calls in parallel and then waited for these calls to return using the &quot;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;WaitHandle.WaitAll&lt;/span&gt;()&quot;.  So this piece of code was my prime suspect for the following reasons: Asynchronous delegates use thread from the worker thread pool to make the async call and in case of our application it was making 4-5 async calls, which means each request has the potential for using 4-5 more threads from the thread pool. And if the web services were slow in responding, as more requests come in more worker threads will be used from the queue and ultimately lead to request queuing. (BTW &lt;a href=&quot;http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Fritz Onion&lt;/span&gt; has written an excellent article about &lt;/a&gt;&lt;a href=&quot;http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/&quot;&gt;asynchronous delegates&lt;/a&gt;&lt;a href=&quot;http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/&quot;&gt; and it&#39;s pitfalls&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;To test this theory I modified the code and made all the calls synchronous in an attempt to reduce the usage of threads from the worker thread pool per request. But when I perf tested this code I saw the same behavior!! The CPU dropped again!&lt;br /&gt;&lt;br /&gt;I did another perf testing and this time I was watched the socket connections opened from our app to the external systems using the &quot;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;netstat -ap TCP&lt;/span&gt;&quot; command. And I saw this interesting behavior; at the beginning of the perf test, as I was slowly ramping up the virtual users (total 30 vusers,  ramping 1 per sec),  even with 10 vusers there were only 3-4 outgoing socket connections. This means that the web services were responding so fast that 3 socket connections were sufficient to serve 10 users. The CPU was being properly utilized at this time (10%-15%). When the ramp reached 20 vusers everything just froze!! The CPU suddenly dropped, requests started queuing and &lt;span style=&quot;font-weight: bold;&quot;&gt;the number of socket connections were still 3&lt;/span&gt;! Then the next instant the number of socket connections suddenly jumped to 20, the CPU went back to normal 20% utilization and there were no request queuing!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;u&gt;The Cause:&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;My theory based on the above observation is that when the application first starts there are very few threads available in the pool to service remote requests. As load increases the few threads cannot handle the requests and so ASP.NET runtime tries to create more threads and when this happens it freezes all other threads (don&#39;t know why) and you see the CPU drop.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;u&gt;The Solution : &quot;minFreeThreads&quot;!&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;I searched a lot on the internet without much success until at last I found this &lt;a href=&quot;http://support.microsoft.com/kb/821268&quot;&gt;Microsoft Knowledge Base Article &lt;/a&gt;&lt;a href=&quot;http://support.microsoft.com/kb/821268&quot;&gt;821268&lt;/a&gt; which confirmed my theory. The solution is to add a new attribute called &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;&quot;minWorkerThreads&quot;&lt;/span&gt;  to the &lt;processmodel&gt; section of machine.config&lt;br /&gt;&lt;/processmodel&gt;&lt;pre class=&quot;code&quot;&gt;&lt;processmodel minworkerthreads=&quot;50&quot;&gt; // minWorkerThreads = maxWorkerThreads/2&lt;/processmodel&gt;&lt;/pre&gt;&lt;br /&gt;ASP.NET by default has only 1 thread allocated for remote calls! So even if you configured your machine.config with the recommended settings of &lt;span style=&quot;font-style: italic;&quot;&gt;&quot;maxConnections=24&quot;&lt;/span&gt; and &lt;span style=&quot;font-style: italic;&quot;&gt;&quot;maxWorkerThreads=100&quot; &lt;/span&gt;(see my post below for more info) you are just setting the maximum value! It doesn&#39;t mean the pool starts with 24 threads ready for making outgoing calls! And the most surprising thing is that by default this entry is &lt;span style=&quot;font-weight: bold;&quot;&gt;missing from the machine.config!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So if you are facing with a similar problem with your ASP.NET app that makes remote calls try adding this entry. This simple fix may just solve your problem!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;P.S :&lt;/span&gt; There are different kinds of &quot;The underlying connection was closed: &quot; errors. Here&#39;s a link to a Microsoft blog (&lt;a href=&quot;http://blogs.msdn.com/engelsr/articles/497902.aspx&quot;&gt;http://blogs.msdn.com/engelsr/articles/497902.aspx&lt;/a&gt;) that explains most of these errors and how to fix them. Unfortunately it doesn&#39;t cover the error message that I encountered (&quot;the request was canceled&quot;).&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://maheshprasad.blogspot.com/feeds/7769924626454436556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9455409/7769924626454436556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/7769924626454436556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/7769924626454436556'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/2007/05/underlying-connection-was-closed.html' title='The underlying connection was closed: The request was canceled.'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9455409.post-113396875945224878</id><published>2005-12-07T07:19:00.000-08:00</published><updated>2007-05-12T07:03:37.967-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net threading optimum performance machine.config maxWorkerThreads minFreeThreads maxIOThreads maxConnection"/><title type='text'>Tuning ASP.NET thread settings for optimum performance</title><content type='html'>To get an optimum performance out of ASP.NET Web Application you may need to change the following settings in machine.config. The following text has been reproduced from MSDN article on &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenetchapt17.asp&quot;&gt;ASP.NET preformance optimizations&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;maxconnection.&lt;/span&gt; If your application makes calls to a remote Web service and the requests are waiting for the call to complete, you can increase the CPU utilization and your application performance by changing the &lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;maxconnection &lt;/span&gt;attribute.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;maxWorkerThreads and maxIoThreads.&lt;/span&gt; These attributes define the maximum number of worker and I/O threads that the ASP.NET worker process is allowed to create. These values do not reflect the actual number of threads that are created by the worker process. The maximum value for these attributes is 100 per processor.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;minFreeThreads.&lt;/span&gt; This attribute defines the number of threads that can be used for work other than processing incoming requests to the worker process. This attribute prevents the ASP.NET process from using a thread from the thread pool to handle a new HTTP request if this would mean that the free thread count drops below this limit. The attribute is specified on the &lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;&lt;httpruntime&gt;&lt;/span&gt;element and has a default value of 8.&lt;br /&gt;&lt;br /&gt;You can use this attribute to help prevent deadlocks by ensuring that a thread is available to handle callbacks from pending asynchronous requests. A deadlock can occur if all of the threads in the thread pool are currently in use handling incoming HTTP requests, and one or more of those requests are waiting for asynchronous callbacks. In this situation, there are no available threads to service the callback. You can set &lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;minFreeThreads &lt;/span&gt;to ensure that some free threads are available to process the callbacks.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;maxconnection = 24 (threads used to make remote web service calls)&lt;/li&gt;&lt;li&gt;minFreeThreads = 176 (threads kept reserved for serving non-request calls)&lt;/li&gt;&lt;li&gt;minLocalRequestFreeThreads = 152&lt;/li&gt;&lt;li&gt;maxWorkerThreads = 100 (Maximum number of worker threads per CPU in the thread pool)&lt;/li&gt;&lt;li&gt;maxIoThreads = 100 (Maximum number of IO threads per CPU in the thread pool)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;No of threads for processing incoming requests : (#CPU * maxWorkerThreads) – (#CPU * minFreeThreads)&lt;br /&gt;&lt;br /&gt;&lt;httpruntime&gt;&lt;br /&gt;&lt;/httpruntime&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/113396875945224878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/113396875945224878'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/2005/12/tuning-aspnet-thread-settings-for.html' title='Tuning ASP.NET thread settings for optimum performance'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-9455409.post-113281232655273941</id><published>2005-11-23T22:05:00.000-08:00</published><updated>2005-11-23T22:05:26.553-08:00</updated><title type='text'>XSLT for trimming RSS results</title><content type='html'>Recently I was working on a project where there was a requirement to display only a specified number of items returned by a RSS Feed (instead of all the items).&lt;br /&gt;&lt;br /&gt;This XSLT will trim the results of an RSS Feed. Set appropriate value to &quot;resultcount&quot; parameter.&lt;br /&gt;&lt;br /&gt;&amp;lt;?altova_samplexml C:\junk\rss.xml?&amp;gt;&lt;br /&gt;&amp;lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:param name=&quot;resultcount&quot;&amp;gt;2&amp;lt;/xsl:param&amp;gt;&lt;br /&gt;&amp;lt;!-- Identity transform, passes nodes through untouched --&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match=&quot;@*|node()|text()&quot;&amp;gt;&lt;br /&gt;&amp;lt;xsl:copy&amp;gt;&lt;br /&gt;&amp;lt;xsl:apply-templates select=&quot;@*|*|text()&quot;/&amp;gt;&lt;br /&gt;&amp;lt;/xsl:copy&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&amp;lt;!-- Match the item nodes. --&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match=&quot;item&quot;&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;&amp;lt;position&amp;gt;&amp;lt;xsl:value-of select=&quot;count(preceding::item)&quot;/&amp;gt;&amp;lt;/position&amp;gt;&lt;br /&gt;--&amp;gt;&lt;br /&gt;&amp;lt;xsl:if test=&quot;count(preceding::item) &amp;lt; $resultcount&quot;&amp;gt;&lt;br /&gt;&amp;lt;xsl:copy&amp;gt;&lt;br /&gt;&amp;lt;xsl:apply-templates select=&quot;@*|*|text()&quot;/&amp;gt;&lt;br /&gt;&amp;lt;/xsl:copy&amp;gt;&lt;br /&gt;&amp;lt;/xsl:if&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&amp;lt;/xsl:stylesheet&amp;gt;</content><link rel='replies' type='application/atom+xml' href='http://maheshprasad.blogspot.com/feeds/113281232655273941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9455409/113281232655273941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/113281232655273941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/113281232655273941'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/2005/11/xslt-for-trimming-rss-results.html' title='XSLT for trimming RSS results'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9455409.post-112702034286772976</id><published>2005-09-17T22:10:00.000-07:00</published><updated>2005-09-17T22:12:22.883-07:00</updated><title type='text'>Stay hungry, stay foolish - Speech by Steve Jobs</title><content type='html'>&lt;b style=&quot;font-family: georgia;&quot;&gt;Transcript of Steve Jobs&#39; commencement speech at Stanford:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; Thank you. I&#39;m honored to be with you today for your commencement from one of the finest universities in the world. Truth be told, I never graduated from college and this is the closest I&#39;ve ever gotten to a college graduation.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; Today I want to tell you three stories from my life. That&#39;s it. No big deal. Just three stories. The first story is about connecting the dots.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; I dropped out of Reed College after the first six months but then stayed around as a drop-in for another eighteen months or so before I really quit. So why did I drop out? It started before I was born. My biological mother was a young, unwed graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife, except that when I popped out, they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking, &quot;We&#39;ve got an unexpected baby boy. Do you want him?&quot; They said, &quot;Of course.&quot; My biological mother found out later that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would go to college.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; This was the start in my life. And seventeen years later, I did go to college, but I naïvely chose a college that was almost as expensive as Stanford, and all of my working-class parents&#39; savings were being spent on my college tuition. After six months, I couldn&#39;t see the value in it. I had no idea what I wanted to do with my life, and no idea of how college was going to help me figure it out, and here I was, spending all the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back, it was one of the best decisions I ever made. The minute I dropped out, I could stop taking the required classes that didn&#39;t interest me and begin dropping in on the ones that looked far more interesting.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; It wasn&#39;t all romantic. I didn&#39;t have a dorm room, so I slept on the floor in friends&#39; rooms. I returned Coke bottles for the five-cent deposits to buy food with, and I would walk the seven miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer was beautifully hand-calligraphed. Because I had dropped out and didn&#39;t have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and sans-serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science can&#39;t capture, and I found it fascinating.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; None of this had even a hope of any practical application in my life. But ten years later when we were designing the first Macintosh computer, it all came back to me, and we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts, and since Windows just copied the Mac, it&#39;s likely that no personal computer would have them.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; If I had never dropped out, I would have never dropped in on that calligraphy class and personals computers might not have the wonderful typography that they do.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; Of course it was impossible to connect the dots looking forward when I was in college, but it was very, very clear looking backwards 10 years later. Again, you can&#39;t connect the dots looking forward. You can only connect them looking backwards, so you have to trust that the dots will somehow connect in your future. &lt;/span&gt;&lt;b style=&quot;font-family: georgia;&quot;&gt;You have to trust in something--your gut, destiny, life, karma, whatever&lt;/b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;--because believing that the dots will connect down the road will give you the confidence to follow your heart, even when it leads you off the well- worn path, and that will make all the difference.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; My second story is about love and loss. I was lucky. I found what I loved to do early in life. Woz and I started Apple in my parents&#39; garage when I was twenty. We worked hard and in ten years, Apple had grown from just the two of us in a garage into a $2 billion company with over 4,000 employees. We&#39;d just released our finest creation, the Macintosh, a year earlier, and I&#39;d just turned thirty, and then I got fired. How can you get fired from a company you started? Well, as Apple grew, we hired someone who I thought was very talented to run the company with me, and for the first year or so, things went well. But then our visions of the future began to diverge, and eventually we had a falling out. When we did, our board of directors sided with him, and so at thirty, I was out, and very publicly out. What had been the focus of my entire adult life was gone, and it was devastating. I really didn&#39;t know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down, that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure and I even thought about running away from the Valley. But something slowly began to dawn on me. I still loved what I did. The turn of events at Apple had not changed that one bit. I&#39;d been rejected but I was still in love. And so I decided to start over.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; I didn&#39;t see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods in my life. During the next five years I started a company named NeXT, another company named Pixar and fell in love with an amazing woman who would become my wife. Pixar went on to create the world&#39;s first computer-animated feature film, &quot;Toy Story,&quot; and is now the most successful animation studio in the world.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; In a remarkable turn of events, Apple bought NeXT and I returned to Apple and the technology we developed at NeXT is at the heart of Apple&#39;s current renaissance, and Lorene and I have a wonderful family together.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; I&#39;m pretty sure none of this would have happened if I hadn&#39;t been fired from Apple. It was awful-tasting medicine but I guess the patient needed it. &lt;/span&gt;&lt;b style=&quot;font-family: georgia;&quot;&gt;Sometimes life&#39;s going to hit you in the head with a brick. Don&#39;t lose faith.&lt;/b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; I&#39;m convinced that the only thing that kept me going was that I loved what I did. You&#39;ve got to find what you love, and that is as true for work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work, and the only way to do great work is to love what you do. If you haven&#39;t found it yet, keep looking, and don&#39;t settle. As with all matters of the heart, you&#39;ll know when you find it, and like any great relationship it just gets better and better as the years roll on. So keep looking. Don&#39;t settle.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;  My third story is about death. When I was 17 I read a quote that went something like &lt;/span&gt;&lt;b style=&quot;font-family: georgia;&quot;&gt;&quot;If you live each day as if it was your last, someday you&#39;ll most certainly be right.&quot;&lt;/b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself, &quot;If today were the last day of my life, would I want to do what I am about to do today?&quot; And whenever the answer has been &quot;no&quot; for too many days in a row, I know I need to change something. Remembering that I&#39;ll be dead soon is the most important thing I&#39;ve ever encountered to help me make the big choices in life, because almost everything--all external expectations, all pride, all fear of embarrassment or failure--these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; About a year ago, I was diagnosed with cancer. I had a scan at 7:30 in the morning and it clearly showed a tumor on my pancreas. I didn&#39;t even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctors&#39; code for &quot;prepare to die.&quot; It means to try and tell your kids everything you thought you&#39;d have the next ten years to tell them, in just a few months. It means to make sure that everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; I lived with that diagnosis all day. Later that evening I had a biopsy where they stuck an endoscope down my throat, through my stomach into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated but my wife, who was there, told me that when they viewed the cells under a microscope, the doctor started crying, because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and, thankfully, I am fine now.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; This was the closest I&#39;ve been to facing death, and I hope it&#39;s the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept. No one wants to die, even people who want to go to Heaven don&#39;t want to die to get there, and yet, death is the destination we all share. No one has ever escaped it. And that is as it should be, because death is very likely the single best invention of life. It&#39;s life&#39;s change agent; it clears out the old to make way for the new. right now, the new is you. But someday, not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it&#39;s quite true. Your time is limited, so don&#39;t waste it living someone else&#39;s life. Don&#39;t be trapped by dogma, which is living with the results of other people&#39;s thinking. Don&#39;t let the noise of others&#39; opinions drown out your own inner voice, heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; When I was young, there was an amazing publication called The Whole Earth Catalogue, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late Sixties, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and Polaroid cameras. it was sort of like Google in paperback form thirty-five years before Google came along. I was idealistic, overflowing with neat tools and great notions. Stewart and his team put out several issues of the The Whole Earth Catalogue, and then when it had run its course, they put out a final issue. It was the mid-Seventies and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath were the words, &lt;/span&gt;&lt;b style=&quot;font-family: georgia;&quot;&gt;&quot;Stay hungry, stay foolish.&quot;&lt;/b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt; It was their farewell message as they signed off. &quot;Stay hungry, stay foolish.&quot; And I have always wished that for myself, and now, as you graduate to begin anew, I wish that for you. Stay hungry, stay foolish.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;  Thank you all, very much. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://maheshprasad.blogspot.com/feeds/112702034286772976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9455409/112702034286772976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/112702034286772976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9455409/posts/default/112702034286772976'/><link rel='alternate' type='text/html' href='http://maheshprasad.blogspot.com/2005/09/stay-hungry-stay-foolish-speech-by.html' title='Stay hungry, stay foolish - Speech by Steve Jobs'/><author><name>Mahesh Prasad</name><uri>http://www.blogger.com/profile/07546374999946484825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmWSCXP5gBW8u3FVeHvkygx86vpp-7O5lKsOsESg5ReE3AdwC82XYYNvfK3txsFmtoqOqql4BjJLl5ipxTD0mNNaJmyMS7cTIMUX5DHFGTcz7T3kHGYKJkrECwxol-UHo/s320/ShivaAnanta.jpg'/></author><thr:total>0</thr:total></entry></feed>