Hello to any who might of decided to at least read this. I'm in the process of learning OpenGL and I' am having so much trouble

. To say the least I'm not happy about my many failures thus far but moving on. I'm trying to use phong shading, and a number of other things, but lets focus on shading. I have been to countless sites and online guides and every single one of them has the same problem. They all throw a bunch of information at me without explaining the code at all.
Here is an example chunk of source code from one such site:
struct gl_LightSourceParameters
{
vec4 ambient; // Aclarri
vec4 diffuse; // Dcli
vec4 specular; // Scli
vec4 position; // Ppli
vec4 halfVector; // Derived: Hi
vec3 spotDirection; // Sdli
float spotExponent; // Srli
float spotCutoff; // Crli
// (range: [0.0,90.0], 180.0)
float spotCosCutoff; // Derived: cos(Crli)
// (range: [1.0,0.0],-1.0)
float constantAttenuation; // K0
float linearAttenuation; // K1
float quadraticAttenuation;// K2
};
uniform gl_LightSourceParameters gl_LightSource[gl_MaxLights];
The above code supposidly has something to do with phong shading in OpenGL. I won't deny that, mostly because I don't know, but the site says nothing about how this code works. Its great that glLightSource[] is a built in array, wonderful

. However, I would like to know how the code works like for instance why is vec4 ambient or vec4 specular in the code; what is their purpose? What is float spotCosCutoff for and whats up with with the 3 floaters on the bottom; what does any of this stuff do

!!! The site, as well as the others I visited, all failed to explain any of the code they used as well as its syntax and I'm sick of it.
Please, those reading this forgive my bad attitude, I just...I'm so tired of trying to learn this stuff and not making any progress

.
Anyway, if there is someone on this forum who can truly help me or give me advice then please do so. If you know of a guide, a good one, send a link. My thanks goes to any who try to help, Thank You

.