Here is my crazy list of ideas for less buggy web apps:
1) care
2) understanding why a change is made/needed before making it
3) deleting code
4) simplifying and removing unneeded features
Now it's easier than ever to make and maintain your own software, so that might be a better road.