First off, if this is your first pistol, I'd go with a 9mm. The key to learning to shoot a pistol well is practice, practice, and more practice. The 9mm ammo will cost less and be less tiring on the hands, therefore encouraging long practice sessions. Given the choices you listed, I would recommend the Ruger over the S&W. Politics aside, S&W autos are junk. However, for about $375-400 you can buy a nice, used Glock 17 or 19. Glocks and H&Ks are the finest autopistols made. I was at a local shop yesterday and they had several good condition used Glock 9mms for $400 or a little less. The Beretta 92FS is a good first gun, but they seem to run more money for used ones.
So, depending on where in NYS you live, I'd be happy to offer some suggestions. E-mail me if you'd like.
Anyway, if you're considering buying a S&W or Ruger for around $400 or so, get a Glock 17/19.