Recent posts about LINQ and related topics by ThinqLinq

Roslyn resources

imageToday I’m giving a hand’s on hack session on using Roslyn to create code Diagnostics. As part of that, I put together a listing of some resources that might be helpful and thought I’d share them with everyone. Realize that these links are based on the versions for the Visual Studio 2015 RC and are subject to change when the product releases.

With that in mind, here are the links:

There are also some older hand’s on walkthroughs that might be helpful, but know that they are based on even earlier versions and you will need to figure out how to change them to get them to work. However, sometimes the best ways of learning is to fix something that is broken, so think of it as a growth exercise.

Posted on - Comment
Categories: VB - C# -

Microsoft Connect conference links and key takeaways

imageThis week, Microsoft ran an online conference which included a number of significant announcements. In case you missed it, the sessions are available for streaming on demand on Channel9. The major announcements were accompanied by a number of blog posts. In this post, I wanted to summarize the most important items that I noticed and include links to the detail pages where appropriate.

.Net Core open source – Perhaps the most significant announcement was the open sourcing of the .Net core. This does not mean that the entire framework is open sourced, but represents a leaner core part of .Net upon which other components can be added (including ASP.Net, WPF, Windows Forms, Entity Framework, etc). The intent here is to open the development process and encourage a more active and engaged open source community. To that end, the team accepted it’s first pull request within the first hour of the announcement. Perhaps the most ironic post regarding the open source announcement was @PVandenheede’s statement,

".NET open source? On Mac and Linux? Hah! Only when spacecraft start landing on freakin' comets!"

In addition, the new framework will shift from numbered versions to year names and it will be installed local to your solution rather than installing to the GAC that we’ve had a love-hate relationship with the original 1.0 release came out 12 years ago.

Visual Studio versions – Closely tied to the .Net version information, Microsoft also announced two new versions of Visual Studio. The Visual Studio Community Edition will contain the functionality of VS 2013 Pro (including supporting plugins) but will be free for open source, charity, students and companies with under 250 employees and 1 million annual revenue. This will potentially replace the express versions and reduce the need for the BizSpark and DreamSpark programs.

In addition, Microsoft officially named the next version as Visual Studio 2015 many of the new features that I will talk about below are also included in the release notes.

•ASP.Net vNext – Among the many features of VS 2015, perhaps the most significant is ASP.Net vNext including MVC 6 and EF 7. This version is a drastic re-thinking of the ASP stack including a JSON based project and configuration files, direct inclusion of Grunt, Bower, and a revised Nuget. The new .Net core is only 15 meg and can run natively not only on Windows, but also natively on OS X and Linux servers. At this point, I wouldn’t recommend writing production code in vNext, but it is worth keeping an eye on and kicking the tires a bit.

Entity Framework 7 – Perhaps even less stable that ASP.Net vNext, is the completely re-written EF7 which among other things removes the use of the EDMX  and reduces the API surface from previous versions. It is such a large change, that the team even posted recently the as to whether EF should be a v7 or v1 of a different product.

Typescript 1.3 – Typescript continues to mature and quietly updated to version 1.3 with the 2015 release. This version takes advantage of the Roslyn language services to support a number of new analytics and refactorings. If you want to configure ASP.Net vNext to automatically transcode your Typescript into JavaScript, check out  Marcin Juraczek’s post on configuring grunt-typescript.

imageCross platform – These days of Mobile first application development, most companies are trying to figure out how to reduce costs and increase code reuse. Visual Studio 2015 offers a number of new features to try to address these concerns.

Xamarin – Visual Studio 2015 includes increased partnership with Xamarin which allows developers to write C# code to natively target iOS, Andriod, Windows Phone, and Windows RT using a single code base.

Apache Cordova support – VS 2015 also includes enhanced tooling for creating mobile apps with HTML/JavaScript using the open source Apache Cordova (PhoneGap) tools including debugging iOS directly from Visual Studio.

Cross platform C++ – Microsoft also added support for writing cross platform C++ if that’s your language of choice or you need access to device native features that aren’t available using the other platforms.

•Andriod emulator – The official Andriod emulator from Google is widely acknowledged as being quite slow and problematic. Microsoft now offers an alternative emulator based on HyperV similar to their own Windows Phone emulator. – Not only can you deploy your ASP.Net vNext applications on Linux or OS-X, you can now use your favorite text editor to create the code in Sublime/Emacs/etc. Instructions on how to hook up your favorite editors are available at

Visual Studio 2015

Instead of detailing the changes in VS 2015, below is a quick summary of some of the more interesting ones that I found. Drill into each hyperlink below for details on the feature you’re interested in.

  1. New compiler for C#/VB(. Net Compiler Platform) (what’s new vids)
  2. New language features
  3. Code focused IDE enhancements
  4. Lightbulb refactorings (extensible)
  5. PerfTips
  6. Memory usage tool
  7. LINQ/Lambda expressions in debug/watch windows
  8. Bigger and filterable error list
  9. WPF roadmap tooling and debugging enhancements for WPF
  10. Auto generate smart unit tests
  11. .Net Native

VS OnlineimageWhether you prefer TFS or Git, you can use VS Online. I’m not going to try to summarize the new features here since they stated that they update the site every 3 weeks. By the time you read this, there is a high likelihood that they may have already added more features.

Application insights – One new feature worth mentioning is the Application Insights that can allow you to add analytics and diagnostic monitoring to your app and offer a helpful dashboard to use directly inside of VS Online.

Did you watch the Connect sessions and noticed something important that I missed here? Feel free to let me know what you thinq below.

Posted on - Comment
Categories: Visual Studio -

ThinqLinq Samples on Github

When I first created this site, I used it both as a test bed for technologies as I played with them and as a repository for others to use for my presentations and other insights. Over the years people have been free to grab these samples, but haven’t had good ways of giving back to help improve the samples.

In the mean time, there have been quite a number of technology changes. While I may have been late to the party on some, there’s only so many things one can focus on. One of the advances we’ve seen is the explosion of use of web based distributed source control systems. In that light and as an effort to both make it easier for you to access the sample projects, and help you give back, I’ve started publishing my samples on GitHub. While you’ll still be able to download the samples from my downloads page, I won’t be updating them as new versions ship and instead will plan to keep the samples updated on GitHub instead.

At this point, the following projects are available via my Github repository:

  • RX Samples – Includes Windows Phone, Silverlight, Windows Store App, WebForm, HTML/RxJs, and SignalR samples with code in VB, C# and JavaScript.
  • WebAPI Samples – Includes Sample recipe EF 6 models and Web API endpoints.
  • Signalr RX Samples – Includes Chat samples in Web and WPF, Reactive Sensors in Web and Console projects, and Drag/Drop with MVC and WPF

As always, please let me know what you Thinq. Does Git make accessing the samples easier? Is there something else I should add to the samples?

Posted on - Comment
Categories: C# - Entity Framework - JavaScript - LINQ - Rx - RxJs - SignalR - VB - WinRT - WP7 -

Reactive Extensions RX in Action the movie

I’ve been giving presentations for some time now. By far, my favorite talk to give is my Reactive Extensions in Action. This past summer, I had the talk recorded at the Code on the Beach conference. If you haven’t had a chance to see it live, now’s your chance. The focus of this talk is to focus on some of the practical uses of Rx rather than the underpinnings of how it works. I hope you enjoy and this sparks ideas from you on how you can use it in your applications.


Rx in Action recorded at Code on the Beach.
Posted on - Comment
Categories: C# - VB - Rx -

Build Impressions

Once again, I had the opportunity to attend Microsoft's //build// conference in person. SatyaThis year did not disappoint. In these days of fast internet and streaming/recorded conference sessions, I still find it beneficial to attend in person, not so much for what is said on stage, but also to see the audience reaction to announcements. In some of the informal gatherings like at lunches or at the airport, I try to make it a habit to ask people what the best thing they saw was to gain a feeling for the atmosphere that was present in rooms that I was not able to attend in person. I also try to pay attention to not only what is said, but also what is conspicuously not said at the conference. In this post, I'll try to share my thoughts from the conference on what was hot and what to keep an eye out for based on the reactions I saw.

In the opening keynote, Microsoft announced to of the most important advances: Universal Apps and the Windows Phone 8.1 with the Cortana voice based digital assistant. With Universal Apps, Microsoft is attempting to move closer to a unified programming model across devices and platforms including Desktop, Tablet, Phone, and XBox. Adding in partners like Xamarin and Unity 3D, these universal apps can also extend to Apple and Andriod as well. There is not 100% API parity across the platforms, but these changes promise to get us much closer to the silver bullet of write once-run anywhere that so many customers are looking for. At this point they indicated that there is a 90% API parity between Windows Store Apps and Windows Phone 8.1. While you can use Xamarin, Miguel did indicate that you will still need to write separate UI tiers for the Andriod and iOS platforms reusing the core shared business logic.

WindowsPhoneSpeaking of platforms, Microsoft took the wraps off of the next major update to Windows Phone. Contrary to some reports, this is a major update both from a developer and end user perspective and generated quite a bit of buzz. The changes include significant lock screen enhancements, a new notification center, and an impressive voice controlled digital assistant called Cortana cortana-windows-phonethat learns from your use and integrates with your online activities. It's like Siri and Google Now got together and had a prodigy. I didn't get to try it out first hand, so it will be interesting to see how much the demos were scripted or if it really works as well as promised. Integrating it with your apps also appears to be relatively painless so it will be interesting to see how well this takes off. The new UX features on the phone along with a unified WinRT model really make the platform something to contend with and signals the convergence that had long been rumored.

Beyond the advances in UX and platforms, developers were pleasantly surprised by the language teams with some important advances in managed languages including the release of the Roslyn compiler. After a long 5+ year effort, the teams have finally completed the rewrite of the compilers in managed languages adding in extensibility hooks for the community to build extensions to the language services. This also allowed the team to add a number of language features that had long been on the back burner, but they were now finally able to incorporate with a more manageable code base. Perhaps the biggest news item of the conference trending on Twitter and at the top of Hacker news as Anders open sourcing the Roslyn compilers. Hopefully as a result, we'll now see a greater community involvement in extending the languages in much the same way that F# has thrived from their small but enthusiastic community.

In addition to the managed languages teams, the developer division has been hard at work on a number of other things that were debuted at Build to largely positive reactions. Among these, the ones that got the most reaction were the release of Typescript 1.0, SIMD support, and .Net Native compilation for Windows Store Apps.


XamarinBuildEven though this was a Microsoft conference, attendees are still concerned about cross platform solutions and strategies. As a result of massive attendee interest, the Xamarin talk was moved from a regular session room to the main keynote hall. Judging from the number of seats taken up, I would guess that nearly 1/4 of all attendees came to this session. As mentioned earlier, Xamarin offers a cross platform C# solution, but does not guarantee 100% code reuse across platforms. It was good to see Microsoft acknowledging and embracing this solution and it will be interesting to see what happens going forward with Xamarin, particularly now that the C# compilers were open sourced and are already being incorporated into the Xamarin tools.

Microsoft-Azure-Management-Portal-620x300Not everything at the conference was focused on the clients. Azure and ASP.Net also got a fair amount of love as well. A couple of the more buzz worthy items here were the Azure management portal enhancements, greater integration between Visual Studio and Azure IAAS (Including remote debugging in cloud VM's), JAVA web sites (I don't see Google putting .Net in their cloud, so who's more open now?).

For ASP.Net, there were plenty of ooh's and ahs for browser link and being able to push updates to markup and styles directly from the browser back to Visual Studio. The IE11 F12 developer tools also now support map files (to debug typescript/coffee script/minified JavaScript) and marking files as library files to eliminate debugging into core frameworks (Angular/JQuery/etc) allowing you to focus on the custom application code to improve developer productivity.

I was surprised to see one technology that is still a Microsoft Research project getting so much attention in the sessions. The Orleans project for massive cloud based parallel computing was discussed in several of the sessions I attended, including one describing how it is being used in production for managing Halo game status and stats even tracking all 500,000 games that were ever played on the platform.

WinDesktopFutureThis year's Windows announcements were somewhat dwarfed by some of the others mentioned previously. Many of these enhancements are directed at improving the experience and feature discoverability for mouse/keyboard users. Perhaps the one that made the news the most was a prototype image of a possible Win v.Next start menu. I hope people aren't disappointed when they install Windows 8.1 Update and don't see this new menu because some news sites missed the fact that this is not yet officially in the product, though given the enthusiastic response it got, I wouldn't be surprised to see it appear down the road.

Perhaps more important from an enterprise perspective is the changed licensing and side loading costs for Windows. Dropping the price of Windows and Windows Phone to free for devices under 9 inches should greatly increase the number of OEM's that have preferred the free Android platform. Also the challenges and expense with procuring side loading licenses are now dramatically reduced due to policy changes coming with that distribution model. Additionally, new Brokered apps can access the full power of windows from “Store Apps” for enterprise purposes. Rocky Lhotka has a good summary of the pricing and side loading changes and the impact that they will have for enterprise deployments.

The conference isn't all fun and games. There's also sound. Being a formally trained musician, I was interested to attend a session on incorporating Midi, sequencers, and synthesis. In that session they announced a new MIDI API for WinRT to enable more music interactivity using Windows Store Apps which I need to try playing with in my free time.

Not to be accused of seeing everything through rose colored GLASSes, there were a few notable omissions at the conference. While there were some sessions regarding the "Internet of things" these sessions largely focused on abstract use of Azure in the cloud to manage a a wide array of connected devices. With Google, Sony, Facebook, Pebble, and many others currently pushing forward with an array of devices, I found it surprising that Microsoft didn't make any announcements of new devices at the conference. For a company that's trying to be a device and services company, not having a new device to announce was noticeable. I admit that the delay of the Nokia mobility acquisition and Facebook's recent purchase of Oculus may have put a wrench in the ointment, so there may be things in the works that were just not quite ready to release at this time.

HarryPearsonWith this being the first major public conference since the One Microsoft reorg, and management shuffles, I was particularly interested in getting a feel for the kinds of change Microsoft was making. In general, I found they portrayed a much younger hipper vibe and returning to a more publically open style, unlike the walled garden that was present in the Windows division with the former leadership.

Who would have thought that Microsoft would be publishing libraries written by Twitter (Bootstrap), and Linus Torvalds (Git), and having people on the keynote stage wearing MiguelGoogle Glass and using a MacBook Pro. They continue to more fully embrace a more collaborative open source model with not only Roslyn being open sourced, but many of the core .Net components as well. (link to .Net open site). If there was one overarching theme from this year, it seemed to be a re-Embracing of .Net and the developer community. I like the direction that Satya Nadella appears to be heading and hope that it continues this way.

Posted on - Comment