QuoteSo the question: is it a bad practice that I don't use glGetAttributeLocation?
It's bad practice that you don't assign explicit location layout qualifiers for your vertex inputs/attributes in your GLSL shaders.
For example: If you at some point want to migrate to Vulkan GLSL, then it becomes even _mandatory_ to explicitly specify the location layout qualifier for every vertex attribute.
See section "4.4.1. Input Layout Qualifiers" of the GLSL 4.60 specification about that.
QuoteWould it be a better idea to rewrite the VAO code to find attribute locations from shaders, or is it fine to just specify for every vertex shader attribute a layout(location = ...)?
Usually, shaders and vertex specification (VAO) go hand in hand. You can't author one without knowing about the other, at least if you don't employ some name-based conventions with GLSL reflection.
So, the best thing would be to explicitly assign location layout qualifiers within your GLSL shaders.
If you don't want to do that, you can, like you said, use https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGetAttribLocation.xhtml to find out the locations by name.
Last but not least there is also https://registry.khronos.org/OpenGL-Refpages/gl4/html/glBindAttribLocation.xhtml which you can use to explicitly set the attribute locations by name via the OpenGL API / your host program before linking the shader program.