Rash thoughts about .NET, C#, F# and Dynamics NAV.


"Every solution will only lead to new problems."

Category Diverses

In dieser Kategorie sind Blogeinträge die nicht richtig in die anderen Kategorien einzuordnen sind.

Saturday, 5. July 2014


Microsoft, Open Source development and Codeplex

Filed under: .NET,C#,Diverses,F# — Steffen Forkmann at 12:37 Uhr

Recently Microsoft released all their major programming languages as open source and even started to accept pull requests. I didn’t think this would ever be possible at Microsoft, but they opened up and people like me started to contribute:

Personally I sent 29 (mostly small) pull requests to the Visual F# project. 5 pull requests already got accepted and 15 are still under evaluation.  In principle the development process seems to be working very well. Especially in the Visual F# project Don Syme and the Visual F# team are doing an excellent job to encourage the community. They are marking user voice issues as “approved in principle” and even provide detailed documents for implementation tasks (See CoreLibraryFunctions). This makes it very easy to get started and to hack a bit on the F# compiler. A big thanks to you guys.

A very important part of the open source is the review process. The F# community is awesome in this regards. On issues like a new “compareWith” function I got comments with remarks about coding style, test cases, documentation and lots of new ideas about possible performance improvements. It’s really exciting to be part of such an active and welcoming community. There is only one “but” and this “but” is the choice of the development platform. I really think CodePlex is hindering these projects to become even more successful. In this post I want to show some of my experiences with Codeplex. Remember I already sent 29 pull requests so I think it’s fair to say I tried!

Overall usability

The first impression on the Codeplex site is that every click feels so frustrating slow. Waiting 4s and more for a site to load doesn’t exactly feel like 2014.

If you want to comment on something then there is an “interesting” distinction between issues and pull requests. On issues you get a preview box and some buttons to make formatting easier, but you can’t edit your comments later:

Issue comment editor

On pull request you can edit your comments later but your don’t have the formatting buttons:

Pull request comment editor

 

E-Mail notifications

Like most online portals you can enable E-Mail notifications on Codeplex. Unfortunately it doesn’t really work. I tried to set all notification sliders I found to the max. and still don’t get notifcations if someone sends a new pull request to the Visual F# projects. Instead I’m getting annoying E-Mail notifications on my own activities:

E-Mail notifications on own comments

 

Things like this make you wonder if they actually dogfood their own stuff.

Code reviews on pull requests

As described above good code reviews are a very important part of any software development project, for open source programming language projects even more so. Unfortunately Codeplex has a really bad code review tool. I mean it is possible to comment on diffs:

Comments on diff

But if you update the pull request with a fix then the comment is displayed on the new fixed code and makes no sense any more:

Wrong code comments on diff

The whole code review is broken when you add commits to a pull request and it get’s even messier when you rebase your pull request on the current master. Rebasing pull requests is a very common operation in open source projects since it allows to move the merge effort from the project maintainer to the contributor. But unfortunately Codeplex gets confused by the rebase and now shows a wrong diff:

Wrong diff on rebased pull requests

A code platform shows a wrong diff – yep I couldn’t believe it myself so I tried again. #7040, #7045, #7060, always the same.

Finding the needle in the hashstack

A couple of days ago I wanted to tweet a link to a cool performance trick and knew it was the last commit on a pull request. Now try to find the url:

Alphabetical order by hash

Yes that’s right – the commits are ordered in alphabetical order BY HASH or as I call it in “least useful order”.

Reporting Codeplex issues

Of course you may ask: “Steffen why didn’t you report these issues to the Codeplex team?” and that’s a valid question. Actually I went to codeplex.codeplex.com, which I believe is the home of the Codeplex project, and looked at their issue list. This is what I got:

Codeplex has quite some issues

 

Not a single issue on the first page is related to Codeplex and it seems they don’t even care to close this spam. So why should I care to log issues there?

What now?

It’s more than obvious – use the “move source code to github” strategy and people already created an issue on the TypeScript project. Unfortunately it got closed:

Business needs

After reading this I really doubt it was the decision of the teams to use Codeplex. Fortunately the ASP.NET team seems to be an exception to this. Somehow they managed to move to github.com/aspnet.

There are also other ways. Microsoft could really invest in Codeplex and make it a usable platform. But I don’t see this happing, because it will cost A LOT of money. Even if they would open source Codeplex I don’t see a community which is willing to improve this site.

So I appeal to the people in charge at Microsoft please answer the following questions:

  • What are the reasons for putting the Visual F# project on Codeplex, especially when the majority of the existing F# projects and community already operate on Github?
  • Do you think it’s more important to support Codeplex or to grow a community around the programming language projects?
  • If the F# community voted for the project to be moved, would you consider moving it?
  • If you insist on Codeplex how and when do you plan to fix these usability issues?

So please let your OSS teams and their community pick the open source platform they want!

Monday, 16. June 2014


FAKE 2.18 released – RoundhousE kick edition

Filed under: Diverses — Steffen Forkmann at 14:08 Uhr

With the FAKE 2.18.1 we now have 80 contributors. A big thanks to all of you.

Here are the most important changes since my last blog post about FAKE 2.14.

What’s new?

  • New (backwards compatible) CLI #455 – see new docs
  • Visual Basic support to AssemblyFileInfo task #471
  • Small fixes for OctoTools support #468, #469, #470
  • Support for Project RoundhousE #456
  • Support for NuGet source packages without a NuGet project file #450
  • Support for MSTest settings #428
  • Support for BuildFailureTargets #407
  • Fake.Deploy agent requires user authentication – see docs

More details about minor bug fixes can be found in the release notes.

Getting started

If you new to FAKE you should read the getting started guide or clone the F# ProjectScaffold.

Go and grab the bits

Feel free to contact me if you need help for the upgrade.

Tuesday, 20. May 2014


Regression in Dynamics NAV 2013 R2 string formatting

Filed under: Diverses — Steffen Forkmann at 9:43 Uhr

We are still porting one of our products from Dynamics NAV 2009 R2 (Classic Client) to NAV 2013 R2 and found another strange issue:

On Dynamics NAV 2009 R2 Classic client (Build 6.00.33494):

FORMAT(13.5671,0,'<Integer,4>'); ==> 0013,5671
FORMAT(13.5671,0,'<Precision,0:0><Integer,4>'); ==> 0014

But on Dynamics NAV 2013 R2 (Build 7.10.36281) we get:

FORMAT(13.5671,0,'<Integer,4>'); ==> 0013,5671
FORMAT(13.5671,0,'<Precision,0:0><Integer,4>'); ==> 0013

Not sure if it is that important for practical purposes, but it’s breaking some of our unit tests. ;-(

Tuesday, 22. April 2014


FAKE 2.14.0 released – OpenCover edition

Filed under: Diverses — Steffen Forkmann at 9:43 Uhr

Today I released FAKE 2.14 with some smaller bug fixes and improvements. The biggest feature is that we now have support for OpenCover and ReportGenerator. A big thanks to all of the 65 contributors.

What’s new?

Getting started

If you new to FAKE you should read the getting started guide or clone the F# ProjectScaffold.

Go and grab the bits

Feel free to contact me if you need help for the upgrade.

Sunday, 23. February 2014


FAKE 2.10 released – more stuff for Dynamics NAV, Windows Azure, FTP, Nuget

Filed under: Diverses — Steffen Forkmann at 15:41 Uhr

FAKE logoToday I released FAKE 2.10 with a lot of small bug fixes and improvements. A big thanks to all of the 55 contributors.

What’s new?

  • Support for Nuget Install
  • AzureHelper allows to control local Azure Emulator
  • Several fixes in FAKE.Deploy (#333)
  • Split Dynamics NAV object files (#335)
  • Support for Dynamics NAV test results (#336)
  • Export objects support for Dynamics NAV (#332)
  • Include/exclude traits support for xUnit (#329)
  • ISSExpress helper allows to host websites in IIS Express (#323)
  • FTP Helpers allow file upload (#322)
  • Breaking Change: OctoHelper contains Packages parameter instead of “PackageVersionOverride” (#320)

Getting started

If you new to FAKE you should read the getting started guide or clone the F# ProjectScaffold.

Go and grab the bits

Feel free to contact me if you need help for the upgrade.

Sunday, 2. February 2014


FAKE 2.8 released – DotCover and TestFlight support

Filed under: Diverses — Steffen Forkmann at 15:53 Uhr

FAKE logoToday I released FAKE 2.8 with support for JetBrains DotCover and TestFlight.

It’s really awesome to see that this project is getting used more and more. We now have 51 contributors including people from GitHub and Xamarin. A big thanks to all of you.

What’s new?

  • DotCover support #318 (docs)
  • TestFlight support #304 (docs)
  • FAKE got a logo #308
  • Explicit references in NuGet params #295
  • Using F# 3.1.1 -> removed the F# compiler bundle from the repository
  • Removed dependency to Newtonsoft.JSON from FakeLib.dll
  • Ability to pass in F# Interactive Options, namely -d:MONO #302
  • “Goto github sources” is working from the docs #309
  • FSharp.Formatting task used here
  • Fix: ILMergeHelper uses correct TargetKind #312
  • Fix: Path resolution issue in MSBuildHelper #315
  • Fix: Better logging for git and mspec tasks
  • Fix: Make SQL Server Helper compatible with .NET 4.0 #243
  • Improvements in the docs

Getting started

If you new to FAKE you should read the getting started guide or clone the F# ProjectScaffold.

Go and grab the bits

Feel free to contact me if you need help for the upgrade.

Monday, 20. January 2014


FAKE 2.6 released – support for TravisCI

Filed under: Diverses — Steffen Forkmann at 13:24 Uhr

TravisCI support in FAKEToday I released FAKE 2.6 with support for TravisCI and much better mono support.

What’s new?

  • Fix: FileIncludes use stable order #270 
  • Fix: ReleaseNotes parsing was improved #275
  • Feature: Some new git helpers
  • Using latest SharpZipLib
  • Fix: Fixed all unit tests on mono
  • Feature: runWithRetry helper #289
  • Fix: FAKE is more careful when it tries to kill processes #291
  • FAKE has TravisCI build where it builds itself

Getting started

If you new to FAKE you should read the getting started guide or clone the F# ProjectScaffold.

Go and grab the bits

Feel free to contact me if you need help for the upgrade.

Sunday, 22. December 2013


FAKE 2.4 released

Filed under: Diverses — Steffen Forkmann at 10:16 Uhr

I’m happy to annouce the FAKE 2.4 release with F# 3.1 support.

What’s new?

Getting started

If you new to FAKE you should read the getting started guide or clone the new F# ProjectScaffold.

Go and grab the bits

Thanks to the 6 new ccontributors in the last months we are now 45! That’s so awesome.

Feel free to contact me if you need help for the upgrade.

Friday, 22. November 2013


FAKE 2.2 released

Filed under: Diverses — Steffen Forkmann at 17:06 Uhr

It’s a long time since the last major FAKE release and the community has contributed a lot of really cool features. This is so awesome and I want to thank all the contributors. You rock.

Today, I’m happy to annouce the FAKE 2.2 release. This release is really a very big change, so if you are still on FAKE 1.x there might be some problems for the upgrade. Feel free to contact me if you need help.

What’s new?

There is really a lot happening in this release so I want to talk about some of the improvements. Let’s start with the change of the project stucture. We separated the projects into different nuget packages in order to deploy a much smaller FAKE.Core package. These are the packages we have on nuget.

  • Fake.Deploy – allows to use FAKE scripts in deployment.
  • Fake.Experimental – exciting new stuff we want to try out and might want to remove again.
  • Fake.Gallio – contains the Gallio runner support.
  • Fake.SQL – Contains tasks for SQL Server.
  • Fake.Core – All the basic build features and FAKE.exe. If you only want the basic functionality then you would probably want to use this.
  • FAKE – Contains all the stuff above. We keep this package for compatibility.
FAKE.Deploy

As you can see the FAKE.Deploy package is now finally released. A big thanks to Colin Bull and all the others that are working in this area. See this tutorial for more information.

FAKE.Boot

Another interesting sub project is FAKE.Boot by Anton Tayanovskyy. It’s also released today. Read more about it in Anton’s blog.

New tasks

Of course we have plenty new tasks:

New globbing system

We (which means Colin 🙂 ) changed the implementation of the file scanning in FAKE. The original implementation was way to complicated and had tons of bugs in it. The new version is really elegant and only a fraction of the original code size. If you are interested in Functional programming check this out. It’s an interesting problem.

You will notice that a lot of the original file pattern functions are marked as obsolete. The file patterns implement IEnumerable, so you don’t need to use the “Scan” function any more.

What’s next?

I have some ideas how to reorganize the project and how to make it easier to debug build scripts. There are also ideas floating around how we can change the way FAKE bundles the FSI and but this still needs some time.

In the meantime we try to improve the existing tasks and continue to improve the documentation.

Up for grabs

The FAKE project joined the Up For Grabs project and I started to add tasks which are meant for new contributors to join the project. So if you want to get involved in FAKE then these might be interesting for you.

SemVer

I want to start using SemVer but I still have to figure out all the details of the new version number strategy. If someone has ideas about this then please let me know.

Monitoring external projects

Most of the tasks in FAKE are calling external tools. It’s very hard to test this properly so one approach is that FAKE is dogfooding the latest FAKE version to build itself. This ensures that most issues are catched very early. But of course FAKE’s own build script doesn’t use all the supported tasks.

In order to make FAKE more stable I want to monitor more external projects. So if you have an OSS project with a public CI build which is using FAKE then please let me know. I will try to maintain a list of these projects and will start to monitor if a new FAKE version would break these projects.

Go and grab the bits

Thanks again to all the 39 contributors – I thinks that’s an awesome number for an OSS  project that’s written in F#.

Friday, 4. January 2013


F# and Microsoft Dynamics NAV 2013 OData Services

Filed under: C#,Diverses,Dynamics NAV 2009,Dynamics NAV 2013,F#,Visual Studio — Steffen Forkmann at 13:52 Uhr

In my last post I described how we can access Dynamics NAV 2009 SOAP web services from F# and the benefits we get by using a type provder. Since version 2013 it’s also possible to expose NAV pages via OData. In this article I will show you how the OData type provider which is part of F# 3 can help you to easily access this data.

Exposing the data

First of all follow this walkthrough and expose the Customer Page from Microsoft Dynamics NAV 2013 as an OData feed.

Show the available companies

Let’s try to connect to the OData feed and list all available companies. Therefore we create a new F# console project (.NET 4.0) in Visual Studio 2012 and add references to FSharp.Data.TypeProviders and System.Data.Services.Client. With the following snippet we can access and print the company names:

As you can see we don’t need to use the “Add Service Reference” dialog. All service type are generated on the fly.

Access data within a company

Unfortunately Dynamics NAV 2013 seems to have a bug in the generated metadata. In order to access data within a company we need to apply a small trick. In the following sample we create a modified data context which points directly to a company:

Now we can start to access the data:

As you can see this approach is very easy and avoids the problem with the manual code generation. If you expose more pages then they are instantly available in your code.

As with the Wsdl type provider you can expose the generated types from this F# project for use in C# projects.

Further information:

Tags: , , ,