Fog Creek Software
Discussion Board




.cty

How do you decided on file extensions to applications you are working on?

How do you know that someother application developed by someone else doesn't have the same file extension?

In case of CityDesk it is .cty, but if another company in Austria is using the same extension for some other application.

Prakash S
Monday, October 21, 2002

Well, that's one of the disadvantages of the three-letter extension model of file typing.

I'm constantly amazed at the number of developers who use .bin and .img extensions for their proprietary-format files.

The web site http://filext.com/ seems like it might be a useful resource for answering this question.

This is one advantage of systems that support a more sophisticated file type system (think Mac OS or BeOS). Since modern versions of Windows support more than three letters in an extension, I wonder how long it'll be before people commonly use them?

-Mark

Mark Bessey
Monday, October 21, 2002

Thanks, Mark.

http://filext.com/c.htm ,
this links tells me that "CTY  SimCity City File" .  which is why I raised this issue.

Prakash S
Monday, October 21, 2002

In any case, there should be information within the first <small number of> bytes that the application can use to determine whether the file can be processed by it.

Keep in mind that the correspondance of extension to file type is not enforced.

njkayaker
Monday, October 21, 2002

.bin and .img doesn't matter if the files are only for internal use by the program.

It's only if you need your file to be double-clickable in the shell that the extension needs to be unique. Internal data files don't qualify here.

Chris Tavares
Monday, October 21, 2002

Back in the days of Acorn's Archimedes, they had a filetype numbering system (From 0x000 to 0xfff), and if you wanted to release a product you contacted Acorn and applied for a filetype. It's a pity that M$ didn't implement such a scheme.

Mr Jack
Tuesday, October 22, 2002

I think Apple had (have?) something similar with the creator byte. The problem with having a controlling authority is this - who gets .DOC? If Microsoft were in charge (not unresonable, as Windows is their product), they're going to give it to themselves for Word documents, aren't they? In the early days Microsoft were just desperate to get people to write software for Windows, so the idea of controlling file extension usage was a non-starter.

I don't think it's as much a problem now that the Windows shell actually allows multiple programs to be associated with a document type.

John Topley
Tuesday, October 22, 2002

I remember that Apple has something like metadata specifying what app a file is associated with. 

The idea of having a controlling authority dictating file extensions is a dangerous dependency that ensures a platform dies with its company.

Anyway I like the unix concept of extensions.  Otherwise, what happens if an app gets outdated?  There's no sense in such close couplings.

Tj
Tuesday, October 22, 2002

I prefer the Unix style of extensions (there aren't any - "period" is merely another character in a name, and there are not any "associations").

But, then, you cannot double-click a file in "Explorer" and expect a particular result based on "extension".  Of course, I never cared for that either.

I'd say revert to what MSFT ususally does when their first approach becomes limited and conflicting:  Use a GUID instead - no extension conflicts, _guaranteed_.

"file.XXXXXXXXXXXXXXXX"

Where 16 hex digits are the 64 bits of GUIDness happily generated for you by guidgen!

Glad to help.

Nat Ersoz
Tuesday, October 22, 2002

Nat, I'm sure you were joking (I hope).

Man I hate GUIDs. Microsoft assumes they are never exposed to end-users. The problem is, that is not true and we programmers still have to deal with GUIDs.

Like, which is the CityDesk file and which is the Sim City file:

Nate's Stuff.{F9D96557-E1E6-42eb-9F6D-E7A273322623}
Nate's Stuff.{AC3B2627-68AD-4d04-93FC-839B65ED2D97}

The simple solution -- the one that works *most* of the time -- are extensions with human-readable names. I've never understood why longer extensions aren't used in Windows:

Nate's Stuff.simcity
Nate's Stuff.CityDesk Site

Nate
Tuesday, October 22, 2002

Why are we still using only three (alpha numeric) characters as a file extension in the Windows world?

There are already exceptions of that "rule" and at least two examples that come to my mind, that prove the opposite:

index.html
MyApp.class

Both work since Win95 (correct me if I'm wrong).

BM
Wednesday, October 23, 2002

Other examples that come to mind as well are .shtml and .shtm for server side includes in IIS or .wsdl, wsml for SOAP.  Of course with the release of the .Net framework and Visual Studio.Net there are a slew of new file extensions including: .aspx, asmx, .soap, .csproj, .and .vsdisco to name a few.

Garett Chang
Wednesday, October 23, 2002

".and" is just a typo:)

Garett Chang
Wednesday, October 23, 2002

*  Recent Topics

*  Fog Creek Home