Friday, May 29, 2015

The Top 10 rules of Software Development

On a DotNetRocks episode following link was shared: http://www.nullskull.com/a/722/the-top-ten-rules-of-software-development.aspx

It starts with the following 10 rules:

  1. Order the T-shirts for the Development team
  2. Announce availability
  3. Write the code
  4. Write the manual
  5. Hire a Product Manager
  6. Spec the software (writing the specs after the code helps to ensure that the software meets the specifications)
  7. Ship
  8. Test (the customers are a big help here)
  9. Identify bugs as potential enhancements
  10. Announce the upgrade program

Luckily it’s followed by the real rules afterwards… Glimlach

OneYearInAITProject

Thursday, May 28, 2015

Techorama 2015: EcmaScript 6 features overview

If our ‘What’s next for JavaScript?’ session got you interested, here are some useful EcmaScript 6 resources:

Wednesday, May 27, 2015

WarriorJS: Play a game by writing ES6 code

Interested in learning EcmaScript 6 in a fun and entertaining way? Try Warrior.js.

banner

This is a game designed to teach JavaScript and artificial intelligence in a fun, interactive way.

You play as a warrior climbing a tall tower to <insert something that motivates you here> at the top level. On each floor, you need to write JavaScript (with full ES6 support) to instruct the warrior to battle enemies, rescue captives, and reach the stairs.

To run the game,  first install it by running npm install -g warriorjs from a command prompt. You can start playing by typing warriorjs.

image

This will generate a player.js file you have to edit. Inside this file, you’ll find a player class with a playTurn() function that you have to edit.

image

Once you are done editing Player.js, save the file and run the warriorjs command again to start playing the level. The play happens through a series of turns. On each one, your playTurn method is called along with any enemy's.

image

Tuesday, May 26, 2015

Best (or at least funiest) ng-conf 2015 session

At ng-conf Shai Reznik brought this great ‘ng-wat’ session inspired by the ‘Wat’ sessions by Gary Bernhardt(a must watch).

Maybe not so informative but certainly entertaining!

Friday, May 22, 2015

Xamarin.Forms: Xamarin-Forms-Labs

The amount of controls for Xamarin.Forms is rather limited. Luckily with the help of the community and control vendors like Telerik, Syncfusion,etc… this is changing.

One of the open source initiatives is Xamarin-Forms-Labs:

“Xamarin Forms Labs is a open source project that aims to provide a powerful and cross platform set of controls and helpers tailored to work with Xamarin Forms”

It offers a wide range of controls, services, helpers and plugins. A must have for every Xamarin.Forms developer…

Available controls

Available services (Beta)

  • Accelerometer
  • Cache
  • Camera (Picture and Video picker, Take Picture, Take Video)
  • Device (battery info, device info, sensors, accelerometers)
  • Display
  • Geolocator
  • Phone Service (cellular network info, make phonecalls)
  • SoundService
  • Text To Speech

Available Mvvm helpers (Beta)

  • ViewModel (navigation, isbusy)
  • ViewFactory
  • IOC
  • IXFormsApp (application events)

Available Plugins (Beta)

  • Serialization (ServiceStackV3, ProtoBuf, JSON.Net)
  • Caching (SQLLiteSimpleCache)
  • Dependency Injection containers (TinyIOC, Autofac, NInject, SimpleInjector, Unity)
  • Web (RestClient)
  • Charting (Line, Bar & Pie) (Alpha)

Thursday, May 21, 2015

Xamarin.Forms: No valid iOS code signing keys found in keychain

Yesterday while creating a new Xamarin.Forms application,  it failed to build for iOS with the following error message:

No valid iOS code signing keys found in keychain

I first thought that there was something wrong with my iOS configuration, but when I tried to create a ‘traditional’ iOS application, it just worked.

On the Xamarin forums I found the following solution that worked for me:

  • Open your Xamarin.Forms projects.
  • Unload the iOS project in Visual Studio.
  • Open the csproj file and search for the following element

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>

  • Remove ‘Entitlements.plist’ from the ‘CodesignEntitlements’
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<CodesignEntitlements></CodesignEntitlements>
</PropertyGroup>

Wednesday, May 20, 2015

Simplify MsBuild thanks to MsBuild Explorer

MsBuild is a complex beast. It’s easy to get lost inside the XML and hard to discover what exactly is going on.

One tool I recently discovered is MsBuild Explorer:

Use MSBuild Explorer to help you find your way around the make-up of your build file(s). It presents you with a treeview to see the targets that you have available. A series of tabs provide access to more information including detailed target information, custom target execution, detailed property, item, import and using information and evaluation.

 

MsBuildExplorer

Techorama 2015: RequestBin

Always great to discover the tools that other people use during their presentations. It are these moments that make visiting a conference worthwhile and allow you to earn your money back big time!

image

During Techorama 2015, one of the speakers was using RequestBin:

RequestBin gives you a URL that will collect requests made to it and let you inspect them in a human-friendly way.
Use RequestBin to see what your HTTP client is sending or to inspect and debug webhook requests.

It’s the perfect solution when you want to see what’s send to the server but are not able to trace and inspect the HTTP requests on the server.

Click on the Create a RequestBin button:

image

Copy the generated url into your HTTP client (like curl for example). Execute a call:

image

And check the results on the RequestBin website:

image

Nice!

Tuesday, May 19, 2015

Impress your colleagues with your knowledge about…AggregateException.Flatten()

Sometimes when working with .NET you discover some hidden gems. Some of them very useful, other ones a little bit harder to find a good way to benefit from their functionality. One of those hidden gems that I discovered some days ago is AggregateException.Flatten().

If you have a task that calls another task that calls another task and so on… and an exception is thrown, you end up with an AggregateException that contains an AggregateException that contains an AggregateException and so on… . If you want to unwrap the real exceptions and get rid of all the intermediate AggregateExceptions, you can use the Flatten method on the top most AggregateException.

An example:

var task = Task.Factory.StartNew(
() =>
{
Task.Factory.StartNew(
() => { throw new Exception("inner"); },
TaskCreationOptions.AttachedToParent);

throw new Exception("outer");
});


If you Wait() on the created task, it will throw an AggregateException, that looks like this:




  • AggregateException


    • Exception: outer


    • AggregateException


      • Exception: inner







Thanks to the Flatten method, the structure is simplified to:




  • AggregateException



    • Exception: outer



      • Exception: inner



Monday, May 18, 2015

Team Foundation Server: How to migrate TFS Version Control project by project

One of the customers I work for is making the move to Team Foundation Server. For the project I’m working on, we used a temporal TFS project hosted at my employer(Ordina). Unfortunately there wasn’t an easy migration path to move the source code from the Ordina TFS to the TFS at the customer location. Why? Because we are using SQL Server 2014 and the customer has standardized on SQL Server 2012. And this is an unsupported migration path.

Luckily, I found a workaround to not lose any history. In short, what I do is export all the source code in TFS Version Control(TFVC) from my company’s TFS to a Git Repo. Afterwards I import the code from Git  into the TFSVC from the customer.

Interested in the specific steps? Here are all the details:

Prerequisites

I used a combination of 2 tools that support integration between TFS and Git. (Why 2 tools? Because I had some issues when I tried to accomplish the process with only one of the tools.)

Export the code from TFSVC into Git using Git-TFS

  • Download and install the Git-TFS binary
  • Add the git-tfs folder path to your PATH environment variable
  • Open a command prompt
  • Check which branches are available for cloning
  • Clone the full repository or a specific branch(note that this can take a while…)
  • After the clone operation has completed, you have the full TFS history available in a local git repo

Import the code from Git into TFSVC using Git-TF

  • Let’s now switch to the Git-TF tool. Download and install it from the Microsoft Download site.
  • Add the Git-TF installation path to your PATH environment variable
  • Open a command prompt
  • Browse to the location where you have the local git repo created
  • Configure git-tf to link to the target tfs repo
  • Do a check-in of the Git repo in TFS
    • git-tf checkin --deep --verbose

Friday, May 15, 2015

Team Foundation Server: Error creating a new team project

A customer reported me the following issue when they tried to create a new TFS project:

brary!ReportServer_0-43!fbc!03/30/2015-08:44:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database.;
library!ReportServer_0-43!fbc!03/30/2015-08:44:26:: e ERROR: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.Library.Storage.WrapAndThrowKnownExceptionTypes(Exception e)
   at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
   at Microsoft.ReportingServices.Library.SqlAgentScheduler.get_IsSchedulerRunning()
   at Microsoft.ReportingServices.Library.SchedulingDBInterface.CheckIfSchedulerIsRunning(Boolean error)
   at Microsoft.ReportingServices.Library.SchedulingDBInterface.GetCacheSchedule(Guid reportID, ReportScheduleActions& action)
   at Microsoft.ReportingServices.Library.ScheduleCoordinator.SetReportSchedule(Guid reportID, ScheduleDefinitionOrReference scheduleData, ReportScheduleActions reportAction)
   at Microsoft.ReportingServices.Library.ReportExecutionCacheDb.SetReportSchedule(Guid reportID, ScheduleDefinitionOrReference scheduleData, ReportScheduleActions reportAction)
   at Microsoft.ReportingServices.Library.ReportExecutionCacheDb.SetCacheOptions(CatalogItemPath reportPath, Guid reportID, Boolean cacheReport, ExpirationDefinition expiration)
   at Microsoft.ReportingServices.Library.SetCacheOptionsAction.PerformActionNow()
   at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute()

I had seen this issue before, but the error message is kind of misleading. To solve it I had to (re)configure the rights of the RSExecRole on the database:

Wednesday, May 13, 2015

Techorama 2015: RadioTFS.com

During Techorama there was a lot of great ALM related content. Martin Woodward did his very last ALM related session, so it was an honor to be there for his goodbye.

One of the great things he shared was the existence of the RadioTFS podcast. Although I’m active in the ALM space for a long time, I have to admit that I never heard about it Verlegen emoticon.

image

// the podcast about microsoft visual studio team foundation server, visual studio online and visual studio application lifecycle management

Time to update my list of podcasts…

Tuesday, May 12, 2015

Techorama 2015 : What’s next for JavaScript?

In case you missed the presentation I did at Techorama with my colleague Gerd Teniers, here are the slides:

Monday, May 11, 2015

Agile Project Management with Kanban

Although I have seen the power of a successful Scrum team, I don’t believe it’s the best fit in all situations. Scrum has a big impact on your (development) organization and requires buy-in at multiple levels to succeed. If you believe in the values and ideas behind the Agile Manifesto but think that Scrum will not work in your organization; or if you already tried Scrum and failed; I can recommend to have a look at Kanban. In my experience there is a lot less friction, especially if you are coming from a traditional Waterfall approach.

Interested? Start by reading the following free chapter from the Agile Project Management with Kanban book: https://www.microsoftpressstore.com/articles/article.aspx?p=2316388

Of course, I can also recommend the full book: Agile Project Management with Kanban.

AgileProjectManagementWithKanbanUse Kanban to maximize efficiency, predictability, quality, and value
With Kanban, every minute you spend on a software project can add value for customers. One book can help you achieve this goal: Agile Project Management with Kanban.
Author Eric Brechner pioneered Kanban within the Xbox engineering team at Microsoft. Now he shows you exactly how to make it work for your team.
Think of this book as “Kanban in a box”: open it, read the quickstart guide, and you’re up and running fast. As you gain experience, Brechner reveals powerful techniques for right-sizing teams, estimating, meeting deadlines, deploying components and services, adapting or evolving from Scrum or traditional Waterfall, and more.
For every step of your journey, you’ll find pragmatic advice, useful checklists, and actionable lessons. This truly is “Kanban in a box”: all you need to deliver breakthrough value and quality.

Friday, May 8, 2015

Microsoft Azure Essentials

Microsoft has started releasing a series of free eBooks about Microsoft Azure. At the moment there are three books in the series but this number will grow over time:

Fundamentals of Azure

Azure Automation

Azure Machine Learning

Thursday, May 7, 2015

CQRS Sample Application

CQRS is a really useful pattern, but it’s hard to find good examples out there. Jimmy Bogard took the time to rewrite the Microsoft Contoso University Sample app using a CQRS approach. Although not complex enough to show you the full power of CQRS, it gives you a good insight in the mechanics involved.

ContosoUniversity

Certainly worth checking out…

Wednesday, May 6, 2015

Visual Studio Online Process Customization is (finally) coming

We had to wait for it for a long time, but Microsoft finally announced that Process Template customization is finally coming to Visual Studio Online.

Some highlights:

  • Shared process: A fully customizable process template can be shared over multiple team projects meaning that you only have to change the template in one place to apply it for all projects
  • Inherited process: Apply a lightweight set of customizations on top of the default templates, allowing you to get all the upgrades when these templates evolve
  • Simplified customization: The customization model will be simplified and a new (web based) tool will be available
  • Improved Work Item Form: The existing work item form will be replaced with a new and fancy alternative

More information can be found here: http://blogs.msdn.com/b/visualstudioalm/archive/2015/05/05/visual-studio-online-process-customization.aspx

Tuesday, May 5, 2015

Hidden gems from Build 2015

With the long list of announcements at Build, it’s hard to separate the good from the great stuff.

2 things on my radar that can make or break the success of Windows 10:

Universal Windows Platform Bridge for Classic Windows Applications
Windows has a huge portfolio of existing Win32, WPF and .NET apps. Unfortunately until now, they were not available through the Windows Store. This made the Windows Store the loser in the big number game about “which store has the most apps?”. With the announcement at Build, this will change: Microsoft announced Project Centennial, a bridge which will allow an existing Classic Windows application to be converted to a Universal Windows app and made available in the Windows Store. These apps will not only have the same install and update user experience that the Store provides today, they will also be able to call the Universal Windows Platform APIs and use new platform capabilities like Action Center, Actionable Notifications, and enhanced Live Tiles.

BridgeForClassicWindowsApps

To make it even better, Microsoft brought the same security features of WinRT apps to the .NET and Win32 world.Registry and app data access are isolated for the app. So when your app thinks it is writing to the registry, it’s actually being stored in a per app hive, which can be easily removed.   This is all done without having to make major changes to your code.

Universal Windows Platform Bridge for Web Apps
Microsoft also provides a similar story for hosted web apps, where existing web apps can be published to the Windows Store. Developers may start with a preexisting web site URL, place it in a manifest and create an app targeting the Universal Windows Platform.

HostedWebApps

Full access to the platform is possible including calling APIs directly from scripts hosted on a server, leveraging Cortana integration and authentication. Web developers are able to directly call platform APIs through JavaScript hosted on their server when their hosted content is running as an application on Windows.

Monday, May 4, 2015

WPF Rendering Issue

A colleague mentioned that he had a strange UI error on his second monitor for a WPF application he’s working on:

image

This looks like a WPF rendering issue. 2 possible solutions I could think of:

    1. Change the Rendering Mode using the following code snippet:

      RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;

    2. Disable Hardware acceleration by adding the following registry key:  

      HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\DisableHWAcceleration, DWORD value=1

    More information can be found here: https://msdn.microsoft.com/en-us/library/aa970912(v=vs.110).aspx