Thursday, December 30, 2010

2011's Six Month Book Reading Plan

Six Books for first half of New Year.

CLR via C# (Dev-Pro)
CLR via C# (Dev-Pro) 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 stackoverflow.

C# in Depth, Second Edition
C# in Depth, Second Edition 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.

Head First Design Patterns
When people ask for design patterns book for .net, they get Head First Design Patterns. The book provides examples in java but they are relevant for .net developers as well. This book does not cover all the GoF Design Patterns but does a good job of explaining the patterns.

Professional ASP.NET Design Patterns
Professional ASP.NET Design Patterns 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 here.

Refactoring: Improving the Design of Existing Code
Refactoring: Improving the Design of Existing Code 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.

The Art of Unit Testing: With Examples in .Net
The Art of Unit Testing: With Examples in .Net 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!

Tuesday, December 14, 2010

Zen Coding

For those looking to get more with less keystrokes, zencoding plugin is a must. You can write lightening fast HTML using its powerful abbreviation engine.

From its project site -

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.
To appreciate its power you need to play with it. Its author Sergey Chikuyonok has very good article on smashing magazine - a speedy way of writing HTML code. Watch the 6 minute video and you will be a convert.

Here is an example of its power. The following expression

html:4t>div#header+div#main.content
expands to the following snippet -
<!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>

Or the following example

ul>li#item-$*6
which expands to
<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>

Here is a link to the zencoding cheatsheet. For Resharper fans it is available as ZenCoding Powertoy and there is also a Visual Studio PlugIn