wedrifid comments on Tool ideology - Less Wrong

25 Post author: PhilGoetz 09 September 2011 10:37PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (66)

You are viewing a single comment's thread. Show more comments above.

Comment author: wedrifid 13 September 2011 05:37:23PM 0 points [-]

It knows each directory by its content, so it knows when a directory was renamed, without needing to be explicitly told.

Doesn't work so well if the content is 'nothing'.

Comment author: Vladimir_Nesov 13 September 2011 05:57:36PM *  1 point [-]

Git doesn't notice these at all.

Comment author: wedrifid 13 September 2011 06:34:54PM 0 points [-]

Which is my point exactly. It is one aspect of Vi's criticism of git not storing some important data that is clearly valid. It is a tradeoff that probably doesn't matter if you are Linus and you are storing code for a Linux kernel but in other cases it is a blatant flaw that needs to be worked around via compromises or kludges.

Git is the absolute worst version control system out there (except for all the others).

Comment author: thomblake 13 September 2011 08:16:16PM 0 points [-]

In what situations would you want to store an empty directory and pay attention to whether it is renamed?

Comment author: taw 14 September 2011 09:58:31PM 3 points [-]

Empty directories are sometimes necessary and it's a pain in the ass that git cannot store them at all. I had to put almost empty README.txt files in directories like log/ in many projects. It's more a minor annoyance than anything more.

Comment author: vi21maobk9vp 13 September 2011 08:35:03PM 1 point [-]

I have a complex enough deployment helper living in Monotone repository for which it is simpler and more natural to keep a few empty directories in the repository than to check-and-create from each of ten shellscripts. It is checkout-and-use, no other setup makes sense, so "just creating them in Makefile" would be suboptimal.

Comment author: taw 14 September 2011 10:04:26PM 2 points [-]

A single line of:

mkdir -p one/directory two/directory three/more/directories

will deal with it. It's a nice idempotent action. I started using mkdir -p as workaround for git issues, but now it just seems to make far more sense than dicking around manually maintaining working directories.

Comment author: vi21maobk9vp 15 September 2011 05:31:14AM 0 points [-]

I know about "mkdir -p" - my non-problem (I was not going to use Git anyway for this project) is that I multiple places where to put it and if I miss one I will not notice for some time.

Saying that recreating something just in case right after checking out the new version makes more sense than simply storing along with all the rest seems to be exactly an example of tool imposing some workflow ideas on people.

Comment author: taw 15 September 2011 10:11:42AM -1 points [-]

Saying that recreating something just in case right after checking out the new version makes more sense than simply storing along with all the rest seems to be exactly an example of tool imposing some workflow ideas on people.

You have it backwards. Using version control to store working areas for programs rather than programs simply mkdir -ping working areas they need seems to be exactly an example of tool imposing some workflow ideas on people.

I'm mostly serious here.

Comment author: wedrifid 15 September 2011 11:56:17AM 0 points [-]

I'm mostly serious here.

You're mostly wrong. Enough so that I reread your comment 4 times to be sure I was parsing correctly.

Comment author: vi21maobk9vp 16 September 2011 04:06:25AM 0 points [-]

I have two choices, you have one. My tool imposes less workflow ideas here. It's totally information-theoretical.

Comment author: taw 16 September 2011 02:27:07PM -2 points [-]

There are so many common cases where you absolutely need mkdir -p like dynamic working directory layout that it's mentally simpler to just use it always. It works on 100% of problems, is idempotent, and resistant to human errors.

Why would I ever bother with VCS-based solution what only works in some simple cases like static working directory layouts, is based on non-idempotent operations, and fails often in case of human mistakes?

It just creates so much less mental overhead if you simply mkdir -p place where you want to create your files always, no exceptions.

I understand that people who use languages where mkdir -p is a non-trivial operation won't get it, but that's problem with their tools limiting their mindset.

Comment author: wedrifid 14 September 2011 04:43:25AM 0 points [-]

Is that something I need a justification for? My version control system throws away stuff that I am trying store. I'd also prefer it not to throw away files staring with 'b'.

I've learned to make my programs pessimistic and recreate the file system if necessary. It surprised me a few times before I learned the quirks.

Comment author: thomblake 14 September 2011 01:59:46PM 0 points [-]

Is that something I need a justification for?

No, just curious. I have not encountered and could not imagine a use case.

Directories, in my mind, are meta-information about files, so it makes no sense to me to store an empty directory.

Comment author: TheOtherDave 14 September 2011 03:15:41PM 1 point [-]

I may be missing context here, but I frequently create empty directories to guide future filing/sorting behavior.

Comment author: wedrifid 14 September 2011 03:29:40PM 0 points [-]

The examples mentioned so far could be described as meta information about future intended files.