I'm a first-year undergraduate taking computer science and math courses, currently studying data structures in C. Math is starting to make sense to me, even when it takes time, but programming concepts often only click after I translate them into mathematical terms. Linked lists in particular feel arbitrary and frustrating. I'm unsure whether this means I'm better suited to theoretical math than software development. Did anyone else start out this way and eventually enjoy programming or building software? If so, what helped it click? Or is it usually obvious early on whether someone prefers theory or practical software work? I'd appreciate honest advice because I'm considering switching my focus to math.
4 Answers
You may simply be more interested in the theoretical side of computer science. Programming itself involves logic and mathematics, but building software also means interpreting vague human requirements, choosing trade-offs, maintaining code, and dealing with changing systems. Those messy parts aren’t necessarily signs that you’re bad at programming. Math-heavy areas such as algorithms, statistics, cryptography, formal methods, scientific computing, or theoretical computer science could be a good middle ground. You can also study math and use programming as a tool rather than forcing yourself into product-oriented development.
Don’t judge programming entirely from introductory C and data structures. C makes the underlying memory model, pointers, and allocation part of the lesson, so a simple list can feel harder than the actual algorithm deserves. In another language, the same list operations may be much easier to see. Once you understand memory and pointers, C becomes more manageable, but you don’t have to decide your entire future based on struggling with linked lists in a low-level language.
I understood the algorithms much faster in Python. C added a second problem—memory management—before I had fully understood the first one.
Try a programming style that resembles the way you already think. Functional languages such as Haskell emphasize pure functions, immutable data, and composition, while proof-oriented tools such as Lean connect programs with mathematical reasoning. Logic programming or array-oriented languages might also be interesting. A small project can reveal more than coursework: choose something where you care about the result and see whether designing the solution becomes enjoyable once the assignment constraints disappear.
Lambda calculus, algebraic data types, and theorem proving may make data structures feel less arbitrary. Lists can be described mathematically and are closely related to ideas used in functional programming and proofs.
Programming is related to math, but it isn’t identical to solving a math exercise. A mathematical statement describes a relationship, while an imperative program often describes a sequence of actions and changes state. Software also has to deal with performance, interfaces, imperfect input, hardware, users, and requirements that change halfway through the project. Those skills develop through experience, and most developers remain uncertain about design choices. You don’t need to love every language or every software task right away. Keep exploring, compare different areas of CS, and choose math if you genuinely prefer it—not simply because early C coursework feels difficult.

That distinction helped me too: code can be mathematically elegant, while software projects involve a lot of ambiguity and coordination. Liking one doesn’t guarantee liking the other.