Most of the developers in today's world have a practice of referring to code online. Not all the developers write their code from scratch instead develop the code from an existing piece of code. There is nothing wrong with that and that is how the modern-day coding works. We don't have to invent the wheel which was already built. This is one of the reasons why they are called developers and not coders. When this is the case on one side, there are also hardcode coders who write code from scratch. Their knowledge level would be very different from that of the developers.
I have been a developer for like around 10 years and most of the time I also develop applications from existing code and it is quite a rare situation where I write code from scratch. It could even be because my working environment is like that and the opportunity I get. 15 years back when some of the most experienced colleagues in my office were coding, books were the only source from where they can get the knowledge about a programming language and they will have to write spike code to understand the concept and see if that would work well for the application or not.
But in today's world, most of the applications we try to build in our day to day life would be available already as an open-source application online. We can just refer to that and take the code that we want for our own application. It is like doing our final year project. In most of the colleges, the final year students buy their code from some companies that sell final year projects. I even bought an application for my final year project and completed the course. But today the final year students need not go and buy any code from any company. If they sit with the internet for like one or two hours they will have their own unique project in their hand.
I guess this is enough for the introduction part, coming back to the topic all I wanted to say was that when we have the opportunity to get code online or from internet sources, it would be ideal to first understand the code before we implement it in our project. If we don't understand the code and just implement it blindly it can give so many problems in the future. The code can stop working someday especially when it is in production and we will not be able to troubleshoot it without the knowledge. We will end up writing the same piece of code again with a different logic instead of fixing the issue alone in the code.
Getting a reference code from online sources is good and also an easy way to complete the project that we are doing. But it will be even greater if we first try to understand the code we got from online sources and implement it. It can take some of our time to read and understand that code but spending that time would be worth it. Learning things from existing code is always the best learning because we would have the use case and it will be easy to understand the code and how they have approached the solution. To my subordinates in the office, I always suggest to learn from the code we got from online sources, understand it, and implement it in our projects.
If you find my article interesting, please vote, share and follow. Also, let me know your thoughts in the comments section.
Posted via neoxian.city | The City of Neoxian