Some Emacs commands that aren't designed specifically for editing programs are useful for that nonetheless.
The Emacs commands that operate on words, sentences and paragraphs are useful for editing code. Most symbols names contain words (see Words), while sentences can be found in strings and comments (see Sentences). As for paragraphs, they are defined in most programming language modes to begin and end at blank lines (see Paragraphs). Therefore, judicious use of blank lines to make the program clearer will also provide useful chunks of text for the paragraph commands to work on. Auto Fill mode, if enabled in a programming language major mode, indents the new lines which it creates.
Apart from Hideshow mode (see Hideshow), another way to selectively display parts of a program is to use the selective display feature (see Selective Display). Programming modes often also support Outline minor mode (see Outline Mode), which can be used with the Foldout package (see Foldout).