What computer to get for programming (Lenovo ideapad y700 vs Omen 15-AX280ND)?

I'm going to buy a laptop for programming.
I have to chose between a lenovo y700 with an Intel Core i7-6700HQ Processor ( 2.60GHz 2133MHz 6MB ) a 1TB HD + 256 SSD, an NVIDIA GeForce GTX 960M 4GB GDDR5 graphics card and 16GB RAM
or
an Omen laptop with Intel Core i7-7700HQ processor, 8GB RAM, 128 GB SSD + 1 TB HDD memory and the NVIDIA GeForce GTX 1050 (2 GB) graphics card.
which one is better

The 2nd laptop has a faster CPU and GPU, but the GPU isn't going to affect programming at all… Mostly you'll want as fast a CPU as you can afford and you'll want 16 GB of RAM.

Here's a CPU comparision, the 7700 is around 8-9% faster.
http://www.cpu-monkey.com/en/compare_cpu-intel_core_i7_7700hq-690-vs-intel_core_i7_6700hq-573

You could probably buy new RAM chips for the Omen to get 16 GB if you need.

The SSD will come in handy too for improving load and saving times, though I'm not sure how much space you'll end up needing there.