HACKER Q&A
📣 Dracophoenix

What programming concepts do/did you find hard to understand/implement?


What programming concepts do/did you find hard to understand/implement?


  👤 vanilla-almond Accepted Answer ✓
I'm a mediocre programmer at best and I still struggle with Object-Oriented Programming (OOP). I understand the ideas, but I simply find it to be an 'unnatural' way of programming. Millions of other programmers are successfully coding with OOP, but I'm not one of them.

I've tried many OOP languages and Ruby and Crystal felt that they had the friendliest approach. Why do I struggle? I think some of it is to do with the thick layers and unnatural wordiness of the way it is implemented in many languages: constructors, instantiating, getters, setters, public, private, unattractive syntax etc.

As I said earlier, I am not a great programmer (but try to improve :-) and my opinions on OOP reflect that.

As an aside, the stranglehold that OOP has had over the profession seems to have loosened. New languages like Julia, Go, Rust and Nim do not describe themselves as object-oriented although they have object-like features. Back in 2019 I asked Hacker News: "Why do new(ish) programming languages eschew OOP features?"

https://news.ycombinator.com/item?id=20320752


👤 tacostakohashi
I found regexes pretty baffling (i.e., took me a long time to understand at all) when I first encountered them. And, even now, complicated regular expressions can be difficult to work on.

The main challenge is that you can't see which part of some huge pattern isn't matching, or insert a breakpoint / printf in the middle, it's just an opaque black box that either works or doesn't... and if it doesn't you need to break it all the way down to something that does, then work back up again from there.


👤 simonblack
Recursion.

I can write a factorial-computing program, but I'm slow at it.

I think my biggest problem is working out those instances when I should use a recursive function.


👤 thedevindevops
I worked on a piece of software that made use of Simulated Annealing and I'm still not entirely sure I understand how it worked.

👤 giantg2
Regexes, some 3rd party java annotations, quantum concepts, even some patterns of OOP that involve a lot of abstraction.

👤 girishso
I found it very hard to understand functional programming after more than a decade of OO. Was lucky to find Elm.

👤 pknerd
Recursion Abstract Classes Pointers, thanks to Golang I don't feel so insecure anymore.

👤 LandR
Continuations and call/cc

👤 AgoRapide
Regular expressions.

Functional programming.