  Minimal linear codes are in one-to-one correspondence with special types of
blocking sets of projective spaces over a finite field, which are called strong
or cutting blocking sets. In this paper we prove an upper bound on the minimal
length of minimal codes of dimension $k$ over the $q$-element Galois field
which is linear in both $q$ and $k$, hence improve the previous superlinear
bounds. This result determines the minimal length up to a small constant
factor. We also improve the lower and upper bounds on the size of so called
higgledy-piggledy line sets in projective spaces and apply these results to
present improved bounds on the size of covering codes and saturating sets in
projective spaces as well. The contributions rely on geometric and
probabilistic arguments.
