<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: The Nastiest Bug</title>
	<atom:link href="http://cafe.elharo.com/blogroll/the-nastiest-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/</link>
	<description>Longer than a blog; shorter than a book</description>
	<pubDate>Tue, 06 Jan 2009 01:34:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: J. David Beutel</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-268</link>
		<dc:creator>J. David Beutel</dc:creator>
		<pubDate>Wed, 29 Mar 2006 19:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-268</guid>
		<description>This is a problem.  IntelliJ IDEA helps a little by using different icons and colors on a file's editor tab.  E.g., if you open the copy of messages.properties deployed to your web app, its name is brown instead of black because it isn't under version control.  Nevertheless, it's still too easy to open the wrong one.

Cheers,
11011011</description>
		<content:encoded><![CDATA[<p>This is a problem.  IntelliJ IDEA helps a little by using different icons and colors on a file&#8217;s editor tab.  E.g., if you open the copy of messages.properties deployed to your web app, its name is brown instead of black because it isn&#8217;t under version control.  Nevertheless, it&#8217;s still too easy to open the wrong one.</p>
<p>Cheers,<br />
11011011</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GG</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-241</link>
		<dc:creator>GG</dc:creator>
		<pubDate>Thu, 09 Mar 2006 17:59:41 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-241</guid>
		<description>Stephen was onto the answer: Have the editing window itself show more of the pathname.

I disagree that full pathname is necessary, or even useful.  Big long strings of similar-looking noise all look alike.  What you want to see is the DIFFERENCES WITH A DISTINCTION.

On Mac OS X, one example of this is Property List Editor.  A significant fraction of the files you edit with it will be named "Info.plist", located in a "Contents" directory, which would make a recent-files list extraordinarily useless.

So what PLE does is show the "Info.plist" name followed by ONLY the unambiguous part of its actual location, which is usually the enclosing "Xyzzy.app" app-bundle folder, or whatever the nearest actual enclosing folder is.

For example, I have 9 "Info.plist" items, 4 of them from a .app context, 3 from a .SpeechVoice bundle, and 2 from a .SpeechSynthesizer bundle.

So I say the solution is to show JUST ENOUGH context, with JUST ENOUGH difference, that a glance alone will tell the user what's going on.

Sadly, not even Property List Editor does this in the editing-window's title-bar, where it would be even more useful.  However, all its windows support the cmd-click to reveal a popupmenu of the entire path to the file.  Still, this is not good enough, because it's not clear enough AT A GLANCE.  If I always had the discipline or presence of mind to cmd-click before editing, then there isn't even a problem.  It's precisely because I'm NOT disciplined and error-free that I need the context at a glance.</description>
		<content:encoded><![CDATA[<p>Stephen was onto the answer: Have the editing window itself show more of the pathname.</p>
<p>I disagree that full pathname is necessary, or even useful.  Big long strings of similar-looking noise all look alike.  What you want to see is the DIFFERENCES WITH A DISTINCTION.</p>
<p>On Mac OS X, one example of this is Property List Editor.  A significant fraction of the files you edit with it will be named &#8220;Info.plist&#8221;, located in a &#8220;Contents&#8221; directory, which would make a recent-files list extraordinarily useless.</p>
<p>So what PLE does is show the &#8220;Info.plist&#8221; name followed by ONLY the unambiguous part of its actual location, which is usually the enclosing &#8220;Xyzzy.app&#8221; app-bundle folder, or whatever the nearest actual enclosing folder is.</p>
<p>For example, I have 9 &#8220;Info.plist&#8221; items, 4 of them from a .app context, 3 from a .SpeechVoice bundle, and 2 from a .SpeechSynthesizer bundle.</p>
<p>So I say the solution is to show JUST ENOUGH context, with JUST ENOUGH difference, that a glance alone will tell the user what&#8217;s going on.</p>
<p>Sadly, not even Property List Editor does this in the editing-window&#8217;s title-bar, where it would be even more useful.  However, all its windows support the cmd-click to reveal a popupmenu of the entire path to the file.  Still, this is not good enough, because it&#8217;s not clear enough AT A GLANCE.  If I always had the discipline or presence of mind to cmd-click before editing, then there isn&#8217;t even a problem.  It&#8217;s precisely because I&#8217;m NOT disciplined and error-free that I need the context at a glance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mokka mit Schlag &#187; Converting a Mini to a Server, Part 3: MySQL and PHP</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-238</link>
		<dc:creator>Mokka mit Schlag &#187; Converting a Mini to a Server, Part 3: MySQL and PHP</dc:creator>
		<pubDate>Tue, 07 Mar 2006 20:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-238</guid>
		<description>[...] to httpd.conf. Again the installer should have done this, but it didn&#8217;t. Believe it or not, it took me longer than it should have to figure out the problem because of yet another variation of the nastiest bug. This time, I had httpd.conf files from two different web servers open in several different terminal windows, and I checked for the AddType line in what I thought was the new server but was in fact the old server. [...]</description>
		<content:encoded><![CDATA[<p>[...] to httpd.conf. Again the installer should have done this, but it didn&#8217;t. Believe it or not, it took me longer than it should have to figure out the problem because of yet another variation of the nastiest bug. This time, I had httpd.conf files from two different web servers open in several different terminal windows, and I checked for the AddType line in what I thought was the new server but was in fact the old server. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avery Regier</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-237</link>
		<dc:creator>Avery Regier</dc:creator>
		<pubDate>Tue, 07 Mar 2006 16:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-237</guid>
		<description>I often have this problem in Eclipse, not when dealing with two files of the same name, but when copying one file to another with a different name.  I typically then blindly go to edit the copied file, and only realize a bit later that Eclipse didn't automatically open the copied file, but rather left me at the editor for the old file.  Thus, I've been editing the file I'm copying from, not the one I want to edit.  

I couldn't count how many times I've done this, but I'm *starting* to get smart to it and check which file I'm on before I start.</description>
		<content:encoded><![CDATA[<p>I often have this problem in Eclipse, not when dealing with two files of the same name, but when copying one file to another with a different name.  I typically then blindly go to edit the copied file, and only realize a bit later that Eclipse didn&#8217;t automatically open the copied file, but rather left me at the editor for the old file.  Thus, I&#8217;ve been editing the file I&#8217;m copying from, not the one I want to edit.  </p>
<p>I couldn&#8217;t count how many times I&#8217;ve done this, but I&#8217;m *starting* to get smart to it and check which file I&#8217;m on before I start.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver Mason</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-232</link>
		<dc:creator>Oliver Mason</dc:creator>
		<pubDate>Sat, 04 Mar 2006 21:54:41 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-232</guid>
		<description>I find that particular problematic with resource files which are either in the current working directory, in a special resource directory, or in the classpath (using Java).  Often there are different versions, and you are guaranteed to edit the wrong one.  The problem then is that it's a data file which cannot print off it's location, as it is read in by some class which you might not even have direct access to...

Or compiling a file and having the class-file in the wrong place so that you edit the right file, but execute the wrong one.

Perhaps you could have a FileReader class debug version which prints every filename it opens, which in the production version is disabled.  Doesn't help with classpath-searches though :(</description>
		<content:encoded><![CDATA[<p>I find that particular problematic with resource files which are either in the current working directory, in a special resource directory, or in the classpath (using Java).  Often there are different versions, and you are guaranteed to edit the wrong one.  The problem then is that it&#8217;s a data file which cannot print off it&#8217;s location, as it is read in by some class which you might not even have direct access to&#8230;</p>
<p>Or compiling a file and having the class-file in the wrong place so that you edit the right file, but execute the wrong one.</p>
<p>Perhaps you could have a FileReader class debug version which prints every filename it opens, which in the production version is disabled.  Doesn&#8217;t help with classpath-searches though <img src='http://cafe.elharo.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Persnickety</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-231</link>
		<dc:creator>Persnickety</dc:creator>
		<pubDate>Sat, 04 Mar 2006 15:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-231</guid>
		<description>"Like each piece of the output had a super-tooltip that could tell you the provenance of the data and the instructions that produced it. Awesome!"

If you would actually be in awe of a tool-tip, well, you need to get out more.</description>
		<content:encoded><![CDATA[<p>&#8220;Like each piece of the output had a super-tooltip that could tell you the provenance of the data and the instructions that produced it. Awesome!&#8221;</p>
<p>If you would actually be in awe of a tool-tip, well, you need to get out more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Blewitt</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-229</link>
		<dc:creator>Alex Blewitt</dc:creator>
		<pubDate>Sat, 04 Mar 2006 09:29:42 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-229</guid>
		<description>You make a good point. I think this falls into two categories:

Different versions of the same file
Different files with the same name

The first is the case where you have a backup file somewhere (and that's the one you're editing). The solution, as you rightly point out, is to only have one copy of a file. Fortunately, that's pretty easy to manage; don't have backup files. Use a version control system (e.g. subversion) instead. That way, your files are always the version control system and there's only one file available. When you've finished with updates (and of course, checked it in!) then delete the file from disk. It's not necessary to keep it around, and you can get it out again afterwards.

More importantly, don't let live systems read from files on the file system; get them out of version control. This might be accomplished by having a version checked out on a regular basis (with a CVS tag so you don't have to use HEAD; I use STABLE, for example). Alternatively, if you're using subversion, you can even mount the version control system via a WebDAV share (simple enough on most Unix operating systems, and to a lesser extent, even 'doze boxes). Of course, you'd want the version control system to be local to the server to make it fast, and this presupposes that you're sending source directly to the server and not needing an intermediary compile step.

Secondly, files with the same name but different projects. This often crops up with generic files (like 'style.css') and you're not sure what you're editing. There seems to be two ways of handling this; either give each project's file its own name (e.g. styleCafeAuLait.org), or have a 'common' set of files that are checked into source control that you pull out into your project. I guess if you're editing in an IDE, one other approach is to close all projects that you aren't working on, which has the effect of not allowing you to edit those files (multiple projects open with '.classpath' will show up in Open Resource in Eclipse, for example). I don't believe the project set filters do that.

If you're doing a lot of development work in Eclipse, you can have separate workspace. I'd recommend that you have a different workspace for each different major project/system that you're working on. That way, when it starts up, you know you're in ~/CafeAuLaitWorkspace instead of ~/CafeConLecheWorkspace and you'll only see projects related to that that you've already checked out.

In a nutshell; version control is probably the way to keep them separate, and use the partitioning mechanisms in your IDE/editor to keep unrelated projects apart (or better still, delete after synchronizing them or close them when you're not working on them). Neither of these will help if you have multiple copies of 'style.css' in the same project though.</description>
		<content:encoded><![CDATA[<p>You make a good point. I think this falls into two categories:</p>
<p>Different versions of the same file<br />
Different files with the same name</p>
<p>The first is the case where you have a backup file somewhere (and that&#8217;s the one you&#8217;re editing). The solution, as you rightly point out, is to only have one copy of a file. Fortunately, that&#8217;s pretty easy to manage; don&#8217;t have backup files. Use a version control system (e.g. subversion) instead. That way, your files are always the version control system and there&#8217;s only one file available. When you&#8217;ve finished with updates (and of course, checked it in!) then delete the file from disk. It&#8217;s not necessary to keep it around, and you can get it out again afterwards.</p>
<p>More importantly, don&#8217;t let live systems read from files on the file system; get them out of version control. This might be accomplished by having a version checked out on a regular basis (with a CVS tag so you don&#8217;t have to use HEAD; I use STABLE, for example). Alternatively, if you&#8217;re using subversion, you can even mount the version control system via a WebDAV share (simple enough on most Unix operating systems, and to a lesser extent, even &#8216;doze boxes). Of course, you&#8217;d want the version control system to be local to the server to make it fast, and this presupposes that you&#8217;re sending source directly to the server and not needing an intermediary compile step.</p>
<p>Secondly, files with the same name but different projects. This often crops up with generic files (like &#8217;style.css&#8217;) and you&#8217;re not sure what you&#8217;re editing. There seems to be two ways of handling this; either give each project&#8217;s file its own name (e.g. styleCafeAuLait.org), or have a &#8216;common&#8217; set of files that are checked into source control that you pull out into your project. I guess if you&#8217;re editing in an IDE, one other approach is to close all projects that you aren&#8217;t working on, which has the effect of not allowing you to edit those files (multiple projects open with &#8216;.classpath&#8217; will show up in Open Resource in Eclipse, for example). I don&#8217;t believe the project set filters do that.</p>
<p>If you&#8217;re doing a lot of development work in Eclipse, you can have separate workspace. I&#8217;d recommend that you have a different workspace for each different major project/system that you&#8217;re working on. That way, when it starts up, you know you&#8217;re in ~/CafeAuLaitWorkspace instead of ~/CafeConLecheWorkspace and you&#8217;ll only see projects related to that that you&#8217;ve already checked out.</p>
<p>In a nutshell; version control is probably the way to keep them separate, and use the partitioning mechanisms in your IDE/editor to keep unrelated projects apart (or better still, delete after synchronizing them or close them when you&#8217;re not working on them). Neither of these will help if you have multiple copies of &#8217;style.css&#8217; in the same project though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-228</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Sat, 04 Mar 2006 02:45:11 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-228</guid>
		<description>sorry for the dupe - I didn't escape the &#60;pointy brackets&#62; in the first post.

gnu emacs (and other emacsen?) offers some help in preventing this problem: files of the same name are suffixed with &#60;n&#62; according to the order they were opened. This is almost an effective solution for me ... except the original file name is not updated to include a &#60;1&#62; suffix. So when editing the original file there's no indication its one of a bunch.

I wish new IDE's would adopt this convention including a &#60;1&#62; suffix for the original file when needed.</description>
		<content:encoded><![CDATA[<p>sorry for the dupe - I didn&#8217;t escape the &lt;pointy brackets&gt; in the first post.</p>
<p>gnu emacs (and other emacsen?) offers some help in preventing this problem: files of the same name are suffixed with &lt;n&gt; according to the order they were opened. This is almost an effective solution for me &#8230; except the original file name is not updated to include a &lt;1&gt; suffix. So when editing the original file there&#8217;s no indication its one of a bunch.</p>
<p>I wish new IDE&#8217;s would adopt this convention including a &lt;1&gt; suffix for the original file when needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-227</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Sat, 04 Mar 2006 02:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-227</guid>
		<description>gnu emacs (and other emacsen?) offers some help in preventing this problem: files of the same name are suffixed with  according to the order they were opened. This is almost an effective solution for me ... except the original file name is not updated to include a  suffix. So when editing the original file there's no indication its one of a bunch.

I wish new IDE's would adopt this convention including a  suffix for the original file when needed.</description>
		<content:encoded><![CDATA[<p>gnu emacs (and other emacsen?) offers some help in preventing this problem: files of the same name are suffixed with  according to the order they were opened. This is almost an effective solution for me &#8230; except the original file name is not updated to include a  suffix. So when editing the original file there&#8217;s no indication its one of a bunch.</p>
<p>I wish new IDE&#8217;s would adopt this convention including a  suffix for the original file when needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen</title>
		<link>http://cafe.elharo.com/blogroll/the-nastiest-bug/#comment-226</link>
		<dc:creator>Stephen</dc:creator>
		<pubDate>Sat, 04 Mar 2006 00:28:40 +0000</pubDate>
		<guid isPermaLink="false">http://minicafe.elharo.com/java/the-nastiest-bug/#comment-226</guid>
		<description>The main reason I see for this is editors insist on only showing the short form of the filename, not the full path.  The bug is (more) obvious if you can see the full file name with path.

I've had a bit better luck with this bug in Eclipse when "sync editor with navigator" is on.  When you're editing the version from your build directory (doh!), it doesn't have the right icon in the navigator.  It's subtle, though.  It'd be nice if there was a line right below the editor tabs that showed the full path of the file you're editing, instead of having to hover over the tab, or a warning "you're editing a file that isn't on your source path... Are you sure?"</description>
		<content:encoded><![CDATA[<p>The main reason I see for this is editors insist on only showing the short form of the filename, not the full path.  The bug is (more) obvious if you can see the full file name with path.</p>
<p>I&#8217;ve had a bit better luck with this bug in Eclipse when &#8220;sync editor with navigator&#8221; is on.  When you&#8217;re editing the version from your build directory (doh!), it doesn&#8217;t have the right icon in the navigator.  It&#8217;s subtle, though.  It&#8217;d be nice if there was a line right below the editor tabs that showed the full path of the file you&#8217;re editing, instead of having to hover over the tab, or a warning &#8220;you&#8217;re editing a file that isn&#8217;t on your source path&#8230; Are you sure?&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
