Case sensitivity is one of the best examples of how programmers expect people to conform to the computer rather then having the computer conform to people. We are human, we make mistakes and we are forgiving in the way we communicate. My name is Gregory but I also go by Greg and sometimes respond to ‘Hey You.’
But Linux/Unix isn’t forgiving, if I want Test.txt, this isn’t the same as test.txt and it’s completely different from TEST.txt.
Why?
The primary reason is that programmers in the late 1960′s & 70′s for C and Unix decided to optimize the compilers and parsers. At the time computers were much slower and it was faster to compare identical strings rather then normalizing the upper/lower case of the strings. Back in 1969 when there were was no such thing as personal computers this optimization made a lot of sense.
Fast forward to today as someone is tying a URL into a web-browser. It doesn’t work. Why? Because the web browser passes the exact case of the web file to the web-server, the web-server is Apache and runs on a Linux server that cares about cases because almost 30 years ago comparing cases took a little extra effort. Today this type of upper/lower case comparison is trivially quick.
But what’s really amazing is that in all those years developers have refused to change this. Some even think of this as a ‘feature.’ This is really stupid, it causes a ton of problems and there is no longer any good reason to have case sensitivity in an OS.
Computers are meant to be used by people, and people make misTakes.
I think your point is valid, although stated way too broadly.
Case-sensitivity IS a feature that we should have the option of taking advantage of (more identifier names, optimized performance, etc).
However, when it comes to users, it becomes a problem. Searches should ignore case. URLs should probably also follow the same precedent. But just like how we have to code searches to handle miss-spellings, synonyms and related words, it isn’t unreasonable to have to code to specify ignoring case (even if it is just a configuration setting).
Where do you draw the like between sequences of characters and text typed by humans ? searches should definitely be as easy as possible in this respect, otherwise, the “more identifier names” argument counts for me, apart from it not being a problem UNLESS people start pressing shift when they don’t have to.
case sensitivity is found in most modern programming languages, where it helps create a unified look of commands. whILe, while and WHILE look different, just saying “while” creates a regular look and strains the little finger least.
Then, HOW could one have changed the rule ? The feature has been in place for over 30 years, and has logically been used. Ripping this rule out of UNIX would have broken half the system, avoiding it in GNU would have broken compatibility.
DOS DESIGNERS MUST have in part LOVED CAPS lock.
Programming languages can be case sensative but if they are they should use things like red spelling squiggles to highlight terms not in the correct case.
To preserve the current code but make it easier for people you simply prevent users from choosing filenames that already exist. You also set the OS to always return files in a consistent way for legacy applications.
When windows moved from 3.1 to 95 they used a similar trick for older applications. Older apps that didn’t recognize long filenames would get back things like c:\progra~1\ while new applications could understand “c:\program files.”
This isn’t rocket science. Both Windows and OSX are not case sensitive.
Panther includes Case-sensitive HFS as a potential file system.
Could someone clarify case-sensitivity for URLs?
Is it the Unix/Linux O/S that is case sensitive, or the WebServer?
For example if I run Apache on a Windows server, will I have to watchout for case?
It’s the OS. If you run Apache on a Windows server it will not be case sensitive. From what I understand there is also an option in Apache to turn off case sensitivity in general.
I hope you don’t mind that this is a really late comment, however, I’ve configured my Linux installation to be very case insensitive.
The file system is all case insensitive, and so is all readline-applications (auto-completion in bash etc).
The file system I use is JFS with -O passed to jfs_mkfs. Works like a charm. But I do get a lot of Linux fanboys running after me with pitchforks calling me a “Windows wannabe”
(same thing as above about the “really late comment”)
I totally agree with the original post.
I’d love that whether the file system is case sensitive or not, it should be just an option we could choose at run-time (I say this, but I haven’t even checked).
Those who say that a case-sensitive language is great because it allow many more identifier names are (in my opinion) too lazy to type more expressive names.
Speaking of modern languages, Ada (83, 95 and now 2005) is case insensitive, but a correct environment keeps a good visual : ada-mode in emacs (!) has a function called ada-adjust-case : the name of procedures and functions are lowercased, the variables are capitalized (only the first letter is upcased), and you can configure the mode to keep some fixed identifiers entirely upcased (awfully for traditionalists, a constant’s name is only capitalized, not upcased)
Of course, I don’t say that commands’ parameters should be insensitive …
Great remarks. Where is the solution or workaround. I have a client that wants to make it easier for users to remember their names by breaking up the URL strings with Upper Lower type. Example: MyNewWebsite.com/ProductCatalog
Their IT dept is satisfied by saying the server canʻt do it. The end.
So, is there some prefernce or script that will allow the apache server to ignore case at directory levels?
Actually something like photo.jpg will be different from photo.JPG.
this one is easier to overlook
BOTH will be identified as a JPEG file, but they will be different files
@Ken – Load Apache’s mod_speling (sic) module and say “CheckSpelling on”.
See http://httpd.apache.org/docs/2.0/mod/mod_speling.html
Another late comment, but want to chime in.
A) URL’s should not be case sensitive because the DNS name is not. http://www.LINUX.org and http://www.linUX.orG are the same thing. So why should what comes after these follow a different set of rules. This is inconsistent. Apache shouldn’t need a mod it should just be case insensitive. I wonder if any of the various “web” RFC say anything about it.
B) Devlopment languages and the File system are two different things. If you refer to a .SO or .DLL or whatever file in your code you should use case sensitivity for good measure. If you have a variable name case sensitivity is usually a good thing because it makes the code “cleaner”. Of course this is preference. I’ve used langauges that do it both ways…honestly it never seems to be that big of a deal. Using “IF” instead of “if” or “iF” is just silly. That is a keyword in the programming langauge…I’m not asking if “IF” exists…I know it does. When I open a file with “Test.txt” or “test.txt” I’m asking for the “test.txt” file…not some sort of programming language construct.
C) To this day I’ve never had anyone be able to give me a good example of why a directory would have two files of the same “name”, but with different case sensitivities. ie. a folder/directory with c:\test.txt and also c:\Test.txt. This seems like it would only cause confusion.
D) Interopability – Like it or not Windows is case insensitive. *nux is typically not. Porting applications then becomes and issue. In order for both systems to be able to talk effectively one has to change. Changing windows breaks current functionality. Changing it in Linux does not because everything was already using the correct sensitivity. The only thing that would break is if a folder had two files of the same name like in point C). If we don’t actually have a reasonable use case for c), then Linux/Unix should change. Give the option today and then make it the default later. I would love some explanation as to why ripping out case sensitivity will break “half the system” in *nix.
E) *nix is being lazy not windows – I’ve heard that the *nix crowd actually thinks Windows is doing less by ignoring case. This usually comes from non developer types of admins. This is just not the case and should realize that *nix is actually the one with less functionality.
F) How much time has been wasted on this issue. *nix crowd seems have problems admitting when their system is less optimal then others muddling the water with programming and what not. Is it an inferiority complex or something? Is your hatred of all things MS so great? Swallow the pride pill and get over it. I think it is the same crowd that thinks their grandma should learn how to use VI.
Please answer either “yes” or “no” to the following questions:
— Is it reasonable to assume that someone who is a programmer is no longer a human?
— Do you want to obscure your files so that nobody can tell them apart?
— Have you named every dog you’ve owned “spot”?
— Do you think that your operating system will break if they make a long-overdue improvement to it? (Exclude all Microsoft software from consideration) =\
— Is it your life’s goal to prove that doing a case-sensitive sort is faster than a case-insensitive sort?
— When you meet someone new, and he says his name is Greg, do you ask him if either of the G’s are uppercase?
— Do you think that working with files and directories is SO easy that you need to add something to make it harder?
— If you are forced to smell a decomposing fish, and asked to describe the smell, do you try to think of what foods it might smell like?
— Do you think it’s not possible to write a case-ambivalent program if your programming language is case-sensitive?
— You won $2,000 from Publisher’s Clearinghouse. The check comes by Fedex, in the afternoon, when the wind is blowing south. If the company’s name was in all caps, should you refuse the package? (careful, this is a trick question…
— Do you have 3 daughters, named susan, Susan, and SUSAN, so that there might be some names left when you have your next 2 or 3 susans?)
— Do you limit all your symbols to 6 characters so that it will assemble faster, uses less memory, and will be compatible with assemblers written in the 70′s? (Oh wait, using all numbers is even better!)
— Do you still write source code that is no wider than 80 characters?
— If your computer asked you to take it on vacation in Barbados, would you?
If you answered “yes” to at least half of the above questions, you deserve a case-sensitive O/S and file-system.
I hope those weren’t too offensive to anyone, but it pretty much sums up all my experiences discussing this issue with the “sensitive” side. :p
A final thought… I am designing my own programming language. It will be going a step farther… Not only will it be case-insensitive, it will also be underscore-blind. If you think about it, underscores in identifiers are meant for readability (as is CamelCase). They are another instance of varying how you write a name, without making any real change in its meaning. Yes, case-following is also the way to go. Real-time if the editor’s hooked up with the compiler, or as a step in building. And actually… If a language is case-following and the source has been all “synchronized”, then your compile can case_sensitive names. So the “decoration ignorance” is not actually in the compiler, it’s a function of the IDE or utility run just before building.
So for example… if someone on your team mentions the function “get time”, you could type it in as gettime, GetTime, get_time, GET_TIME, etc. There’s no need to distinguish between all of those, because they all have the same meaning and are pronounced the same.
Thanks for taking my survey :0)
“CapitalGee-ood morning, CapitalGee-reg,”
-Well, maybe human speech should be case-sensitive too…
Just recently I created a virtual machine in VMWare/Linux, called (e.g.) VirtualMachine. I had already created a folder /home/virtualmachine for it. The result was that the VM was created in the virtualmachine folder, BUT the virtual disk was automatically created in a duplicate folder called VirtualMachine. This was an totally unexpected result, and an extremely undesirable situation, since a backup of the /home/virtualmachine folder would be minus the virtual disk.
Thus, case-sensitivity is more than just a nuisance, it can defeat your backup strategy and lead to a mission-critical loss of data. It doesn’t require human error to fall foul of this either, as seen here it can result from unexpected interactions between naming of objects.
Linux has a lot to commend it as an OS, except for this one piece of 1950′s awfulness. If they’d get rid of the case-sensitive filesystem it would be a truly great OS.
Thanks for the blog. The *nix community’s stance on case sensitivity has always been that it’s hands down a good thing, when the truth is that only case preservation is good, while case sensitivity is, by *all* means, bad
I don’t know of any application I’ve used in the last year that was case sensitive besides the NIX boxes that host a particular site at work and freakin NIX boxes on the web.
Who, seriously, are the individuals who defend this “preference”? It seems like quite a silly thing to stand behind. It must cause countless headaches when your average user has no idea why it is happening. That is the paramount issue with programmers who don’t code for people but rather code for their own principles.
I think it is that type of self-absorbed thinking that kept those operating systems from becoming more widely accepted. (Think Ubuntu or Vector – I realize linux is used EVERYWHERE in the business sector prob just because it’s free) It also causes people to overlook any benefits or qualities of the system simply because the developers can’t get their heads out of their asses long enough to ask their mother to use it for a day and see why she can’t stand it.
Phew.
In absolute agreement, ‘nix case sensitivty is not only a hassle for website end users (mistyping a URL), but also for developers.
Do I want to be forced into lowercasing all filenames and directories? No, not at all, but it’s the easiest way to deal with this ridiculous OS “feature” (read: handicap)
When I test in Windoze and OSX, no problem, can have /ExampleDir and code files as EasyToReadClassName.ext
Squinting to read through a directory with all lcased class files is a pain, but c’est la vie, ‘nix is free after all.
Anders idea of mounting the file system case sensitive is a good one.
The programming language is case sensitive. Great. The FILESYSTEM should NOT be case sensitive, period. Why? Because the real-world, the usability, the English language of NAMES and oh, did I mention USABILITY and the real world are NOT case sensitive. John Whatever Smith and jOHN wHATEVER sMiTh are *NOT* two different people. Come on.
I hate to tell you this, but “Polish” and “polish” are two different things.
Mark, of course they are not the same thing. I’m not saying we shouldn’t have upper and lower case files and file names. I am saying that the OS should allow you to type the wrong case and still find the file.
I’ve heard both side to this argument over the years. I think that many people underestimate how hard it is to get computers to understand human language. Case sensitivity is a western concept, and is not common to all languages. Even the term “uppercase” and “lowercase” stem from printing standards that date back just six hundred years. The ancient civilizations didn’t have capital letters, and many languages don’t have the concept either.
It should make people feel better to know that file systems are already an antiquated technology anyway. Storing “documents” in “folders” was an inexact model which arrived to give more flexibility to the systems and help the non-technical user to understand what was being asked of them. It’s on it’s way out.
The answer to the URL case sensitivity is that no one is supposed to be typing them in. If you are typing them in and you not using a search engine or index, you’re working too hard.
Computer is much more far from people than you think. Only previous knowledge lets us operate with GUI, press buttons and checkboxes, etc., although we think it is very easy and should be understood by anyone (try to explain it some1 who havent experience with PCs, will be shocked by “dumbness”).
Now, why case sensitive is better. Simply because it reflects basic computer paradigm: each letter, digit, special symbol is different character. If people will get used to this (in my opinion, very simple) idea, they will get a very big step closer to PC. It pays off to get closer to PC IF it is easy. In this case it is easy. In other words, it important thinking habit. If someone is totally unhappy with Unix style filenames, use other OS. Or use ciopfs. But don’t touch fundamentals.
You assume that case insensitivity is easy because you speak English. If you speak other languages, you would realize that case insensitivity is hard. What happens when I have “heße.txt” on my hard drive but I type in the capitalized “HESSE.TXT”? Is Bjork the same as Björk? (Hint: depends on the language.) Unix was always designed for people who knew what they were doing, people who like case sensitive systems. And if you run a web site, you can just correct the URL’s spelling with a redirect (Apache’s mod_spelling). What a waste of hot air.
You know, a bit of advice I’ve heard a few times is that the best way to get into a good computer sciences programme at university is to have good English marks; being great at maths and sciences often isn’t enough. Most businesses consider good English and communication skills a lot more important than a lot of hackers seem to think they are, and it really shows. Guys, come on, I know this is shocking, but English /is/ case sensitive. Sure you can look at “jOHN wHATEVER sMiTh” and know that it’s more or less equivalent to “John Whatever Smith,” but if you know what you’re doing, you’d also be able to immediately tell that the former is definitely wrong, in the context of the English language. It’s just as incorrect as “john whatever smith.” UNIX has always been for people who knew what they were doing, or who would at least bother to learn how.
Another late commenter here.
I am currently trying to learn Linux, and one of the major problems I have with it is simply that much of it requires “Do this exactly or else it all fails with a cryptic message that tells you nothing.”
I installed fedora 14 in a virtualbox machine, then tried to install the additions by hand.
After mounting the cdrom by hand, I guess the gui normally does it, I tried,
vboxlinuxadditions.run
and was told file not found.
After some googling I discovered that the current directory is not included in the list of places a command can be, ‘In the $PATH$’ I found out, so period slash
./vboxlinuxadditions.run and no difference. I eventually found
./VBoxLinuxAdditions.run after capping words for a while and it finally worked.
Why in the name of sanity would you need case sensitivity in filenames?
Is there some mystic pattern to what is capped and what is not?
You want to know why Linux is not used by the general populace?
Simple, it doesn’t communicate like we do.
You want more people to use it, simple, make it more friendly.
I’m not talking about eye candy, them ore they add, the harder the computers get to use, the latest windows, Vista,7,8 are a travesty.
I own my computer, quit trying to hide it from me, quit trying to make me ask permission to use my own computer.
Same with Linux, quit making it obscure.
How is a windows user going to learn about it, when you can’t even expand out and explore the kernel source code on a windows machine.
Without the ability to explore by dipping your toes in, your only choice is whole body plunge, and then you type the command and nothing happens even though you type it exactly as it showed up in the file listing.
Linux is unfriendly to the new user, and case sensitivity just makes it worse.
I am also trying to learn C/C++, and after examining a few dozen program source trees I can tell you, there is my own opinion, no real pattern to what people will capitalize or how.
I have seen, index, Index, InDex, InDeX and INDEX, all used it the same program.
I have also seen places where every word in variable name is capped, and others where it is only the major words, the fillers are all lower case.
I prefer pascal and basic, index is also index is also InDex etc, designed for HUMAN readability.
Computers exist to work for us, try to keep that in mind.
Sorry for the length, I have to go explore Fedora command line now.
Use things for what they were meant for, don’t force humans to conform to IT rules or start using ASSEMBLY/HEX because it’s closer to “metal” !
UPPER CASE Latin characters were not used for written language in the past (a good example is the Latin Bible called Vulgate, translated from old Greek in the 4-th century) but i have seen only UPPER CASE letters on roman monuments probably because they were easier to carve, anyone can easily verify this.
People write mostly using lower case and only the first letter of a sentence or a person’s name is typically Uppercased to make it easy to spot where a sentence begins or if a word in that sentence is important, it’s only purpose is a decorative one, it doesn’t give a different meaning, it just looks bad if used wrongly.
It doesn’t make sense to have a case sensitive file system because most people assume that: “The Great Flood.avi” and “The great flood.avi” mean the same thing.
The thing that makes most people angry is pure hypocrisy of egotistical IT purists that want Linux for themselves and usually hate Ubuntu(and others) for being over-hyped (read friendly). This hypocrisy I’m writing about can easily be confirmed by the fact that most Unix commands are only written in lower-case which kinda makes Unix and Linux 99% lower-cased because most developers are afraid to even use case since this might cause confusion to fellow developers and they might not use that application for this reason alone.
It’s not the developer’s “divine” mission to force people into not making mistakes by paying the high price of having DSCF4326,JPG and dscf4326.jpg because of some silly mistake which might have been caused by the stupid import application.
OSX is based on Unix but it doesn’t enforce case-sensitivity on users.
Programming languages like SQL, Object Pascal(Delphi/FPC), ADA don’t encourage developers to have a variable “pig”, a constant “PIG” and a function or type “Pig”, these programming languages are related to pseudo-code which many of us learned before programming use Pig for types, GetPig for functions, MyPig, Pig1, or some other less confusing convention, it even makes more sense to use prefixes/suffixes, because newer concepts were introduced in case-sensitive languages they even started using prefixes such as “I” for interfaces which proves that you only have 3 extra ways to distinguish words with case-sensitivity.
Also one of the most horrible things in programming is the underscore symbol which looks ugly and makes code very difficult to read if all functions and variables use this style, you will have a hard time distinguishing underscore from space because underscore is not a character, it should only be used as a primitive method for underlining in simple text files.
Conclusion: Case preservation is great, case-sensitivity is an abomination and MUST be terminated because it’s not natural.