What skills do puzzles in programming develop?

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

Discussion Overview

The discussion revolves around the skills developed through solving programming puzzles, exploring their implications for logical thinking and problem-solving in software development and other fields. Participants examine the nature of these puzzles and their educational value, as well as the relationship between logical thinking and programming practices.

Discussion Character

  • Exploratory
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants suggest that programming puzzles develop the ability to analyze problems and create effective strategies for solving them, which can then be translated into algorithms and implemented in code.
  • Others argue that puzzles test a programmer's understanding of the programming language and logical thinking skills, highlighting that even legal code may not function as intended due to misunderstandings.
  • One participant notes that puzzles encourage original thinking and problem-solving skills, as opposed to simply searching for answers online, which is often easier with practical questions.
  • Another point raised is that puzzles help ensure solutions are not only correct but also efficient, emphasizing the importance of time and space complexity in programming.
  • Some participants question why logical thinking is emphasized in computer science, noting that it is also crucial in other scientific fields, and suggest that many science and math problems can be viewed as puzzles.

Areas of Agreement / Disagreement

Participants generally agree that programming puzzles enhance logical thinking and problem-solving skills, but there is no consensus on the specific reasons for the emphasis on logic in computer science compared to other fields.

Contextual Notes

Some participants express uncertainty about the relationship between logical thinking and programming, and the discussion includes various perspectives on the educational value of puzzles without resolving these complexities.

jd12345
Messages
251
Reaction score
2
I have been solving some programming questions and all are some sort of puzzles?
What are they trying to teach us with puzzles? What skills are they trying to develop by solving puzzles?
 
Technology news on Phys.org
Logical thinking.
 
What logical thinking is required in software development and other stuff?
 
The puzzles aim to let you develop your ability to analyze a problem and develop one or effective strategies for solving them and translating those strategies into algorithms and then implement those algorithms in code. Programming puzzles may target particular data structures or programming methods (eg, matrix algebra or optimization)
 
jd12345 said:
What logical thinking is required in software development and other stuff?

When you see some of the code written by "professionals", you might think the answer as "none whatever" ...

But seriously, the puzzles may also be testing that you REALLY understand what the programming language means, as well as your "logical thinking" skills.

For example
Code:
void swapsigns{int i, int j}
{
  if (i = j)
    i = -i;
    j = -j;
}
Is a perfectly legal C function, but it probably doesn't do what its author intended, for at least three reasons.
 
A possible advantage is that the answer doesn't always lie an internet search away. If you want to make your students think to eventually get the programming mindset needed, you can easily make up an original question that must be thought out instead of copied from some programming forum.

The same can't be done with practical questions because by definition practical questions are common and therefore answers to such questions can easily be found online.

Finally, be thankful. In practice, everyday programming is often tedious and boring whereas puzzles are fun.
 
Puzzles are a good way to make sure that not only do you find a correct solution, but you find a solution that is computable in a reasonable amount of time. Often with puzzles of any significant size, there are solutions that might as well be incorrect because they are so horribly inefficient. The (time / space) complexity of a solution is an important thing to know.

I play around at Project Euler a lot :)
 
Sorry for the late reply
ok so puzzles improve my logical thinking. But logical thinking is required in every field of science and maths. Why computer science course focuses so much on logic building?
 
jd12345 said:
Sorry for the late reply
ok so puzzles improve my logical thinking. But logical thinking is required in every field of science and maths. Why computer science course focuses so much on logic building?
Because when you write a program, you are writing a sequence of statements in a certain order to anticipate all possible values that a program user might enter. Unless you are writing a very trivial program, your program needs to do one thing if the user enters a certain value, but do something else if the user enters a different value, and so on. Also, the program needs to be able to react in some graceful way if the user enters invalid data.

Writing a program that deals with these occurrences requires a lot of logical thinking on the part of the programmer.
 
  • #10
jd12345 said:
ok so puzzles improve my logical thinking. But logical thinking is required in every field of science and maths.
And as a consequence, most science and math problems are puzzles as well.
 
  • #11
mfb said:
And as a consequence, most science and math problems are puzzles as well.

True. Didnt really think about it. Anyways thank you
 

Similar threads

  • · Replies 37 ·
2
Replies
37
Views
5K
  • · Replies 43 ·
2
Replies
43
Views
4K
  • · Replies 43 ·
2
Replies
43
Views
7K
Replies
38
Views
4K
Replies
33
Views
3K
Replies
16
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K