Let $p$ be an odd prime and $zeta_p$ be a primitive pth root of unity over $smallBbbQ$. The Galois group $G$ of $K:=smallBbbQ(zeta_p)$ over $smallBbbQ$ is a cyclic group of order $p-1$. The integral group ring $smallBbbZ[G]$ contains the Stickelberger ideal $S_p$ which annihilates the ideal class group of $K$. In this paper we investigate the parameters of cyclic codes $S_p(q)$ obtained as reductions of $S_p$ modulo primes $q$ which we call Stickelberger codes. In particular, we show that the dimension of $S_p(p)$ is related to the index of irregularity of p, i.e., the number of Bernoulli numbers $B_2k$, $1le kle (p-3)/2$, which are divisible by $p$. We then develop methods to compute the generator polynomial of $S_p(p)$. This gives rise to a new algorithm for the computation of the index of irregularity of a prime. As an application we show that 20,001,301 is regular. This significantly improves a previous record of 8,388,019 on the largest explicitly known regular prime