New Fun Blog – Scott Bilas

Take what you want, and leave the rest (just like your salad bar).

Build Conference 2011: Wednesday

without comments

[This is my notes from Wednesday. See Tuesday's Notes.]

Important: some of these are out of date and superceded by later notes I took after talking with Microsofties. I’ve tried to mark them as such where I remember with a [*].

Visual Studio 11

No release date of course, same as Win8. Feels like “definitely not this year”. Did you all download the preview yet? It’s available for everybody. Win8 and the dev tools (VS11, Blend 5, etc.) are online.

Anyway, what’s new…

  • After 10 years they finally updated the image editor. Now it supports transparency and DDS’s.
  • VS has an FBX viewer w/ property editor. Right in the IDE you can open a 3D model, select meshes, set properties like color and transform.
  • They put a lot of work into a new thing called DGSL that is your typical shader graph.
    • Preview rendering at different stages of the pipeline, things like pins and wires connecting them to output a final render.
    • Good for the XNA crowd I guess? Seems like a distraction for the VS team.
  • Pix is integrated into VS.
    • You can debug a 3D app, take a frame grab, then in VS walk the drawprim calls backwards from a pixel. Get call stack per graphic event and all that.
    • Being integrated into VS means that this this will have a nice, consistent UI, yay.
  • There is this great DOM Explorer (JS/HTML only)
    • Reminds me a lot of the tools built into Firebug or Chrome’s dev mode, except it runs through VS.
    • Even on a server web app you can hover over a rendered web page and it will point you at the aspx line that generated it.
  • Productivity Power Tools are part of VS now. You probably already know this. Well, perhaps they’ll fix some of its many bugs if it’s an in-box addon.
  • Nice random improvements to the VS UI like categories for Intellisense (“commonly used by you” vs. “all”) and minor new features in snippets.
    • Maybe now R# will pick up this much-needed feature that VisualAssist has had for a while..
  • Await/async is deeply supported in the debugger.
    • Step through async code (like WinRT’s ShowDialogAsync) procedurally without needing to get confused by all the underlying thread context switches. I like.
  • Tons of new unit testing support. Now is the time when I remind myself to look into unit testing again..
  • The Kernel Debugger can now run from inside of VS. Sure to come in handy next time you’re developing a device driver (har).
  • Static code analysis is now a plug-in architecture.
    • He talked about, for example, the kernel mode driver validation static analysis tools that just show up as part of the compile.
    • Works on C++ or C# or whatever.
    • I expect we’ll see the same type of integration for FxCop/StyleCop
  • Javascript in VS now has a REPL command pane, just like the browsers have had.
  • Full support for ECMAScript 5. I’m only familiar with 4, which added (I think) static typing. Well, fake static typing. Anyway, now we have 5! That’s 1.0 better than 4!
  • No word of improving E&C like supporting altering a function containing a lambda..I’m going to ask them about this. [* answer: no]
  • Ooh a nice new color picker for CSS. Probably for Xaml as well.
  • VS11 projects are going to be the same format as VS2010.
    • No upgrade required, forward/backward compatible. That will make testing the beta on our stuff easier.

WinRT (Windows Runtime – the Metro API)

  • “Language Projection” is what they’re calling the layer between the language and the kernel services. It maps a language onto the underlying API’s, reflection and type system (the metadata).
    • They are dropping the least-common-denomenator “CLI” system and instead are mapping things as close as possible to the language you’re using.
    • Example: on an array returned by the core, C# uses “.Add()” to add an item, whereas Javascript uses “.append()”. I like this. Least common denominator probably wasn’t working out for them anyway because nobody really cared about making things VB-compatible when writing libraries in C#.
    • WinRT types are automatically adapted to the language. For example getting an array back from WinRT will come back to C# as an IList<T>, done through adaptors but not by making a new list (no copying). In C++ they have adaptors to get it into STL iterator form, etc.
  • Async is embedded very deeply.
    • Martyn said that in .NET when they provided a sync and an async version of the same function, people would just use the sync version and then get crap behavior and experience.
    • New stuff heavily encourages use of async, though not sure if that means the sync functions are unavailable [* they are].
  • New Windows Metadata format that is used sort of like the Reference Assemblies, sounds like, except this metadata IS the OS. Not libraries on top, but the actual Windows API’s.
    • Format is based on .NET type system but extended to meet the new needs.
    • Metadata catalog is extensible (again, Metro apps only, for custom WinRT objects) but only privately. No publishing of shared assemblies. Not that they are using the word “assembly” any more…
    • Sharing across apps is done exclusively through “contracts”, which are part of the OS. If you want to communicate across apps it must be done through a preexisting contract, looks like.
  • YAY! A new string type!!! This one is called HSTRING and is probably the 15th string type I’ll have used.
    • It gets mapped onto whatever the local language thinks of as a string but sounds just like a .NET string – immutable, and so does not copied.
  • WinRT is heavily interface driven, as is now common in the rest of the programming world
    • IUnknown is now IInspectable. They said IUnknown confused people or something. Anyway, IInspectable -> ISpecificInterface -> ConcreteClass (runtime, private).
    • C++ binds statically as usual.
    • C#/VB binding is mostly static but also uses some runtime metadata (very cheap though)
    • JS/HTML binding is dynamic dispatch at runtime, works completely through metadata as you expect a dynamic language to operate
  • Some MC++ changes, like “gcnew” is now “ref new”. [* turns out this is not true. See later notes.]

Other

  • Lots and lots of stuff about Azure, which is pretty neat but I’ve heard is very expensive for large-scale use.
  • Pithy statement I just made up: “swipe is the new right click”.
  • TFS marches forward.
    • The new stuff looks really cool, and I’d consider using their hosted TFS if I had a small studio. They even support scrum directly.

Expo Floor Queries

WPF

  • What’s New in WPF Version 4.5 Developer Preview: http://msdn.microsoft.com/library/bb613588(v=VS.110).aspx
  • WinRT is definitely Metro only.
    • We cannot embed Metro in WPF, and vice versa (well we can, but they said it would be awful, dirty, and please run away).
    • Metro really is a completely independent sandbox that has little to do with Windows.
    • [* Some of the above is a lie, as I found out on Friday. WinRT is definitely useable outside of Metro. See later notes I’ll post.]
  • Very little work has been done in WPF. It still exists! Visual Studio and the Expression suite are all WPF apps and will remain that way. But for 4.5 they focused exclusively on perf and stability. I suppose that’s ok.
  • I lost track of how many times I’d ask someone about desktop apps (WPF) and would get asked why we didn’t just “rewrite it all” for Metro. Ah, Microsoft, never change!

Blend/VS

  • The reason Silverlight has data-binding breakpoints is because the Silverlight team put the hooks in there independently and VS was able to use them.
    • Until someone does that for non-SL Xaml (whether Metro or WPF) we will not have this functionality in VS.
  • The reason JS/HTML has such freaking awesome debugging support (like interactive mode) is completely provided by the hooks already developed independently in IE over many years.
    • Again, work that Blend/VS did not have to do.
    • So they’re waiting for debug hooks in Xaml frameworks, which may never appear. Complicated problem to solve and limited resources/initiative to do it.
  • We should use DynamicResource and not StaticResource as a general rule.
  • They know that debugging resources sucks.
    • They want to work on the problem. They aren’t working on the problem. They have no plans to do so.
    • They recommended using DynamicResource (again) and binary-search style commenting out stuff to narrow down problems. Yeah, so, nothing new here.

September 17th, 2011 at 3:02 pm

Posted in conference,windows8

Build Conference 2011: Tuesday

with 2 comments

I’ve been at Microsoft’s Build 2011 conference. Over the years I’ve gone to a handful of Microsoft conferences – Gamefest, Meltdown, Gamestock, Windows World (if you go waaay back). Mostly gaming related. Build is the merger of PDC and WinHEC, neither of which I had attended in the past. Unlike the gaming conferences I’ve been to, Build has serious money behind it. It’s been incredibly well-managed.

I sent out notes about the conference to my team and figured I’d post them here as well in case it would be useful to anyone. Stripping out any Bungie-specific commentary that wouldn’t be generally applicable of course.

Important: some of these are out of date and superceded by later notes I took after talking with Microsofties. I’ve tried to mark them as such where I remember with a [*].

Notes From Tuesday

I’m writing these up while it’s still fresh in my head..

Two big takeaways for me:

  1. Windows 8 will actually be really awesome. Seriously.
  2. It won’t matter to production tools developers. Business as usual.

As a consumer, I am really looking forward to Windows 8. They did what needed to be done in order to live in the modern world: new API, breaking of backwards compatibility, heavy integration of touch and gestures, complete guidance provided for new design, large library and protocols for connecting apps together, support for web development on the desktop to bring in all those crazy kids, plus some really forward looking design…

But only for Metro – “the new stuff”. Windows 8 will run all the apps that 7 did, but there are now two classes: desktop apps and Metro apps. Desktop apps are 3DS Max, Photoshop, Word, Notepad, etc. Metro apps are 100% new. It is a brand new platform in just about every way. Really don’t even need to call it Windows.

Metro has clearly been the focus of Build and therefore Microsoft. So far today, the only thing I heard about ordinary desktop apps is that “they will still work great”. They all run within a context in Metro called “Desktop”, which is already seeming very antiquated, almost like Windows XP Mode was with Vista. Everything MS is talking about here is geared towards Metro. And it’s seriously cool. I look forward to switching all my home machines over to it, especially my girl’s Dell Duo. Win8 is fast, lean, and cool as hell.

So I don’t have much to report on the future of our platform: Win32/64 + WPF/.NET. I’ll be finding out what I can over the next three days.

I did take some notes, though. Here they are in no particular order:

Non-Metro:

  • No mention of WPF all day. Not even whispered. Is WPF rolled into Silverlight? Is WPF on life support? What about frogs? No word yet.
  • New C++ standards compliant compiler is shipping with Visual Studio vNext. I saw the “auto” keyword being used for duck typing.
  • They kept making a big deal about performance as a top priority, over and over again. This is a pillar of Win8.
    • Perf is even more important than in Windows 7 due to touch support, because people are unwilling to put up with any latency whatsoever when using a touch interface. So look for a lot of async support integrated at all levels.
  • Cider is gone. Blend’s designer is now integrated into Visual Studio. Big yay. Always annoyed me that something would work in one place and not the other, or vice versa. (Now we can have things not work in both places, but at least it will be consistent.)
  • There’s a new debug view that lets you view parallel stacks of async/TPL tasks as well as the program flow through the tasks. I’m going to ask them if this can be applied to our own scheduling system (or if we should switch to Task in order to take advantage).
  • Looks like they upgraded the remote debugging, way easier to set up. Even have remote Javascript breakpoints. Definitely won’t need Firebug in this world.
    • There is even a DOM inspector for JS that works over remote debugging. Not only are the UI elements hot as you hover/touch them (like in Snoop or Chrome dev) but you can modify properties on the fly while debugging. Remotely! OMG!
  • Blend has a crazyass new interactive mode where you can run the app inside of Blend, fully interactive, then pause it on the screen you want to modify and switch to design mode to update the Xaml. Sort of like play-in-editor. (Think Expanders or other state-dependent stuff..a bit of a pain to do right now.)

Metro:

  • XAML is coming to C++ which compiles down to native x86/ARM. Appears to be Managed C++ due to use of ^ ref modifier [* nope]. Makes sense. Don’t know how they’d make any of this work with pure C++.
  • Thankfully they’re not just copying Apple but fixing a lot of stupid UI problems on the iphonepodpad. My favorite is how they said that the modal rearranging of the home screen is crap and how folders bury things too far. Couldn’t agree more.
    • They are also expanding the “touch language” beyond existing standards of swipe-to-scroll and pinch-to-zoom/rotate. Selection, context bars, app switching..
    • Totally eliminating the “mouse-ish” stuff like holding down a touch to bring up the context right-click. All of those old Windows 4 Pen-isms are gone. This is why touch sucked on Win7/Vista and is finally usable on 8.
    • BTW if you have any time at all, be sure to watch Jensen Harris’s “big picture” talk from today (should be posted online sometime on Wednesday). I thought it was superb.
  • Metro apps do not have access to Win32 api’s (such as MessageBox or anything in GDI)! – no overlapping windows etc
    • All graphics are done through DirectX only.
    • Metro apps are totally different. Don’t even have a message loop. [* not true]
  • I saw examples of the “await” and “async” keywords a lot in the demos. This is a key part of delivering high perf UI. Their expectation is that nothing is synchronous.
  • WinRT (windows runtime, the new API) appears to be a true new API and not just a forms/.net style wrapper.
    • This one appears designed well from the start! Takes advantage of modern design patterns and not held back by obsession with backwards compat.
    • They said several times that this is definitely not a “layer on top” (like how winforms wrapped up user32 etc.) but talks straight to the kernel. [* mostly true]
    • Fully object-oriented, has reflection, even in C++.
  • Async support features are implemented in all languages.
    • For example in Javascript, known as “promises”: mediaCapture.initializeAsync().then(function() {…}) type stuff.
  • The javascript integration is pretty damn cool. Has data binding even. Hope this brings web devs in to make things for Win8 (obviously MS does too).
  • Can write native C++ to reference-in from javascript. They gave a demo of HLSL compute shader-based image processing lib written in C++ and used in Metro javascript app. Neato.
  • Single file .appx package for distro. Yay finally. No more installers! Turns out this is just a zip file too, like Java did with jars. Yay, no more proprietary package formats!
  • They have a very cool Metro simulator that runs your app through a fake local RDP session that makes it easy to test different rez / dpi / orientation without needing a VM or separate computer with the correct display.

September 16th, 2011 at 8:41 am

Posted in conference,windows8

Enable SkyDrive for OneNote 2010

with 5 comments

Using OneNote 2010?

Trying to create a new notebook on SkyDrive through OneNote and can’t choose “Web” from File | New? Error is “This service is disabled by policy. Contact your system administrator to enable it.”?

Solution:

HKEY_CURRENT_USER\Software\Microsoft\Office\Common\WebIntegration\WebIntegrationEnabled=1

July 15th, 2011 at 8:22 am

Posted in quickie