I actually just bought a brand spankin' new Glock 17 Gen 5 today.
There was a time when I was disdainful towards just about any polymer framed pistols, but especially Glocks. They were ugly, had a weird grip angle that I didn't like, and their frame was made of plastic.
However, my opinion of polymer framed pistols changed once I got a Ruger LCP because I needed something ultra lightweight and extremely concealable for Summer Carry. From there I bought a like new S&W Sigma SW40VE (a Glock 23 clone) which I found at my LGS for a mere $199, and that gun changed my opinion of Glocks.
Today I was at my LGS to pick up a Tokarev TTC I ordered online and when I saw a brand new Glock 17 Gen 5 in the case for $539, I decided to buy it because my brother has always been into them and I wanted to see how it compared to my Sigma. Based on first impressions, the grip angle isn't as nice as the Sigma, but it's nowhere near as bad as I expected based on what folks say. In fact, it felt pretty good in my hand with the default backstrap, I have to say. That being said, the fit, finish, and trigger are all much nicer than the Sigma, but that's no big surprise given that the SW40VE is a budget-priced pistol which even brand new ran a good $200 south of the Glock.
It ain't pretty by conventional aesthetic standards, but there is a sort of charm in its simplistic appearance that I can't really explain, so I feel that calling it "ugly" is a gross overstatement. Truthfully, its appearance is so simplistic that it ought to be considered objectively innocuous. To me, ugly is something like the H&K VP9, or better yet, a Hi-Point C9. Glocks are just plain, not ugly. Heck, it's downright beautiful compared to certain historical firearms which as so hideous, so abhorrent, so aesthetically terrible that I strongly recommend that you pour yourself a stiff drink like Whiskey or at least a strong non-alcoholic beverage like Dr. Pepper before you Google Image them.
Ready? If you think that Glocks are ugly, then look up the LeMat Cartridge Revolver, (not to be confused with the standard cap & ball LeMat Revolver) the Dardick Pistol, and the MBA Gyrojet Pistol. Still think Glocks are ugly?