For generating dungeon I'd try to proceed this way:
1st step is that you must definitely have a map editor for your game, and within the editor,
maybe it would be good to have a tile/wall/scenery random generator, BUT!!!...
with some constrains - to provide that majority of maps you generate won't be
looking awkward, to make sure the corridors will line up correctly, with the walls and the floor.
This way, you could generate 100 or 200 dungeon maps and then, you'll clean up all of them
from all the things that are redundant from the random generation.
In the gameplay, the randomizer will choose which of the large variety of maps will be loaded.
What do U think?
Even this world is "programmed" by a Creator, the most skilled programmer of us all. What do you think of all that exists and all the environmental phenomena? He that maketh all had programmed it all and whenever needed, He can call one of the functions with input specified by Him.