AngularJS in 19 Days : Download the free eBook with samples

Hello All,

As you might be following the series of posts on AngularJS from last couple of months and that I completed 20 post and covered range of topics. Based on many suggestions, I have updated all those posts with current version 1.4, since initial posts were using other using 1.0+, added navigation links etc. Now I have incorporated compiled all the posts, refined the content and sample a bit and happy to present it in a format of eBook. I am sure it will be very handy and easy to read and follow till end.

About the ebook :

ebookcoverFor those who were not following the series of post, As the name suggests this book in divided in 19 days from Introduction to covering most of the core topics including unit tests. The sample of each day can be downloaded from GitHub. This is not just another e book which covers the basics of AngularJS or cover everything, but it is a unique combination of basics and details description of core concepts with sample. If you are ASP.NET MVC developer then it will become more fruitful to you as some of days it covers that how and what are best ways to use Angular in ASP.NET MVC project. I am sure you will enjoy the book and will share your feedback that will help in upcoming new version.

 

Download the book from here

Thanks
Brij

Advertisement

Top 12 tricks to insert common code snippets : Productivity Tips

This post is in line with my previous post where I talked about how one can be more productive with Visual Studio. In last post, We discussed top 12 shortcuts that helps a lot while writing and reviewing code in day to day work. While writing code we need to follow to follow certain rules and constructs that also becomes very repetitive say, you are writing classes for your domain or adding properties or defining constructors or putting try block and lot more where we just need to write the code in similar pattern and are no brainer. Spending time in these types of code are kind of waste of time and energy. To see my previous post, use the link below

Top 12 Visual Studio short cuts – Productivity Tips

In this post, I am going discuss 12 tricks that can insert code snippets just by few keystrokes.

1- Writing a class is a one of the most common repetitive code we write. Use

  class press TAB

1-Class

 

 

 

Once the snippet inserted, it puts the cursor at MyClass which allows to change the name of class instantly without any extra keystroke.

2- Writing constructor is also another task which is very common and many times we many constructor for the same class. To write constructor use

ctor press TAB

ctor

 

 

 

3- Now Class is created. Let’s add property now. Use

prop press TAB

2-Prop

 

 

Similar as 1st trick, it puts the cursor to change the type and after that change the property name itself. I found really cool when I used first.

It comes with many other flavor. Use propg  to create a auto implemented property with private set.

4- Second trick allows us to write auto-implemented property which requires less code but there could be many scenarios, when we need to write Full property definition that we used in earlier to C# 3.0 then use

propfull press TAB

3-propfull

 

 

 

 

Changing type and name can be done similar to above.

5- Need to write an indexer, use

indexer press TAB

indexer

 

 

 

6- Many times while code review we see that some part of code is not under try catch block or we need to write the block. Use

try press TAB

5-try

 

 

 

 

There is another flavor, if we just want try and finally then use tryf.

7- Want to create enum use

enum press TAB

enum-6

 

 

 

Similarly use struct to insert struct block.

8- Want to create switch block, use

switch press TAB

7-switch

 

 

 

Similarly use for, foreach, do, while etc to insert respective code blocks.

9- Many times we need to write our own custom exception class that should inherit from Exception class. It can written easily by

Exception press TAB

It creates a serializable class as

8- Exception

 

 

 

 

 

 

10- Want to override Equals method for your class. Use

equals press TAB

It will insert as

9-equals

 

 

 

 

 

 

 

 
 

 

 

 
11- To write static void main, use

svm press TAB

svm

 

 

 

Similarly you can use sim for static int main.

12 – last, many times we write console.writeline in our application. Just use

cw press TAB

10-cw

 
 
 

In this post, how can we save lots of keystrokes and time while writing some very common repetive code. This is not complete list but very common ones that can be used a lot in our day to day coding. if you know any other snippet which is very useful, do share in comments.

Cheers
Brij