What is the best way to learn programming?

  • Thread starter Thread starter jd12345
  • Start date Start date
  • Tags Tags
    Programming
Click For Summary

Discussion Overview

The discussion revolves around the best practices for learning programming, particularly from the perspective of a beginner. It explores the relationship between human problem-solving approaches and how they translate into programming logic, as well as the challenges faced by new programmers.

Discussion Character

  • Exploratory
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants suggest that programming involves translating human problem-solving methods into instructions for the computer.
  • Others argue that while this is a fundamental aspect of programming, it can be challenging due to the complexity of certain problems.
  • One participant questions why different approaches, such as Euclid's algorithm versus factorization for finding the GCD, exist and highlights the elegance of the former.
  • Another participant points out that while humans can use various methods, coding certain approaches can be more complex and less efficient than others.
  • There is a suggestion that the quality of programming often reflects human logical reasoning, which can be flawed.
  • A participant requests more information about the original poster's learning methods to provide more tailored advice.

Areas of Agreement / Disagreement

Participants generally agree on the idea that programming is about conveying human logic to computers, but they express differing views on the challenges and methodologies involved. The discussion remains unresolved regarding the best practices for learning programming and the reasons behind the use of different algorithms.

Contextual Notes

Some limitations include the lack of specific examples of code from participants, which could clarify their approaches and challenges. Additionally, there is an absence of consensus on the most effective learning methods or the pedagogical choices behind teaching algorithms.

jd12345
Messages
251
Reaction score
2
I started programming like 1-2 months ago - In most of the questions I actually try to tell the computer what I would actually do to solve the problem. I am just telling the computer what humans would do to solve that problem.

Is that the right practice?
 
Technology news on Phys.org
jd12345 said:
I started programming like 1-2 months ago - In most of the questions I actually try to tell the computer what I would actually do to solve the problem. I am just telling the computer what humans would do to solve that problem.

Is that the right practice?
That's what programming is. You write the instructions that the computer performs. One of the steps in writing a program is to figure out an algorithm, which is the set of steps you would do in solving the problem. The next step is to write your code in using the programming language of your choice (or the one you are learning).
 
Then why is it tough( some questions ). I just need to tell the computer what I would do in that question but still that is tough, why?

Also some questions like finding gcd of two numbers- humans factorise the two numbers and multiply the common factors but for the computers we use euclid's algorithm. Why the different approaches?
 
jd12345 said:
I started programming like 1-2 months ago - In most of the questions I actually try to tell the computer what I would actually do to solve the problem. I am just telling the computer what humans would do to solve that problem.

Is that the right practice?


Yeah, that is pretty much the idea. Most computer programs are very routine logic, just done much faster than a human can do.

I would add that most humans do a rather sloppy job with logic, this reflected in the poor quality of the average computer program. So try to do better than that, if you can. The main problem is that humans tend not to consider unusual cases and get a program that crashes whenever you do anything out of the ordinary.
 
jd12345 said:
Also some questions like finding gcd of two numbers- humans factorise the two numbers and multiply the common factors but for the computers we use euclid's algorithm. Why the different approaches?

Nobody ever prohibited humans from using Euclid algorithm nor computers from factorizing and multiplying common factors.

Method with common factors is rather difficult to code - way more operations to do (preparing list of prime factors, managing two sets of factors, finding the intersection). Euclid algorithm is much more elegant. No idea why Euclid algorithm is not taught in schools as a method; perhaps for pedagogical reasons.
 
jd12345 said:
... I am just telling the computer what humans would do to solve that problem.
That has some pretty wide-ranging possibilities

Is that the right practice?
Easier to answer if you would provide a sample of your code.

What is your method of learning? (School, on-line courses, "how to" books, ...?)
 

Similar threads

Replies
33
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
8K
  • · Replies 102 ·
4
Replies
102
Views
4K
Replies
16
Views
3K
Replies
86
Views
3K
Replies
38
Views
4K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 54 ·
2
Replies
54
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K