Navision: how poorly written code.

It is incredible how poorly is written the manufacturing code of navision. If you are looking how it is calculated the lead time, you will find a lot of places where is calculated depending if its purchase or manufactured item. Instead of having a good documented and structured function called something like ‘get_LeadTime’, so you can change the behaviour (and there are very important reasons for doing that), you can not find where to hack the code. there are several places where to change so the consistency of the code is not assured. It is probably the worst code I’ve seen.

Even worse than the item tracking form ? [:D] If you ask 10 people to write code for a project, you’ll get 10 different pieces of code. Some of them are probably better than others. You probably would have written code for manufacturing in a different way. But then again, somebody else would have posted a topic on how bad it was developed no ?

Well, it is not a matter of specific lines of code. It is a problem of software design. The analyst, the project leader or chief software engineer should be fired.

That’s again matter of difference. I can agree that there is poor documentation, but can’t agree that this is poorly written code. Since Navision C/AL is interpreted language putting comments in the code will greatly increase loading time of the object, thus increasing network traffic on the initial startup of every client and on every subsequent need for loading an object /e.g. when it can’t be found in the obj.cache/. If YOU can not find where to hack the code that YOU want to change, you can probably ask your NSC or NTR to provide you with additional training or changing this for you. There are number of areas in Navision when code structure and coding can be improved, there are even some bugs here and there, but generally Navision code has quite good structure and is readable.