I'm a former designer turned programmer, and I couldn't agree more. I was recently tasked with doing some mockup images (no official designer on the team), and at the end, I realized that I could do it so much faster with code.
Ironically, while I was putting the images together (I used Affinity Photo), I remember thinking to myself "Does this thing have some sort of scripting language?".
I still think a sketchpad and a pen is the best way to generate ideas. But, when it comes to mockups, good old HTML and CSS really can't be beat.