DEV Community

Cover image for Which concept took you the longest to grasp?

Which concept took you the longest to grasp?

Madza on December 03, 2020

This could be anything from some specific technologies/tools, data structures, design patterns, programming paradigms to advanced concepts like Machine learning, Neural networks, AI, etc.

Which concept took you the longest to grasp?

Collapse
 
mellen profile image
Matt Ellen-Tsivintzeli

Back in 1999 I was trying to learn c++, but I got stuck on template classes. A few years later I learnt about generics in c# and suddenly I understood what template classes were :D

I'm still stuck on monads, so I guess that will be the biggest gap when I finally get back to it.

Collapse
 
madza profile image
Madza • Edited

Would you say it would be a great first language?
I'm not considering the learning curve, but the way the lang is designed to learn programming basics. Most say C is super solid. Although, I've heard C++ is good, too.

Collapse
 
dwd profile image
Dave Cridland

Python.

The advantage of Python is that it's quite a "broad church" language, supporting many different approaches to solving a problem - but it's also very consistent.

There are some things it won't teach you, most notably generics/templates (which are different, but similar, capabilities), but generally most concepts in other imperative languages exist in Python (and there are a few functional techniques about as well).

The lack of special-casing and "gotchas" makes it very simple to work with and explore, though, and things like Jupyter (a sort of web-based super-REPL) help things further.

Moving on from there, C++ is a great language to understand because it has both very low level elements to it and high level constructs built on top - allowing you do dig very deeply into how things like coroutines or containers actually work if you need to.

Thread Thread
 
madza profile image
Madza

I have no experience in using it, but as far as I've seen some code, I've liked the syntax of it 😉 Very intuitive and easy to read for those starting out 👍

Thread Thread
 
dwd profile image
Dave Cridland

There used to be quite a number of languages designed for teaching - BASIC was one (designed by, amongst others, a nun), and Pascal was another. Universities and schools seem to have universally ditched them all in favour of Python.

Thread Thread
 
keogami profile image
keogami

Sauce for the nun thing?

Thread Thread
 
dwd profile image
Dave Cridland

Sister Mary Kenneth Keller

Sister Mary image

Took vows in 1940, and while doing a PhD - the first woman to get one in Comp Sci - ended up in Dartmouth College, implementing the first version of BASIC.

Thread Thread
 
ballpointcarrot profile image
Christopher Kruse

Wow, I didn't expect to find a Sr. Keller reference on DEV!

I went to Clarke, where she founded the Computer Science department (and there's a building named after here there now).

Thread Thread
 
keogami profile image
keogami

Lol a nerdy nun, thanks for thr fact!

Collapse
 
mellen profile image
Matt Ellen-Tsivintzeli

My first language was BASIC, which I think was a good place to start. It's more important to have fast feedback when you're first starting out (IMO) to get you hooked. So I would recommend an interpreted language over a compiled one, just because you can get the immediacy in a read-evaluate-print loop (REPL) where you type something and it causes something to happen.

Also, the "batteries included" nature of most popular interpreted languages means that you're going to find it easier to do things off the bat, not trying to figure out how and what to include.

I can't say I'm a C++ dev, because it's been well over a decade since I last wrote any, so maybe the STL and whatever exists now has a batteries included approach, so perhaps that's not a concern.

But for the basic concepts I'd start with a language that outputs comprehensible errors and doesn't make you wait to find out when you make a mistake.

C and C++ are good second languages.

Thread Thread
 
madza profile image
Madza

Fair enough 😉
Some solid points there 👍

Collapse
 
peerreynders profile image
peerreynders • Edited

but the way the lang is designed to learn programming basics.

"Programming Languages" are designed to represent programs that can get "stuff done" - not to teach programming basics - unless of course the language is expressly designed to "teach programming basics".

How to Design Programs, Second Edition

HtDP teaching languages

Pyret

PAPL - Programming and Programming Languages

The Structure and Interpretation of the Computer Science Curriculum (2004):

In general, we believe that the HTDP project has validated the usefulness of functional programming and functional programming languages in the first programming course. We have found that teaching Scheme for Scheme’s sake (or Haskell for Haskell’s sake) won’t work. Combining SICP with a GUI-based development environment for Scheme won’t work better than plain SICP. The two keys to our success were to tame Scheme into teaching languages that beginners can handle and to distill well-known functional principles of programming into generally applicable design recipes. Then we could show our colleagues that a combination of functional programming as a preparation for a course on object-oriented programming is an effective and indeed superior alternative to a year on just C++, Java, or a combination.

We are hoping that other functional communities can replicate our success in different contexts. We suggest, however, that using plain Erlang, Haskell, or ML and that teaching programming in these languages implicitly will not do. We all need to understand the role of functional programming in our curricula and the needs of our students. (p.13)

quote

“It’s mind boggling that your HtDP students are better C++ problem solvers than people who went through the C++ course already”.

Collapse
 
ducaale profile image
Mohamed Dahir

I can't say I fully understand what a monad is but after banging my head days against parser combinators, I am a bit more confident about it.

Collapse
 
snyderling profile image
David Snyder

Pointers

Collapse
 
ben profile image
Ben Halpern
Collapse
 
peterwitham profile image
Peter Witham

This is high on my list, foolishly I dived into C++ with no prior programming experience way back when and immediately starting crying lol

Collapse
 
snyderling profile image
David Snyder

same, C++ was my first language and I was having fun for a few months until I got to pointers and decided I would switch to JavaScript lol

Thread Thread
 
peterwitham profile image
Peter Witham

It always seems like every language has that moment that comes down to "you loved me until now"

Collapse
 
mccurcio profile image
Matt Curcio

Bayes theorem! I use it occasionally but I have to teach myself over and over. It's like learning a new language, 'use it or lose it.'

Collapse
 
keogami profile image
keogami

What do you use it for?

Collapse
 
mccurcio profile image
Matt Curcio

The last time I used it I was testing the false positive paradox. I was used to work in the biotech industry. So, What's the chance you get a disease versus the fact that you tested positive for that disease, tested once or even twice. Alternatively, one might come across it for A/B testing in stats. What are the chances you will see false positives in your comparison testing.
HTH

Thread Thread
 
keogami profile image
keogami

I dont have much of a mathematics background so anything related probablity hits me hard. Could you suggest me study material? Oh and what kinda data you were storing for your purpose?

Thread Thread
 
mccurcio profile image
Matt Curcio • Edited

Starting out in Statistics, I suggest something like Kahn Academy. It looks well thought out.

But I also like Kahn Academy because you can jump around as you want.
HTH

Thread Thread
 
keogami profile image
keogami

Oh i love that guy! He runs a new channel by the namr "Three blue one brown", i learned differential from on there 😍😍

Collapse
 
flamer17 profile image
OmegaCerberus • Edited

For me it was Dynamic Programming,
Had a hard time understanding when to use it in problems and still now i'm kinda afraid of it mainly the ones coupled with trees and graphs

One of the reasons is that i was unable to find appropriate resources on how to use and understand DP and also cuz i'm kinda dumb

Collapse
 
desirtechnologies profile image
Jeffrey Desir

Lol only a self-deprecating genius could have a hard time with dynamic programming, and still feel kinda dumb 😁
If intelligence could be quantfied, then maybe the ability to transform data outside of its structure would be a better start than the joke that is IQ.

Collapse
 
carlosabcs profile image
Carlos Córdova Sáenz

For me, even until now, after 3 years from the first time I read and studied about DP, I still forget almost everything about it and have to study again to keep it fresh in my mind.

Collapse
 
promikecoder2020 profile image
ProMikeCoder2020 • Edited

Some of them were(please don't judge me as I am only a 13 guy learning to program in his spare time):

  • The concept of classes
  • Git and GitHub( Tech with Tim video on this helped me a lot to understand this stuff)
  • Responsive CSS(Kevin Powell responsive course really helped me on this)

What I still have problems with:

  • Yarn workspaces
  • Yarn and npm dependencies problems and such
  • CSS weirdness
  • Choosing the correct semantic html tag
Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard • Edited

Simplicity

Collapse
 
madza profile image
Madza

Well put 👍
Also 'simplicity' !== 'easy', both directly and indirectly 😉

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

Every developer should watch and digest this video from Rich Hickey :P

infoq.com/presentations/Simple-Mad...

Thread Thread
 
madza profile image
Madza

Thanks for sharing, this is golden 🔥🔥

Collapse
 
keogami profile image
keogami

Lol

Collapse
 
desirtechnologies profile image
Jeffrey Desir

Soon (enough 🙄) my affinity for LISPs & Clojure will be matched with my discursive posts. The most rewarding & self-damning attempt I'd ever made in my CS career is learning Clojure 🌟macros🌟.
random example:
often when we repeat declarative patterns (do this with this) we capture their behavior in functions or methods

(ns example.macros)

;; simple script to compare variable against 0. 
(defn heat 0.001)

(if (not (= 0.0 heat))
     (println "Cannot cohere!"))
Enter fullscreen mode Exit fullscreen mode

To capture the if atoms behavior, let's try a function first.

(defn if-cohereable [value dispatch]
  (if (not (= 0.0 value))
     (println "Cannot cohere!"
      (dispatch)))

;; nice! but a few problems in practice...
(defn run-program [ :keys [ actions, H* ;;Heat Operator ]] 
   (if-cohereable H* (actions)))

(run-program :H* 0)

;;psuedo-output
=> #<clojure.function>
Enter fullscreen mode Exit fullscreen mode

looks helpful, but we can't actually use this as an 'if' statement, just a comparator that returns a function.
With the power of Macro though

(defmacro if-cohereable [ :keys [H* actions-body ]]
   (if (not (= 0 H*))
      ;;throw error if comparison fails
     (throw "Non-zero-energy prevents entanglment!")
     ;;otherwise run the body of code passed into macro call
     ~@(actions-body)))

;; now in action...

(defn run-program [ energy ]
  (if-cohereable :H* energy ;;named arities with if-statement
    (do
      (init! energy)
       (simulation/start!)))
Enter fullscreen mode Exit fullscreen mode

😅 a rather innocuous example but point is I couldn't grasp the use-cases for this meta-programming feature until I labored through documents & examples & uses before I understood the sheer power in talking about code the same as data.

The closest thing I know to LISPs macro power are most other languages Proxy Generator or Iterator capabilities and although they mirror much of LISPs flexibility, they are SYNTACTICALLY inefficient to express data transformations (all code is) fully.
✌🏿 It was a pain and a pleasure both learning and sharing ~

Collapse
 
gautham495 profile image
Gautham Vijayan

When I was in 11th grade I did not understand C++ concepts which was taught in my school. Eventually I grinded hard enough to score full marks in all of the C++ tests they had given about the fundamentals of C++ like classes, inheritance and conditionals.

Collapse
 
forrcaho profile image
Forrest Cahoon

I don't know if this took the longest for me to grasp, but it took a certain example. Way back in the 1990s when I was first learning object-oriented programming, it was hard for me to get a grasp of what an object really was. Every explanation of OO programming made objects out to be these things with almost mystical properties.

It was only when I encountered Perl's LWP module, which uses an object as an "agent" to make web requests, that I realized that an object could, in fact, be anything.

Any grouping of behaviors that arbitrarily decide are being done by "the same thing", hey, you're perfectly free to declare that's an object. It's all up to you.

The problems with all the previous explanations I encountered is that they all conflated what an object should be (in terms of sensible code organization) with what an object could be (in terms of language structure, which is to say, no limits).

I still think it would be great, when introducing OO, to show examples of silly decisions of how to break a problem up into objects, just to make this arbitrariness perfectly clear, and open the door to creative thinking about what objects could be.

Collapse
 
altamas2049 profile image
Altamas Khan

longest concept , I think almost each concept took time to grasp , but later when i learn those concept after few days i forget those concept not completely but in small chunks . I think myself kinda dumb or maybe i am dumb don't know which one either of them look dumb.😐

Collapse
 
avikki profile image
AviKKi

I guess Dynamic Programming is the one that took me so much time, I was reading about it from second last year of my high-school but I was only able to do it on the freshman year of my college; my first submission to a DP problem in a live contest, was worth all the patience.

Collapse
 
gwsounddsg profile image
GW

First language I learned was Objective-C back in 2010. Blocks (which are like lambda expressions, closures, or arrow functions), alluded me for so long.

I stopped writting obj-c maybe 7 years ago. Just recently I was chatting with a friend about Swift closures and it dawned on me, that's what blocks are in obj-c!

Collapse
 
seeila profile image
Seeila

As a person with a graphic designer background, so without mathematical, scientific or logical background, while I taught myself how to code, what took me the longest was to understand the programming logic.
When you've finished learning the basics of basics (types, loops, variables,...) and you try to actually use them. At first it took me more than 3 hours to finish one simple exercise on codewars but when I understood the logic, it took me less than 5 minutes, the difference was huge.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Structuring the project in my first programming language I used personally, Python.

Collapse
 
desirtechnologies profile image
Jeffrey Desir

Structuring projects in general feels like learning programming all over again sometimes when you switch frameworks or platforms 😔

Collapse
 
madza profile image
Madza • Edited

This ^^💯 It gets better with each project, for sure 😉

Collapse
 
lemmaeof profile image
LemmaEOF

Whenever I come across something difficult, it's usually a sort of there-is-no-spoon sort of thing. The first I can remember was wrapping my head around Java generics only existing at compile-time, and then grasping what first-class means in the context of programming languages. Now I suppose it's monads.

Collapse
 
desirtechnologies profile image
Jeffrey Desir

you're like an inch away from the cliff of Clojure 🙏🏿

Collapse
 
patricnox profile image
PatricNox

javascript functions such as map and specifically reduce, that one was and kind of still is a complete new world for me!

Collapse
 
keogami profile image
keogami

Ikr but they are the most useful stuff i have ever learned.
I like them so much that i construct them even for environment where they dont exist, like C or JS on wsh

Collapse
 
dereknutile profile image
Derek Nutile

In the early 2000's - AJAX. I was working with a lot of static HTML, PHP and MySQL back then and being able to grab and present data in the background wouldn't sink in to my thick skull!

Collapse
 
madza profile image
Madza

Although more than a decade later, getting a grasp of how async code works overall was pretty challenging for me too 😉

Collapse
 
keogami profile image
keogami

Your mistake was using php in the first place lol,
Altho in early 2000 you must have had quite a lack of teaching resources..
Respect mate!

Collapse
 
kayis profile image
K

Everything.

I think, I started programming multiple times. And I only got on a professional level after the 3rd or 5th try.

Collapse
 
matthewpalmer9 profile image
Matthew Palmer

As silly as it sounds now, async/promises took the longest for me to grasp.

Collapse
 
miguelbogota profile image
Miguel Bogota

For me personally, Redux was a concept really hard to understand and also I didn't understand why it exists. I mean there's better and easier ways to handle state in my opinion back then.

Collapse
 
neeagwl profile image
Neetu Agarwal

Recursion!!
Mainly because every time I solve a recursion problem I focused more on how its working instead of how to work with it. But Gladly, I have passed that phase but it did take a very long time :)

Collapse
 
the_unconventional_coder profile image
ABHINAVA GHOSH (he/him)

recursion!
still struggling xD

Collapse
 
keogami profile image
keogami

Ngl... loops lol 😂😂
Initially loops just looked awful, so i wont use them. But loops were important, so i would instead use recursion XD

Collapse
 
egilhuber profile image
erica (she/her)

Try/Catch blocks. Admittedly, I'm still shaky on them. At this point, I just consider them a code smell and avoid writing code that throws exceptions.

Collapse
 
urielbitton profile image
Uriel Bitton

Probably states in react lol

Collapse
 
justincy profile image
Justin

Recursion and pointers.

Collapse
 
raguay profile image
Richard Guay

Lens in Haskell. I still have trouble with them.

Collapse
 
nicolus profile image
Nicolus

I'd say either pointers or rxjs Observables.

Collapse
 
pratamatama profile image
Furukawa Fukka

Model Factories, TDD

Collapse
 
peterwitham profile image
Peter Witham

Great question. What immediately came to mind was the this/self JavaScript reference, even now I have to read tea leaves to be sure I'm getting it right :)

Collapse
 
keogami profile image
keogami

Ooh there are like 4 cases which describes what this is!
I used to create my own reference to this and name it that or cache.. and use closures to make life easy.

Collapse
 
kalashin1 profile image
Kinanee Samson

Looking through a multi dimensional array in visual basic was a serious headache at the time for me

Collapse
 
codeprototype profile image
Kevin Le

I have a difficult time understanding how to correctly and effectively use the Pricing Calculator of Azure, AWS, Firebase, etc.

Collapse
 
radavis profile image
Richard Davis

It took me YEARS to understand and use Redux correctly. There were times I thought this career wasn't for me because I couldn't understand and use this "simple" library.

Collapse
 
madza profile image
Madza

As I've heard, most have struggled with it.. Have you tried Context API, btw?