You really can't go wrong with a Glock. I think the biggest reason shooters dislike them are because of the ergonomics, but they'll grow on you if you're not used to them.
My first one was a Gen 3 Glock 22, chambered in .40S&W. I'd never shot a .40, but I figured that if I could become proficient with a larger caliber then shooting a smaller one would be easier more or less. I still have it (my former OC gun) and it now lives on my nightstand, with a 31-round magazine and a light/laser combo attached to the rail.
A good thing about Glocks is that not only are they reliable right out of the box, but there is a plethora of aftermarket parts and accessories you can use with and on them. I've come across a lot of people with the "the best Glock is a stock Glock" mentality, but I'm not one of them. For example, a few things I have on my Gen 4 Glock 22 are a LaserMax laser, 3.5LB trigger, night sights, Pachmayr rubber grip and magpul speed plates on each of the three magazines. Not necessary, but each helps in their own way and serves a useful purpose, especially when I carry it. (everyday)
If you're set on a Glock, or particularly the G17, I'd recommend trying out both the Gen 3 and the Gen 4 models. I am not at all a fan of the grip texture on the Gen 4 Glocks, and if you've been using an older one for awhile the re-designed recoil spring can take some getting used to. Aside from the spring, and the ability to switch the mag release for a left hand shooter, there's not a huge difference between the last two generations. You can buy a police trade-in Gen 3 Glock for as low as $300 on some websites, and those mostly include night sites from what I've seen which is a huge plus. I bought my Gen 3 for about $350 via a private sale, and my Gen 4 for $400 online because it was a police trade in (SPP?).
Sorry for the novel! Hope that helps in some way.