Was it types, promises, or ternary operators?
Maybe async, testing, recursion?
Was it OOP, malloc, or decorators?
Or maybe compilers, data structures, or recursion?
Was it types, promises, or ternary operators?
Maybe async, testing, recursion?
Was it OOP, malloc, or decorators?
Or maybe compilers, data structures, or recursion?
For further actions, you may consider blocking this person and/or reporting abuse
Madhav Ganesan -
Norbs' Notes -
Adeyemi Racheal -
0x3d Site -
Top comments (56)
Early on in my career I think OOP concepts like inheritance polymorphism etc gave me the most trouble. After that I think Monads were probably the trickiest concept to grasp and one I don't fully grasp.
There's a wide variety of concepts I would like to learn e.g. dependent types.
I share the experience with OOP, it took me a lot of "this pen is an object, it has a method write() and an attribute color" example for me to finally learn it.
Considering monads, I have yet to step into FP for that sole reason, some concepts look real hard.
I feel with monads experience using them in a variety of ways might be more useful than reading about it. My explanation of them would be "they're a reification of computation", which is totally useless unless you've already spent a bit of time with them practically.
Makes sense, oftentimes some concepts only "click" for me after a few weeks applying it naively.
GraphQL is a recent example, I was weeks into a project when I finally realized: "Oh, THAT'S why it is better than REST in this situation".
Monads aren’t nearly as complicated as people make it seem. It’s literally just a generic interface. Kind of like how you can have
array.map
,linkedList.map
, orpromise.map
... all those types have a sort of common interface. Those are all “functors”. Monads are the same kind of thing, except in addition tomap
they haveflatmap
, which is basically just a different version ofmap
which flattens nested results. This allows certain operations to be easily “chainable”. And that’s pretty much it.Boom - monads!
Monads are much easier to learn by example. If I tell someone: "Look, this is an Optional, this is how it works, the Optional is a monad. Now imagine you can apply this pattern to a whole lot of things, not just wrapping nullable values", they get it pretty fast and it's usually enough to get them rolling code using monads.
As for inheritance/polymorphism, I used to be somewhat confused about it too and I blame it on the myriad of articles and books that don't clearly differentiate between the two just because the easiest way to show polymorphic behaviour is through inheritance (which is by the way, something you usually want to avoid)
Honestly, it would probably be garbage collection. My first job in the 90’s was writing C code and burning it on to EPROMs. By the time I came to learning Java some time latter, I had moved through C++, Delphi (also, does anybody remember Powerbuilder?) and even PHP and Javascript, but this was the first ‘serious’ language I’d picked up that used garbage collection.
The free-wheeling, devil-may-care attitude of just allocating memory offending my well worn sensibilities no end. I’ll give you my destructors when you pry them from my cold, dead keyboards.
It is incredible how diverse programming is, most of my experience is with web-focused languages like PHP and JavaScript so memory allocation is a concept that has never been part of my daily work. But I can understand the difference you must have felt when switching, haha.
naming conventions 🙄
As the classic quote goes:
Acutally, I prefer Leon Bambrick’s version: “There are two hard problems in computer science: cache invalidation, naming things, and off-by-one errors.”
Yup, I always refer to that quote, too 🤣🤣
Too bad "time" was forgotten :D
Yeah, I've built quite a lot of WordPress websites with date queries and it never gets easier.
Now now, who will admit to struggling with programming concepts? However. Some 15~20 years ago I got overenthusiastic about generics in Java. Sent me down a deep, deep rabbit hole and I wrestled on and on until I hit the right answer: in moderation. Generify in moderation.
I have no experience whatsoever with Java but it seems that this piece of wisdom applies to a lot of paradigms. Thanks for sharing!
Event loop. Watch any videos explaining about it and end up thinking JavaScript is multi threaded.
This is a subject that I should look more into. Do you have any good resources on that?
I watch Philip Roberts talks at JsConf and think many videos referring to this talks and also he provide a tool that simulate how event loop works. youtu.be/8aGhZQkoFbQ
Fantastic, thanks! 😄
Sure 😀
Does pixel count as a programming concept? Understanding it as a child was a challenge when you had to figure out the concept of it via CRT screen, manual in a language you didn't really comprehend, and no internet or other people to help you. Place white and black dots next to each other and you got cyan, or purple, or moire. And then you had all the bleeding with other colors.
I'm not sure, but it seems close enough, haha. Pixels can be hard to understand without some understanding of optics and color theory, especially for a child.
Weirdest concept for us... was that there was a boss or creative - that had no idea what they were doing... and then they sold all these crazy ideas - and then we were supposed to somehow make all that crappy stuff - and fast / and have everyone get really rich and happy. Yikes. That part of the pipeline is broken! Then maybe Auth? Still don't know if we're using a monad ;)
Hands up for monads, but i saw some comment here talking about how you can try to understand them better using them, but dang, without knowing what they do, using them is just too hard, i was learning haskell at the time, and this was the harder concept i had to grasp from the language itself
The concepts themselves have never been a problem, it's been the "best practices" of the concepts that have been a problem. About two decades ago, I tended to suffer from NIH (not invented here). I still seriously overthink decisions like REST vs graphQL vs RPC, which component libraries or frameworks to use, etc., as I'm still highly opinionated, but I at least understand that outsourcing the work to someone for whom the library/framework is their primary mission is more likely to produce a quality product than rolling my own in between or in support of my real tasks.
I was learning Go and struggled a lot with channels and buffered channels, after using promises for everything in JavaScript. I kept getting deadlocks trying to wait for multiple goroutines to all finish!