Appetizer vs Main Course— Language vs Framework

“Choose the least powerful method suitable for a given purpose” — rule of least power

If you are reading this, I can safely assume that you started on the wrong foot when you began coding. Don’t worry, I am here to tell you about the correct sequence of learning.

Keep reading, you’ll have a light saber in no time

What’s the difference?

A computer language is the fundamental unit of programming, but here we will consider it in a different context. Here we are comparing language to framework. Now what is a framework then?

A framework is an API built using a computer language, that serves the purpose of making the developer’s life easy by providing pre-implemented methods. Now it is a fair possibility that you know the ins and outs of a language while you are trying to master a framework that is developed on a completely different language — which is equally bad for your coding skill development.

Why is it that bad?

Well, I will share a personal experience of mine — I had mastered java to some extent when I used to do competitive programming in my freshman year, then I found my interest in web applications and ended up working for a startup, developing a web based software using AngularJS ( JavaScript framework developed by Google ). Time was of the essence so I had to quickly setup myself and start contributing so I had almost no time to read the docs and understand how things worked, I just figured out which method was used to do what by reading the source code and trust me, I became pretty good at it. I had no clue how JavaScript actually worked, yet here I was, master( That’s what I thought ) of a JavaScript framework.

But later when I started developing an application of my own, I sensed trouble. I had become totally dependent on the AngularJS APIs to work my way around anything, and eventually my code base became bloated with unnecessary API calls and redundant code. Had I know how JavaScript worked, I could have written much better code.

Let’s get into some reasoning

Remember, frameworks were made to make the developer’s life easy. It’s like a black box with some buttons on it to get the job done for you saving you the trouble of reinventing the wheel by abstract you out of the low level code(imperative code).

You know what I mean..

Now, if you wish to be the good law abiding developer your whole life, then I guess there is nothing much you can do from here, but if you are the mad scientist kind of programmer then the first thing you want to do is break that black box open and look what’s inside it and then may be later on you will have some bright ideas about making one on your own.

What should you do now?

Your first step should be to find out the underlying language that was used to write the framework that you are about to use. If you are not planning to use any framework any time soon, it is still a good idea to learn a versatile and useful language( Java, Python, Cpp, Go etc. ). I can guarantee that the time you invest in learning a language will never ever go in vain.

Now when you have sufficient understanding of the language( You don’t have to master it all at once, just get into the basics and rest will come over experience ), you are good to dive into a framework. Read the docs and try to figure out the motivation that lead to the design choice of the feature you are reading about.

NEVER EVER question the design judgement of the framework, realize this — the person who wrote the framework is much more experienced and smarter that you. Try to figure out the reasons that lead to such a judgement, that way you will actually develop the power to create and making good design decision later on in you coding career.

You don’t have to reinvent the wheel but it is always a good idea to take a peek under the hood to know how things are actually working. This makes you a power user and will give you the ability to write more efficient code that would fit perfectly with the framework. Also, if things break, knowing your way around the framework would actually give you the chance to track your steps back and find the bug.

Take away!

Your dream as a developer should always be to become the producer rather than the consumer. By that I mean, you should plan on creating things that make the lives of fellow developers easy, but that is only possible when you know how to use your tools well. The points that I mentioned above should help you get through that extra mile that others tend to miss out. BEST OF LUCK!

“Learning is a journey, let’s learn together”