Monday, November 26, 2012

Open Command Window at current directory

Common pro-user method:

Hold the shift key when you right click on / inside a folder and you get a menu option : 

Something I just found out today (better): 

I just found this out today. I find having to hold the keydown and press the mouse button a bit too much. You can simply (on windows 7 and up, including windows 8) type in cmd in the address bar as these screenshots demonstrate. Select:


 Type:

 And after you press enter:
Much better. Enjoy!

Friday, November 23, 2012

.NET 4.5 Authentication and Authorization Trick question

I love the new ClaimsIdentity and ClaimsPrincipal classes added into .NET 4.5 : http://msdn.microsoft.com/en-us/library/hh873305.aspx

Using federated security used to require somewhat configuration in WCF with its SecurityContext handling : http://msdn.microsoft.com/en-us/library/ms731814.aspx and it was not integrated into the IIdentity and IPrincipal classes that come as a part of the .net core framework. Its nice to see these merge up.

That said. Here is a gotcha. Guess the output of this :


If you use GenericIdentity it is Authenticated by default. Whereas with Claims you can have users that are not authenticated! Here is the output:
This is actually more intuitive since we should be able to claim things about anonymous users. The moment you specify an authentication type for Claims Identity the user becomes authenticated.

Enjoy the new features. 

Monday, November 12, 2012

TypeScript is Awesome!

TypeScript has quickly become my current favorite language. If you haven't heard of it yet then go here : http://www.typescriptlang.org/

Why?
Any self respecting developer that does javascript work should definitely check it out. I really like the ideas in javascript and the ability to modify the language according to my liking but I really really miss the great tooling / typo checking we get with static typing.

I strongly suggest you look at Ander's talk here : http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript (also embedded below) to get an idea of the awesomeness that becomes at your disposal:


Its open source. The tooling will be awesome. Developers, Developers, Developers.

Its better than CoffeeScript
In my opinion typescript is going to be as awesome for Javascript as LESS has proved to be for CSS. And in case you haven't heard of LESS its a superset of CSS that compiles down to CSS (example of popularity, twitter bootstrap uses it : http://twitter.github.com/bootstrap/extend.html ). Similarly TypeScript is a Superset of Javascript, all your javascript is still valid TypeScript. Super Cool. You are not learning a new language, you are extending your knowledge of a language.

So to learn typescript === learn javascript + more goodness

The community Loves it
The response from the community is what makes me really happy, and raises my faith in human support of all that is righteous and good :) . My measure of community response Stackoverflow : http://stackoverflow.com/questions/tagged/typescript And its not the number of questions they got in one month. Its the the number of votes on the accepted solutions. People are monitoring it a lot, in their own time. Always a good sign.

All your definitions are us
This is quickly becoming the definitive resource for all the typescript definitions your heart can desire : https://github.com/borisyankov/DefinitelyTyped Love the open source