If you’re developing apps or services for the web, you’re bound to be using ASP.NET. This language framework is one of Microsoft’s gifts to the development world for building dynamic web sites, apps and services. It has been around since early 2002. It actually succeeded Microsoft's Active Server Pages (hence the ASP in ASP.NET) technology.
And now there’s ASP.NET's successor ASP.NET Core. The Core version is built around a new open-source, cross-platform .NET compiler. Codenamed “Roslyn” when it was under development, it was often jokingly referred to as the “worst kept secret at Microsoft,” since they didn’t seemed as concerned about secrecy as they often do when new releases are in the works.
So you’re developing web apps and services and you want to become more proficient in ASP.NET and ASP.NET Core? You’re in luck. Another trip through the blogosphere revealed a healthy handful of ASP.NET Core tutorials. Here’s a look:
This is the official Microsoft ASP.NET Core tutorial site. It covers broad categories like building web applications, building web APIs, working with data, authentication and authorization, client-side development, testing, publishing and deployment. These ASP.NET Core tutorials do a good job of taking you right from the start. Under the building web apps category, for example, there are tutorial segments for Your first ASP.NET Core application on a Mac or Linux using Visual Studio Code, Building your first ASP.NET Core MVC app with Visual Studio, and Getting started with ASP.NET Core and Entity Framework Core using Visual Studio.
And in the next category, building Web APIs, there are segments on Building your first web API with ASP.NET Core MVC and Visual Studio, ASP.NET Web API Help Pages using Swagger and Creating backend web services for native mobile applications.
This one is part of Tutorialspoint, which also covers the original version of ASP.NET. These are very much first-timer oriented. The ASP.NET Core tutorials cover an overview, environment setup, new project, project layout, exceptions, set up MVC, MVC design patterns, routing, action results, and a handful of other topics.
The regular ASP.NET section they describe as basic ASP.NET programming will bring you to a moderate level of expertise in ASP.NET. The site recommends starting with an understanding of the .NET programming language and other web technologies such as HTML, CSS, and AJAX. The ASP.NET tutorials cover environment, life cycle, event handling, server side and server controls, client side, directors, validators, file uploading, multi views, AJAX control, data sources, data binding, and debugging. There’s a whole list of other specific topics as well. These pretty much cover all the ins and outs of ASP.NET and ASP.NET Core.
Once you’re rolling with ASP.NET and want to branch out to Core, check this one out. This covers the latest and greatest in the latest version. The site recommends, "You basically need to update your project.json file, targeting the version 1.1 of the framework and the NuGet packages. If you are using VS 2015, you might also need to update or create a global.json file that pins the target framework to be used with your project, in case you run into issues with multiple versions installed locally side by side."
The tutorial covers the major new feature areas in ASP.NET Core 1.1, including middleware as filters, the rewrite module, viewing components as tag filters, viewing compilation, response compression and caching, cookie storage for TempData, and some of the other less notable improvements. These are hardcore higher level tutorials, complete with code snippets and detailed descriptions. In the first piece on using middleware as filters, it explains, "If you check the source code, when a middleware is added as a filter, it is effectively being added as a Resource Filter. This means the middleware executes after routing and authorization but before everything else. You now will be able to:
- Add middleware (your own or third party provided) to particular controllers or actions. For example, you could add the new compression middleware only to particular actions.
- Use Route features like the RouteData values extracted by the routing middleware.
The first option means greater flexibility. The second might not seem much, but it makes a great difference in some scenarios."
It follows up each topic with code snippets to demonstrate how to do what the tutorial has just explained. There are other ASP.NET and ASP.NET Core tutorials out there, but these were some that rose to the top, in my humble opinion. Let me know what you think at email@example.com.
Posted by Lafe Low on 03/31/2017 at 11:06 AM0 comments
Howdy readers, Lafe here. About once a month, my partner in crime, Rich Seeley, will be doing technical takeovers of this blog. Here's his look at some of the new features in Visual Studio 2017.
Microsoft filled hours of YouTube space this month with the launch of Visual Studio 2017 including this kickoff by Microsoft CEO Satya Nadella, who touted the release as designed to empower developers to build any app on any platform.
"We can’t wait to see what developers do with it," he said.
Once you get past the all-things-for-all developers hoopla, there are some cool cutting-edge features in this Visual Studio update. Not surprisingly, some of the demos that got the most applause from developers at the launch event were automations that speed up coding and debugging.
As a Visual Studio Magazine article pointed out in covering this month’s launch "much of what's new has to do with updates to tools that aim to increase developer productivity and performance and the current state of several VS iterations, including the Mac and Mobile Center previews...improvements to startup (new Start page) and project loading (also, project loading without the need to have a solution loaded); enhanced navigation, with a host of Go To shortcut keys for grouping, sorting, filtering and searching of references in a Results window; IntelliSense filtering; improved refactoring, style analyzers, and other C# language improvements; support for CMake and Linux (via extension) in Visual C++; live unit testing; new Run to Click in lieu of temporary breakpoints and exception helpers in a non-modal dialog for debugging; and a new, streamlined installer."
As Michael Domingo pointed out in this Visual Studio Magazine post, getting an overview of what’s new in the Visual Studio update can be difficult with so many features being touted in the two-day launch event. But he pointed readers to a poster created by the VS team at Microsoft to show all the new features including Advanced IntelliSense, Live Code Analysis, new shortcut keys for faster development, links to pages for extensions, and a mini-graphic of the many layers of .NET, and language-specific changes. When you spot the new goodies that apply to your work, you can dive into the release notes to get the details.
The Big Picture
While it is tempting to cut-and-paste into this blog the entire release notes, which cover everything from the "new installation experience" to workarounds for things like VS Team Explorer that didn’t make this month's Visual Studio update, there isn't much point since it's easy to scan the notes and find the items you're going to be using for your projects.
Here are a few highlights focused on speeding coding, debugging and testing, as well as improving app performance:
- Visual Studio IDE - A broad range of enhancements in Visual Studio 2017, including reduction in startup and solution load times, sign in and identity improvements, improved code navigation, open folder view, and connected services to enable connections between your app and any service on-premises or in the cloud.
- Debugging and Diagnostics - Overhaul of the Exception Helper and faster code navigation with Run to Click. Plus, a new summary of your application events in the Diagnostic Tools window and several improvements to the CPU Tool.
- Live Unit Testing - Visualize unit testing results and code coverage live in the editor.
- Testing Tools - Associate automation with test case work items using the Test Explorer.
Visual Basic Developers Not Forgotten (Sort of)
You can scan the release notes to find out specifics for the language you use. For example, Visual Basic developers will find these updates:
- Value tuples introduce language support for using tuples to temporarily group a set of typed values: Dim point As (x As Integer, y As Integer) = GetOffset().
- ByRef return consumption extends the language to support consumption of functions and properties from libraries which have ByRef returns.
- Binary literals and digit group separators allow native representation of binary numbers. This is super convenient for bitmasks and flags enumerations: &B1001_0011.
Of course, the Visual Studio update couldn't have everything or please everyone. An article on the ADTmag site noted that despite persistent requests from Visual Basic developers for more support for their language, ADT reported:
Microsoft also stamped DECLINED on:
- Visual Basic for Developing Universal Windows Application
- Provide a Visual Basic 6 Community edition - to allow free download of the VB6 programming language
- VB6 Programming - Create a utility to convert VB.Net to VB6
- Re-open the 'Bring back Classic Visual Basic' suggestion for VB6 Programming
There Will Be Bugs
As a reminder that any software release is more of a work in progress than a final product, an article on the Visual Studio magazine website, points to this irony: "Even with Team Foundation Server 2017 now out with the release of Visual Studio 2017, the VS team continues to work on TFS 2015 improvements. Just last week, the group released a TFS 2015 Update 4 preview that rolls up with a slew of bug fixes."
So enjoy the Visual Studio 2017 update. And stay tuned.
Posted by Lafe Low on 03/27/2017 at 2:03 PM0 comments
Visual Studio Magazine Editor-in-Chief Michael Domingo found this Visual Studio 2017 infographic helpful, and we hope you will too!
Microsoft added a ton of new features and updated functionality to Visual Studio 2017. There is also a lot of partner technology now incorporated directly into the IDE, like Redgate’s database features and Parasoft’s integrated unit testing. There has been a lot going on in the development pipeline throughout the last year since Build 2016. It’s a lot to keep track of, so having a summarized list of all Visual Studio 2017’s new and updated features—both the standard features you use every day, and some unique hidden gems—can help keep you on track.
So that's what the Visual Studio team did, put all of those goodies and hidden gems into an infographic posted on their site and ready for printing. Besides some quick tips on Advanced IntelliSense, Live Code Analysis, and a whole host of new shortcut keys for every facet of development, there are also links to pages for extensions, a nifty mini-graphic of the many layers of .NET, and language-specific changes, all depicted graphically.
You can find the poster here. (You can also view the VS 2017 release notes, which provide the usual text descriptions of all the newness, here.)
If you end up printing this up and posting it, we'd love for you to send photos of you with the wall you tape this poster on. Tell me about it at firstname.lastname@example.org.
Posted by Lafe Low on 03/21/2017 at 11:24 AM0 comments
If you're developing mobile apps, you’re developing with Xamarin. Today we look at some of the sharpest Xamarin blogs out there for developers.
This is the official Xamarin blog, so there is plenty of good stuff in here – from individual tips and tricks to links to Xamarin-related webcasts and other resources. Most, if not all, of the contributors are Microsoft employees—including the Xamarin guy James Montemagno, who has presented before and will certainly present again at Visual Studio Live!
A recent post describes the new Xamarin.Forms Previewer that comes with the latest release for Visual Studio and Visual Studio for Mac. There are now enhancements to the Xamarin.Forms Previewer to "increase the range of supported controls and XAML constructs … make the previewer much more reliable, including the initialization process. Be sure that you have the latest Java 1.8 x64 installed, as it is required for Android previewing."
Another recent post by James Montemagno dives deep into .NET Standard Libraries in both Xamarin Studio and Visual Studio. These help you share code more easily. "Consuming .NET Standard NuGets and Assemblies is completely seamless, and with Xamarin Studio 6.2, developers can create and open .NET Standard projects. The .NET Standard Library is a formal specification of .NET APIs that are intended to be available on all .NET run-times. You can think of it as a simplified, yet expanded, Portable Class Library. It is a single library with a uniform API for all .NET Platforms, including .NET Core. You just create a single .NET Standard Library and use it from any run-time that supports .NET Standard Platform."
Speaking of James Montemagno, this is his personal Xamarin blog. As you might suspect, he gets deep into the details of coding mobile apps with Xamarin and supporting technologies. He also covers ASP.NET Core. Linux, Azure and how they all work together. A recent post covers Deploying an ASP.NET Core app to Linux on Azure App Service. He says he has been "messing around with ASP.NET Core inside of Visual Studio for Mac," which is what led him to this topic. His posts are nicely detailed and include screen shots that support and illustrate what he's describing.
Jonathan Peppers is a self-described "Xamarin MVP and C# nerd." His blog, like Montemagno's, includes a laundry list of specific topics and functions. Some of the top recent posts include Securing In-App Purchases for Xamarin with Azure Functions, Improving HTTP Performance in Xamarin Applications, and Mocking Xamarin.Forms.
That last post isn’t making fun of Xamarin.Forms. Instead, he talks about recreating the forms app. "We've been building a large Xamarin.Forms application for quite some time at Hitcents, and there was a huge pain point I was able to figure out for our team. If you've ever gotten into Xamarin.Forms" development, it becomes quite clear that there isn't a guide for unit testing things like markup extensions, custom views, navigation, animations, etc."
He goes on to describe his solution. "The dilemma is, if you try to setup your own Xamarin.Forms.Forms.Init() for the purposes of unit testing, you quickly find that most of the interfaces needed to set this up are marked internal. To get around this issue I took advantage of [InternalsVisibleTo], and created a unit testing library where I renamed the output assembly to Xamarin.Forms.Core.UnitTests.dll. This allowed me to setup a MockForms.Init() method, and this assembly name isn't likely to conflict with anything in a developer's Xamarin.Forms project."
There are several other top-notch Xamarin blogs out there, so look for another post coming up in which we’ll present several more. Happy coding!
Posted by Lafe Low on 03/14/2017 at 1:04 PM0 comments
The Calls for Presentations are NOW OPEN for the following events:
We asked Rockford Lhotka, Visual Studio Live! Conference Co-Chair and Modern Apps Live! Conference Chair, to bring to light the lack of speaker diversity at tech conferences and how we can work to fix it. Here's what he said:
It is widely understood that the software industry has a lack of diversity, perhaps more than most modern industries. This is particularly true with gender diversity: there are very few women in the science and technology fields, and software development is no exception.
This wasn't always the case, as made so clear by the recent (and excellent) movie Hidden Figures. Or the many examples of women who helped shape our industry into what it is today. We know that there are many women out there whose skills and insights are needed to advance our field, just as the women of the past were so important.
To address this lack of gender diversity, I think it is very important to increase the diversity of speakers at tech conferences. If you are a white male at a tech conference it is easy to see yourself in the role of industry leader – most of the visible leaders in our industry are like you. Similarly, as we get more diversity in the ranks of conference speakers it becomes easier for many other folks to see themselves in the role of industry leader – because they can also identify with the people they see on stage.
My co-chairs and I have also been advocates for women speakers in our industry and at our conferences in particular. Finding women speakers is a continual challenge, even with our explicit outreach to various women's tech advocacy groups on Twitter and elsewhere on the web.
One challenge with finding women speakers is that the pool of candidates is rather small. This tells me that there is more to do to make sure that our industry can take advantage of all the potential leadership and talent available. In addition to reaching out to women and people of color, we need to find a way to help those who have so much to offer find their voice.
Much has been said about why there are few women speakers to choose from, and there's no escaping the chilling effect that the behavior of some men in the field has on the participation of women. I will talk a little more about other factors, but I can't gloss over this in any way, it’s too important.
Unfortunately, for each example of outstanding female technologists, there are numerous first-person accounts of (to me) inconceivable misogynistic behavior by people and organizations in our industry today, and the effect of that behavior on the career choices of women who have a great deal to offer.
For a long time, I absorbed these stories and came to accept the reality they represent, but didn’t know what to do. I've always believed it is important for each of us to help make the world a better place, in whatever ways are available to us as individuals. As a straight white male, exactly what could I do?
WHAT WE CAN DO
It turns out there are a number of things to be done. One is to actively and vocally refuse to tolerate sexist comments or behavior by others. Peer pressure is a powerful tool, and sitting silently by when people are being cruel is tacit approval. Speaking out is necessary to effect change.
1. Refuse to tolerate bad behavior
In my particular case, I'm a co-chair for the Visual Studio Live conferences, and chair of the Modern Apps Live conferences, and in that context I have a bit more influence. Some years ago I worked with the conference organizers to put in place the anti-harassment policy for the conferences. We were among the first tech conferences to ever have such a policy, and I’m pleased to see that such policies have rapidly become the norm across most events in our industry. I intend to continue to work to create respectful environments where professionals of all backgrounds can be confident that their work will get professional and constructive treatment.
2. Overcome your fear
Breaking into speaking can be difficult enough without active mistreatment based on gender. In listening to women interested in public speaking, I find that there are also many barriers shared by all people.
Perhaps the biggest barrier is the fear of public speaking. This sometimes manifests as a belief that public speakers have a "gift" and this gift is something that the potential speaker just doesn't have.
Studies have shown that many people (women and men) fear public speaking more than they fear death. Whether true or not, it is a hard reality that a lot of people are afraid of, or at least uncomfortable with, public speaking.
If you have something valuable to say, then you have all the talent and "gift" required to speak. Now, what you need is skills, practice, and feedback. Mentoring is also a valuable asset. Just as the person new to computing defeats the fear of "doing something wrong and screwing everything up" as they gain technical skills and know-how, you will defeat the fear of speaking as you become more accomplished.
In my personal case, I was involved in speech and debate from age 13, and remained involved even through university and into my professional life. This has been an advantage to me, because public speaking is a skill, and just like any skill it requires training, coaching, and practice.
Recently I had a conversation with a young woman in the Magenic QA group, and she was talking about her career ambitions. She said she recently joined a Toastmasters group hosted by Magenic, because the inability to speak in front of people would limit her career. This is a perfect example of what anyone should consider if they want to advance their career – including the possibility of public speaking at something like a Visual Studio Live conference.
Even if you don’t have easy access to a Toastmasters group, it is beneficial to speak in front of trusted friends or colleagues, and extremely valuable to set up a camera to record yourself while speaking. This sort of coaching can help a person become a good speaker very rapidly. Candid, productive feedback goes a long way.
I've been speaking publicly for decades now, and I still take advantage of opportunities to get coaching or watch myself on video. Again, speaking is a skill, and the only way to improve over time is via training, coaching, and practice.
3. Practice, practice, practice
Speaking of practice, nobody gets a speaking slot at a professional conference without some sort of speaking history. Fortunately, most communities have various meetups, user groups, code camps, and other opportunities to give technical presentations in front of groups. There's no better way to practice public speaking, including the organization of content, various ways of explaining that content, and gaining the confidence that comes with success. When we look at potential speakers for each of our conferences, we look at the speaking history of people we don't already know, and this sort of experience weighs heavily in our assessment.
Everything I'm saying here applies to anyone who is interested in speaking at a conference. But one of the most common barriers I see, is people's fear of being an imposter. Imposter syndrome is quite common, but I've been told by numerous female colleagues that it is more prevalent among women than men.
4. Don’t fall victim to "impostor syndrome"
I struggle with this frequently when talking to people. They’ll tell me some cool thing they've learned, or some interesting problem they've solved. I'll suggest they write a blog, or give a presentation on that topic. To which they'll answer that it was nothing special, or nothing that other people would care about – the fact that I was intrigued notwithstanding.
The reality is that a great many talented developers do know something unique, and have a lot to offer their colleagues in the industry. Yes, I am talking to you as you read this! Chances are, you have sat in a presentation being given by someone else, and realized that there is a whole world of information that you are familiar with that is outside the scope of their talk, and you have wondered why you haven't seen a talk on it. Maybe you have even thought about doing a talk on it; and then talked yourself out of it. After all, if it was important, somebody would have already done a talk on it, right? Not necessarily!
For one thing, you know what you know because you did a project, or solved a problem, or worked in an industry that required you to learn this thing. Your insight comes from your unique experience.
For another, most people have the same barriers to speaking as you, and talk themselves out of putting their ideas and contributions forward.
Many who have something useful to say will immediately assume that their message isn’t important, or they are not the right ones to bring it forward. If you are interested in speaking, and you have something to say, why not work up a proposal for your idea? Even if it and you are not quite ready for Visual Studio Live, there are numerous venues to present talks and get that experience that you will need when you are ready to present at a professional conference.
There are a lot of ways to get started in communicating your contribution to our industry, but they all start by building skills and finding effective strategies. I've written a few of them down here to get us started, but this is only one step in a conversation that I intend to continue as long as it takes for our industry to benefit from the vast array of talent out there in the world.
READY TO SUBMIT? MY TOP TIPS!
I'll close with some advice specific to Visual Studio Live! and Live! 360 - as we mentioned, the current Call for Presentations for the Chicago and Anaheim locations is open through March 24, and the current Call for Presentations for Live! 360 is open through April 10.
As I mentioned earlier, each time we put together the content for a show we look at speakers we know and speakers we don’t yet know. If you are in the latter camp, there are things you can do to improve your chances of being selected – with the caveat that we get several times the number of submissions than we can fit in each show.
#1. Demonstrate experience from other events
Either numerous local or regional events, or other conferences makes a big difference. Our call for presenters (CFP) web site has a place to enter this information, and we also check out potential speakers by looking at their LinkedIn profiles and doing a web search. Having relevant experience visible on the web is a good idea.
#2. Give us at least 5 session ideas
In our case, each speaker gets two talks (with the rare exception of someone getting more). So if you only submit one talk we can't even consider you. And if you submit only two talks, the odds of both being exactly what we need are very small. Therefore, you should submit around five session ideas to improve the odds that your submissions will fit our needs.
#3. Give us ideas for a range of topics
I also suggest looking at our VSLive! CFP and Live! 360 CFP, because we list the sorts of topic we’re looking to have at each event. You can probably imagine that some popular topics (such as Angular or REST services) generate a lot of submissions because a lot of people are enthused about them at the moment. Submitting a bunch of session ideas centered around those popular topics is unlikely to be productive. Mix in some session ideas around other topics we list that seem less hyped now, because it is often the case that we'll get few (or no) submissions on some of those topics, even though we consider them important. At the same time, avoid submitting only "fringe" ideas. I can't give you perfect advice here, other than to suggest a mix of very mainstream, and less mainstream session ideas being helpful.
#4. Submit your sessions by the deadline!
On behalf of myself, my co-chairs, and the organizers of the Live 360 and Visual Studio Live events, I want to be crystal clear that we welcome and value a diverse group of speakers. We've been a pioneer in the tech conference space around code of conduct policies, and we work to provide a welcoming and supportive environment for speakers and attendees of any background. The only thing we ask is that you share our enthusiasm for technology and software development!
Have feedback for Rockford? Email him at email@example.com.
Posted by Lafe Low on 03/08/2017 at 2:10 PM0 comments
Howdy readers, Lafe here. About once a month, my partner in crime, Rich Seeley, will be doing technical takeovers of this blog. Here's his latest post, focused on fixing high CPU usage issues in Visual Studio.
The cause of a problem can be obvious.
You spill your coffee into the keyboard of your old laptop and it stops functioning.
But the cause of other problems can be elusive and tricky to troubleshoot.
That's how it is when you start looking for the cause of high CPU usage issues related to Visual Studio.
Consider the dilemma of the Visual Studio coder who has a perfectly operational machine except sometimes for no apparent reason CPU usage spikes.
Your Surface Pro 3 is overheating. But when you check with a Visual Studio guru, who has been working with the IDE for a decade or more, he says, "Never had that problem myself."
Others may say they've heard of the problem but have only a vague idea of what causes it or how to prevent it.
If you do a quick web search, you will find that there are some coders experiencing similar problems. Some are asking for solutions. Some have done serious troubleshooting and believe they have a solution.
VS CPU issues: A two-headed monster
Since nothing is simple in life or coding, there are two different Visual Studio CPU usage issues: the one mentioned above regarding the actual running of Visual Studio, and two, the issue of debugging your app so it does not cause high CPU usage for the end users. Solutions to both these problems can be elusive because it is hard to pin down what exactly is going wrong.
High CPU usage in apps
Debugging high CPU usage in apps appears to be the more common problem and Microsoft offers a tool to help solve it, so let's start there.
Taylor goes on to provide detailed tips for using the CPU usage tool to make sure your app isn't bogging down end users, who might find that annoying and stop using your app.
Further details are offered in Microsoft's Visual Studio 2015 documentation that has a refer to the documentation for the soon-to-be-released Visual Studio 2017 where there is a guide for collecting CPU usage data for apps destined to run on everything from traditional desktops to smart phones. This will be helpful for everyone writing apps for the growing mobile device market.
Also helpful for debugging issues that may bog down an app is How To Do Production Debugging on the Fly by Kamran Bilgrami, a software developer specializing in .NET, CLR internals, security, patterns and debugging. He is a contributor to Visual Studio Magazine. Bilgrami walks the reader through the steps to debug a mission critical app that is bogging down for no apparent reason. He outlines how he used tools from Microsoft and other sources to eventually pinpoint an SQL operation that had been failing for quite some time. It turned out that alerts were misconfigured, so no one was being informed of the problem.
When Visual Studio is too hot to handle
As regards the other CPU usage issue where some coders using Visual Studio say the demands of the IDE are heating up their PC, Bilgrami says he has not encountered that problem with his recently installed VS 2017 RC (Version 15.0.26206.0).
Web searches do find occasional reports of coders complaining of high CPU usage when they are working with Visual Studio. However, these reports are not widespread. Several tech journalists, who cover the Visual Studio space, say they have heard of the problem but are not aware of actual cases of it.
Blog posts such as this one indicate that the Visual Studio CPU usage issue may result from opening excluded files. In that case, a simple solution was found.
Another possible culprit may be GitHub, the web-based version control repository. On a Microsoft Developer Network forum page titled VS 2015 high CPU usage a coder reported: "I have VS 2015 running at very high CPU usage all the time. What do I do with this problem?"
The suggested solution: "You can try to disable git in Source Control if you don’t use it all the time. Sometimes enabled git plug-in can increase your CPU usage."
Instructions for disabling the package that is responsible for loading the Git source control support in Visual Studio is available here. But there is a caveat that goes along with the instructions: "Use at your own risk!"
Perhaps the more prudent route is to ask the Microsoft Visual Studio Team for help. However, they will need more information than just: "Help my CPU usage is spiking while my project is open." Instructions for gathering the data needed to troubleshoot the problem can be found on this Visual Studio Developer Community page.
If you have a similar problem/solution or even one we haven’t heard of, please let us know.
Posted by Lafe Low on 03/06/2017 at 12:26 PM0 comments
We all like to be faster and more efficient. We also like doing things the easier way, or slightly easier way. It’s human nature. So I have always been a huge fan of things like keyboard shortcuts. When you’re deep in the groove, the last thing you want to do is lift your hands from the keyboard to go mousing about looking for a toolbar command. Thankfully, at least when it comes to working with SQL Server, shortcuts abound.
There are the keyboard shortcuts everyone would use, regardless of the level at which you’re working in SQL Server, including:
- Ctrl-N to start a new file
- Ctrl-Shift-N to start a new project
- Ctrl-O to open an existing file
- Ctrl-Shift-O to open an existing project
- Ctrl-Alt-X to display the toolbox
- Ctrl-F2 to insert a toggle
- Ctrl-G to go to a line number
- Shift-F6 to switch panes
Here are four other great resources for more great SQL Server shortcuts:
SQL Server Management Studio Keyboard Shortcuts
This first list comes right from the source at Microsoft and is valid for SQL Server 2016 or later. Apparently first you’ll have to select your keyboard scheme though, as it can operate with the SQL Server 2016 scheme, with keyboard shortcuts based on Microsoft Visual Studio 2010. It can also use a keyboard scheme similar to the standard scheme from SQL Server 2008 R2.
11 Keyboard Shortcuts Every SQL Server Geek Should Know
This one narrows it down to 11. It might be a little dated, as it was posted in 2014, but I’m sure there are a great many older versions of SQL Server still charging hard out there. This one starts with the classic Ctrl-N and Ctrl-Tab to toggle between tabs, but also has some interesting ones like Ctrl-Space-Tab to list member and complete work in Intellisense, and comment and uncomment on lines of code with Ctrl-K, then Ctrl-C or U.
SQL Server Shortcut Keys Enlisted
It’s great to have a top 10 or top 11 list, but when it comes to something like keyboard shortcuts, I want as many as possible. With that in mind, this list is one of my favorites. It seemingly has everything, from some of the classic shortcuts mentioned above to all sorts of esoteric but important functions like database tuning, parsing queries, and connecting databases.
SQL Server Management Studio Keyboard Shortcuts
This two-part list from MSSQL Tips also has nice descriptions of what the shortcuts actually accomplish. The first section shows you how to quickly change databases with a Ctrl-U or Change Code Case with a Ctrl-Shift-U or ,Ctrl-Shift-L. Section two follows those up with shortcuts like refresh local cache with Ctrl-Shift-R and execute scripts with Ctrl-F5. You can find the first part here and the second part here.
There are plenty of other SQL Server shortcuts and tips and tricks on-line elsewhere. Stay tuned for part two coming soon!
Posted by Lafe Low on 02/23/2017 at 2:28 PM0 comments
Howdy readers, Lafe here. About once a month, my partner in crime, Rich Seeley, will be doing technical takeovers of this blog. Here's his first contribution, focusing on debugging in Visual Studio 2017.
Debugging isn’t the favorite part of the job for most developers, but the newest version of Visual Studio is at least trying to make it faster.
The release candidate that Microsoft tells us to get used to calling it Visual Studio 2017, makes debugging “faster now and doesn't cause delays while you are editing,” according to an article on the Microsoft website.
In an earlier version of Visual Studio, Microsoft added a hosting process for WPF, Windows Forms, and Managed Console projects to make debugging faster by spinning up a process in the background to use in the next debug session.
Then the law of unintended consequences reared its ugly head.
Or as Microsoft explained: "This well-intentioned feature was causing Visual Studio to temporarily become unresponsive for a few seconds when you stopped debugging or used Visual Studio after the debug session ended."
But Microsoft's never-say-die spirit kicked in and a fix has been made to Visual Studio 2017. The hosting process has been turned off and debugging has been optimized, so it is just as fast as it was with the hosting process but now it hopefully won’t glitch out on you.
Additionally, Microsoft says debugging is even faster for projects that never used the hosting process including ASP.NET, Universal Windows, and C++.
Plus, there is a new “Run to Click” feature.
"Now, while you are debugging, you can click the icon next to a line of code to run that line,” the Microsoft article on Visual Studio 2017 says. "You no longer have to set temporary breakpoints to perform several steps to execute your code and stop on the line you want."
Extended Debugging Support
There's more debugging news in 2017 as Microsoft shows off a new software development kit that coincides with the most recent Window 10 Insider Preview, as we learn in Windows 10 Devs Can Check Out Windows 10 Creators Update SDK in Visual Studio Magazine.
The Windows 10 Creators Update SDK Preview is a test-only version that contains a slew of updates and additions to the Windows namespace as well as some extended debugging support,” writes Michael Domingo, Visual Studio Magazine Editor in Chief.
So far Windows 10 Insider Preview version of the Windows 10 OS is only available to members of the Windows Insider program, he explains. To run it, developers need to have Visual Studio 2017 RC installed.
The Visual Studio Magazine article explains that the preview SDK offers these debug enhancements:
- Kernel-mode iHandle extension moved to debugger data model
- Debugger data model now contains PEB and TEB basic information
- Added a .dtx command for displaying extended symbolic type information when using the debugger object model
"In enhancing TACO for the new Visual Studio 2017 RC, Microsoft focused on two major problems it identified in discussions with Cordova developers: fast and reliable builds and faster edit-debug cycles," writes David Ramel in the ADT article.
For faster edit-debug cycles, he explained TACO gets a new simulator called Cordova Simulate.
The article quotes a Microsoft blog post touting the new features: "For those that have been using TACO for a while, Cordova Simulate replaces the Ripple emulator that we have been using for in-browser simulation of mobile apps. It provides for a local, fast, browser-based workflow that fits with modern Web developer practices that lets you do almost all your mobile development without touching an emulator or device."
Among other improvements, the team working on TACO made some bug fixes in the open source code itself, according to the ADT article. Good to know they practice what they preach as it were.
And for developers using TACO, especially those working on mobile apps where the pressure for faster and faster turnaround is growing, anything that speeds up debugging has got to be good news.
Posted by Lafe Low on 02/08/2017 at 2:28 PM0 comments
Visual Studio Live! Co-Chair Brian Randell caught up with Microsoft’s DevOps guy Donovan Brown to hear what he’s been doing and thinking lately.
You hear the phrase DevOps used a lot these days, but you may wonder what it really means, how important it is and what you should do about it for your development efforts. Donovan Brown can help. Brown is a Principal Program Manager at Microsoft. In that position, he is responsible for the DevOps vision for Team Foundation Server and Visual Studio. If you’ve heard him speak, you know he is clearly passionate about DevOps. And if you haven’t heard him speak, you’ll have another chance soon. He’ll be speaking again at Visual Studio Live! in Las Vegas this March 13-17.
Let’s go way back. How did you get started working with computers?
The first time I ever saw a computer was in the eighth grade. We had a class that taught us Q Basic. That was long before we had our own computer at home, so the only time I could use it was at school. I didn’t really use another computer until tenth grade. We had an elective called Computer Math, which again was all about Q Basic and I loved it.
Fast forward a few years and I forgot about computers. By then I had one at home. I saw this board game that I really wanted, but it was $60 and I was a starving college student. So I tried to build it with clay, which was a miserable failure. Then I tried to build it with wood, which was also a miserable failure. Then I remembered Q Basic and said, “I bet I can write this game inside this computer.” Once I started, it was the only thing I could think about. How do I get this to work? I had to figure out the algorithms. All I cared about was figuring out how to work with this computer and make it play this game with me. When it was done, it was this hideous vector based game, but it worked. I could actually play this game. So after doing that in Q Basic, I went and bought “Teach Yourself C in 20 days” and here I sit.
Can you define what DevOps means to you?
I was asked to define DevOps for Microsoft. When you have 200,000 people working in a company and you are the guy asked to define it, you take that very seriously. I’ve been writing software professionally for about 20 years, so I reflected on my career before just blurting out a definition for DevOps.
My first question was, “Why is DevOps the hottest topic on the planet right now?” Every conference has something about it. I did a search on Amazon today, and found 405 books on DevOps. This is not a flash in the pan. People are taking it seriously. But why now? How were we not talking about DevOps ten years ago? I was always taught that you’re supposed to fix what hurts most first. If I look back at my career ten or twenty years ago, deployment was so far out in the future that didn’t hurt. We were struggling just writing software. We were in waterfall, we always missed our dates. It was a nightmare. We had to fix developing software first. We had to get out of waterfall and start doing something different. What we came up with was agile and scrum, and what this allowed teams to do was produce value. But producing value and delivering value, those are not the same thing. And now all of a sudden, the fact that we’re able to produce value so quickly, it emphasizes the fact that we have a problem here. We can’t get this value to the hands of our users as fast as we can produce it.
It shines a light on what DevOps is here to solve, which is taking that value and continuously delivering it to the users. We’re talking about automation, change in the process, people’s mindset shifting. So once I figured out why it’s such a hot topic and what we’re trying to solve, I was able to define DevOps for Microsoft. I define DevOps as the union of people, processes, and product to enable continuous delivery of value to the users. It took me 30 days to write that sentence, because I can defend every word. People say why don’t you call it tools instead of products? A tool in my opinion has a specific purpose. However, if you put a product on top of that to orchestrate it, now you can do some magical things.
It’s like the analogy of a house. The house was not built by your hammer and your saw. It was built by a carpenter who used those tools to build your house. I feel the same way about my DevOps pipeline. It’s not the individual tools. It’s the product that sits on top of it that orchestrates all that and really is what enables DevOps for me. So it’s the products, not the tools that you need to focus on.
The process is the easiest part of that definition. We know how to go in and diagnose what’s wrong with a process and fix that. The hardest part is the people. They’ve been doing it the same way for 30 years. And now we’re telling them they need to change the way they’re doing things? Why fix something that’s not broken? You don’t realize it but your competition is already doing this, and by the time you realize it, it’s going to be too late. So the passion is there for me because I’ve been in the industry so long, I’ve seen all this stuff evolve and right now it’s all coming together where now we can continuously deliver value to our users. And it’s not just about delivering software. It’s about delivering value. I wanted it to be a definition that would be a spring board into a deeper conversation. That’s why it took me 30 days to write that definition. I labored over every word.
So building on your definition, why do you think DevOps has become so important to organizations?
If you don’t implement it, you lose. That’s the simplest way I can say it. Your competition is already doing it. I think mobile is the best example of this. In any mobile store, there are at least half a dozen apps that do the same thing as the app you’re currently working on. So if your app is not delivering value as fast as the others, it’s just a simple uninstall and reinstall and I’m back using someone else’s product. The world has changed drastically to where there’s instant gratification. I want it now, I expect it now, and if you’re not giving it to me, there’s a line of other vendors waiting to give me what I’m asking for.
It has become so critical because if you don’t do this, I will now uninstall you. I will give you a one star rating and I go to someone else. Negative feedback can spread over the internet in an instant if you do something wrong, so you have to be able to deliver value continuously. And DevOps is what enables that. Gone are the days where you could fail in silence. You fail in public now.
You’ve got your definition. You’ve also got this phrase “rub some DevOps on it.” How did you come up with that?
I think the first time I said that, I was making a joke. Because it’s almost like this dysfunction was sort of like a rash. It was something we needed to cure. About a year and a half ago, there’s was this ointment bottle and I put DevOps on the side of it so you could just squeeze a little DevOps on it and it would go away. The first time I did that publicly was at Build in 2016, and some guy in the crowd just lost it. And it just became a thing. It was just a joke, and it worked.
Can you give us a little preview of what you’re going to talk about at Visual Studio Live! Las Vegas? Why do they need to be there?
By then we’re going to have some more fun stuff to demo. I am also going to try to do the demos a lot quicker than I normally do. A lot of people have seen me speak already. You know what I’m going to say, you know my definition, so I’m not going to waste any time on stuff that they’ve seen already. I’m just going to try and pack it with some really cool stuff. I’m starting to fall in love with the command line, which is weird coming from a Windows guy. So I’ve been on this heavy Powershell kick lately. I’ve been working on Powershell module to VSTS and TFS, so I might preview that for you guys. I started working on a Powershell Provider, which helps you navigate your VSTS. That’s the kind of stuff I hope to bring in a demo pack.
I know you are very competitive, and you are quite an air hockey player. So what’s your current standing in air hockey?
I have not been to a world championship since I joined Microsoft. I was as high as 11 in the world. I brought a table to Redmond with me. To this day, my table is sitting in Redmond in the commons so I can go over there and practice. I haven’t made it to a world championship recently, but I am itching to get back. I can’t seem to find the time to go back to air hockey when I am having so much fun spreading the gospel of DevOps.
Click here for more info on Donovan's keynote at VSLive! Las Vegas!
Posted by Brian Randell on 02/02/2017 at 2:28 PM0 comments
There's certainly no shortage of resources on-line when it comes to ASP.NET. In fact, diving into all the ASP.NET blogs out there can be a bit overwhelming at first. There are so many individual bloggers and posts. Many are "official" Microsoft blogs or blogs run by Microsoft insiders, but that certainly doesn't mean they lack substance or value. Even the official Microsoft blogs mentioned here are more substance than sizzle, more source code than sales pitch.
Official ASP.NET Community
Here's where Microsoft hosts its official team ASP.NET blog, as well as some by ASP.NET insiders and independent bloggers. The list includes Scott Guthrie
(who has spoken at Visual Studio Live! events), Ricardo Peres
, Bertrand LeRoy
, and Nikolaos Kantzelis
. It also links you to ASP.NET Monsters
, Andrew Lock's .NET Escapades
, and Armen Shimoon's .NET Liberty
Recent posts include a Channel 9 presentation that dives deep into Azure Analysis Services programmability and automation. In this clip, Christian Wade and Scott Hanselman talk about some of the programmability APIs and automation opportunities in Azure Analysis Services. The intent is to help enable integration with DevOps processes and enhanced application lifecycle management.
Other posts on the site cover topics like Integration Testing with Entity Framework Core and SQL Server and Generic Repository Pattern In ASP.NET Core. Then of course there’s also content like Three FREE Training Courses on ASP.NET Core from Microsoft Virtual Academy, which comes from Scott Hanselman's blog.
.NET Web Development and Tools Blog
This too is an official Microsoft blog, but it still has some great detailed content on the ins and outs of ASP.NET. While there are product-related announcements like Announcing Microsoft ASP.NET WebHooks V1 RTM and New Updates to Web Tools in Visual Studio 2017 RC, there are also posts digging deep into specific topics like Client-side debugging of ASP.NET projects in Google Chrome and Bearer Token Authentication in ASP.NET Core.
Ode to Code
Scott Allen's Ode to Code is an excellent resource. Scott’s easy open style can help guide you through some of the more complex topics related to ASP.NET. Some of his recent posts have covered AddFeatureFolders and UseNodeModules on Nuget For ASP.NET Core, Updated Videos for ASP.NET Core and Database Migrations and Seeding in ASP.NET Core.
Fear and Loathing
I particularly like the tone of this blog, which describes itself as "Gonzo blogging from the Annie Leibovitz of the software development world." Perfect. Bil Simser, the blogger behind the "Annie" and "Hunter," dives deep into topics like automatically publishing NuGet packages from GitHub. While it appears he hasn’t posted too much recently, there’s still good content on there. Here's a sample of his tone: "There must be a better way. We have the technology. We have the capability to make this process easy."
I'll keep searching for more ASP.NET blogs, but if you have one you really like, shoot me an email at firstname.lastname@example.org and I'll add it to the list.
Posted by Lafe Low on 01/25/2017 at 2:28 PM0 comments