When I worked on NeWS at Sun, we had very strict rules about PostScript coding practices, formatting, documentation, function and stack comments, naming conventions, object oriented programming techniques, etc.
I don't have a copy of the coding practices written down any more, but here are some examples:
I wrote pizzatool at Sun, as a programming example to show how to use the NeWS toolkit, so it was well commented and intended to be read by developers learning NeWS:
http://www.donhopkins.com/home/code/pizzatool.ps.txt
http://www.art.net/~hopkins/Don/images/pizzatool.gif
Here's a typical NeWS user interface widget that I wrote at Sun following the NeWS coding practices, including the OPEN LOOK slider and menu:
http://www.donhopkins.com/home/code/slider.ps.txt
http://www.donhopkins.com/home/code/menu.ps.txt
http://www.art.net/~hopkins/Don/images/tnt.gif
This is older code I wrote on my own before working at Sun, so it's not as rigorously formatted or well documented:
http://www.donhopkins.com/home/code/piemenu.ps.txt
http://www.donhopkins.com/home/code/term.ps.txt
And here's a huge file of messy PostScript code I wrote, with a warning at the beginning about how ugly it is:
http://www.donhopkins.com/home/code/litecyber.ps.txt
And here's some really old NeWS code written by James Gosling:
http://www.donhopkins.com/home/code/lander.ps.txt