Sunday, October 30, 2011

Adding SQL Server Compact 4.0 (CE) support to Visual Studio 2010 SP1

I just noticed that SQL Server Compact 4.0 tooling is not installed along with Visual Studio 2010 SP1 by default. 


Ofcource you can still make a SQL Server Compact 4.0 database using the latest build of EntityFramework from Nuget and using Code First development. However if you try to open the generated sdf file from Visual Studio you get the error "The operation could not be completed. Unspecified error" as shown : 


To fix this you can either install "Visual Studio 2010 SP1 Tools for SQL Server Compact 4" from the Web Platforms Installer or use the offline installer available here : http://go.microsoft.com/fwlink/?LinkId=212219 

Enjoy!

Sunday, October 16, 2011

Enjoy your typography

If you enjoy typography here are a couple of links to bring a smile to your face.

First of all is the famous "So you need a typeface?" infographic.

(The original author has his website here : http://julianhansen.com/)

Next up there are the really hilarious shorts by college humour called Font Conference and Font Fight.

And if you have 50 minutes here is a nice talk by Rob Conery and Scott Hanselman with Bill Hill (the creator of cleartype) that you are sure to enjoy.

And if you want to have a deeper understanding of why typography matters here is "Magic of reading" by Bill hill in Microsoft Word format : www.billhillsite.com/osprey.doc
(Source http://billhillsblog.blogspot.com/2008/02/magic-of-reading.html)

Here is a short description of how cleartype works:

For a detailed discussion Wikipedia has an excellent article. Also interestingly WPF renderes all text in cleartype. But so does every windows by default starting from Vista.

Enjoy!

Friday, October 14, 2011

CSS Quick Guide

With JQuery which supports CSS selectors in its query part and ASP.NET MVC giving complete control over the HTML, CSS has never been this important for a .NET developer (that works with a designer).


So, here is a short warm up session for CSS that might be useful for you right before you go into a web developer interview.

You can follow this link if you want to download it. 

Monday, October 10, 2011

Installing ASP.NET MVC 3 all in one for Visual Studio 2010

Simply install the asp.net mvc 3 tools update :
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1491



This contains EVERYTHING you need to get started with ASP.NET MVC 3. This will actually even install NuGet 1.2 for you :)

There is NO need to install the asp.net mvc 3 RTM : http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=4211 although if you already have it installed it will not get in the way. The tools update contains the same binaries and the only improvements are in Visual Studio between the two versions. So no need to update projects you have made with the original ASP.NET MVC 3 RTM release.

Compatibility with SP1 / without
It does not matter if you have SP1 installed or not. The special case is when you have Async CTP installed. 


Compatibiliy with Async CTP 
It is not compatible with the original Async CTP. If you want to use async first install the old async CTP. Then you need to upgrade your Visual studio 2010 to SP1 and then install Async CTP SP1 Refresh. Finally you can install ASP.NET MVC 3 tools update and everything will work fine :)

Enjoy!

Saturday, October 8, 2011

Comparison of Knockout.js and Backbone.js

Knockout.js is a great micro javascript library that allows you to make MVVM style applications with Javascript. To learn more about knockout.js check out there awesome live (in the browser tutorial) at :
http://learn.knockoutjs.com/


But enough about what is Knockout. Lets move on the how cool is knockout. A sample TODOs was provided by Scott Messinger about how cool Knockout.js is as compared to Backbone.js.

In backbone.js :

And in Knockout.js:

Enjoy!

Offline Installer for Visual Studio 2010 SP1

Reinstalling windows is something that I do at least once a year on any machine that I have ever used. Its not a bad omen on the part of windows ... its just that I like my computer system to be clean. So I would really like to have an offline installer for Visual Studio 2010 SP1 that I just run after windows reinstallation rather than waiting to download 500 MB with an online installer. So here is the offline installer for Visual Studio 2010 SP1 core.



Download it here 
Note that the size of the offline installer is 1.5 GB+ because it contains upgrade files for every possible upgrade path (x86 / x64 etc).

Just extract the iso with winrar and run setup.exe.
Note : I recommend that you uninstall AsyncCTP (pre SP1 version) before you being this installation.
Enjoy!

Actionscript for C# developers

I've been learning Actionscript for some while now. The reason being the ability to target iOS / Android / Facebook gaming with a single platform.



C# for me is what my brain likes to think in (when it is not thinking in pseudocode or python). Here is a document that I made during the process of learning ActionScript as a language when you know C#.

Note: This document is a constant work in progress thanks to Google docs ability to sync between various computers I own I can chose to start and stop work on it from anywhere :)

You can download the word document file here.

Or view it here:

Friday, October 7, 2011

Razor View Engine Cheat Sheet for C#

C# Razor view engine is the most beautiful templating syntax I have ever seen in the MVC frameworks (rail and django included ... sorry for bringing django up).


Here is a quick cheatsheet that I made when revising if there was anything about the syntax that I didn't get the first time. I am sure there are still syntax related things that I am missing. If you feel that anything needs to be added to this let me know.