Tip: Using Code Snippets in Visual Studio – Boredom Challenge Day 20

Standard

Code Snippets feature of Visual Studio allows us to save pieces of code in snippet files, and then easily put them to our projects with the press of a few shortcut keys. This is useful if there is a specific code that you have to use again and again in different projects (for example, the code that handles Facebook login), so instead of writing it each and everytime (or opening another project and then pasting from there) we can just use the code snippet. This is also useful if you are giving presentations about a technical topic since you can prepare the code you’ll use beforehand and don’t bother to write them from scratch during the presentation.

If you have Visual Studio open now, try it yourself: Press Ctrl+K, X; then select a snippet and press enter. The related code will be automatically added to that line.

1

Under “Documents\Visual Studio 2012\Code Snippets” folder, you’ll see that there are folders for different programming languages, each with a My Code Snippets subfolder where you can put your custom code snippets. If you also wish, you can go to Tools -> Code Snippet Manager in Visual Studio and add other code snippet folders.

2

3

➤ Read on if you wish to learn how we can make our own code snippets

Visual Studio Achievements

Standard

Evet, yanlış okumadınız. 😀 Aynı oyunlarda olduğu gibi, artık Visual Studio içerisinde de küçük bir eklenti sayesinde achievementlara sahip olabilirsiniz. Artık kod yazarken çektiğimiz sıkıntıların ve ekran başında harcadığımız saatlerin achievementlar sayesinde az da olsa ortaya çıkmasının yanı sıra, hırs yapıp arkadaşlarımızla yarışmamız, hatta Visual Studio içerisinde varolan bazı bilmediğimiz özellikleri öğrenmemiz bile mümkün. 🙂 Kod yazmayı kesinlikle çok daha eğlenceli hale getiren bu eklenti içerisinde öyle şeyler var ki, gülmemek elde değil. 😀

Öncelikle, tam olarak Visual Studio Achievements‘ın ne olduğundan kısaca bahsedelim. Bu eklentiyi Visual Studio’ya yüklediğimizde, arkaplanda çalışarak hem Visual Studio içerisinde yapabileceğimiz belirli hareketleri ve durumları takip etmeye başlıyor, hem de yazdığımız kodu her derlediğimizde kontrol ediyor. Yaptığı bu takibi ve kontrolü kendi sunucusu ile denetleyerek achievementlar ile ilgili durumumuzu belirliyor.

Eğer bir achievement kazanırsak, bunu ekranda sağ alt köşede gösteriyor.

➤ Devamını okuyun…