Depends on who the paper is for. Theoretical CS papers for example, often don't have any code, but sometimes have pseudocode (for example in page 4 of PRIMES is in P [0]), to describe their algorithms. If the paper is written for people with less math background then writing up the algorithm in at least once language as a sample implementation is the way to go.
Also there's nothing wrong with doing both?
[0]: https://annals.math.princeton.edu/wp-content/uploads/annals-...