r/AskComputerScience • u/VirtualGlitch_99 • Sep 14 '26
Which CS subject was hardest for you initially but became easy later?
I'm studying CS subjects and I'm curious which subject gave everyone the most trouble at first but eventually became manageable.
35
Upvotes
10
u/Beregolas Sep 14 '26
DSA, specifically complexity. It looked so impenetrable for the first weeks, and then it just clicked.
In programming it was recursion, but luckily my university forced us to learn a functional language in our first semester. It just requires a mental model to exist first, which I didn't have at the time.
6
u/SuspiciousDepth5924 Sep 14 '26
Functional programming, partly because I had to unlearn some procedural stuff and partly because the "simple core" of it is often obfuscated by a bunch of category-theory-circlejerking.
Ignore all the functors, monads, semigroups and whatever initially. The two "big ideas" is
"Ok, well obviously, so what?"
It opens up some nice properties for the code. Because 'f(x, y) -> z' always return the same value when you provide the same inputs, then any call to 'f(x, y)' can simply be replaced with 'z'.
it also means that you can safely shuffle the order of expressions.
Additionally for larger programs a common source of bugs is some part of the code changing the shared values without you knowing it. For example if you had a print name function which prints the name in lowercase by first changing person.name, unless you already knew that you'd assume the name was still "Alice" or "Bob" after printing. By disallowing changing values the print function would be unable to change the person.name without creating a new person object so you can be sure that the name of the person value you hold is unchanged.
Recursion can be a bit tricky, and it's sort of a consequence of not being able to change values.
The basic
for(int i = 0; i < threshold; i++ /*<- this thing */) { ... }assumes you can change an existing number into another one. For simple cases there is usually something likeList.map(list, (item)->newItem)orfor item <- items do <some action> end,but I provided an example of mapping a basic "for" into a functional equivalent.
12
u/T_Thriller_T Sep 14 '26
Complexity theory.
Not sure if it became manageable, though
3
u/AlgorithmicGoslings Sep 14 '26
For me, the theoretical aspects of CS were quite difficult to grasp at first. It's really hard to understand a lot of the why behind things until you understand all the internal processes involved. I remember when I took discrete mathematics, my ability to write proofs and do combinatorics problems was quite poor. Could I do them? Yes, but it felt more like me "going through the motions" rather than me actually internalizing the process. In a similar vein, I found backtracking algorithms and graph algorithms quite intimidating in the data structures class.
I don't really know why it became manageable. I don't think things really clicked for me until I was halfway through the algorithms course, and I suddenly had some newfound ability to finally understand the theoretical aspects. I suspect it's mostly because the time I spent understanding more complicated algorithm paradigms and seeing how all the earlier concepts built up to this kind of wired my brain differently in a way that allowed me to understand the proofs I had once struggled to understand.
For example, the proof of the average case for quicksort was introduced in the data structures class --- I didn't understand it at the time, and it wasn't until maybe at least a year later when all the steps finally internalized and I saw how they all connected. It just takes time and exposure.
2
u/Kadabrium Sep 14 '26
Async and concurrency
1
u/Dazzling_Music_2411 Sep 14 '26
Which one is giving you trouble?
1
u/Traveling-Techie Sep 15 '26
Writing parsers.
1
u/Abomb11yo Sep 15 '26
Theory of Computation, I didn’t pass it the first time and it was easier the second time I took it. I think there was three or four people who had to retake it.
1
u/talimme Sep 16 '26
concurrency, distributed systems. these were hard at first, but after building a couple of projects and good resource, i'm loving this.
1
u/Relative_Cat_8791 Sep 18 '26
For me it was algorithms. At first all those sorting methods and big O notation made my head spin, but once I started implementing them in projects it clicked and now I actually enjoy it.
1
u/Ok-Complaint9319 Sep 19 '26
Automata theory and formal languages!
1
u/scol2n Sep 28 '26
access modifiers in C++
I understood what they did, but when it came to protected, i looked up like 5 youtube videos before it caught on.
0
u/[deleted] Sep 15 '26
[deleted] — view deleted comment
1
u/[deleted] Sep 14 '26
[removed] — view removed comment
1
u/[deleted] Sep 15 '26
[removed] — view removed comment
1
u/[deleted] Sep 15 '26
[removed] — view removed comment
0
u/[deleted] Sep 14 '26
[deleted] — view deleted comment