Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
Even though I work for the Azure and ASP.NET team, I still pay for my own Azure account. Frankly, if I did get free cloud time not only would I likely abuse it, but I also wouldn't be using the cloud in the way it's meant to be used! From my perspective, a good cloud is a cheap cloud. I use CDNs, caching, and focus on a balance of cheap resources and compute that work for me when I need them, and are asleep (and not costing me money) when I don't.
There's things like auto-scale for websites, for example, based on either CPU or a schedule, but the one thing that gets me into trouble (sometimes) is leaving big virtual machines on. I manage most of my Azure assets from the command line, so I can just "azure vm list" to see what's running and I'll see this:
C:\Users\scottha λ azure vm list info: Executing command vm list + Getting virtual machines data: Name Status Location DNS Name data: -------------------- ------------------ -------- ------------------------------- data: VSinTheSky StoppedDeallocated West US vsinthesky.cloudapp.net data: hanselmandiscourse StoppedDeallocated West US discourse.cloudapp.net data: hanselmansendy ReadyRole West US sendy.cloudapp.net data: hanselmanlinuxfarm StoppedDeallocated West US linuxfarm.cloudapp.net data: hanselmanlinuxfarm-2 StoppedDeallocated West US linuxfarm.cloudapp.net data: hanselmanlinuxfarm-3 StoppedDeallocated West US linuxfarm.cloudapp.net data: hanselmanmysql ReadyRole West US mysql.cloudapp.net info: vm list command OK
But sometimes I have custom apps to manage Azure resources, perhaps WinForms or WPF apps, MSBuild Tasks, or I want to add cloud management to an existing process. I'll want to not just turn off VMs, but also manage WebSites, create resources, upload things to storage and more.
I just learned from Brady Gaster that there's now Windows Azure Management Libraries for .NET as part of the Azure SDK. Basically this means that you can call the same backend REST APIs that the Azure Portal calls now, except now with a simple wrapper around them that makes it rather a bit easier in .NET.
Azure authentication and authorization is based on X509 Certificates, so you'll use those to initially talk to your Azure instance. You can download your certificates from an authenticated session here and your certificates and subscription id are inside.
I can list out, for example, all my running websites in all their locations (web spaces):
using (var client = new WebSiteManagementClient(creds)) { var spaces = client.WebSpaces.List(); foreach (var space in spaces) { Console.WriteLine("Space: {0}", space.Name);
var sites = client.WebSpaces.ListWebSites(space.Name, new WebSiteListParameters{ PropertiesToInclude = { "Name" }}); foreach (var site in sites) { Console.WriteLine(" " + site.Name); } } }
I can go and update sites, disable (stop) them, make web farms, scale them, create, configure and generally do everything I can from the command line. Very slick. Now I can manage Azure stuff from PowerShell, from .NET, from node and the cross platform command line, Visual Studio, and the Azure Portal.
Also, I encourage you to check out Azure Friday, a new show I'm doing at http://friday.azure.com. Azure Friday also on iTunes as a downloadable podcast in HD!
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
I decided to sit down today and create three more short tutorials that all address Windows 8.1. If you find them useful, please share them with your friends, family, and the people on Twitter and Facebook you call your friends. ;)
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
One of the most wonderful and least appreciated things about computers is diversity of devices. You're probably interacting with your computer with a keyboard and mouse. But in the last few years, you may have added touch and, to a limited extent, voice.
The photo above is of my desk. Yes, it's messy. On it are the things I use to work with my computer. I use these nearly every day and at least every week or they wouldn't last on my desk.
I think we all should consider our workflows and consider what devices that aren't a keyboard and mouse that might be better suited for the tasks we perform every day.
I initially gave this product a 10 for concept and a 0 for execution. I'll give it a 3 now...but it's getting better. It's still not well suited for gross motions, but for browsing and scrolling it's at least becoming useful. I keep it on all the time and since I haven't got a touchscreen on my desktop machine (yet) I use it for scrolling while reading and leaning back. It has huge potential and I'm impressed with how often the software updates itself.
I'm using the Touchless for Windows app. The concept is so promising...wave your hands and your computer reacts. I still don't suggest that the Leap Motion is a consumer quality device, but I do use it weekly and turn to its promise often.
Tablets are the gold standard for interacting with Adobe products like Illustrator and Photoshop. I learned Photoshop on a Tablet many years agoand I still prefer using one today. The Wacom Bamboo also has touch support which is a bonus, although I use my Logitech N650 Touchpad as a trackpad as it's more sensitive (to touch).
If you're trying to draw or paint without a stylus like a Wacom, you're truly missing out. They are surprisingly affordable, too.
My buddy at Channel 9 Larry Larsen turned me on to the ShuttlePRO for video editing. I don't know what I did without it. It's got program-sensitive programmable keys. That means their function changes depending on what's running. I can mark a key as "Split" or "Play" but the ShuttlePro software will automatically use the right hotkey depending on if I'm using Audition or Premiere. Some nice gent even made settings for Camtasia Studio and the ShuttlePro v2. If you do screencasts or video editing like I do, a shuttle is a must.
You can get a Logitech T650 Touchpad for less then $35 if you look around. It's a large, gorgeous class touch area that's also wireless. If you have Logitech products already you can use the Unifying Receiver you may already have. I have as USB hub and it works just fine.
I use it to two-finger scroll, pinch to zoom, and all the things that MacBook touchpad folks take for granted. You can also use it with Windows 8 to "swipe in" and task switch. I move between my mouse and this touch pad to reduce repetition and wrist strain with the mouse, but also sometimes just because I'm in the mood. It's a great Trackpad/Touchpad that can ease the transition if you have trouble moving from a laptop and a desktop.
I adore the Logitech BCC950 Conference Cam so much that I've written software to remotely control its motorized Pan-Tilt-Zoom functionality and use it as an Auto Answer Kiosk. Not only is it a great web cam that I use every day, but it's also a fantastic speaker phone for conferences. It shows up as just another audio device that you can set as the default for communication but not your default speaker. This means Lync and Skype calls come from this device, but your regular computer audio doesn't. Sound quality is killer, confirmed by everyone I've talked to with it.
Aside: There's so much untapped usefulness in just a webcam but most programs just don't use it. Have you seen the Windows 8 "Food and Drink" app? You likely already have this app. It has a Hands-Free mode for cooking. You know when you're using a tablet to show a recipe? It uses just the data from your webcam to see your hand wave to move to the next page. Very cool.
The Kinect SDK was updated last year with support for "Near Mode" which is basically "sitting at your desk mode." This update made programming to the Kinect for Windows a LOT more useful for the desktop. Writing apps is fairly easy, like this example where you can control PowerPoint with your hands. With apps like KinEmote you can use the Kinect to control your XBMC media installation and lots more.
There's such a huge diversity of ways to interact with computers and it's truly just starting. In my lifetime I'm sure computers will be able to detect (guess) if I'm sad or happy, notice my health status, great me when I walk up, and so much more.
What devices do YOU have plugged into your computer right now?
Disclaimer: My Amazon links are affiliate links and that the resulting few bucks buys me gadgets and tacos. Mostly tacos.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
NTVS runs inside VS2012 or VS2013. Some node.js enthusiasts had forked PTVS and begun some spikes of node tools for VS. At the same time the PTVS team was also working on node.js integration, so they all joined forces and made NTVS a community project. NTVS was developed by the same team that brought you PTVS with help from friends like Bart Read from Red Gate (he did the npm GUI), and Dmitry Tretyakov from Clickberry for several debugger fixes & features.
NTVS is open source from the start, and has taken contributions from the very start. It supports Editing, Intellisense, Profiling, npm, Debugging both locally and remotely (while running the server on Windows/MacOS/Linux), as well publishing to Azure Web Sites and Cloud Service.
It's actually pretty freaking amazing how they did it, so I encourage you to download it and give it a try because some of the stuff (even given this is an alpha) is very very clever.
Node.js Tools for Visual Studio takes advantage of V8 Profiling API's as well Visual Studio's Reporting features to give you a sense of where your program is spending its time.
NOTE: See that File | New Project dialog up there? Visual Studio organizes things by language, so node.js is under JavaScript. But you've also got Python and Django, iOS and Android via C#, TypeScript, VB, F#, all in Visual Studio.
One of the things that's impressed me about the way they integrated node.js into Visual Studio was that they didn't try to recreate or re-do things that already worked well. It's node, it runs node.exe, it uses the V8 debugger, it uses the V8 profiler because that's what people use. Duh. But, for example, NTVS can take the output from the V8 profiler and display it using the Visual Studio Profiler Reporting Tools. No need to reinvent the wheel, just use the right tool for the job.
Hacking on the Ghost blogging engine with node.js for Visual Studio
From within Visual Studio, go File New Project, click JavaScript, then "From Existing Node.js code."
Point NTVS to your Ghost folder.
Then tell node.js for VS that the startup file is index.js, hit Next, save the project file and Finish.
At this point, you've got Ghost inside VS.
Random: that since I have Web Essentials I also get a nice split-screen markdown editor as well.
From here, just hit F5 to Debug, or Ctrl-F5 to start without Debugging. Also notice the properties of the Project in the lower right corner there showing the node path and port as well as the Startup File. You can change these, of course.
Here's me running Ghost locally. You can see the path to node, the ghost.js file and my browser.
You'll get good intellisense for completions and help for method signatures.
Debugging
Node.js Tools for Visual Studio includes complete support for debugging node apps. This includes support for Stepping, Breakpoints, "Break on exception", as well as Locals, Watch, Immediate and Call Stack tool windows.
You can manage Exceptions just like any other language service. See in the dialog below node.js exceptions are listed along with other exceptions in managed and unmanaged code.
The debugging still happens like it always has, with the node V8 debugger, except Visual Studio connects to the debugger over another socket (remember, you can even debug node.js remotely running on a Linux or Mac like this!) and translates how V8 thinks into how Visual Studio thinks about debugging. The experience is seamless.
See in this screenshot, you can see node.exe is being debugged, I'm running Ghost. You can see my Call Stack, and the Locals in the Watch Window. I can inspect variables, step around and do everything you'd want to do when debugging a Web App.
npmVisual Studio
The npm experience is pretty cool as well. Node.js for Visual Studio is always watching the file system so are more than welcome to run npm from the command line or from within the node immediate window and Visual Studio will see the changes.
You can also use the npm Package Management dialog and search the repository and install packages graphically. It's up to you.
Here's a package installing...
The physical node_modules and how modules are handled is pure node...VS doesn't touch it or care. However, the Solution Explorer in Visual Studio also presents a logical view on top of the physical view.
NOTE: I really like this. I think it has potential and I'd even like to see references in .NET treated like this. The physical and the logical, along with a dependency tree showing NuGet packages. It helped me understand the project much better.
There's lots more. There's an REPL interactive window, and you can just publish like any other web project using the same Publish Wizard that ASP.NET projects use. You can publish node.js apps directly to Azure as well, either with Git or with Visual Studio publishing.
As mentioned, you can do remote debugging between Visual Studio and node running on any server OS.
Conclusion
I'm personally pretty happy with the way that Visual Studio is turning (in a short amount of time, seems to me) into quite the competent language and environment factory.
Node.js Tools for Visual Studio is entirely open source under the Apache license and they welcome contributions and bug reports. It's Alpha and it's early but it's awesome. Go get it. Big congrats to all involved!
Disclosure: FYI, Red Gate does advertise on this blog, but it was a total coincidence that a Red Gate employee helped with node.js Tools for VS. I just found that out today. They are very nice people.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.