tag:blogger.com,1999:blog-54877539467684602092024-03-13T12:00:19.593-07:00DevNetFxNet Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-5487753946768460209.post-15187126181771285852011-08-15T03:59:00.000-07:002011-08-15T03:59:50.141-07:00Developer Links - 02<h3>Development</h3>
<a href="http://philipm.at/2011/0808/">.Net DI container speed test</a>, Philip Mateescu<br />
<a href="http://www.smashingmagazine.com/2011/08/07/a-dozen-cross-browser-testing-tools"/>Review Of Cross-Browser Testing Tools</a>, Cameron Chapman<br />
<a href="http://www.smashingmagazine.com/2011/08/09/designing-for-android-tablets/">Designing For Android Tablets</a>, Dan McKenzie<br />
<a href="http://blog.golang.org/2011/06/profiling-go-programs.html">Profiling Go Programs</a>, Russ Cox<br />
<a href="http://wekeroad.com/post/8704830356/the-backbonejs-and-knockout-danceoff">The BackboneJS and Knockout Danceoff</a>, Rob Conery<br />
<a href="http://stackoverflow.com/questions/549/the-definitive-guide-to-forms-based-website-authentication">The Definitive Guide To Forms based Website Authentication</a> at Stackoverflow<br />
<br />
<h3>Articles</h3>
<a href="http://www.thinkwithgoogle.com/quarterly/innovation/">Think Quarterly - The Innovation Issue</a><br />
<br />
<h3>Business</h3>
<a href="http://tech.fortune.cnn.com/2011/08/05/ben-horowitz-there%E2%80%99s-a-fine-line-between-fear-and-courage">There's a fine line between fear and courage</a>, Ben Horowitz<br />
<br />
<h3>Miscellaneous</h3>
<a href="http://www.globalone.tv/profiles/blogs/how-to-treat-others-5-lessons">Five Lessons About How To Treat People</a><br />
<a href="http://www.techrepublic.com/blog/10things/10-survival-tips-for-non-morning-people/2641">10 survival tips for non-morning people</a>, Steve Tobak<br />
<br />Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-70840857470105728152011-08-08T02:42:00.000-07:002011-08-08T02:42:36.313-07:00Developer Links - 01<h3>Development</h3>
<a href="http://nfarina.com/post/8239634061/ios-to-android">An iOS Developer Takes on Android</a>, Nick Farina<br />
<a href="http://www.elijahmanor.com/2011/08/7-chrome-tips-developers-designers-may.html">7 Chrome Tips Developers & Designers May Not Know</a>, Christian<br />
<a href="http://net.tutsplus.com/articles/should-you-start-using-csslint/">Should You Start Using CSSLint?</a>, Siddharth<br />
<a href="http://haacked.com/archive/2011/08/01/text-templating-using-razor-the-easy-way.aspx">Text templating using Razor the easy way</a>, Phil Haack<br />
<br />
<h3>Articles</h3>
<a href="http://drdobbs.com/java/231300060">Sloppy Work at Oracle</a>, Andrew Binstock<br />
<br />
<h3>Cloud Computing</h3>
<a href="http://highscalability.com/blog/2011/5/19/zyngas-z-cloud-scale-fast-or-fail-fast-by-merging-private-an.html">Zynga's Z Cloud - Scale Fast Or Fail Fast By Merging Private And Public Clouds</a><br />
<br />
<h3>Career</h3>
<a href="http://onstartups.com/tabid/3339/bid/52927/Prison-Break-Escaping-From-Shawshank-Inc-For-A-Startup.aspx">Prison Break: Escaping From Shawshank Inc. For A Startup</a>, Dharmesh Shah<br />
<br />
<h3>Videos</h3>
<a href="http://research.microsoft.com/apps/video/default.aspx?id=152281">Refactoring with Roslyn Circus Comes to Town</a> - Exposing C#'s compiler code analysis<br />
<a href="http://www.ted.com/talks/lang/eng/matt_cutts_try_something_new_for_30_days.html">Matt Cutts: Try something new for 30 days</a> - Ted Talk<br />
<br />
<h3>Miscellaneous</h3>
<a href="http://www.smashingmagazine.com/2011/08/01/desktop-wallpaper-calendar-august-2011/">Desktop Wallpaper Calendar: August 2011</a><br />
<br />Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-87752504370588217052011-02-27T18:05:00.000-08:002011-03-23T04:49:07.617-07:00Chrome Features<p>
<a href="http://www.google.com/chrome">Chrome</a> is already at par with modern browsers and now other browsers have to increasingly play catchup with chrome features. It's hard to imagine the kind of progress they have made with it in just under three years. Two new features which caught my eyes recently are fine examples of adding features which actually help the user and raises the bar for others.
</p>
<h2>Extending Omnibox</h2>
<p>The <a href="http://blog.chromium.org/2011/02/extending-omnibox.html">omnibox API</a> lets extension developers add their own keyword command to the omnibox. And just like that it opens a whole new world of possibilities. New extensions can be created which might not need the real estate on browser interface. I played with <a href="https://chrome.google.com/webstore/detail/gbfhhcljihbgcobpfnceegfmooomhhli">Switch to Tab</a> extension and immediately fell in love with it.
</p>
<p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZRBwRrJ-RR05gcjhHWWjAFxrTGyi89pWItYmU1STV1HZvw7S3LiULaGVfHhWnemTyMjWkt9ErFSnQKybV6ybIzR4BiVxbR48cLCX3uVlgpYUH7OQTjlhQxiBjLHzbl_dZqo4l0rw_aUA/s1600/sw-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img style="border:1px solid black;" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZRBwRrJ-RR05gcjhHWWjAFxrTGyi89pWItYmU1STV1HZvw7S3LiULaGVfHhWnemTyMjWkt9ErFSnQKybV6ybIzR4BiVxbR48cLCX3uVlgpYUH7OQTjlhQxiBjLHzbl_dZqo4l0rw_aUA/s400/sw-4.png" width="400" /></a></div>
</p>
<h2>Search Settings</h2>
<p>
How many times you need to change a setting and you spend a lot of time just looking for it. Just look at Internet Explorer settings and you get drowned in a sea of settings. For example, sometimes I need to block javascript to test some functionality. Now I can serach for the keyword and get all the related settings.
</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir5X0ZYEiIoOL8rovq54ZOW_DLPifVi_Mn6-wEwH_zbdi0W5ePqdEWE0L-buvf3HoJ4ANG9EgI6-vkCHUKO0-T3E-Fbl3etg7yiu0aVcj3XMzfVuWASFy7HnIrVuJw-5EK4rFXfHPqNHU/s1600/options-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img style="border:1px solid black;" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir5X0ZYEiIoOL8rovq54ZOW_DLPifVi_Mn6-wEwH_zbdi0W5ePqdEWE0L-buvf3HoJ4ANG9EgI6-vkCHUKO0-T3E-Fbl3etg7yiu0aVcj3XMzfVuWASFy7HnIrVuJw-5EK4rFXfHPqNHU/s400/options-1.png" width="400" /></a></div>
<p>
It even shows that the keyword is inside Content Settings.
</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBTCvEiwc911wL8D4fI4OzcBAuU3UZKjKNgjkH1bIQOMCvSIpmZIVkEuKyxf3D3v2sPCaxD_nsGgxB6nMMEWN3bUgTV1OhGupJolGGRvV6cibwWUCNqbpJ7vCgqQcjN-farvlMLWBnxtw/s1600/options-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img style="border:1px solid black;" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBTCvEiwc911wL8D4fI4OzcBAuU3UZKjKNgjkH1bIQOMCvSIpmZIVkEuKyxf3D3v2sPCaxD_nsGgxB6nMMEWN3bUgTV1OhGupJolGGRvV6cibwWUCNqbpJ7vCgqQcjN-farvlMLWBnxtw/s400/options-2.png" width="400" /></a></div>
<p>
Even inside Content Settings, the keyword is highlighted to easily see the setting.
</p>
<p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUpXvsKXPtx14Qrgj7pADSzU0UJiXD3NCltaOeX5GZ22Kfjgpnompde_6kJFIjoqZeUS270ZOd87tSu6s-fCl0-VLd7jCFudPDYMl9BBB3Ihj3S13x9h0KS2oWr0_OoRFz3M7Jj9T5f38/s1600/options-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img style="border:1px solid black;" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUpXvsKXPtx14Qrgj7pADSzU0UJiXD3NCltaOeX5GZ22Kfjgpnompde_6kJFIjoqZeUS270ZOd87tSu6s-fCl0-VLd7jCFudPDYMl9BBB3Ihj3S13x9h0KS2oWr0_OoRFz3M7Jj9T5f38/s400/options-3.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</p>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-21234242268690335892011-02-18T20:57:00.000-08:002011-02-25T18:05:48.840-08:00How NOT to launch a new version without testing?<p>
I was going through unread blogs list when I saw this news - <a href="http://forums.asp.net/t/1653509.aspx?New+version+of+the+ASP+NET+Forums+is+live+">New version of the ASP.NET Forums is live!</a>. Now being a asp.net developer I naturally went to see if it can help in my work (I tend to go to StackOverflow) but still any help is good help. Only if the site actually worked...
</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcoxV8VePb_536tkD0BtBdoP-nmQvGoMKOiFzccI-EBA0R7H5Q5CX2Fdt6Lg-zhc9vFr85IDtQ75TjBVrR9Nn6MX6JQ6F9wI0cnoUgMcL5a4_jMvW4UnQvDgiTw3xKaUcpVtQN_89d7qo/s1600/error1.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"><img class="screen-shot" border="0" height="119" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcoxV8VePb_536tkD0BtBdoP-nmQvGoMKOiFzccI-EBA0R7H5Q5CX2Fdt6Lg-zhc9vFr85IDtQ75TjBVrR9Nn6MX6JQ6F9wI0cnoUgMcL5a4_jMvW4UnQvDgiTw3xKaUcpVtQN_89d7qo/s320/error1.jpg" /></a></div>
<p>
A quick look of the site through this <a href="http://forums.asp.net/188.aspx/1?Feedback+on+this+website">link </a>and found the following issues -<br />
- Search was not working <br />
- Navigation items were not working <br />
</p>
<p>
Perhaps it was left to the users to test the site as the feedback thread contained all these issues and more. But can we really allow sites to go live without doing such basic testing especially when it is one of you premier sites for your users?
</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9dgYKOynUL9FBctH7WpCgubE6fmLVyZbyBvuN4pERH3KLCWsLoaiiZ4TLLUULMCeDiLRcSO8OS2yTdhGxSWSifw9xHwIpxD62aj7H2-jfFwOkLRQt6zrnP3eprci-N9gnSpl89FbvE6A/s1600/issues-list.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"><img class="screen-shot" border="0" height="233" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9dgYKOynUL9FBctH7WpCgubE6fmLVyZbyBvuN4pERH3KLCWsLoaiiZ4TLLUULMCeDiLRcSO8OS2yTdhGxSWSifw9xHwIpxD62aj7H2-jfFwOkLRQt6zrnP3eprci-N9gnSpl89FbvE6A/s320/issues-list.jpg" /></a></div>
<p>
Update: By the time I finished this post and went back to check most of the links and search was working. But still it took about 2-3 days to fix. Perhaps we are asking too much from Microsoft.
</p>
<p>
Update 2: Search still doesn't work if you try to search from this <a href="http://forums.asp.net/search">page</a>.
</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZwhFqVisDrQIf256HaKGwRmT8pY_3tZGbD2GAvD-ONqAUcVXQJrHIeBzatIIhvwL7OJNRnmWjzkz6VJNchwgsBCopPfS8QNBJ60xuoAlRZHjfuGI7unJPiuIp2p_8W77E4yJq3y7KTCc/s1600/search-error.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img class="screen-shot" border="0" height="186" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZwhFqVisDrQIf256HaKGwRmT8pY_3tZGbD2GAvD-ONqAUcVXQJrHIeBzatIIhvwL7OJNRnmWjzkz6VJNchwgsBCopPfS8QNBJ60xuoAlRZHjfuGI7unJPiuIp2p_8W77E4yJq3y7KTCc/s320/search-error.png" /></a></div>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-70133311294723561382011-02-08T01:24:00.000-08:002011-02-08T01:28:42.764-08:00How to Handle Errors?<p>
It's been a while since I got an error which makes you get more of these! It should be a part of creative error handling (without annoying your users). If you find the monkeys, please point them here. :)
</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkSWtMnG_FvzjkTcDBF67sCdcdJXLBG07BbUN_nfwE5iVHa0XibcAZKHzmUYzPGU33XCgc2IykYQp3w-GpaaLUCnW0l8sweiZcnx-HCaUBOXRCFB2MLQpcESGaiMrhcsSNGTlvbtNUET8/s1600/youtube_error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img class="screen-shot" border="0" height="349" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkSWtMnG_FvzjkTcDBF67sCdcdJXLBG07BbUN_nfwE5iVHa0XibcAZKHzmUYzPGU33XCgc2IykYQp3w-GpaaLUCnW0l8sweiZcnx-HCaUBOXRCFB2MLQpcESGaiMrhcsSNGTlvbtNUET8/s400/youtube_error.png" width="400" /></a></div>
<br />Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-38262432903566534762010-12-30T20:08:00.000-08:002010-12-30T20:08:47.436-08:002011's Six Month Book Reading PlanSix Books for first half of New Year.
<p>
<div style="float:left; width:130px; height:160px; overflow: hidden;">
<a imageanchor="1" target="_blank" href="http://www.amazon.com/CLR-via-Dev-Pro-Jeffrey-Richter/dp/0735627045?ie=UTF8&tag=develo06-20&link_code=bil&camp=213689&creative=392969"><img alt="CLR via C# (Dev-Pro)" src="http://ws.amazon.com/widgets/q?MarketPlace=US&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&ASIN=0735627045&tag=develo06-20" /></a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=bil&camp=213689&creative=392969&o=1&a=0735627045" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" />
</div>
<div style="float:left; width:350px; margin-left:10px;">
<a target="_blank" href="http://www.amazon.com/CLR-via-Dev-Pro-Jeffrey-Richter/dp/0735627045?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969">CLR via C# (Dev-Pro)</a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=0735627045" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /> is a very good resource to master the intricacies of the common language runtime (CLR) and the .NET Framework 4.0. I think it is time to master C# and .Net Framework and this is one of the most recommended books on <a href="http://stackoverflow.com/questions/1166653/what-are-the-best-reads-to-know-more-about-the-net-clr">stackoverflow</a>.
</div>
</p>
<div style="clear:both;"></div>
<p>
<div style="float:left; width:130px; height:160px; overflow: hidden;">
<a imageanchor="1" target="_blank" href="http://www.amazon.com/C-Depth-Second-Jon-Skeet/dp/1935182471?ie=UTF8&tag=develo06-20&link_code=bil&camp=213689&creative=392969"><img alt="C# in Depth, Second Edition" src="http://ws.amazon.com/widgets/q?MarketPlace=US&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&ASIN=1935182471&tag=develo06-20" /></a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=bil&camp=213689&creative=392969&o=1&a=1935182471" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" />
</div>
<div style="float:left; width:350px; margin-left:10px;">
<a target="_blank" href="http://www.amazon.com/C-Depth-Second-Jon-Skeet/dp/1935182471?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969">C# in Depth, Second Edition</a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=1935182471" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /> is by far the most recommended book for learning deeply about C#. It assumes that you are already familiar with C# and its syntax and doing that allows it to get rid of boring introductory material.
</div>
</p>
<div style="clear:both;"></div>
<p>
<div style="float:left; width:130px; height:160px; overflow: hidden;">
<a imageanchor="1" target="_blank" href="http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124?ie=UTF8&tag=develo06-20&link_code=bil&camp=213689&creative=392969"><img alt="Head First Design Patterns" src="http://ws.amazon.com/widgets/q?MarketPlace=US&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&ASIN=0596007124&tag=develo06-20" /></a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=bil&camp=213689&creative=392969&o=1&a=0596007124" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" />
</div>
<div style="float:left; width:350px; margin-left:10px;">
When people ask for design patterns book for .net, they get <a target="_blank" href="http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969">Head First Design Patterns</a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=0596007124" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" />. The book provides examples in java but they are relevant for .net developers as well. This book does not cover all the <a target="_blank" href="http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969">GoF Design Patterns</a> but does a good job of explaining the patterns.
</div>
</p>
<div style="clear:both;"></div>
<p>
<div style="float:left; width:130px; height:160px; overflow: hidden;">
<a imageanchor="1" target="_blank" href="http://www.amazon.com/Professional-ASP-NET-Design-Patterns-Millett/dp/0470292784?ie=UTF8&tag=develo06-20&link_code=bil&camp=213689&creative=392969"><img alt="Professional ASP.NET Design Patterns" src="http://ws.amazon.com/widgets/q?MarketPlace=US&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&ASIN=0470292784&tag=develo06-20" /></a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=bil&camp=213689&creative=392969&o=1&a=0470292784" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" />
</div>
<div style="float:left; width:350px; margin-left:10px;">
<a target="_blank" href="http://www.amazon.com/Professional-ASP-NET-Design-Patterns-Millett/dp/0470292784?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969">Professional ASP.NET Design Patterns</a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=0470292784" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /> is more about layered architecture than design patterns. This book covers a lot of ground and is more suited for beginners to mid-level developers. David Hayden has a good review of the book <a href="http://davidhayden.com/blog/dave/archive/2010/12/17/ProfessionalASPNETDesignPatternsBookReview.aspx">here</a>.
</div>
</p>
<div style="clear:both;"></div>
<p>
<div style="float:left; width:130px; height:160px; overflow: hidden;">
<a imageanchor="1" target="_blank" href="http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672?ie=UTF8&tag=develo06-20&link_code=bil&camp=213689&creative=392969"><img alt="Refactoring: Improving the Design of Existing Code" src="http://ws.amazon.com/widgets/q?MarketPlace=US&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&ASIN=0201485672&tag=develo06-20" /></a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=bil&camp=213689&creative=392969&o=1&a=0201485672" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" />
</div>
<div style="float:left; width:350px; margin-left:10px;">
<a target="_blank" href="http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969">Refactoring: Improving the Design of Existing Code</a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=0201485672" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /> is kind of natural progression from design patterns. Every application I have worked so far could have used a bit of refactoring and I intend to learn more about it from this book.
</div>
</p>
<div style="clear:both;"></div>
<p>
<div style="float:left; width:130px; height:160px; overflow: hidden;">
<a imageanchor="1" target="_blank" href="http://www.amazon.com/Art-Unit-Testing-Examples-Net/dp/1933988274?ie=UTF8&tag=develo06-20&link_code=bil&camp=213689&creative=392969"><img alt="The Art of Unit Testing: With Examples in .Net" src="http://ws.amazon.com/widgets/q?MarketPlace=US&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL160_&ASIN=1933988274&tag=develo06-20" /></a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=bil&camp=213689&creative=392969&o=1&a=1933988274" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" />
</div>
<div style="float:left; width:350px; margin-left:10px;">
<a target="_blank" href="http://www.amazon.com/Art-Unit-Testing-Examples-Net/dp/1933988274?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969">The Art of Unit Testing: With Examples in .Net</a><img src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=1933988274" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /> The only way I can make changes, refactor and still have confidence in my code is if I have a way of knowing that I haven't broken anything and Unit Tests are a way of doing just that - giving you instant feedback that all is well or NOT!
</div>
</p>
<div style="clear:both;"></div>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-70529912528234746542010-12-14T02:48:00.000-08:002010-12-14T02:57:07.271-08:00Zen Coding<p>
For those looking to get more with less keystrokes, <a href="http://code.google.com/p/zen-coding/">zencoding</a> plugin is a must. You can write lightening fast HTML using its powerful abbreviation engine.
</p>
<p>
From its<a href="http://code.google.com/p/zen-coding/"> project site</a> -
<br />
<blockquote>
Zen Coding is an editor plugin for high-speed HTML, XML, XSL (or any other structured code format) coding and editing. The core of this plugin is a powerful abbreviation engine which allows you to expand expressions—similar to CSS selectors—into HTML code.
</blockquote>
To appreciate its power you need to play with it. Its author Sergey Chikuyonok has very good article on smashing magazine - <a href="http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code/">a speedy way of writing HTML code</a>. Watch the 6 minute video and you will be a convert.
</p>
<p>
Here is an example of its power. The following expression
<pre class="prettyprint" style="border:none;">
html:4t>div#header+div#main.content
</pre>
expands to the following snippet -
<pre class="prettyprint" style="white-space:nowrap; overflow-x:scroll;">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title></title>
</head>
<body>
<div id="header"></div><div id="main" class="content"></div>
</body>
</html>
</pre>
</p>
<p>
Or the following example
<pre class="prettyprint" style="border:none;">
ul>li#item-$*6
</pre>
which expands to
<pre class="prettyprint">
<ul>
<li id="item-1"></li>
<li id="item-2"></li>
<li id="item-3"></li>
<li id="item-4"></li>
<li id="item-5"></li>
<li id="item-6"></li>
</ul>
</pre>
</p>
<p>
Here is a link to the zencoding <a href="http://code.google.com/p/zen-coding/downloads/detail?name=ZenCodingCheatSheet.pdf">cheatsheet</a>. For Resharper fans it is available as <a href="http://resharperpowertoys.codeplex.com/wikipage?title=ZenCoding">ZenCoding Powertoy</a> and there is also a <a href="http://zencoding.codeplex.com/">Visual Studio PlugIn</a>
</p>
<br/>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-22741985104503262882010-11-24T20:54:00.000-08:002010-11-24T20:54:53.031-08:00Sudoku ValidationIn one of the interviews I gave recently, there was a question about sudoku validation (9x9). The logic to check itself is quiet simple -
<br />
<ol>
<li>Check for existing value in row</li>
<li>Check for existing value in column</li>
<li>Check for existing value in block</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimfzfsegjMKGVl8eMoHgmfNlohJ9ExEwpbLgK4E3ARlSEvTSgRDrWaoATohDq8-6eXlekZNPtlDnmzS7btjcsnj2X_q_3oiqvTtS1bsmg6kCLbKvLFu3WsdA37vbkZIwwJEU8FWMkvSLc/s1600/sudoku-web.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" class="screen-shot" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimfzfsegjMKGVl8eMoHgmfNlohJ9ExEwpbLgK4E3ARlSEvTSgRDrWaoATohDq8-6eXlekZNPtlDnmzS7btjcsnj2X_q_3oiqvTtS1bsmg6kCLbKvLFu3WsdA37vbkZIwwJEU8FWMkvSLc/s400/sudoku-web.PNG" width="400" /></a></div>
<p>
<b><u>Solution</u></b><br />
Two dimensional array is a good data structure to use for it. My first solution involved using three loops but on refinement I was able to use only one loop for the validation. I find the start of block location first. In the loop checking row and column is quite straight forward. It is checking for value in a block that is a bit tricky and I had to play with <a href="http://www.linqpad.net/">LinqPad</a> and Excel before I came up with correct statements.
</p>
<div id='content' style="margin-top:20px; margin-bottom:20px;">
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js" type="text/javascript"></script>
<pre class="brush: csharp;">
public static bool Validate(int number, int row, int col)
{
Console.WriteLine("Writing at pos {0},{1} - value {2}", row - 1, col - 1, number);
var startBlockX = ((row - 1) / 3) * 3;
var startBlockY = ((col - 1) / 3) * 3;
for (int i = 0; i < 9; i++)
{
if (arr[i, col - 1] == number)
{
Console.WriteLine("found in col value {0}", arr[i, col - 1]);
return false;
}
if (arr[row - 1, i] == number)
{
Console.WriteLine("found in row value {0}", arr[row - 1, i]);
return false;
}
var mx = (i / 3) + startBlockX;
var my = startBlockY + (i % 3);
Console.WriteLine("block pos {0},{1}", mx, my);
if (arr[mx, my] == number)
{
Console.WriteLine("found in block");
return false;
}
}
return true;
}
</pre>
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
</div>
<p>
<b><u>Checking</u></b><br />
Using the following array and checking for highlighted spots in figure above for value of 9.
<pre>
var arr = new int[9, 9];
arr[3, 6] = 9;
arr[3, 8] = 7;
arr[0, 8] = 9;
arr[1, 2] = 2;
arr[7, 7] = 9;
</pre>
Validate(9, 3, 3);
<br />Checking for pos 2,2 - value 9<br />
found in block<br />
<br />
Validate(9, 1, 5);<br />
Checking for pos 0,4 - value 9<br />
found in row<br />
<br />
Validate(9, 3, 9);<br />
Checking for pos 2,8 - value 9<br />
found in col
<br />
<br />
</p>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-12873309853367929962010-11-17T21:22:00.000-08:002010-11-17T21:22:43.818-08:00SSW Sydney .Net User Group Meet<p>I just attended SSW Sydney .Net User group meet yesterday for the first time and thought would share a summary. The session was attended by a good crowd of about 50 people. <a href="http://www.adamcogan.com/">Adam Cogan</a> started the meeting with some industry news. The following wsj article "<a href="http://blogs.wsj.com/wtk/">What They Know</a>" was interesting and informative in showing how much of user tracking is being done even by some of the well respected brands.
</p>
<p> The first talk was by <a href="http://blog.gfader.com/">Peter Gfader</a>. It was good to see him explain object oriented principles and explain about SOLID which I have blogged about <a href="http://devnetfx.blogspot.com/2010/11/lets-make-it-solid.html">earlier</a>. I had knowledge of <a href="http://www.codinghorror.com/blog/2005/06/the-broken-window-theory.html">Broken Window Theory</a> but <a href="http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule">Boy Scout Rule</a> was new to me and it was interesting. Peter also showed some examples of bad code and we could relate to it in our works. However because of time constraints he had to rush through showing tools like StyleCop, Code Analysis etc. which was a bit unfortunate. His blog post and presentation slides are available <a href="http://blog.gfader.com/2010/11/clean-code-development-talk-at-netug.html">here</a>.
</p>
<p>
The second talk was by <a href="http://tjsblog.net/">TJ Gokcen</a> and he created an apple iphone application using <a href="http://monotouch.net/">Monotouch</a>. It was great to see a whole new application being developed using language we know pretty well. But I wonder how complicated native applications we can develop with that. I guess mostly sort of web applications which uses web browser but not heavy apps like games etc. The demonstration itself was very informative and I feel comfortable if I have to develop applications like that in iPhone.
</p>
<p>
Lastly, it was nice talking to people. I couldn't interact much because of my neck pain but it was good to see and listen to different developers. One gentleman I was talking to mentioned the difference between knowledge of a domain expert and coder and how he would rather teach a domain expert some coding than a coder some domain knowledge. I kind of disagree but that is for some other post. I will update this post with link to TJ's slides and code when it is available.
</p>
<p>
Takeaways<br />
<ul>
<li>The Broken Window Theory</li>
<li>The Boy Scout Rule</li>
<li>SOLID Principles</li>
<li>StyleCop, Code Analysis</li>
<li>MonoTouch</li>
<li>Feature Pack 2</li>
<li>WSJ article "What They Know"</li>
<li>C# 5 CTP</li>
<li>Windows 7</li>
</ul>
</p>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com3tag:blogger.com,1999:blog-5487753946768460209.post-59128298970728329352010-11-16T19:58:00.000-08:002010-11-17T20:17:54.436-08:00Firefox Extensions for Web Developers 2010<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Even though I use Google Chrome as my primary browser, Firefox is my browser of choice for web development - thanks to its wonderful extensions. This post will be useful to you if you are new to web development and want to know some of the best firefox extensions for web development. </span>
<br />
<br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">All the recommended extensions on this page are available in one place as a collection - <a href="https://addons.mozilla.org/en-US/firefox/collections/DevNetFx/web/">Devnetfx Web Development</a></span><br />
<br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you are short of time, you need to know just the following two extensions and you will be fine for 90% of your development - Firebug and Web Developer
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/60/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>Web Developer</b></a> - Web Developer is the plugin of choice for style gurus. The toolbar gives you a lot of options for inspecting, validating and optimizing web-pages. </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzriOZYnvoQ9ABbjlVc-oVbzW9p36oAA-CLD4uTMTYNhjnDVE1Ogcf5Ni7w4zH6cI1lLdf2h-6JMRTsqV8ZhBLV_hh2NlPo_hCopRMA2GPMQYygF5E_g_yjqth39z2cSnwi-RVYnHxUkc/s1600/webdeveloper.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" class="screen-shot" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzriOZYnvoQ9ABbjlVc-oVbzW9p36oAA-CLD4uTMTYNhjnDVE1Ogcf5Ni7w4zH6cI1lLdf2h-6JMRTsqV8ZhBLV_hh2NlPo_hCopRMA2GPMQYygF5E_g_yjqth39z2cSnwi-RVYnHxUkc/s400/webdeveloper.png" width="400" /></a></div>
<br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">
<a href="https://addons.mozilla.org/en-US/firefox/addon/1843/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>Firebug</b></a> - If Web Developer is the tool of choice for style gurus, Firebug is the tool of choice for back-end developers. It becomes a must when you are doing Ajax debugging. It allows editing, debugging, monitoring CSS, HTML, and JavaScript. Firebug is powerful by itself, but when you add other extensions like YSlow, XRefresh, Firecookie etc., it is unbeatable.
<br />
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKr5XhJVH5ETBoeyVf8aSYZISv4cI_q2CkXyx4K3wf7UNY9TYwxl9cMDqjBX_Zi2VZ6IFklsozSdU0O7xwLGDAU7mimTUoVbucyVI_9TfE8lA1dy5VUni6ZDao86Ye3pt551cO9vMR2RA/s1600/Firebug.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" class="screen-shot" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKr5XhJVH5ETBoeyVf8aSYZISv4cI_q2CkXyx4K3wf7UNY9TYwxl9cMDqjBX_Zi2VZ6IFklsozSdU0O7xwLGDAU7mimTUoVbucyVI_9TfE8lA1dy5VUni6ZDao86Ye3pt551cO9vMR2RA/s400/Firebug.jpg" width="400" /></a></div>
<b><u>
<br />
Other Extensions</u></b><br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/655/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>View Source Chart</b></a> - I love this extension because it allows you to see DOM structure visually.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/539/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>MeasureIt</b></a> - This extension sits in one corner and its when I need to check height and width that I call my friend.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/271/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>ColorZilla</b></a> is just like MeasureIt - does its job well and quickly. It is Advanced Eyedropper, ColorPicker, Page Zoomer.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/3863/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>iMacros For Firefox</b></a> - Allows you to automate Firefox. Record and replay repetitious work. Recently I was doing some artwork uploading at a client which involved a combination of UI steps. Thank God I knew about iMacros for Firefox!
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/249/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>Html Validator</b></a> adds adds HTML validation inside Firefox. The number of errors of a HTML page is seen on the form of an icon in the status bar when browsing.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/5369/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>YSlow</b></a> analyzes web pages and why they're slow based on Yahoo!'s rules for high performance web sites. <a href="http://code.google.com/speed/page-speed/download.html">PageSpeed</a> from Google is another one which does the same job of analyzing web pages for performance issues.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/5648/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>FireShot</b></a> creates screenshots of web pages (entirely or just visible part). I just use the basic version and it does my need for taking snapshots easily.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/7711/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>XRefresh</b></a> does the job of browser refresh for web developers (integrated into Firebug) You need to download software from <a href="http://xrefresh.binaryage.com/">binaryage</a> to use it. With most developers using two monitors, it becomes an essential utility to see results instantly.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/2064/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>Dummy Lipsum</b></a> generates "Lorem Ipsum" dummy text from http://www.lipsum.com.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/5792/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>Firesizer</b></a> allows you to resize the window to specific dimensions - quickly.
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/1802/?src=collection&collection_id=250fa6f4-49c9-4621-9c3e-8f7e65131f80"><b>X-Ray</b></a> When I am too lazy to inspect using Firebug and Web Developer, X-Ray allows me to analyze page quickly.
<br />
<br />
Notable Omissions - <br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/748/">GreaseMonkey</a>
GreaseMonkey is one of the most downloaded extensions and it allows you to customize the way a webpage displays using small bits of JavaScript. Perhaps I will find some scripts to start using it in future.
<br />
<br /><b style="text-decoration: underline;">
Resources</b></span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><u><br /></u>
<a href="http://www.1stwebdesigner.com/development/the-best-50-firefox-add-ons-for-web-developers/">The Best 50 Firefox add-ons for Web-developers!</a> has a lot of good suggestion. Apart from XRefresh, View Source Chart, ShowIP it covers a lot of ground.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
<a href="http://getfirebug.com/wiki/index.php/Firebug_Extensions">Firebug Extensions</a> page has a list of extensions for firebug. Some firebug extensions are situation specific like FirePyhton, ColdFire etc. and some are generic which can be used in most cases like YSlow, FireFinder etc. I would recommend you to have a look and see if you can find some that meets your needs.
<br />
<br />
All the recommended extensions on this page are available in one place as a collection - <a href="https://addons.mozilla.org/en-US/firefox/collections/DevNetFx/web/"><b>Devnetfx Web Development</b></a>. I hope you found some useful extension which will make your life easier as a developer.</span><br />
<br />Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-80499524286856106082010-11-14T18:33:00.000-08:002010-11-14T18:33:38.703-08:00ReSharper For Fluent DevelopmentTools like Resharper and CodeRush are time savers and a must for fluent development. As they tend to overlap, I settled for Resharper just because of familiarity, though as the following <a href="http://blogs.msdn.com/b/mikeormond/archive/2010/09/20/visual-studio-add-ins-poll-result.aspx">poll</a> shows they pretty much evenly balanced. However both of these has a learning curve and you need to learn few more shortcuts to be effective.<br />
<br />
<b><u>Import Symbol</u></b><br />
It is a common to inherit from a class or use a type which is in other projects and you need to import them before you can use them. In ReSharper there is Import Symbol (<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Shift+Alt+Space</span>) which lets type completion much more easily. It also adds namespace automatically when you select a type.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXDio1DHc3F_76l7_vmYqRUE87nwJv6V-XvUw3pVxMDjDaq8QylAM_Vav_E0XBIt-BCApMDqQmAn5xsHZ1kYZe3-zxg0T4aBzbmU0E7-t7m1fgBQO6wtAmlB8eH8ZozcN7lh0IElYnIS8/s1600/resharper-import.PNG" imageanchor="1"><img border="0" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXDio1DHc3F_76l7_vmYqRUE87nwJv6V-XvUw3pVxMDjDaq8QylAM_Vav_E0XBIt-BCApMDqQmAn5xsHZ1kYZe3-zxg0T4aBzbmU0E7-t7m1fgBQO6wtAmlB8eH8ZozcN7lh0IElYnIS8/s400/resharper-import.PNG" width="400" /></a></div>
<br />Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-82056922224666346242010-11-09T18:32:00.000-08:002010-11-09T18:32:37.867-08:00Fixing Code Format<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Just noticed that my code examples were not showing properly in Firefox.</span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiut9ygXOvuz1RIAJi4f5iLhpIhGuVVEzKWcwB0N_theHNfBkFo7Qn0lfdS9hFIGkNow3SxidylmkjrtxZHF63L_d8899WC17NN1luQiubfrnNht-KyTsLQaxgpBQ-D0l5QrOH4eaYXhq0/s1600/firefox-overflow.PNG"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiut9ygXOvuz1RIAJi4f5iLhpIhGuVVEzKWcwB0N_theHNfBkFo7Qn0lfdS9hFIGkNow3SxidylmkjrtxZHF63L_d8899WC17NN1luQiubfrnNht-KyTsLQaxgpBQ-D0l5QrOH4eaYXhq0/s400/firefox-overflow.PNG" /></span></a><br />
<br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">The fix was simple. Added the following css property -</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre;"><span style="color: red;">white-space</span></span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre;">: </span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre;"><span style="color: blue;">normal</span></span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre;">;</span><br />
<br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">However now IE was not happy -</span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqDCDOKEO_3hK6-jKTrBWf_lplyWZuW0a8mlKyo2U-ySS1GMU3nVntvD6h9t4cru2OL3HelGj3h5vfgfZkduGC9kE-b3Cb_7z5niRnSgqJqgJHmssM-p0xZwHhJWIPU3fWoTaUlC7Xh4o/s1600/ie-normal.PNG"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqDCDOKEO_3hK6-jKTrBWf_lplyWZuW0a8mlKyo2U-ySS1GMU3nVntvD6h9t4cru2OL3HelGj3h5vfgfZkduGC9kE-b3Cb_7z5niRnSgqJqgJHmssM-p0xZwHhJWIPU3fWoTaUlC7Xh4o/s320/ie-normal.PNG" /></span></a><br />
<br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">The correct property in this case was -</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre;"><span style="color: red;">white-space</span></span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre;">: </span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre;"><span style="color: blue;">pre-wrap</span></span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre;">;</span><br />
<br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">With “white-space:pre-wrap”, it's like mix of “pre”, and “normal”.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">- Repeated spaces are shrinked into just one space.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">- Newline char will force a wrap.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">- Very long lines will be automatically wrapped too, by the element's width.</span><br />
<br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">I found the information at <a href="http://xahlee.org/js/css_text-wrap.html">xahlee</a> useful when fixing this style issue. </span>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-25805704149309284902010-11-03T20:42:00.000-07:002010-11-03T20:42:03.433-07:00Covariance and Contravariance in C# 4.0<b>Variance</b> is about being able to use an object of one type as if it were another, in a type-safe way. Variance comes into play in delegates and interfaces and are not supported for generic and non generic classes.<br />
<pre>public class Person {}
public class Customer : Person {}
</pre>
<b>Covariance </b>is about values being returned from an operation back to the caller. In the following example, the keyword out is used with generic parameter to support covariance. <b>Contravariance </b>is about values being passed in using keyword in.<br />
<br />
<pre class="prettyprint lang-cs">
delegate T MyFunc<out T>();
MyFunc<Customer> customer = () => new Customer();
// Converts using covariance - narrower type to wider type assignment
MyFunc<Person> person = customer;
</pre>
<pre class="prettyprint lang-cs">
delegate void MyAction<in T>(T t);
MyAction<Person> printPerson = (person)=> Console.WriteLine(person);
// converts using contravariance - assignment from a wider type to a narrower type
MyAction<Customer> printCustomer = printPerson;
</pre>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-52881401378939371982010-11-02T17:31:00.000-07:002010-11-17T20:18:48.420-08:00Lets make it SOLID<span class="Apple-style-span" style="font-family: Arial;">One unfortunate aspect of working with object-oriented language is that people working with them think they are object oriented programmer just by using C#, Java etc. While design patterns do make you a better object-oriented programmer, they are also hard to learn especially when starting out. It is here that design principles come in handy. And the good thing is once you know design principles, you tend to find design patterns a natural fit into object-oriented programming.</span><div>
<span class="Apple-style-span" style="font-family: Arial;"><br /></span></div>
<div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><b><u>SOLID Design Principles</u></b></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><b>Single Responsibility Principle (SRP)</b></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;">SRP states that every object should only have one reason to change and a single focus of responsibility.</span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><b>Open-Closed Principle (OCP)</b></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;">A class should be open for extension but closed for modification.</span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><b>Liskov Substitution Principle (LSP)</b></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><div>
You should be able to use any derived class in place of a parent class and have it behave in the same manner without modification.</div>
<div>
<br /></div>
</span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><b>Interface Segregation Principle (ISP)</b></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;">Clients should not be forced to depend upon interfaces that they do not use. Make fine grained interfaces that are client specific.</span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><b>Dependency Inversion Principle (DIP)</b></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;">Depend on abstractions, not on concrete classes.</span></div>
</div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><b><u>Resources</u></b></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><a href="http://www.objectmentor.com/">Objectmentor</a> has some good resources on design principles -</span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial;"><div>
<a href="http://www.objectmentor.com/resources/articles/srp.pdf">The Single Responsibility Principle</a></div>
<div>
<a href="http://www.objectmentor.com/resources/articles/ocp.pdf">The Open Closed Principle</a></div>
<div>
<a href="http://www.objectmentor.com/resources/articles/lsp.pdf">The Liskov Substitution Principle</a></div>
<div>
<a href="http://www.objectmentor.com/resources/articles/dip.pdf">The Dependency Inversion Principle</a></div>
<div>
<a href="http://www.objectmentor.com/resources/articles/isp.pdf">The Interface Segregation Principle</a></div>
</span></div>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-23490731780018184032010-10-28T21:22:00.000-07:002010-10-28T21:25:20.149-07:00Code Generation in RubyWhile doing the code generation exercise (chapter 3, code generators) in the book <a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969" target="_blank">The Pragmatic Programmer</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=020161622X" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />, I realized it quickly that C# isn't the best language to do code generation. The main block was that it is too verbose to do regular expression on strings. I had to use Regex.IsMatch and then Regex.Split to get the the tokens. Thats when I looked into ruby.<br />
<br />
Regular expressions is a built in feature of Ruby, put between two forward slashes (/). You can use =~ operator for a regex match which sets the special variables $~. $& holds the text matched by the whole regular expression. $1, $2, etc. hold the text matched by the first, second, and following capturing groups. Some good info <a href="http://www.regular-expressions.info/ruby.html">here</a>.<br />
<br />
<pre class="prettyprint">class CSharpCode
def BlankLine
print "\n"
end
def Comment comment
print "// #{comment}\n"
end
def StartMsg name
print "public struct #{name} {\n"
end
def EndMsg
print "}\n"
end
def SimpleType name, type
print "\t#{type} #{name};\n"
end
def ComplexType name, type, size
if(type == "char[")
type = "string"
print "\t#{type} #{name};\n"
end
end
end
if __FILE__ == $0
unless ARGV[0]
print "cml usage: cml Input.txt\n"
exit
end
if(File.exist?(ARGV[0]))
CG = CSharpCode.new
File.open(ARGV[0]).each_line { |line|
line.chomp!;
if(line =~ /^\s*S/)
CG.BlankLine
elsif line =~ /^\#(.*)/
CG.Comment $1
elsif line =~ /^M\s*(.+)/
CG.StartMsg $1
elsif line =~ /^E/
CG.EndMsg
elsif line =~ /F\s*(\w+)\s*(\w+\[)(\d+)\]/
CG.ComplexType $1, $2, $3
elsif line =~ /^F\s+(\w+)\s*(\w+)/
CG.SimpleType $1, $2
else
print "Invalid line"
end
}
end
end
</pre>
<br />
<b><u>Input File</u></b><br />
<pre>
# Add a product
# to the 'on-order' list
M AddProduct
F id int
F name char[30]
F order_code int
E
</pre>
<b><u>Output</u></b><br />
<pre>
// Add a product
// to the 'on-order' list
public struct AddProduct {
int id;
string name;
int order_code;
}
</pre>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-32588333313635998022010-10-27T21:48:00.000-07:002010-11-15T22:37:09.939-08:00Playing with Google ChartsI wanted to insert a quick chart in my blog using charts from Google Docs after reading about <a href="http://googlesystem.blogspot.com/2010/10/new-charts-editor-in-google.html">new editor features</a>. It turned out to be very easy. The best thing is that the editor automatically suggests a chart for you when you select data. And with charts, it is easy to visualize that my blog postings are on rise!<br />
<br />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"> {"chartType":"AnnotatedTimeLine","chartName":"Chart 3","dataSourceUrl":"//spreadsheets.google.com/tq?key=0AtGNhAqEmIYDdHZxMGtrX0U3VmU5c25NU0YwMld6Nnc&range=A23%3AT30&gid=0&transpose=0&headers=1&pub=1","options":{"displayAnnotations":true,"showTip":true,"dataMode":"markers","maxAlternation":1,"pointSize":"0","colors":["#3366CC","#DC3912","#FF9900","#109618","#990099","#0099C6","#DD4477","#66AA00","#B82E2E","#316395"],"width":600,"smoothLine":false,"lineWidth":"2","labelPosition":"right","is3D":false,"hasLabelsColumn":true,"wmode":"opaque","height":370,"allowCollapse":true,"isStacked":false,"mapType":"hybrid", "width":490,"height":290},"refreshInterval":500} </script>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-39029498301057195382010-10-26T19:05:00.000-07:002010-10-26T19:06:52.804-07:00Hello to RubyMine<div style="text-align: justify;">
As part of starting my adventures in Ruby, I thought an IDE is essential and so settled with <a href="http://www.jetbrains.com/ruby/">RubyMine</a> (on a 30 day trial.) As my first program in ruby I just wanted to print "Hello World" from a static method.</div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbbiA7_H3ci7Ngcny9X1xDI08DwcXGWa-Ptmy8k7Iuc-gp4j3XNU0Tp71OzfX_T4NyEYckGB_UkWsEPwuPAfzcYQ1lGIjmDpkJHmTuT97YZLPF6EW8N2eOK-yK-hu0cX2XKLgWVmCO5ZQ/s1600/HelloWorld.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="325" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbbiA7_H3ci7Ngcny9X1xDI08DwcXGWa-Ptmy8k7Iuc-gp4j3XNU0Tp71OzfX_T4NyEYckGB_UkWsEPwuPAfzcYQ1lGIjmDpkJHmTuT97YZLPF6EW8N2eOK-yK-hu0cX2XKLgWVmCO5ZQ/s400/HelloWorld.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
The trick to use was keyword self. The scope of self varies depending on the context. Inside an instance method, self resolves to the receiver object. Outside an instance method, but inside a class definition, self resolves to the class.</div>
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">class Hello</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> def self.SayHello()</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> puts "Hello World"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> end</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">end</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Hello.SayHello;</span><br />
<br />
And self is not the only way to create class methods. Here is a list of <a href="http://pastie.textmate.org/60848">more</a>.<br />
<br />Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-28347460432730701932010-10-21T00:52:00.000-07:002010-10-21T01:09:57.133-07:00Code Contracts<script language="javascript" src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js" type="text/javascript">
</script>
<script language="javascript" src="http://google-code-prettify.googlecode.com/svn/trunk/src/lang-css.js" type="text/javascript">
</script>
<script type="text/javascript">
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(prettyPrint);
</script>
<style type="text/css">
/* Pretty printing styles. Used with prettify.js. */
.str { color: #080; }
.kwd { color: #008; }
.com { color: #800; }
.typ { color: #606; }
.lit { color: #066; }
.pun { color: #660; }
.pln { color: #000; }
.tag { color: #008; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
pre.prettyprint { padding: 2px; border: 1px solid #888; }
@media print {
.str { color: #060; }
.kwd { color: #006; font-weight: bold; }
.com { color: #600; font-style: italic; }
.typ { color: #404; font-weight: bold; }
.lit { color: #044; }
.pun { color: #440; }
.pln { color: #000; }
.tag { color: #006; font-weight: bold; }
.atn { color: #404; }
.atv { color: #060; }
}
</style>
I recently downloaded <a href="http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx">Code Contracts</a> from Microsoft. I got introduced to Code Contracts in <a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969" target="_blank">Pragmatic Programmer</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=020161622X" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> and then got a better understanding of it from Jon Skeet's<a href="http://www.manning.com/skeet2/"> C# In Depth</a> while the chapter was freely available (unfortunately, it is not now.) Code Contracts is another tool which should have been here a long while ago in .net world.<br />
<br />
In Code Contracts, Preconditions are specified using Contract.Requires to specify constraints on the input to a method. Postconditions are used to specify express constraints on the output of a method using Contract.Ensures. Here is a code snippet from C# in Depth, Chapter 15, which shows code contract in action<br />
<br />
<code class="prettyprint">static int CountWhitespace(string text) </code><br />
<code class="prettyprint">{ </code><br />
<code class="prettyprint"> Contract.Requires(text != null, "text"); </code><br />
<code class="prettyprint"> Contract.Ensures(Contract.Result<int>() >= 0);</int> </code><br />
<code class="prettyprint"> return text.Count(char.IsWhiteSpace); </code><br />
<code class="prettyprint">}
</code>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-9608171232286792612010-10-10T19:40:00.000-07:002010-10-21T00:04:45.502-07:00From Nu to NuPack<span style="color: black; line-height: normal;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">At last Microsoft gave some good news in the series of bad technologies they rolled out recently - WebMatrix, Lightswitch, NuPack. NuPack is good. It will be used - both by newbies and the veterans. Why? Because it makes life easier for developers and doesn't dumb you down. Inspired from Ruby gems, Nu had gotten some traction as package management system. I have used it and loved it but its new avatar as NuPack is even awesome. Integrated into Visual studio as power shell, it is addictive and I bet, as a positive side effect, we will start using shell more. When you add a package, it adds a reference and merges everything it needs in web.config. For a detail Introduction please follow the scott hanselman's </span></span></span><span style="color: black;"><a href="http://www.hanselman.com/blog/IntroducingNuPackPackageManagementForNETAnotherPieceOfTheWebStack.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+ScottHanselman+(Scott+Hanselman+-+ComputerZen.com)"><span style="color: #5588aa;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Introducing NuPack Package Management for .NET - Another piece of the Web Stack</span></span></span></a></span><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">NuPack arrived with an interesting </span></span></span><span style="color: black;"><a href="http://blog.tatham.oddie.com.au/2010/10/07/yet-another-debugging-tale-visual-studio-disappearing/"><span style="color: #5588aa;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">debugging tale</span></span></span></a></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"> by Tatham Oddie. It was a great post the way he narrowed down the exception using WinDbg and Reflector.</span></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><o:p></o:p></span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">When I downloaded NuPack, the first I wanted to download was castle ActiveRecord, which unfortunately is not in the package list but there are ELMAH, Castle.Core, Catle.Ioc etc. So start using it and start saving your time.</span></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><o:p></o:p></span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Scott Gu's </span></span><a href="http://weblogs.asp.net/scottgu/archive/2010/10/06/announcing-nupack-asp-net-mvc-3-beta-and-webmatrix-beta-2.aspx"><span style="color: #5588aa;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Announcing NuPack, ASP.NET MVC 3 Beta, and WebMatrix Beta 2</span></span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"> gives some good links for NuPack and Rob Reynold’s “</span></span></span><span style="color: black;"><a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/10/06/the-evolution-of-package-management-for-net.aspx"><span style="color: #5588aa;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Evolution of Package Management on .NET</span></span></span></a></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">” Post (Rob is one of the leaders of the Nu project and is on the </span></span><a href="http://nupack.codeplex.com/"><span style="color: #5588aa;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">NuPack </span></span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">team) gives a good account of whats happening with Nu and NuPack.</span></span></span><span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></div>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-63478801415754983352010-08-10T03:02:00.000-07:002010-08-10T03:02:03.102-07:00Microsoft Matrix<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><i>My experience with Ruby is that of porting some code to C#. One thing I learned during porting is ruby code seemed much shorter! The other experience came when I tried ruby gems like project management called "</i></span></span><a href="http://codebetter.com/blogs/dru.sellers/archive/2010/07/17/nu.aspx"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><i>Nu</i></span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><i>" and was immediately sold. This is how easy things should be in .net as well.</i></span></span><div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
</span></span></div><div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">When I read about the </span></span><a href="http://blog.jimmy.schementi.com/2010/08/start-spreading-news-future-of-jimmy.html"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Jimmy Schementi</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> and the news of lack of commitment to </span></span><a href="http://ironruby.net/"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">IronRuby</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">, it was again an feeling of abandonment by Microsoft. Microsoft is mostly interested in getting new people to .net world rather developing the ones already on it to higher levels. This </span></span><a href="http://www.weirdlover.com/2010/08/03/microsoft-data-lets-inject-some-love-into-the-conversation/"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">article</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">, though related to Microsoft.Data, has what I want to describe. Read the paragraph </span></span><a href="http://www.weirdlover.com/2010/08/03/microsoft-data-lets-inject-some-love-into-the-conversation/"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Thought 3: Shakespeare had it right</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">.</span></span></div><blockquote><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><i>Every Shakespeare play operates on three levels. The first level is embodied in a jester, who entertains the onlookers (mostly children) who are ill-equipped to understand what's going on in the plot. The second level is the plot, which entertains the onlookers who are capable of longer spurts of self-guided attention. And the third level is metaphorical, which entertains the onlookers who are capable of extracting a bottomless stream of interesting, non-explicit symbolic themes from the play's unraveling. Now, here's the kicker of it all: each level entices the onlooker to "upgrade" to the next level.</i></span></span></blockquote><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Microsoft is interested in level one. And it wants its developers to be at level one. </span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">While researching for this article found this </span></span><a href="http://ayende.com/Blog/archive/2007/12/01/Setting-yourself-up-for-failure.aspx"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">post</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> by Ayende</span></span><br />
<blockquote><span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">John Lam, the guy writing IronRuby, cannot look at the Ruby source code. That is the way Microsoft works. This is </span></span><a href="http://ayende.com/Blog/archive/2007/12/01/Setting-yourself-up-for-failure.aspx"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">setting yourself up for failure</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">, hard.</span></span></span></blockquote><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">The post is more than 2 years old and it seems some things never change in Redmond (like <a href="http://www.youtube.com/watch?v=wvsboPUjrGc">Steve Ballmer</a>). </span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">On the whole, it seems community wants it to be part of CodePlex Foundation. </span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> </span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">JB Evain has some of his thoughts </span></span><a href="http://evain.net/blog/articles/2010/08/07/on-ironruby"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">on IronRuby</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">. But the sad reality is, as one of comments say,</span></span><br />
<blockquote><span class="Apple-style-span" style="line-height: 15px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If Microsoft doesn’t want the Iron* to have a success for .NET it just won’t happen.</span></span></span></blockquote><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">I am curious as to what will be Microsoft's response. Perhaps it is time to leave Microsoft's matrix. Perhaps Google's </span></span><a href="http://code.google.com/appengine/"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">App Engine</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> is calling. If only they had C# and Visual Studio Integration!</span></span>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-84700822509722213662010-08-03T00:41:00.000-07:002010-08-17T08:00:16.606-07:0010 Blogs to follow for .net web developersRecently a friend asked which blogs I follow and to answer his question I thought of writing this post. Say "Ahey" if you like the list.<br />
<br />
1. <a href="http://ajaxian.com/">Ajaxian</a> - I would look at this first thing in my Google reader. Sadly "<a href="http://almaer.com/blog/">Dion </a>and Ben" are not its editors anymore.<br />
2. <a href="http://ayende.com/Blog/Default.aspx">Ayende @ Rahien</a> - One of the charismatic .net developers, involved in NHibernate, RhinoMocks etc. Must for C# developers.<br />
3. <a href="http://weblogs.asp.net/scottgu/default.aspx">ScottGu's Blog</a> is a good blog for .net developments.<br />
4. <a href="http://www.hanselman.com/blog/">Scott Hanselman</a> is another Microsoft guy you need to follow. His <a href="http://www.hanselman.com/blog/ScottHanselmans2009UltimateDeveloperAndPowerUsersToolListForWindows.aspx">ultimate developers tools list</a> is still awesome to find stuff.<br />
5. <a href="http://net.tutsplus.com/">nettuts+</a> is good for its articles on web, CSS, jQuery, Html5 etc. - good for the web part.<br />
6. <a href="http://googland-dev.blogspot.com/">Googland [dev]</a> gathers posts from all official Google development blogs. A great resource to keep track of what's happening in Google world.<br />
7. I like <a href="http://msmvps.com/blogs/jon_skeet/default.aspx">Jon Skeet</a> from his book <a href="http://www.amazon.com/Depth-What-you-need-master/dp/1933988363?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969" target="_blank">C# in Depth</a>. He is not regular in blogging but I like his approach.<br />
8. <a href="http://openmymind.net/">Karl Seguin</a> seems tired of Microsoft technologies but does a good job of opening your mind.<br />
9. <a href="http://highscalability.com/">High Scalability</a> has good articles if you are interested in, well, high scalability.<br />
10. <a href="http://devnetfx.blogspot.com/">devnetfx </a>is my journey to become a better (10x) developer.<br />
<br />
After compiling my list I thought it would be a good idea to share with others. So here is a link to the bundle so that you can subscribe easily - <a href="http://www.google.com.au/reader/bundle/user/12739226246154933272/bundle/DevNetfx">"DevNetfx" bundle</a><br />
<br />
The bundle has 11 feeds as I added "<a href="http://almaer.com/blog/">dion</a>" as well. Ahey! <img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=1933988363" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /><br />
<br />
<i>Edit: I have a lot more "Subscriptions" which I follow but the above ones covers a lot of ground from different perspectives, and yes, I do follow </i><a href="http://www.codinghorror.com/blog/"><i>Coding Horror</i></a><i>, </i><a href="http://www.joelonsoftware.com/"><i>Joel on Software</i></a><i> but you already had them, didn't you :)</i>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-77668714599371402412010-07-30T07:03:00.000-07:002010-07-30T07:03:30.334-07:00Repeat - Don't Repeat Yourself!<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><i>I am reading </i><i><a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969" target="_blank">The Pragmatic Programmer: From Journeyman to Master</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=020161622X" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /> </i><i><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=020161622X" style="border-bottom-style: none !important; border-bottom-width: medium !important; border-color: initial !important; border-left-style: none !important; border-left-width: medium !important; border-right-style: none !important; border-right-width: medium !important; border-top-style: none !important; border-top-width: medium !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important;" width="1" />by Andrew Hunt and David Thomas and I'm sharing my thoughts, questions, confusions and insights as I continue to read the book.</i></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><i><br />
</i></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">I have folders on my computer with same books, music, software, photos at more than one location. I routinely copy things (my idea of backup) and then would forget about it. Even my <a href="http://www.linqpad.net/">Linqpad </a>queries (which I write to test and learn new code) are at more than one place (office, home, usb, <a href="https://www.dropbox.com/">Dropbox</a>) and I can bet they are all different. When working on a active project I knew things start looking bad when I start repeating the same logic at more than one place. Now I have repeated myself a lot of times to make it clear that I do repeat things :)</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">I did attended object-oriented analysis and design classes in my uni days where you learned how to reuse code and good design principles. But, hey, no one told me to... well... not repeat myself! At least not in plain english. No one told me "DRY—Don't Repeat Yourself" when writing programs as that would have been a better advice.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">At work the number one reason of repeating some things would be "Impatient Duplication" - time pressures - forcing us to take shortcuts. But, then again, I have spent many hours correcting something which could have been avoided by not repeating it. </div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">This is one of the first tips which seems to have influenced me. I did cleaned my PC today of duplicated folders. For stuff where I think I need history, I am making use of <a href="http://tortoisesvn.tigris.org/">Subversion</a>. Eliminating all duplication would be a hard task, but I am on it. <i>Now repeat 10 times "DRY—Don't Repeat Yourself", as you know, repetition is the mother of learning!</i></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-42450114655513927122010-07-22T06:20:00.000-07:002010-07-22T06:20:03.087-07:00This is what we do<i>I am reading <a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X?ie=UTF8&tag=develo06-20&link_code=btl&camp=213689&creative=392969" target="_blank">The Pragmatic Programmer: From Journeyman to Master</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=develo06-20&l=btl&camp=213689&creative=392969&o=1&a=020161622X" style="border: medium none ! important; margin: 0px ! important; padding: 0px ! important;" width="1" /> by Andrew Hunt and David Thomas and the very first page strikes a chord with me. I hope to learn and share few things as I read the book.</i><br />
<br />
<blockquote>Programming is a craft.<br />
<br />
At its simplest, it comes down to getting a computer to do what you want it to do (or what your user wants it to do).<br />
<br />
As a programmer, you are part listener, part advisor, part interpreter, and part dictator. You try to capture elusive requirements and find a way of expressing them so that a mere machine can do them justice.<br />
<br />
You try to document your work so that others can understand it, and you try to engineer your work so that others can build on it. What's more, you try to do all this against the relentless ticking of the project clock.<br />
<br />
You work small miracles every day.<br />
<br />
It's a difficult job.</blockquote>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-43787870982088675402008-07-10T00:41:00.000-07:002008-07-10T16:21:15.891-07:00Bring the smile back<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs6o651GT4UxF0TdA0TpDK3iv38I2i77VUlRqSpXsz9RMS8ckLFmTdLFoVRAPQWQ9ANpaP3NHmskIWUuso1TeSCMVk2esjJ6GaKAo2Izrg5N6hs2cjj6FiIpjeIlivwwz9XQtdIaoUp9s/s1600-h/FirefoxConfig.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs6o651GT4UxF0TdA0TpDK3iv38I2i77VUlRqSpXsz9RMS8ckLFmTdLFoVRAPQWQ9ANpaP3NHmskIWUuso1TeSCMVk2esjJ6GaKAo2Izrg5N6hs2cjj6FiIpjeIlivwwz9XQtdIaoUp9s/s400/FirefoxConfig.png" alt="" id="BLOGGER_PHOTO_ID_5221287815786857330" border="0" /></a>I love messages like these especially when they come out of blue. I was just checking about:config in Firefox for some settings when this message came.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq5CscFNp-o_MJy26M06XWQVDtnGs_fvvI5DJ3ZeQdQmhTjJA95Ls-ivFmP1MEMLOzapLvoWBo7ZyAxrkYvgb5PrE5A557ZHjhJCUGAssh4z7ip3RjB6l-TedZDIQ24ulK5unEWf6Z3tE/s1600-h/Careful.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq5CscFNp-o_MJy26M06XWQVDtnGs_fvvI5DJ3ZeQdQmhTjJA95Ls-ivFmP1MEMLOzapLvoWBo7ZyAxrkYvgb5PrE5A557ZHjhJCUGAssh4z7ip3RjB6l-TedZDIQ24ulK5unEWf6Z3tE/s400/Careful.png" alt="" id="BLOGGER_PHOTO_ID_5221529322624610578" border="0" /></a>Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0tag:blogger.com,1999:blog-5487753946768460209.post-54284925404997171062008-04-17T19:22:00.000-07:002008-04-17T19:34:48.206-07:00How Good A Developer You Are?Started my day with reading <a href="http://www.codinghorror.com/blog/">Codding Horror</a> feeds on my reader and found interesting <a href="http://www.codinghorror.com/blog/archives/001101.html">article </a>which introduced us to his new company stackoverflow.com. Here is introduction<br /><p></p><blockquote><p> A little over a month ago, I announced that I was <a target="_blank" href="http://www.codinghorror.com/blog/archives/001074.html">quitting my job</a>. But there was also something else I didn't fully announce. </p><p> </p><blockquote> But <b>I refuse to become a full-time blogger</b>. I think that's a cop-out. If I look at the people I respect most in the industry, the people I view as role models-- <a target="_blank" href="http://www.paulgraham.com/articles.html">Paul Graham</a>, <a target="_blank" href="http://www.joelonsoftware.com/">Joel Spolsky</a>, <a target="_blank" href="http://steve-yegge.blogspot.com/">Steve Yegge</a>, <a target="_blank" href="http://www.ericsink.com/">Eric Sink</a>, <a target="_blank" href="http://www.skrenta.com/">Rich Skrenta</a>, <a target="_blank" href="http://blog.pmarca.com/">Marc Andreesen</a>, <a target="_blank" href="http://www.wilshipley.com/blog/">Wil Shipley</a>, <a target="_blank" href="http://www.crockford.com/">Douglas Crockford</a>, <a target="_blank" href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> -- they all have one thing in common. They're not just excellent writers and communicators. <b>They build stuff, too</b>. The world has enough vapid commentary blogs. <a target="_blank" href="http://www.codinghorror.com/blog/archives/000809.html">I want to build stuff</a>-- <i>and</i> talk about it. I have a little micro-ISV startup opportunity I'll be working on, a web property I'm building out with one of the above people. I'm not ready to announce the details yet, but when I do, you'll read about it here. </blockquote> <p> The "building stuff", as <a target="_blank" href="http://www.codinghorror.com/blog/archives/001095.html">you helped us determine</a>, is stackoverflow.com. It's a small company <b>Joel Spolsky</b> and I are founding together.</p></blockquote><p> </p>What interest me was his role models list. Out of Nine names mentioned I only knew the last one - <a target="_blank" href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a>. How's that for a developer!<br /><br />I added most of them in my reader (thou' not all as I found some of them not for me at this moment.)<br /><br />See how many of them you know.Net Developerhttp://www.blogger.com/profile/05832332936136124904noreply@blogger.com0