It seems, especially in the light of @Yuichiro answer, that it makes sense for me to share here with you my original constant weight codes, which I have discovered in 1977-78 but just absolutely couldn't believe that they were not known. Only years later I got clear evidence that they were still unknown to the public (only then I posted them on pl.sci.matematyka, and I informed about them Neil Sloan and his co-maintainer of the ECC tables--both worked at Bell Labs at the time; I didn't get any feedback from them though). My construction mostly doesn't care about the finiteness. Let $K$ be an arbitrary field, let $L$ be an arbitrary proper subfield of $K$. Let $P(K)\ \ P(L)$ be their projective lines (1-dim projective spaces); we may assume that $P(L)\subset P(K)$ -- it's a harmless abuse. Let $G\ H$ be the projective groups of $P(K)\ P(L)$ respectively. Let $\Gamma := \Gamma(K\ L)$ be the family of all images of $P(L)$ under the projective maps from $G$: $$\Gamma := \{f(P(L)) : f\in P(K)\}$$ That's it. We may call the members of $\Gamma$ to be circles. For every three different points $x\ y\ z\in P(K)$ there exists **exactly one** circle which contains all three of them. When $K$ is a **finite** field then $\Gamma$ is the best possible (even ***perfect*** or similar terminology) constant-weight code--instead of considering the binary sequences we deal equivalently with subsets of $P(K)$, or here simply with circles. Let's say that $|K|=p^n$ and $|L|=p^m$, where $p$ is a prime, and $0 < m < n$ are two natural numbers. Thus $w:=p^m+1$, while @sams' $n$ is $p^n+1$ here (sorry for that). The minimal distance between the codes is $a := 2\cdot (p^m-1)$. And that's what is important for the standard theory, while the maximal distance between the codes is $b:=2\cdot (p^m+1) = a+4$. Of course $$|\Gamma|\ \ =\ \ \frac{\binom \nu 3}{\binom \mu 3}$$ where $$\nu := p^n+1\qquad\quad \mu=p^m+1$$ The property of circles (exactly one circle passing through any three different points) follows from the exact 3-transitivity of $G$, and the identification $H\subset G$. Edit: I rushed. Of course $p^n$ must be a power of $p^m$, i.e. $n$ must be a multiple of $m$.