﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ohad Aston commented on I understand that naming matters, so...</title><description>The class that implement this interface should RECOGNIZE IF A FILE SHOULD BE IGNORED why calling it IFileFilter?
  
  
Call it IDoSomething and you solve the problem
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment44</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment44</guid><pubDate>Wed, 25 Jun 2008 07:33:57 GMT</pubDate></item><item><title>Daniel Kolman commented on I understand that naming matters, so...</title><description>+1 for the IFileFilter by jonnii
  
  
But IMHO this discussion is great example of a fact that solving any problem without context is waste of time.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment43</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment43</guid><pubDate>Tue, 24 Jun 2008 13:09:48 GMT</pubDate></item><item><title>Kirill Osenkov commented on I understand that naming matters, so...</title><description>I agree with Julian, a delegate can be nicer than an interface here. Just think of all the benefits you can get with lambdas.
  
  
If you don't like that Predicate&lt;T&gt; is too generic (sic!), you can define your own:
  
public delegate bool FileFilter(string fileName);
  
  
Also, let us know what was your final decision. I'd be curious :)
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment42</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment42</guid><pubDate>Sun, 22 Jun 2008 00:48:52 GMT</pubDate></item><item><title>Ray commented on I understand that naming matters, so...</title><description>IIgnorantFile :-)
  
  
  
Back on a serious note, I think IFileIgnore is best suggested name. Altho, I prefer Exclude instead of Ignore.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment41</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment41</guid><pubDate>Thu, 19 Jun 2008 20:25:09 GMT</pubDate></item><item><title>Steve Campbell commented on I understand that naming matters, so...</title><description>An interface with a single method is generally part of a strategy pattern.  Given that, I would choose option 1, because it is indicative of what the strategy is for (recognizing files that need to be ignored).  I can use the name of the option 1 interface in a conversation and its purpose will be clear.
  
  
Option 2 has a more concrete (implementation) feel to it (FileSpecification).  It also uses "Ignore" as a verb, which in my interpretation is not what it does (it does not actually do the ignoring, only the recognition).
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment40</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment40</guid><pubDate>Thu, 19 Jun 2008 13:55:07 GMT</pubDate></item><item><title>Benny Thomas commented on I understand that naming matters, so...</title><description>  
IFileIgnoranceRule
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment39</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment39</guid><pubDate>Thu, 19 Jun 2008 13:46:41 GMT</pubDate></item><item><title>Steve Freeman commented on I understand that naming matters, so...</title><description>Surely it depends on the context in which the interface is to be used?
  
  
- using the 'I' wart to refer to the object just seems wrong to me. We should do everything we can to ignore this unnecessary noise.
  
  
- since it's a string, that's a "filename" or "pathname", not a "file".
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment38</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment38</guid><pubDate>Wed, 18 Jun 2008 18:24:36 GMT</pubDate></item><item><title>Marc Wrobel commented on I understand that naming matters, so...</title><description>The first one, since IIgnoreFileSpecification doesn't talk to me very much.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment37</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment37</guid><pubDate>Wed, 18 Jun 2008 06:07:20 GMT</pubDate></item><item><title>Mats Helander commented on I understand that naming matters, so...</title><description>IFilesThatNeedToBeIgnoredRecognizer?
  
  
/Mats
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment36</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment36</guid><pubDate>Wed, 18 Jun 2008 05:02:11 GMT</pubDate></item><item><title>Jeff Tucker commented on I understand that naming matters, so...</title><description>So should the chicken class implement ILayable or ICanLayEggs then? 
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment35</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment35</guid><pubDate>Tue, 17 Jun 2008 18:35:58 GMT</pubDate></item><item><title>Alessandro Riolo commented on I understand that naming matters, so...</title><description>I agree with Ken about the name of the interface.
  
That said, in English "should" doesn't convey the meaning of absolute necessity. In example, as per RFT 2119, "SHOULD .. mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.", while "MUST .. " ( or  "REQUIRED" or "SHALL") ".. mean that the definition is an absolute requirement of the specification.", thus I would advice care also on the naming of the method. In layman's terms, is really ShouldBeIgnored or should be MustBeIgnored?.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment34</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment34</guid><pubDate>Tue, 17 Jun 2008 14:05:16 GMT</pubDate></item><item><title>Patrik commented on I understand that naming matters, so...</title><description>Depending on where this is used there's a good chance that I'd go with something like this:
  
  
public delegate bool FileFilter(string fileName);
  
  
If not that I'd go with the IFileFilter-interface.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment33</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment33</guid><pubDate>Tue, 17 Jun 2008 13:18:06 GMT</pubDate></item><item><title>Sidar Ok commented on I understand that naming matters, so...</title><description>ICanIgnoreFiles :)
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment32</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment32</guid><pubDate>Tue, 17 Jun 2008 09:00:02 GMT</pubDate></item><item><title>Ken Egozi commented on I understand that naming matters, so...</title><description>Started my comment here, moved it to my blog:
  
http://www.kenegozi.com/Blog/2008/06/17/naming-interfaces.aspx
  
In short - be specific. Either of Ayende's offers are good, IFileFilter is not my preference.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment31</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment31</guid><pubDate>Tue, 17 Jun 2008 06:17:14 GMT</pubDate></item><item><title>firefly commented on I understand that naming matters, so...</title><description>IAmWhateverYouAndYourTeam can understand and agree on is good enough. I wouldn't stress over some name. Some XML documentation wouldn't hurt either.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment30</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment30</guid><pubDate>Tue, 17 Jun 2008 01:21:49 GMT</pubDate></item><item><title>John Rayner commented on I understand that naming matters, so...</title><description>I prefer method names to be verbs in the present tense.  So I'd be similar to jonnii:
  
  
public interface IFileFilter
  
{
  
   bool ShouldIgnore( string filename );
  
}
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment29</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment29</guid><pubDate>Mon, 16 Jun 2008 22:37:59 GMT</pubDate></item><item><title>Kenneth LeFebvre commented on I understand that naming matters, so...</title><description>For what it's worth, I like your idea of using the "I" as a first-person pronoun!
  
  
I tend to not use an "I" at all on my interfaces, rather ending my interface names with "Interface" or "Contract". But, I am also a big fan of active voice in my names (actually, in all of my writing, really) so if I used the Hungarian Eye naming convention for interfaces, I would probably go with your first proposal...
  
  
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment28</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment28</guid><pubDate>Mon, 16 Jun 2008 20:45:56 GMT</pubDate></item><item><title>Alex Simkin commented on I understand that naming matters, so...</title><description>One more:
  
  
IPicky with method Refuse
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment27</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment27</guid><pubDate>Mon, 16 Jun 2008 20:15:44 GMT</pubDate></item><item><title>Avish commented on I understand that naming matters, so...</title><description>If that interfaces is only used to recognize the SCM's meta-files (or whatever you call the .svnbridge folders), call it by that name and use it in that way:
  
  
IMetaFileLocator.IsMetaFile(string filename)
  
  
If it's supposed to be used to identify all files that should be ignored (during what? that's a key question), then I think the notion of an "excluder" -- that is, something that excludes files from general filespecs -- will work better:
  
  
IFileExcluder.ShouldExclude(string filename)
  
  
This suits the scenario where it makes sense to combine several of these, for example the default one that excludes meta-files, another one that excludes files based on svn:ignore properties, etc. 
  
  
If there's no need to combine exclusions, then jonnii's FileFilter suggestion -- making the interface say which files should be processed, rather than which files should not be processed -- is slightly more intuitive IMO. 
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment26</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment26</guid><pubDate>Mon, 16 Jun 2008 20:00:15 GMT</pubDate></item><item><title>Alex Simkin commented on I understand that naming matters, so...</title><description>IDisregarding&lt;T&gt; or IDisregardable&lt;T&gt; or IPayingNoAttentionTo&lt;T&gt;
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment25</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment25</guid><pubDate>Mon, 16 Jun 2008 19:56:47 GMT</pubDate></item><item><title>Raja Nadar commented on I understand that naming matters, so...</title><description>how about IIgnoreFiles? [IVerbNoun since IAdjective (IIgnorable) doesn't sound good]
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment24</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment24</guid><pubDate>Mon, 16 Jun 2008 18:25:19 GMT</pubDate></item><item><title>Tobin Harris commented on I understand that naming matters, so...</title><description>public interface Ignorant
  
{ 
  
   bool Ignores(string test);
  
}
  
  
:-)
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment23</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment23</guid><pubDate>Mon, 16 Jun 2008 17:23:07 GMT</pubDate></item><item><title>Shawn Neal commented on I understand that naming matters, so...</title><description>Why do we love to talk about naming conventions/names so much?
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment22</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment22</guid><pubDate>Mon, 16 Jun 2008 16:59:26 GMT</pubDate></item><item><title>David Buksbaum commented on I understand that naming matters, so...</title><description>+1  for the IFileFilter by jonnii
  
  
I think this makes it specific enough for the meaning to be understood, and general enough to promote reuse beyond the current context.
  
  
One other thing, is to possibly make this work in a chain, such that a series of IFileFilter's could be applied to jointly decide if the file should be ignored.
  
  
David
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment21</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment21</guid><pubDate>Mon, 16 Jun 2008 16:55:43 GMT</pubDate></item><item><title>Keith Elder commented on I understand that naming matters, so...</title><description>This reminds me of ICanLayEggs and IEggable! :)
  
  
http://deepfriedbytes.com/podcast/episode-2-interview-war-stories/
  
  
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment20</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment20</guid><pubDate>Mon, 16 Jun 2008 16:01:36 GMT</pubDate></item><item><title>Shaun commented on I understand that naming matters, so...</title><description>I like IFileFilter
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment19</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment19</guid><pubDate>Mon, 16 Jun 2008 15:39:32 GMT</pubDate></item><item><title>Mike commented on I understand that naming matters, so...</title><description>I like prefer ending with 'Specification' for naming standard purposes...It helps too if I need to do a resharper Ctl+N with "*Specification" .
  
I would actually use IDisregardFilesSpecification or IIneligibleFilesSpecification naming.
  
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment18</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment18</guid><pubDate>Mon, 16 Jun 2008 15:33:36 GMT</pubDate></item><item><title>Steve commented on I understand that naming matters, so...</title><description>I like descriptive names, even if longer.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment17</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment17</guid><pubDate>Mon, 16 Jun 2008 15:29:26 GMT</pubDate></item><item><title>Josh commented on I understand that naming matters, so...</title><description>+1 for jonnii
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment16</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment16</guid><pubDate>Mon, 16 Jun 2008 15:15:47 GMT</pubDate></item><item><title>Julian Birch commented on I understand that naming matters, so...</title><description>Well, you still get to name the variable...
  
  
Predicate&lt;string&gt; ignoreFilesSpecification = new OldSvnBridgeFilesSpecification().ShouldBeIgnored;
  
  
For instance.
  
  
But it really depends on how you're using the class, which I guess has always been the point.
</description><link>http://ayende.com/3372/i-understand-that-naming-matters-so#comment15</link><guid>http://ayende.com/3372/i-understand-that-naming-matters-so#comment15</guid><pubDate>Mon, 16 Jun 2008 15:13:56 GMT</pubDate></item></channel></rss>