The assumption/validation approach I developed towards programming
Priyansh Jain Aug 10
I got into general programming around 4 years back, when I was in my high school years. Our Computer Science syllabus comprised C++, and that was the language I started with. When I got into uni, we had Python to start with
So we had general projects for almost every course we took ( still have to ), and it depended on the course content.
We had one such course, web data mining, for which I had to assemble a project. So I had this random idea where one could grab a bunch of ratings from different movie reviewing sites, and aggregate them to show a unified thing.
Now there were multiple, sections in the code that dealt with different parts of the task, like getting the response, parsing it, filtering the rating etc. I read those lines, and registered the fact that yes, if I try this approach on an other, simple website, with the same tree style grammar parsing technique, it should work. I did not look at the documentation of the library they used (BeautifulSoup), did not understand what
POST meant, but I still cooked up a script to scrape some numbers from an other website. Some parts worked, some didn't. Those that didn't, I searched why, and replaced my solution. Got the script to work finally, and in the process, I managed to learn the web request - response model, how HTML grammar is parsed ( tree like structure ), and in the base of all this, how a browser works in the first place.
It seemed quite unconventional to me, as most peers were undertaking proper development courses, and I did the trial and error experiment.
Their code was entirely Promisified - and I was able to understand the flow of the code, without actually knowing what a promise is, or why we use it. I assumed that yes, if I use this as boilerplate, I can modify it according to however I want.
This continued again, when I was introduced to blockchain, and Hyperledger Fabric in particular, during my first internship. I was asked to write some business logic in Golang, and I simply asked for existing code that they had on the topic. Without knowing what interfaces/pointers or anything "special" in the language, all I did was try to understand the flow and replicate it. Made assumptions based on my observations, and mostly, everything turned out to be right. Eventually, when I worked with the language more, I understood the core concepts.
In a sense, I developed this ability to start working with anything that is given to me, and learn by either mine or others' experience, rather than going the conventional way by following tutorials and video lectures. Give me some existing work, I will base my work on it, and validate if my assumption was right. If there's a new requirement, I learn how to implement it, and if it required a core concepts, I learnt that too, until my knowledge was sufficient.
Now I know, that this approach isn't a great way, as usually knowing something completely will allow you to assess and analyze all possible approaches to solving a problem, and pick out the best one.
However, this allowed me to get hands on experience, and learn way faster than a person who would go the usual way. Because eventually, if you really are learning something new, with practice, you will at some time have to understand everything that lies underneath.
What do you think about this approach? Do you think it will hamper my work skills? Let me know in the comments below.
Sorry for the long post, I'm tired of studying for my mid-terms :D