I was in Finder and I couldn't work out why checking the preference "Show all filename extensions" wasn't working.
When you uncheck "Show all filename extensions", the extension will be displayed depending on the "Hide Extension" setting of each file.
When you check "Show all filename extensions", the extension will be shown, even if "Hide Extension" has been checked.
However, the extension of a particular file was not displayed, even though "Show all filename extensions" had been checked.
I realised that it was because I was in "All My Files" which is apparently not affected by "Show all filename extensions".
Display of the extension in "All My Files" will be determined by the "Hide Extension" setting.
When you create a new file, "Hide Extension" will be checked by default. I couldn't find whether you can change it to show the file extension by default.