shivajikobardan said:
TL;DR Summary: How to learn programming?
For eg: Currently I am trying to learn bash shell scripting, text processing using bash etc. But the problem is I don't think I can learn it. Why? Because I don't know programming. In particular, problem solving. I don't know problem solving at all. I try my best but I fail. In the past, I tried learning MERN web development for around 1 year but failed to do so.
So, I am wondering how do I learn programming? Particularly, bash shell scripting. I don't need roadmap but way to learn problem solving.
One tiny step at a time... Are you passed the
the "Hello World" stage?
If so, keep going. Try out one tiny thing at a time and don't give up until you not only get that small thing to work, but you know why it works and have demonstrated at least a few working examples.
Only then move onto the next tiny thing.
You may not thing that that this is building anything great, but it is. You will be programming yourself. You'll be building up a library of tiny things and when it comes to tackling something interesting, either that library will be have everything you need or it'll be back to the tiny exercises.
As far as "problem solving" skill is concerned, as soon as I started working with other programmers (decades ago) I was immediately struck by the diverse ways that people have of attacking a problem. It's almost like a finger print. Some sort of analytic skill is required, but I think these are the important factors:
1) You like coding. There's so much detail involved, that if you don't like the activity, it will be torture.
2) You are willing and able to follow that library-building process I described. All coders do it all the time. The bigger your library, the more you will be able to identify projects you can tackle. Short of retirement or the grave, you will never finish your library.
3) Especially early on, code with others. If you try to code solo without ever sharing your experience and without ever hearing comments about your project from others, you will stop. It's not just picking up tricks. At least to a small extent, the activity needs to be a social thing - otherwise, you will stop.
4) Use online coding examples and other resources.