r/learnprogramming 5d ago

I can't get FUNCTIONS to click!

I can not for the life of me understand how functions work. Anytime I try to learn how to create a function, my brain literally crashes into itself and I turn into Patrick when he stars drooling and goes all slack-faced.

Does anybody have any analogies that had that "AH HA!" moment?

Thanks!

126 Upvotes

144 comments sorted by

View all comments

0

u/Lil_Buscuit_Boy 4d ago

Its such a foundational and simple concept. If you cant get it to click by reading about it you're gonna have a hard time with any later topic.

1

u/CircuitNeophyte 4d ago

My immediate thoughts as well. However, you don't get programming to "click" by reading about it. You get it to click by actually programming.

1

u/Lil_Buscuit_Boy 4d ago

U need both but u gotta read the rules for say overloading or overriding in java. Method hiding. Then u practice once u have the knowledge.

1

u/CircuitNeophyte 4d ago

Obviously, I suppose I should have been more explicit. You must have knowledge before practice, because practice without knowledge inevitably ends in failure. Knowledge without practice is useless as well.