↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

How To Solve Coding Problems Like A Pro

The article presents a four-step framework for solving coding problems more effectively: understand the problem, divide it into smaller parts, research what is missing, and write pseudocode before coding. It argues that good problem-solving depends on clarity about the problem itself and on practice.

Reading notes
#

  • Problem-solving is presented as an important skill for programmers, and the way a developer solves a problem shows both experience and understanding.
  • To understand a problem, the article suggests reading the question, making observations, and asking relevant questions.
  • The example problem is to use JavaScript to log one message when age is 18 or above and another message when age is below 18.
  • The divide-and-conquer step turns one large problem into smaller tasks such as defining the current age, defining the resultant age, implementing conditionals, and handling the alternative case.
  • Research is described as a normal part of programming work, especially when a problem is unfamiliar or too large to solve at once.
  • For the example, the research questions are how to define a variable in JavaScript, how to write conditional statements in JavaScript, and how to log strings to the developer console.
  • Pseudocode is described as an informal description of the code, written for humans to understand.
  • The conclusion says that becoming a better problem solver takes consistent practice and recommends LeetCode as a place to practice coding problems.