TITLE: A question about optimal codes
QUESTION [5 upvotes]: Recall that a code attaining any bound is called an optimal code. Is the dual code of an optimal code also an optimal code?

REPLY [6 votes]: It depends on the bound and on the code - A code is said to be optimal with respect to a particular bound. 
For example, the dual of a linear MDS code is another linear MDS code, so the dual and the original linear code both meet the singleton bound (recall a MDS code is one which meets the singleton bound and thus is optimal with respect to the singleton bound). This is a standard homework problem. 
On the other hand, look at non-trivial linear codes which meet the Hamming bound (i.e. perfect codes -- which are precisely codes with the parameters of a binary/ternary Golay code or Hamming Code), and you see that the dual codes are not within the respective families - for example, the dual of the [7,4] Hamming code is a simplex code which does not share the parameters with any Golay or Hamming code. The characterization of perfect codes is a result of Van Lint and Tietäväinen - See Macwilliams and Sloane's Theory of Error Correcting Codes, Chapter 6 for more details.