Learn to code in this era where generation is fast-paced moving towards learning in a quick fashion.
Let me share you one interesting story of my son. My son wanted to learn coding. One day he comes to me and asks a dozen of questions.
- Can I learn programming?
- How difficult is it to learn to code?
- How quickly would I be able to learn to code?
- Can I build my own software?
- Which programming language is the best?
and many more..
After spending a few days with that book, he comes back to me, saying, I don’t think you have given me the right material. I was rather looking for something which I could see happening, for example a mobile application or a program running on a computer.
Sorry to say that the stuff you have provided me is really boring and I can’t keep it up with this.
I had no answer or anything to argue with my son. I took some privilege of time from him and told that I will try to find out the answers. Allow, me some time.
Now, I’d to do some work as I was having a list of enough questions to work upon.
I spent couple of days digging down in search for answers in practical manner.
After my research trial and error I was able to compile the set of answers I was expected to share.
Luckily, I was having few students of mine who were really passionate about technology. I shared this compiled list with my students and my son to get the final approval.
Luckily, it worked out for them. And, they were able to solve real world problems through coding.
Let me also share these answers with you. This list might help you in making the right decisions for your coding career. Here is the revealed list :
Which programming language is the best for coding?
Learn to code, you may wonder seeing the exhausted list of programming languages available these days. Now, to choose one seems like searching for your lost gem in the collection of thousands.
And, this is most critical part towards the journey of coding. To start, first and foremost thing is to decide which programming language to work upon or to choose the one for your career.
If you have already compiled this list and figured out the one for yourself than I would say you have already won half the battle and you can skip this part.
If not, you can refer to the simple approach I tried myself in making this decision.
1. Identify the Platform
2. Identify the programming language
1. Identifying the Platform of your Interest
Computer Platform is basically an environment where your piece of coding or software will be executed.
Now, rather than directly delving into the list of programming languages and get exhausted with it. Let’s try to reduce the number of options by looking at the picture at higher level.
Start from computer platforms and drill down towards the programming languages which are currently used to support that platform. Different platforms, such as : Windows, Linux, iPhone, MAC, Android, Web, Artificial Intelligence, Hardware, Database etc.
Here, we are trying to reduce the number of options, so that it becomes easy for you to identify your dream language.
We are not trying to find out the programming language rather it is to unlock your passion for success.
Let’s suppose Hardware Layer makes more sense to you or it is as per your heightened interest. If you drill down you can find the supporting programming languages such as : C, C++ could be the options to go with. Now, it becomes fairly easy for you to decide which language to start with. It has long term impact in your career.
I am not forcing you to stick to any one programming language or computer platform. I am rather suggesting you to do this research before you start to code. And,
“when you start, you learn it fast, as you go with your passion or interest”
Interest is the key to success.
It is worth spending time on deciding the platform and a programming language.
Explore these different platforms and try to figure out the ones which interests you most.
Your journey towards “learn to code” will begin with this.
2. Identifying the coding language of your Interest
Once you identify the platform, look for all the different programming languages which works in support for your chosen platform.
Again, explore these languages. You may have to go through the basic information or idea behind the creation of each programming language being built. Go through the history and future support of the language.
Why is it Important to choose coding/programming language of your Interest?
It may not be a good idea to just pick up any programming language and start coding. By going through hit and trial method, you may end up spending more time in just understanding the code syntax rather than the actual designing aspects.
Here, we are trying to reduce the number of trials you will go through. Its okay if you are not able to come up with one language or platform at this time, you can still go ahead and try out different platforms and supporting languages for few days and later decide for your favourite ones. But, you definitely have to work to reduce the number of options you currently have.
How to Learn to Code?
Seeing the title of the page, you may have wondered to start immediately with this. But, you may also agree to the importance of points mentioned above towards this journey.
Here I am going to reveal the secret behind coding.
How to make it interesting?
I think this was the first and most important of all.
Some of you may argue that we came here to learn to code, not data structure. Don’t worry I will come back to that but learning to code without data structure is like a field engineer without his kit of tools.
Data structure is definitely not the code, but it will well equipped you with the tools you need while coding.
Let me take you back to the story of my son. I did not try to convince him to learn the data-structure and algorithms, rather I did something different.
I tried to give him a set of real world problems and asked for a solution on a piece of paper, not a computer program.
Here is the first problem I gave :
PROBLEM 1 : Prepare one cup of tea at a time and make sure the amount of sugar added will be as per the customer’s choice.
Before you jump into solution below, try to solve it by yourself using pen and paper.
SOLUTION 1 : The solution would comprise of few steps such as :
STEP 1 : To prepare a cup of tea, you should have these inputs available :
Water, Milk, Tea Leaves, Sugar, Pan, Cup and a Heater.
STEP 2 : Provision to get input as sugar from the customer.
STEP 3 : Tea Processor or a pot, which will fetch the right amount of material and sugar required to prepare for a cup of tea.
STEP 4 : Delivery module, to deliver once tea is ready to be served.
He shared these steps to me. Now, I asked him to create a computer program which will prepare that one cup for me, what will be required.
His reply : hmm, … I don’t know.
Now, its my turn to play. The answer is data structure, to have all the information stored somewhere, it is required to have a data structure which is going to be backbone of your coding.
For example quantity of water required for one cup of tea has to be fetched and stored using data-structure.
PROBLEM 2 : Searching for friend’s friend on facebook or instagram.
Hint : Before diving and thinking about facebook or instagram, you can try this out in your friend circle. Lets suppose you remembered your school friend but you don’t have any contact information to reach him but you are certain that he may be in your friends friend list, how will you find that person out if you don’t have facebook or social media account.
Solution 2 :
1. Since he/she is a school friend, you will locate your friends of that school.
2. Next, if he/she was studying in the same batch, you will have a filtered list.
3. If you know the location of the person. You keep reducing the number of people you need to contact.
You would probably try to reduce the number of options as above and finally, you will reach out the shortlisted people and ask them about your friend.
This is how you find the details of your friend.
Now, you already know the algorithm, you can simply apply it here. Creating algorithm but you are not aware which data structure. Now, you may understand the importance of data-structure in computer science.
Here, we will be using Graph, what is graph and why?
If you are interested in knowing the complete solution, write in the comment box below.
PROBLEM 3 : I have a library of incredible books, where people often visits and read books. These books have been arranged properly as per their category. Now, since there is no one to look after these readers. They don’t put the books back at the places where they are suppose to be kept.
This keeps annoying me. I am looking for an automated solution to this problem, please tell me what should I do?
PROBLEM 4 : I am a reader and I read many books, but there is a problem. I easily forget the important aspects which I highlight in the book. Though I mark those lines with some background, but still I never felt like opening that book again, just to read the markers.
I am looking for a solution which can generate a copy of those marked points with the title of the chapter and if I want to navigate to that page in the book, I should be able to do that.
PROBLEM 5 : These days there are too many advertisements coming on my favorite TV Programs. As soon as advertisements appear on the program I immediately switch between the programs.
I need a solution which can automatically switch to a different program among my selected list. It should be triggered only when there is an advertisement running, so that I don’t have to manually switch the program.
I understand, if you are running your programs in TV Channels and earn through advertisements. You are going to hate this being called a problem. I am sorry for that.
There are many such real world problems I created for my students. Putting them here might distract the course of our action. If you are interested in knowing the complete list of problems with its solution, write in the comment box below or contact us here.
With this tutorial of ‘learn to code’ I would want to refer you to the real world problems around us. You yourself might observe them, the problems can be really big, hard or small doesn’t matter. Keep adding these problems in a note book or somewhere in your records.
Try to look for solution as and when you get some time. You need to breakdown the problem statement into smaller parts, so that you can identify the portions which can be solved using a computer program.
Before you directly jump into your computer screen to type your code. I would suggest you create the algorithm on a piece of paper, so later you can execute the same using a computer program.
All these incredible software programs today, are just because of the great problems. You never know when you get into this habit of solving problems, one day you might also be the one offering great solution to the world.
I owe my regards to you, best of luck with your coding career. If you are looking for a mentor who can help you with your coding career, please fill up this form and send it.
If you thing whatever I shared makes sense to you, hit the like button and subscribe here for more contents on software programming practices.
There is another important article on Clean Code, you must read that for your successful coding career. Refer to this link ‘Write Clean Code in One Statement’ for the same.
If you haven’t tried the ‘Code Generator’ as yet. Please refer to this link here for free download of the application. This tool can help you generate professional source code in few clicks.