The module needs to emit diagnostic information in order to help diagnose some of the problems users have experienced. This issue will track implementation of diagnostic features.

CommentFileSizeAuthor
#4 remove.debug_.code_.patch4.37 KBbeginner

Comments

mcurry’s picture

Priority: Critical » Normal
beginner’s picture

Title: Add diagnostic / debug information for admins » Remove diagnostic / debug information from code.
Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Assigned: mcurry » beginner
Category: feature » bug

If some users experience problems, they should file a bug report, and it's the developers' job to figure out what causes the problem and fix it.

I propose to do the exact opposite.
The code is littered by calls like:

 if (DIRECTORY_MODULE_DEBUG) ed_module_support_vd($nodes, 'get_nodes_by_term() returns');

which makes the code even less readable and even more, as you said, "dense".

I suggest we remove all of those debug calls completely.
They do not belong into a properly maintained module.

You know that during the last week, I have been working a lot on this module, trying to improve it in many ways.
Not once have I used those debugging calls because they were not those I needed. When I need to debug, I place my own, temporary debug code, and remove them when I don't need them anymore.

So, unless you object, I am going one of those days (probably soon) to remove everything related to DIRECTORY_MODULE_DEBUG and other debug code. I consider those as a bug.

wim leers’s picture

+1

I agree completely with beginner. For a extremely complex module, I *might* consider this, but even then it'd be very unlikely. This makes the code unnecessarily complex, and it's against the Drupal Coding Standards.

beginner’s picture

Status: Active » Fixed
StatusFileSize
new4.37 KB

Ok. I removed it.
attached patch committed.

@wim: it's late for me and I ought to be asleep already. I let you prepare the other code-removing patch, if you wish. I'll review it in the morning and commit it then, unless Inactivist beats me to it.

mcurry’s picture

@Wim, do you want CVS access? @beginner, any objections?

Personally, I have little time right now to work on this module, and as far as I can see, both of you are digging more deeply into the existing mess (er... code) more deeply than I have in the last year. So I'm totally comfortable delegating to those who have the time and energy to fix the smelly code.

beginner’s picture

Wim doesn't seem to have a cvs account.

In any case, I wouldn't mind having one more active developer, provided a certain gentleman's agreement is reached beforehand (I have had a bad experience with a previous cooperation)

wim leers’s picture

If I had plenty of time, I would be interested. Unfortunately I do not have that. Sorry.

Anonymous’s picture

Status: Fixed » Closed (fixed)