Code annotations in AL – Please, don’t!

  • Reading time:10 mins read

One of good practices of writing C/AL Code for Microsoft Dynamics NAV since the dawn of civilization was annotating (commenting) code changes. If you are not sure what I mean by that, this is what I am talking about:

While standards varied about > vs +, or < vs -, or what the annotations should include, there was absolute consensus that annotating changes is an absolute must.

And it was a must. It was such an important rule that everyone followed it without questions asked. In my career, I’ve seen one or two situations of somebody changing or deleting a line of code without leaving any comment, and I’ve seen quite a lot of code, believe you me. It was that important.

It was that important in fact that it was one of the first things developers learned when they signed up for the job, and it was one of the rules they all followed from their first day.

Continue ReadingCode annotations in AL – Please, don’t!
Read more about the article Module Binder Pattern proposal
Zlata Praha, by Roman Boed

Module Binder Pattern proposal

  • Reading time:17 mins read

Whoa! This has been quite an event, the Directions EMEA 2016 in Prague. There has never been this many people (1.700+) and it was quite a pleasure connecting again with old friends, and meeting new friends. Also, it has been quite a pleasure listening to many good sessions, and an even bigger pleasure delivering four of them.

And this is why I am blogging now – to follow up on my promise during my Polymorphic Event Patterns for C/AL. I promised you that I’d post my pattern proposal online, and here I am doing it.

Let’s get started.

Continue ReadingModule Binder Pattern proposal

OnAfter table event subscriber patterns and antipatterns

  • Reading time:6 mins read

The purpose of events is to simplify business logic customization while not impeding upgradeability and general extensibility. However, there is one particular class of events that may cause troubles: OnAfter* table events. There are four of them: OnAfterInsert, OnAfterModify, OnAfterDelete, and OnAfterRename.

If you need them, you must be careful.

Continue ReadingOnAfter table event subscriber patterns and antipatterns

SQL Server Configuration Recommendations for Microsoft Dynamics NAV

  • Reading time:1 min read

Microsoft Dynamics NAV Team Blog has just published a mega-useful post about recommendations for configuring Microsoft SQL Server for optimum Microsoft Dynamics NAV Performance. If you haven’t yet, you should check it here.

The blog post delivers a PDF document summarizing certain important parameters, configuration settings and suggestions for improving and maintaining a speedy SQL Server for your NAV installation. The recommendations have been written for x64 version of SQL Server 2005 SP3, SQL Server 2008 SP1 and SQL Server 2008 R2. The document was compiled by Michael De Voe, a Senior Premier Field Engineer at Microsoft specializing in performance, scalability, infrastructure and high-availability for in NAV and AX.

Continue ReadingSQL Server Configuration Recommendations for Microsoft Dynamics NAV

Development best practices – the aftermath

  • Reading time:3 mins read

image So I would guess that was it. I’m just returning to Kristiansand, my Norwegian base, after delivering the “Microsoft Dynamics NAV 2009 Development Best Practices” course to a partner, my first custom-developed training ever. My impression is—mission accomplished.

I was not sure at first how this would turn out. Teaching NAV best practices to people some of whom have more experience than I’ll have any time soon, isn’t an easy thing. The challenge for me was—how to deliver something new, really valuable to those people, something they could go home with saying “wow, if only I knew this earlier”.

Continue ReadingDevelopment best practices – the aftermath

Development Best Practices

  • Reading time:2 mins read

image “Best practices” is one of those beloved and hated concepts. There are people who just embrace “best” practices for the sake of their bestness. And there are people who just shun them for the very same reason—those know-it-alls who have opinion on everything and know it better before even learning about it. What’s-best-for-you-is-not-best-for-me kind of people. Neither of approaches is actually, well, best.

For a best practice to be the best for you, you need to understand it, and if you find any pitfalls, improve it.

In two days I’m delivering the NAV Development Best Practices training for a service provider in Norway. They approached me two two months ago and asked if could do something like that. This brought to memory some good posts I made years ago, and here I bring the links. If you want me to share my best practices, this would be my starting point:

  • Code of Coding: emphasizes the need for understanding the effects of a change in code, and making others understand your intention
  • Code of coding 2: Documenting changes: about how to document different kind of changes in code, and also about the level of effect a specific type of change has in the long run
  • Code of coding 3: Die, hard(coding)!: about avoiding embedding output text into code
  • Code of coding 4: Die, hard(coding) 2: about avoiding embedding settings into code, with detailed explanation what exactly is wrong with it, and some good guidelines on how to detect less obvious cases of settings hardcoding
  • NeverENDing story: about a very bad example I once encountered, and how to avoid situations such as that
  • Featuritis Cure: now this one is definitely not a “best practice”, it’s about a situation when a developer pulled a prank on a customer so subtly that I just had to share it with the world. A far better cure for Featuritis (a dangerous and ugly disease indeed) is given by Mark Brummel, in his fantastic post Tip #20 – Save Report Usage. If you aren’t yet following Mark’s blog, now would be a good time to start.

If you are interested in development best practices, check these posts, and if you find them useful, then I’m happy. If you don’t, share your thoughts. Best practices develop over time, improving slowly, and gradually until one day they just become the norm.

Continue ReadingDevelopment Best Practices

My new career path – independent consultant

  • Reading time:3 mins read

It’s official now, and it’s time I announce it here: after two years at Microsoft I’ve decided to take the helm of my career and venture into the realm of independent consulting. Two days into it, and all I can say about it is: what have I been waiting for this long?

While at Microsoft, I had a chance to work on some very exciting projects, I was sitting at the source of information, and the thrill of being able to know about all the news and developments before anyone else is priceless.

But the thrill of being able to work on my own, to pick my own projects, to take on completely new challenges, was even more priceless.

Continue ReadingMy new career path – independent consultant

Microsoft Dynamics NAV 2009 Developer and IT Pro Help

  • Reading time:1 min read

image I’m not sure about you, but I’ve missed last week’s update to this free download from Microsoft Download Center: Microsoft Dynamics NAV 2009 Developer and IT Pro Help.

Published in December 2008, this set of help files and guidelines contains valuable information for developers and IT professionals about development, debugging, installation, security and similar best practices.

Continue ReadingMicrosoft Dynamics NAV 2009 Developer and IT Pro Help

Sure Step in action: Architecture Assessment

  • Reading time:6 mins read

Implementing a new Microsoft Dynamics solution doesn’t merely introduce a new piece of software into your environment. Yes, the software is an important part, you need to deploy it successfully, configure it as necessary, probably even customize it and change the business logic under the hood.

One component, however, is easily overlooked, and you wouldn’t believe how often it’s not addressed until late. Or too late. It’s the infrastructure.

Infrastructure is tough. It’s not just servers and desktops with some wires, switches and access points in between. Its a lot more. What kind of hardware do you need for your servers or desktops? What kind of performance do you really need? What kind of network layout is optimal for your transaction volume? Should you run the client on desktop machines, or would a remote desktop access be a preferred method? Do you virtualize your servers? What kind of failover capacities do you need? Can you retain any of your old hardware? How many users will use the system? Tomorrow? In five years? What about interfaces and integration to other systems or applications?

A couple of wrong answers, and down you go.

Continue ReadingSure Step in action: Architecture Assessment

Starting it from scratch – do you dare?

  • Reading time:6 mins read

(Three compelling reasons to reshape your business processes, not your software)

Has your computer ever crashed while you were doing something important, causing you to lose all your work? A natural first reaction to this situation is frustration: your work is gone, your effort went in vain, you’ll never do it as well as you did it the first time…

And yet, when initial frustration is gone, and you start doing it over again, from scratch, you are more likely to produce results of higher quality than the first time. Why? The reason for this is simply called—experience.

Continue ReadingStarting it from scratch – do you dare?