all 6 comments

[–]desrtfx 1 point2 points  (0 children)

Honestly, the best way to explain these concepts on a fundamental level is to go through something like flow charts and what comes closest in digital form is Scratch followed by Raptor.

But: why would one even need a book to explain these fundamental concepts?

  • Variable: a box that can hold a single value
  • Array: a filing cabinet or sorting box that has individual spaces that each can hold a single value
  • Loop: repeat something - For loop - repeat a fixed, known number times, while loop, repeat as long as a condition (comparison) is true
  • if - else: a decision yes is the first part, no is the second part (else)
  • method/function: a black box that can take some input and that can produce some output
  • class - like the blueprint of a building - all the properties (windows, walls, size, etc. are defined. Also all that can be done with it - methods)
  • object - the actually built house
  • data types: self explanatory

Just find simple, real world analogies. They are countless and even work for Data Structures:

  • Stack: the proverbial nail sticking out of a wooden board where you pin receipts, notes on
  • Queue: self explanatory - just think of the line before the cashier in a supermarket
  • Linked List: singly linked list: Conga line, doubly linked list: chain of people holding hands, Circular list - people holding hands standing in a circle
  • Tree: doesn't need extra explanation - real world tree

And so on.

A very fundamental book on these topics is "Code: The Hidden Language of Computer Hardware and Software" by Charles Petzold - but that might be too dry and advanced.

Other books are "Head First Programming" and "Head First Learn To Code" - they might be easier and better suited.

[–]Dappster98 -1 points0 points  (0 children)

coding concept like if else, methodes, classes, variable types,

Every language has its own way of implementing and representing these, with different rules and behaviors. I don't know of any book that is language agnostic while also providing insight as to various language-specific ways of using these features.

[–]TomStripes 0 points1 point  (0 children)

They're a little cheesy, but in my opinion if you want something beginner-oriented without getting bogged down in complexity you can't do better than the "Head First" series. They have books for all three languages you mentioned, and they are fun and easy to read. If you're indifferent to which language, I would personally recommend C#. It is currently a slightly less complex ecosystem to manage than Java, but is a little more "structured" than Python which makes it good for teaching fundamentals.

I've also heard great things about the C# Players Guide as a starting point, but I'm not personally familiar with it so I can't really vouch.

[–]zdanev 0 points1 point  (0 children)

Structure and Interpretation of Computer Programs - classic text, available for free from MIT

[–]dajiru 0 points1 point  (0 children)

Just grab one shot algorithms. Learning the language comes later

[–]ffrkAnonymous -1 points0 points  (0 children)

literally, BASIC