The key to programming is logical thinking rather than mathematical skills; minimal math is required for web development, focusing more on CSS, incrementing numbers, and IDs. Data science, on the other hand, requires a bit more math than web development, though still less than perceived by many. Logical thinking takes precedence over extensive mathematical knowledge in both programming and data science.