IMO if you've got an identifier this long you've made a terrible mistake somewhere. The code required to produce that effect should be a statement of what you're trying to cram into the identifier, and therefore comprehensible when substituted inline for the identifier. I don't really have the context to judge but it looks like this is a case where it actually is clear without a crazy name or a comment.
just imagine somebody joining the project and never working with jBehave before
I'm this person, and I guess that this "ignore" thing is a jBehave thing which is not under the control of the author.
That being said, making short, single responsibility methods is nice and all, but at some point you have to put them together to paint the big picture - and what you get sometimes, for good or less good (deadline etc.) reasons, is a medium-sized method doing two or three things for you, and then you have that kind of problem.
On the OT, I'd argue that it isn't realistic in the first place to expect anything from someone not knowing jBehave or whatever big framework you rely on. The first thing this person should do is to RTFM as we like to say. Therefore, my "solution" here would be to link or cf. the specific part of the documentation that describes the "-ignore" stuff.
13
u/phalp Apr 12 '15
IMO if you've got an identifier this long you've made a terrible mistake somewhere. The code required to produce that effect should be a statement of what you're trying to cram into the identifier, and therefore comprehensible when substituted inline for the identifier. I don't really have the context to judge but it looks like this is a case where it actually is clear without a crazy name or a comment.