A software engineer's glory so often goes unnoticed. Attention seems to come either when there are bugs or when the final project ships. But rarely is a developer appreciated for all the nuances and subtleties of a piece of code--and all the heroics it took to write it. With Visual Studio Achievements Beta, your talents are recognized as you perform various coding feats, unlock achievements and earn badges.
Visual Studio is a powerful tool with tons of features, many of which you may not know about. Earning some of the badges may result in learning about features you didn’t even know existed!
Download it today from the Visual Studio Gallery
With the Visual Studio Achievements Extension, achievements are unlocked based on your activity. Your code is analyzed on a background thread each time you compile. In addition, the extension listens for certain events and actions that you may perform in Visual Studio, reporting progress on these events to the server.
When you unlock an achievement, Visual Studio lets you know visually with a pop-up:
Figure 1 - Unlocking An Achievement
In addition, your Channel 9 profile is updated with any achievements you earn, recalculating your position on the leaderboard:
Figure 2 - The Visual Studio Achievements Leaderboard
Some examples of individual achievements include Regional Manager (have more than 10 regions in a single class), Close To The Metal (use 5 preprocessor directives), Stubby (generate method stubs 10 times) or Interrupting Cow (have 10 breakpoints in a file). All in all, there are 32 achievements awaiting to be unlocked, all of which are listed here. Here's what the 6 different badges look like:
The Six Categories of Achievements
Customizing Visual Studio
Don't Try This At Home
Good Housekeeping
Just For Fun
Power Coder
Unleashing Visual Studio
Each time you earn a badge, a unique page is created with your profile picture, the badge and a description. You can tweet about achievements you earn and/or share them on Facebook:
Figure 3 - Share A Page
Or, you can show a list of achievements on your blog using the Visual Studio Achievements Widget which is as simple as adding one line of script to your page. After all, those badges look so shiny and nice! Here's an example of the widget on a blog:
Figure 4 - The Visual Studio Achievements Widget On A Blog
We have to give props to the blog While True, whose blog post What If Visual Studio Had Achievements inspired us to go build this. That post spawned a reddit post that is the thread which started it all!
We're just getting started with Visual Studio Achievements and are hoping to release more in the future. If you have ideas for additional achievements, we'd love to hear about them. Please use the Q&A section of the achievements extension to make suggestions for future achievements. And if you have suggestions, concerns, issues or problems, again, use the Q&A section of the achievements gallery page. Give a read to the FAQ as well as your question may already be answered.
The Microsoft Visual Studio Design Research Team is looking for participants to give us direct feedback on our development tools, languages and libraries! Opportunities include usability studies of upcoming features, focus groups where we explore new ideas, as well as 1:1 interviews.
What do you get out of it?
When you are selected to participate in one of our research studies, benefits include a combination of the following:
We have a brief enrollment form that will ask you a few questions about your company, your job, and the software and languages you actively use. We will contact you as soon as we have a research study that matches your specific background and/or interests.
Enrollment Form
This enrollment should only take 3-5 minutes to complete. For more information about the program feel free to email us at vsdr@microsoft.com. Please note that the Enrollment link originates from Microsoft User Research and is hosted by our survey software provider. Visit http://www.microsoft.com/userresearch/studies.aspx if you have any concerns. Please note that government employees and non-U.S. residents are not eligible for a Microsoft gratuity.
Thanks, Karl Melder UX Lead, DevDiv User Experience
The Windows Simulator is a tool provided in Visual Studio 11 Developer Preview that helps debugging Metro style applications. Its main purpose is to enable debugging when developers want to test how their applications respond to the new metro capabilities without having a device that supports those capabilities. It is implemented as a remote connection session to the same machine, but additionally emulates common hardware functionalities available in new devices, e.g., Rotation (i.e., orientation change), High Resolution and Touch. A general introduction can be found here. This article focuses on Rotation and Resolution emulation.
Roughly, an orientation-aware application can be coded in two ways (A sample app is available here [1]):
1. It can listen to the Orientation Sensor. As shown in the sample [1], it looks like:
OrientationSensor _sensor = OrientationSensor.GetDefault();
if (_sensor != null) {
_sensor.ReadingChanged += new TypedEventHandler<OrientationSensor,
OrientationSensorReadingChangedEventArgs>(ReadingChanged);
}
2. It can also listen to the display orientation change.
This can be hooked in HTML code through @media rule. Additional customization can be achieved by adding an event handler to Windows.Graphics.Display.DisplayProperties.
The Simulator doesn’t support the emulation of Orientation Sensor, and is only able to trigger a display orientation change. Therefore in the following section, we will concentrate on examples of orientation-aware applications that work with the Simulator.
Let’s start with an orientation-aware application that has only HTML tag.
1. Start Visual Studio Express. Then create a Blank Application, by clicking “File/New Project…”, “Templates/JavaScript/Blank Application”
2. In the generated project, you will find a file default.html. Make the following modifications to the generated code:
2.1 Add the following code to the end of <head>...</head> code block.
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="MSThemeCompatible" content="yes" />
<style type="text/css">
#fullscreen { }
#fill { }
#snapped { }
#deviceportrait { }
@media screen and (-ms-view-state: full-screen) {
#fill { display: none; }
#snapped { display: none; }
#deviceportrait { display: none; }
@media screen and (-ms-view-state: fill) {
#fullscreen { display: none; }
@media screen and (-ms-view-state: snapped) {
@media screen and (-ms-view-state: device-portrait) {
</style>
2.2 Add the following code to the end of <body>...</body> code block.
<div id="fullscreen" class="win-contentSubtitle">Full Screen</div>
<div id="fill" class="win-contentSubtitle">Fill</div>
<div id="snapped" class="win-contentSubtitle">Snapped</div>
<div id="deviceportrait" class="win-contentSubtitle">Device Portrait</div>
Together, the above code claims that when the metro app is in full-screen landscape mode, the app shows “Full Screen”; when it is in full-screen portrait mode, the app shows “Device Portrait”. (Note: by MSDN definition, “a value of full-screen indicates the device is in landscape orientation and the application’s client area is the same height and width as the device’s height and width.” For a detailed explanation about -ms-view-state media feature, refer to this MSDN article[2]).
3. Now change the debug target from “Local Machine” (the default value) to “Simulator”.
4. F5 to start the debugging.
You should see the app displaying something like “Full Screen”.
5. Click the Simulator “Rotate +90 degrees” button to rotate the Simulator clockwise for 90 degrees.
You should see the app displaying something like “Device Portrait”.
In summary, we have shown a sample of how to write an orientation-aware metro app. Without orientation sensor, it is not straightforward to trigger –ms-view-state event so that one can test his/her metro app. The Simulator comes to the rescue in this case.
Another approach to customize a metro app in response to an orientation change is to explicitly add an event handler. The code is as simple as:
Windows.Graphics.Display.DisplayProperties.OrientationChanged +=
new DisplayPropertiesEventHandler(DisplayProperties_OrientationChanged);
An interested reader can download the sample application [1]to try the debugging experience with the Simulator. Here are the detailed steps:
1. Download the sample project and unzip the solution to a temp folder.
2. Start Visual Studio Express and open the project OrientationCS.csproj.
4. Set a breakpoint at MainPage.xaml.cs in the below code (around line 190):
if (DisplayProperties.CurrentOrientation == DisplayOrientations.Portrait
|| DisplayProperties.CurrentOrientation == DisplayOrientations.PortraitFlipped)
5. F5 to debug the app.
6. Click the Simulator “Rotate +90 degrees” button to rotate the Simulator clockwise for 90 degrees. Now you should see the breakpoint hit!
Again, without the Simulator, it would be difficult to debug such application without having an actual device with an orientation sensor.
Assume a developer has a computer with “mismatched” video adapter and monitor: the video adapter supports a high resolution while the monitor doesn’t. In such case it would be difficult for the developer to test his metro app in the high resolution. Again, the Simulator helps in this case: It displays common resolutions that are supported by the video adapter, and allows the user to choose each resolution for testing purpose inside the Simulator. For example, in the below screenshot of the Simulator, it shows various resolutions supported by my computer’s video driver. Here I am able to test a metro app with a high resolution of 2560*1440, even though my monitor doesn’t display such high resolution.
I hope that you have enjoyed this post. By now you should have a good understanding about the support for rotation and resolution in the Simulator.
Thanks,
Zebin Chen
Software Development Engineer, Visual Studio
References:
[1] OrientationSensor Sample: http://code.msdn.microsoft.com/windowsapps/OrientationSensor-Sample-99595893
[2] –ms-view-state media feature: http://msdn.microsoft.com/en-us/library/windows/apps/hh465826(v=VS.85).aspx
All of you might be pretty busy discovering what Windows 8 has to offer. Today I will introduce you to debugging Contracts, one of the cool features in Windows 8.
It is hard to debug contracts when you are debugging locally because they disappear as soon as the focus is lost. So, as you hit a breakpoint in Visual Studio for your app, the target app would disappear making it difficult to debug your app.
Visual Studio 11 Developer Preview ships with a Windows Simulator. The Simulator helps with debugging contracts as it’s a separate session and the target app does not disappear on switching focus to VS. Simulator is also useful in debugging switching between landscape and portrait modes, targeting various device sizes and resolutions, and emulating touch points. Here is an introductory post about Windows Simulator. You can also refer to this post for more information on testing touch using Simulator.
I will use the JavaScript Share Source Sample App and Share Target Sample App (provided by the Windows Developer Preview Metro style apps samples) for my demonstration.
If you are using C#/VB project, make sure to select the following option under Debug tab.
Open the file target.js and put a breakpoint in the method activatedHandler as shown below:
6. Press F5 to start debugging.
Go to the Start screen and search for Share Source Sample App. As Share Source Sample App becomes active, share some text as shown below:
List of target apps for share contract will appear on the right side, and from the list of available apps select Share Target Sample App.
You will notice that as soon as you hit the breakpoint, target app will disappear making it hard to debug your code.
Now let's try the same thing using Windows Simulator. Press Stop Debugging in Visual Studio 11 Developer Preview and start debugging again using Simulator.
Once the Simulator is up and running and your Share Target Sample App is active, click on the Windows button in the Simulator to go to the Start screen, and search for Share Source Sample App. As Share Source Sample App becomes active, start sharing with the Share Target Sample App using same steps described earlier.
You will notice that target app is still visible in the Simulator after breakpoint is hit. Continue debugging using F10, and you can still observe your target app in parallel as seen below.
I hope you will find this post useful for debugging contracts.
Thanks, Ravneet Singh Khalsa Software Design Engineer, Visual Studio
As of today, Visual Studio 2010 SP1 is now available through Microsoft Update. If you have opted into Microsoft Update and haven’t installed SP1 yet, you will soon have it offered to you. The service pack was initially released in March and includes some often requested feature improvements, fixes that improve reliability as well as the most commonly-reported customer bugs.
For more information, check out the following blog posts and links:
Enjoy!
Jack UnverferthThe Visual Studio Professional Team
I wanted to take the time to thank everyone who has contributed to our UserVoice performance site by entering areas you would like to see us improve and for voting on those items. To date we have had over 4700 posts and votes showing the passion you all have for Visual Studio and its performance. For those that have downloaded the Visual Studio 11 Developer Preview from the Microsoft \\Build Conference I would like to encourage you to post any performance issues you are seeing with that drop of Visual Studio as well.
As I said in the initial post Visual Studio’s performance continues to be a hot topic and we appreciate the feedback we have received on this site, and through other forums. We are listening to your feedback and continuing to invest in improving performance across a number of areas you all have posted and voted for on this site along with data we are receiving through the instrumentation provided by PerfWatson described below. I wanted to reiterate that our approach to gathering the key areas to improve are twofold and include:
Collecting Customer Feedback
Please continue to use our single stop for feedback on Visual Studio Performance at our UserVoice site and post items or vote on the performance issues you find are impacting you the most. This feedback has been, and will continue to be, incorporated into our plans as we prioritize our work.
Instrumentation
I want to spend a bit more time encouraging you to make use of Visual Studio PerfWatson, which is included in Visual Studio 11 Developer Preview. PerfWatson, much like regular Watson, enables us to collect data from your machine right when you experience a performance problem. This data allows us to pinpoint right when you experienced a significant pause or delay in the product and we can then debug the exact stack that is causing your Visual Studio instance to experience a performance delay. This blog post describes how we are using the data to identify and fix performance problems. By combining your feedback with this data we continue to work on addressing those issues affecting you the most.
What to look for Next
As we finish our performance work and validate the wins I will be posting some videos of before and after scenarios for you to see. Please look for these posts as we enter the new year. I continue to read the posts, comments, vote totals at the UserVoice site along with PerfWatson reports indicating stacks that are being the most problematic. This dual view of human perception along with instrumented data is invaluable to our understanding of what is impacting you the most, and again I appreciate your passion for helping us make Visual Studio better for you.
Thank you for your support,
Larry SullivanDirector of Engineering