Skip to main content
fixed minor spelling mistakes (spaghetti,possible)
Source Link
Mahmoud Hossam
  • 3.8k
  • 3
  • 33
  • 41

A few techiques that might or might not work:

  • Look at existing solutions to common problems, e.g. design patterns. Maybe you find something similar that at least partially resembles your problem. Search the web.
  • Act as if the problem has already been solved, and trace what follows back to the solution to make. For example, instead of designing the API for a class, just write the code that makes use of the class, with method calls as you would like them, and then implement that API.
  • Do something else, e.g. surf the net or play solitaire, and wait for inspiration to happen.
  • Think of the person you like most, and pretend you want to impress her with your problem solving skills. What would be an extremely impressive solution?
  • Check the problem for inherent contradictions or conflicting requirements, and state exactly what they are and what compromise could be made. Often, when such conflicts exist, but you are not aware of, you tend to discard one possible solution after another because you cannot perfectly satisfy all requirements.
  • If you already have a possibilepossible solution, but it feels "dirty" (copy-paste, global variables, spagettispaghetti code etc.), use it anyway and make it better afterwards

A few techiques that might or might not work:

  • Look at existing solutions to common problems, e.g. design patterns. Maybe you find something similar that at least partially resembles your problem. Search the web.
  • Act as if the problem has already been solved, and trace what follows back to the solution to make. For example, instead of designing the API for a class, just write the code that makes use of the class, with method calls as you would like them, and then implement that API.
  • Do something else, e.g. surf the net or play solitaire, and wait for inspiration to happen.
  • Think of the person you like most, and pretend you want to impress her with your problem solving skills. What would be an extremely impressive solution?
  • Check the problem for inherent contradictions or conflicting requirements, and state exactly what they are and what compromise could be made. Often, when such conflicts exist, but you are not aware of, you tend to discard one possible solution after another because you cannot perfectly satisfy all requirements.
  • If you already have a possibile solution, but it feels "dirty" (copy-paste, global variables, spagetti code etc.), use it anyway and make it better afterwards

A few techiques that might or might not work:

  • Look at existing solutions to common problems, e.g. design patterns. Maybe you find something similar that at least partially resembles your problem. Search the web.
  • Act as if the problem has already been solved, and trace what follows back to the solution to make. For example, instead of designing the API for a class, just write the code that makes use of the class, with method calls as you would like them, and then implement that API.
  • Do something else, e.g. surf the net or play solitaire, and wait for inspiration to happen.
  • Think of the person you like most, and pretend you want to impress her with your problem solving skills. What would be an extremely impressive solution?
  • Check the problem for inherent contradictions or conflicting requirements, and state exactly what they are and what compromise could be made. Often, when such conflicts exist, but you are not aware of, you tend to discard one possible solution after another because you cannot perfectly satisfy all requirements.
  • If you already have a possible solution, but it feels "dirty" (copy-paste, global variables, spaghetti code etc.), use it anyway and make it better afterwards
Post Made Community Wiki
Source Link
user281377
  • 28.5k
  • 5
  • 79
  • 131

A few techiques that might or might not work:

  • Look at existing solutions to common problems, e.g. design patterns. Maybe you find something similar that at least partially resembles your problem. Search the web.
  • Act as if the problem has already been solved, and trace what follows back to the solution to make. For example, instead of designing the API for a class, just write the code that makes use of the class, with method calls as you would like them, and then implement that API.
  • Do something else, e.g. surf the net or play solitaire, and wait for inspiration to happen.
  • Think of the person you like most, and pretend you want to impress her with your problem solving skills. What would be an extremely impressive solution?
  • Check the problem for inherent contradictions or conflicting requirements, and state exactly what they are and what compromise could be made. Often, when such conflicts exist, but you are not aware of, you tend to discard one possible solution after another because you cannot perfectly satisfy all requirements.
  • If you already have a possibile solution, but it feels "dirty" (copy-paste, global variables, spagetti code etc.), use it anyway and make it better afterwards