Crap
Did you ever find any ‘personal’ comments from a Microsoft developer in AX code? I did. In AX2009 SP1 I found the following code block in the method displayComments() on the form HRMGoal:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | public void displayComments()//HRMGoalComment _gc) { Notes note; HRMGoalComment hrmGoalComment; boolean firstTime = true; ; //Crap while select hrmGoalComment where hrmGoalComment.GoalId == hrmGoal.GoalId { if(note) note += '\n\n'; //changeLine; note += queryValue(hrmGoalComment.CreatedDateTime); note += ' ' + hrmGoalComment.employeeName(); note += '\n' + hrmGoalComment.Comment; } displayComments.text(note); } |
Tags: Ax 5.0 (2009), Crap, Dynamics AX, Fun, Programming, X++
This entry was posted on Tuesday, June 16th, 2009 at 12:59 and is filed under Fun. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


June 17th, 2009 at 10:40
Nice find Jeroen.
It is crappy too, because it is best practice to put a space after the slashes, an never to put a comment line after your code, but on the line above! Not to mention the use of static text in the code and the missing brackets after the if.