I am a trainee. According to my teacher to solve a problem we should go through following steps:
- Create Algorithm (optional)
- Create a Datatable: By analyzing the problem, create main concepts in those problem as columns and the related issues in the main concept as rows.
- Create a Flowchart based on the Datatable. (when creating flow chart, think that you are in that situation and design it in your brain)
- By seeing the Flowchart, one can solve the problem easily and in efficient way.
These steps should always be considered by a programmer if he/she wants to become a Software designer (not just a programmer) because this approach gives an efficient way of finding solution to a problem even if the problem is small. According to him, this way of approach also works in real time scenario’s.
My question is: Is this really an efficient way? please share also your thoughts.
Through this question I also wanted to share some thoughts of my teacher with you who is a good mentor.
1
- Teachers may encourage students to approach problems in a structured way because it breeds good habits and fosters a structured mindset, both of which are good things.
- If you polled all software developers with more than two years of experience, I bet that they would all tell you that software developers do not follow any such formal, prescribed, structure, but that they can appreciate the meta-lesson that your teacher is trying to teach.
- While this specific step-by-step approach isn’t awful per se, I can tell you that it’s missing a critical first step.
After performing a certain amount of research on your problem, your first step should be:
- Ask yourself: Am I solving the right problem?
Indeed, when solving a problem, whether it be implementing a greenfield feature or fixing a bug, many software developers either fail, implement a sub-optimal solution, or simply waste time because they did not first introspect and ask themself if they were solving the right problem.
Two points about this:
- The amount of preliminary research that you will need to do before you can ask yourself if you are solving the right problem will vary according to the problem.
- Your ability to know if you are solving the right problem is a function of experience. So always ask yourself the question, and your ability to answer it will improve as you gain experience.
2
What your teacher is trying to do is train you to think about abstractions, abstract thinking is an extremely important problem solving technique.
The specific workflow your teacher laid out for you, the four steps, is an incredibly basic workflow and a far cry from being efficient for non trivial software development problems. However it’s a good enough training methodology, and it will be efficient when you are faced with real life (but trivial) scenarios. Keep in mind that learning is mostly an incremental process, you need to learn the basics first, and that’s what you are doing right now.
Further reading:
- When to prefer a generalized solution over solving specific cases
- Abstraction: The War between solving the problem and a general solution
- How can I improve my problem-solving ability?
- https://softwareengineering.stackexchange.com/questions/152668/solving-programming-problems-or-contributing-code
- https://softwareengineering.stackexchange.com/questions/146913/teaching-programming-by-solving-puzzles
And a couple of relevant blog posts:
- Please Learn to Think about Abstractions
- General Problem Solving Strategies (for programmers)
2
These steps should always consider by a programmer if he/she wants to become a Software designer (not programmer).
What do you mean by Software designer? I tried searching the difference between Programmer and Software Designer and I was flooded with Programmer v/s Software engineer.
Because the above approach gives an efficient way of finding solution to a problem even the problem is small. According to him, this way of approach also works in real time scenario’s.
The Programmer also has to solve a problem or find its solution therefore your teacher saying that this approach (The one you mentioned in your question) is to be used by software designer and not programmer.
My question is: Is this really an efficient way? please share also your thoughts.
Don’t know. As a student I have never done all these things i.e. algorithms etc. I just do my coding, make some DFD (Data flow diagram), ER diagram and some related documentation things and submit it.
As far as industries are concerned i think they have separate teams for all these things like coding team, documentation team,
3