Well, this is a bonus shell scripting question, I’d say! I think that the first thing to realize is that the Posix standard for the “sh” shell includes a number of structures and constructs that are still not fully supported in some commercial Unixes (in particular Solaris 9’s default /bin/sh isn’t Posix compliant).
According to Posix’s sh man page, the $( ) notation is valid and legit. Of course, the man page doesn’t explicitly talk about the notation, but an example about half-way down the page shows it in use, in the line: set $(getconf PATH).
That’s not entirely true. The man page might not be complete, but this section on command substitution documents that the sequence $(x) is functionally identical to `x`.
On the same page, the section on arithmetic expansion explains how the $(( )) notation allows for easy access to rudimentary integer arithmetic functionality within a shell script. This is, of course, a good thing because it finally means that the long-used expr command can be retired and many scripts sped up quite a bit.
So in terms of your question about what flavor of /bin/sh the scripts are written in, I’d say “the Posix flavor”. By this point at the end of 2004 there’s not much excuse why the default shell on your Linux or Unix box wouldn’t be completely Posix-compliant.
In terms of references on writing portable scripts, I’d say that your best bet is to familiarize yourself with the Posix standard and make sure that you stick with the commands, parameters and shell functionality detailed therein. There are also some Web sites worth a possible visit in this regard too: Writing Portable Bourne Shell Scripts, Shell Script Portability Guidelines, and What to Watch Out for When Writing Portable Shell Scripts. There’s also a book on the subject, though I haven’t read it so can’t say whether it’s good or not: Portable Shell Programming. It is out of print, so half.com or another used book venue might be a lot cheaper than Amazon’s marketplace.
I hope that helps clarify these issues with the evolution of the Bourne Shell into the world of Posix!