Read Mode
Default

Importance of Right Algorithm in Your Programs | By Kvc

I still remember, When I was a child - I’ve learnt a great saying from my elders – “There’s always a right way to do every task!”. And, this has really touched my heart. And, I started to look for perfection in every task. While, Programming in Computers – there’s nothing more than a few lines of code. But, arranging this code in the right manner makes all the difference between a Good, Useful Program and a Bad Program.

Importance of Right Algorithm in Your Programs | By Kvc
No-one wants to make a Bad Looking Program intentionally. But, it really makes the difference and reduces the impact of your program on user. So, To Avoid Such disgusting scenarios - We need to clear few more basics. These will definitely help us in making amazingly innovative and great creations.
“Anyone Who Never Made a Mistake – Had never tried anything New!”

Importance of Right Algorithm – Right Approach towards goal

Understanding the Computer Language, in which you are making a Program is the first step towards making a Good Program. And, By Understand – I Don’t mean that you have to remember all the possible syntax and other theory about it. But, you need to know about the weaknesses and Breaking points of it. While also keeping in mind the benefits of using that language for your programs. Because, in that way your chances are more – for making a better program.

What is an Algorithm in Programming?

According to my experience with computer programming, I’ve understood an algorithm as an overall mathematical solution for achieving our goal in any program. An algorithm can be for program design, program efficiency, program flexibility etc. So, there can be multiple algorithms working in a single program. They all combine to make a big algorithm to get the target. 

And, by mathematical solution – I don’t mean that all the mathematical formulas you are using in your program corresponds to algorithm. Nope, All the commands – whether they are – Ifs, FORs, Print or Echos etc. Combine to make an algorithm. Because, they have their special place in the program’s output. 

Otherwise, if you’ll change any element in the algorithm then, its output will definitely change. So, Every Mathematical and Non-Mathematical element i.e. All the elements in a program, combine to make an algorithm.

Can there be multiple algorithms for one Task?

Yes. Why not? As, if you’ll roam in any market. And, you’ll find that there are multiple paths by which you can reach to a specific shop. Similarly, To-get one output – we can use multiple methods. But, for getting the best out of our program. Our Goal should be, to achieve the same output with most efficient and fast executing algorithm. 

So, we need to eliminate unnecessary lines of code. Which can be modified in other ways to get fast code execution. Thus, Finding the Right Algorithm and Right approach towards our goal is a matter of experience and good analytical skills. And, these skills develop automatically when, you’ll make more & more Programs by your own.

Is there an example for this boring theory of yours? – The Example

This concept came to my mind when TSnake41 Submitted their entry to TheBATeam, and we need to Analyze everything in the provided files. We understood everything they provided – while, trying my hands on the example files. I really got fascinated by the output and its timing in the cmd.

But, In one of the example – I found that there is a room for the betterment of the things. You can watch the following video in order to get an example of this concept. Please, note that I’m not criticizing TSnake41 here. They are much better programmer than me and I can’t surpass a person who himself has taken the Batch programming to the next level.

The main aim of this Article is to learn and make the beginners understand about the problems and advantages of programming in batch. If we’ll understand these little differences – we’ll be successful in definitely taking it to the next level.

[video]

Little more about the theory!

I hope, After watching the video – most of your doubts are clear now. And, I just want to emphasize on the point of ‘Flow of the Code’. As, we already know that – CMD reads code from Top to bottom. So, In order to make it most efficient – all we need to do is to maintain this flow of Code. Otherwise, Our program may take more time than it should take.

And, If this problem occurs in the library function (Circle function, Button Function, Line function etc.) Then, it will result into the disaster. As, Your program will be slower than it need to be. And, If you use these functions multiple times. Then, it will be end of the earth. So, while making things for the language itself. We need to keep these little concepts in mind. Which makes the quality of your work and Program better.

Conclusion

In the End, I just want to say that – in this world, Little bricks combine to result into a Big Beautiful building. So, in order to make that building better – we need to understand the nature of bricks and their right arrangement in the building. And, if you are from little scientific background, then you can apply this same thing with the Atoms and compare it.

I hope, you’ll like this little article about Importance of Right Algorithm in your programs. And, In the case of any doubt or appreciation – Feel free to throw a comment on me. I’ll be happy to read them. Thanks for your time.

Keep Learning, Keep Sharing...
Be Happy, Spread Happiness...

Download Link: Example Files | By Kvc
#TheBATeam

No comments:

Powered by Blogger.