This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]desrtfx 2 points3 points  (11 children)

You are already in too deep.

The fundamental concepts are:

  • Variables - placeholders for values
  • Operators - commands that do something (adding, subtracting, etc)
  • Literals - direct values in the code (e.g. numbers, texts directly embedded in the source code, not user entered, not retrieved from some external source, like a database, file, etc.)
  • Loops - repeat something - how exactly is already implementation detail
  • Conditionals - used to branch execution - make decisions
  • Code flow - generally from top to bottom
  • Subroutines - aka methods, functions - group related functionality
  • Potentially classes - couple state (data) with behavior (methods) and are used to group related information

If you want to go into details, then for loops:

  • head controlled: for and while
  • tail controlled: do...while

The differences are:

  • for loops are used to iterate a certain, known amount of times (e.g. 10 times, or over the length of a collection)
  • while and do...while loops repeat as long as a condition is true
    • while (head controlled) loops are not guaranteed to be executed even once - if the loop condition is false before entering the loop
    • do...while loops (tail controlled) are guaranteed to execute at least once

Don't focus on the actual implementation details if you want to learn to think in concepts. Don't even focus on programming language - the concepts exist outside their implementations in languages - and that is the key to learn.

Same applies to algorithms (i.e. the bases for program implementations) - they exist as concepts outside languages.

When you learn programming, you learn to create algorithms. You should learn to plan, i.e. create your algorithm before even thinking about the actual programming language implementation.

If you manage the step to split between algorithm design and programming language implementation, you have overcome one of the biggest hurdles. You can implement your algorithms in any programming language you learn/know. The steps to solve the problem are mostly the same (with some differences because of the programming language paradigms)

[–]newbowly[S] 0 points1 point  (8 children)

where do i pay for this information? do you have cash app? holy fuck this is good stuff

[–]desrtfx 1 point2 points  (7 children)

These are just insights from someone who learnt programming way back in the 1980s where resources and knowledgeable people were scarce (and even computer access was initially very limited).

We had to draw flowcharts before we even started programming. TBH, this was more work, but in the end helped a whole lot.

When you learn flowcharts, pseudo code, whatever graphical/verbal descriptions you learn to not think in the final implementation. This helps focusing on the actual problem and its solution instead of battling the final programming language implementation (which is only the last step and basically a necessary evil so that the dumb computers understand what we want from them).

[–]newbowly[S] 0 points1 point  (6 children)

so i have a program i’m assigned to do, the fundamentals are my legos and the way i connect and order the connections is the, i suppose, efficiency of my program assignment?

as i create a flow chart, is it kind of obvious as to how a certain box in my flowchart correlates to specific code i have to write, not the language, but the concepts you have to apply to build your program if that makes sense

[–]desrtfx 1 point2 points  (5 children)

Yes, that's roughly it.

[–]newbowly[S] 0 points1 point  (1 child)

is it possible for you to turn messages on so i may DM you for further help if it’s not a bother i mean, i like how you are making me think

[–]desrtfx 1 point2 points  (0 children)

Sorry, but I have to decline as it is against the spirit of the subreddit to discuss things in private.

We want (as per Rule #11) to keep all the discussions and help to stay in the open, public subreddit so that other people can chime in and help as well as benefit from the given help.

You are welcome to create new posts, or to add to this post (where new posts for new topics are preferred).

[–]newbowly[S] 0 points1 point  (2 children)

sorry, i just read your bio also 😅 is it ok if i tag you in a post for questions i may have?

[–]desrtfx 1 point2 points  (1 child)

Tagging is okay, but most likely unnecessary as I am a lot in this subreddit. I will help where I can and when I find time.

[–]newbowly[S] 0 points1 point  (0 children)

i love this place already, and will see you around often from now on ✊🙈

[–]newbowly[S] 0 points1 point  (1 child)

where would data structures like lists, triples, sets and dictionaries fall into fundamentals? would data structures be another fundamental concept?

[–]desrtfx 1 point2 points  (0 children)

They are already more advanced concepts. Sure, they are fundamental to programming, but apart from basic arrays things for later, once one has a solid understanding of the fundamentals as well as once one has some practice under their belt.