Shawn Wildermuth


My Rants and Raves about technology, programming, everything else...

Need LINQ but Writing JavaScript?

sketchArchOne of the tasks that I found cumbersome when writing JavaScript is simple collection manipulation. I have gotten spoiled in C# with LINQ. Sorting, filtering, shaping and more is easy with LINQ but what about in JavaScript? Underscore.js to the rescue.

Underscore.js is a small utility library that can help in collection manipulation (as well as other great features). I first started using Underscore.js to replace jQuery's (and AngularJS's) for-each implementations. I find underscore's simple and quick. Like much of JavaScript, the magic is happening in a callback function (think Lambda):

Is It Too Late for Windows RT Tablets?

imageAndroid tablets were a joke. I remember being at a MIX when the Xamarin guys (before Xamarin was Xamarin) were showing off Moonlight on Motorola Xoom tablets. I overheard them complain how bad the devices were compared to their iPad test machines. That was PN7 or Pre-Nexus 7. Sure the Kindle came first, but the real switch for Android tablets was the exceptional Nexus 7. They proved that the OS was usable and that a device was desirable. And they did it for $199. The Nexus 7 was a hit…very late into game. They knew that if they sold it at cost or better that people would learn to believe that Android was more than a haven for Linux-heads.

The problem with the Surface is that Microsoft wanted to make money on it. I know that's their business, but the Surface should have been the loss-leader that got the hardware community to build great tablets around Windows 8. But that didn't happen. Surface RT was $499 at launch (actually $399 but $499 was the right size one). $519 with a touch keyboard. This lined it up against a very successful product but it wasn't going to change any minds of people that already bought it.

My New Web Development Course is Live

Are you getting ready to build a new website? Are you interested in shortening your development by using Bootstrap, AngularJS, Azure and ASP.NET? If so, my new course might be just for you.

In this new course I build a new web site from scratch. I start out with a Bootstrap template (since my design skills suck) and move through creating content, building a database, exposing a REST-ful API and building a Single Page Application. I wrap it up by publishing the site to Azure Web Sites showing you how to not only get your application up an running in the cloud, but also how to monitor it and handle standard tasks like using your own domain in Azure.

My AngularJS Talk at Atlanta .NET UG

Thanks to all who showed up to see me talk about AngularJS at the recent Atlanta .NET User's Group. At the talk, I wrote the client-side code for an AngularJS app by hand. The slides are pretty thin, but the code includes all the functionality I showed. I promised the slides and code so here they are!

If you have questions about any of this, feel free to comment and I'll help as much as I can!

My First Week With Nokia Lumia 1020

imageA week ago I splurged and upgraded my Lumia 920 to the Lumia 1020. So to those of you who were expecting me to switch over the Android or an iDevice; I'm still entrenched in the Windows Phone world. And this phone cements my opinion to stay.  Let's talk about the good and the bad.

I like the weight. I was worried that with the camera bulge that this would feel like a much bigger device but if anything it feels smaller than the 920. I haven't looked up the weight but it feels really nice. I actually find the camera bulge useful as a pivot point to hold the phone.

JavaScript Promises

pinky-promiseNo I am not talking the promise that JavaScript will fix everything if you use it. I don't even believe that ;) I am talking about the concept of a promise object that several JavaScript libraries use (including AngularJS, jQuery, Dojo and WinJS).

A promise is a pattern for handling asynchronous operations. The problem is that essentially when you start an asynchronous operation, you need to execute some code as the operation is completed. Asynchronous code is so common that most libraries have found a solution for passing in callbacks. But there is little commonality to how each libraries does this. Let's take jQuery as an example:

750 Windows Phone Apps?

1020Today I picked up a Lumia 1020. I am impressed with the camera as you'd expect but I am also loving the size. It's about the same size as the 920 except for the extra camera bump. It feels lighter than I expected. The AMOLED screen with Gorilla Glass 3 looks great too.

While I was setting up the new phone, I headed over to Windows Phone's website to install my apps. The website has a feature called "purchase history" that allows you to look at what apps you've purchased and re-install them on your phone with a single click. What is interesting is that it seems I've installed over 750 apps over the time I've had with Windows phone. Yeah…750. I was surprised too.

Forcing Orientation in WinRT

7d703de7-03a1-4a9b-8425-841ae065c30fI am working with a client on an enterprise Win8 app that is for order taking. They have a specific page that they require to be only in Portrait mode while the rest of the app can support any orientation. Since I've done so much Windows Phone 7/8 work I thought this would be simple. Just specify the value on the Page. But this didn't work…

Digging through the docs I found a probable solution: DisplayProperties.AutoRotationPreferences (in the Windows.Graphics.Display namespace). The docs specify that this property can be set with the DisplayOrientations enumeration to specify which of the four orientations to support. The enumeration is a flag so you can combine them too:

Designing APIs for the Web

Ever get perplexed when designing your API for the web? My new course is now available on PluralSight that helps you design your API. The course covers:

You can view the course here:

Building Atlanta Code Camp Website

I recently helped the Atlanta Code Camp effort by building them a new website. You can see it here: Atlanta Code Camp.  I am pretty proud of what I was able to accomplish in the scant number of hours I had to build it. It's not done as we need to improve it when we have the speakers chosen and set up the schedule, but so far I am pretty happy with it.

I had a number of goals for the project:


Application Name WilderBlog Environment Name Production
Application Ver 2.0.0.0 Runtime Framework .NETCoreApp,Version=v2.0
App Path D:\home\site\wwwroot\ Runtime Version .NET Core 4.6.26020.03
Operating System Microsoft Windows 10.0.14393 Runtime Arch X86