Resources for Coding
Dekho there is no need to worry about not knowing anything about coding when you
first start out.
😂
Mujhe bhi nahi aata tha kuch. Jo seekha hai VJTI me hi seekha hai. School se bhi kuch
log Java karke aate hai, woh bhi nai tha mujhe
The main point in learning to code is to understand how your code runs and the basic
concepts like loops, conditions, variables. Language koi bhi seekho, agar yeh concepts
clear hai toh sab easy hojata hai.
A beginner "intro to programming" playlist is suggested
Chhota hai, but go through it properly. (No prior knowledge required)
Which language should I learn?
Beginners usually start out with one of C,C++, Python, Java or Javascript.
Let’s first understand why we have so many languages.
Can we just have one language? - Yes
Almost anything that you can do with one language can also be done with another.
But, Just doing the task is not our priority. How efficiently it is done is matters a
lot.(efficiency = fast, less memory,etc)
The efficiency part is why we have so many languages.
Each language is efficient at performing a certain type of task.
So we use different languages for different types of tasks.
Now lets understand what the famous languages are known for
C/C++ - fastest language, low level, gives you a lot of control. Heavily used in
embedded systems, os development, places where speed is primary
concern(think Machine Learning, Trading applications, Games, etc)
Python - very user friendly, easy to learn, existing package to do about anything,
lots of abstraction, slow, goto scripting language,used to “just get the task done”
Java - A huge portion of real world programs are developed with this, ranging
from enterprise to hardware applications. Relatively complicated.
Javascript - Primary language used in the web, it has developed a huge
community, you can do about anything, ironically the most commonly used
language.
So again, what language should I learn?
- C/C++
- When you’re learning your 1st programming language, its important to not
just learn the syntax, but also how your program is actually getting
executed and all the other aspects of the entire process.
- C and C++ provide a huge learning experience in this part, you get to
understand every phase, from preprocessing up till generation of machine
code, how your program is stored in your computer, where and how the
memory is allocated to variables, etc,etc.
- This is the time you learn all this stuff, other languages either will abstract
away or won’t go in this much depth.
- Try to understand what it is that makes c/c++ faster than others, for what
type of tasks c/c++ won't be a good choice. This is also where you’ll
understand why we need other languages.
If you have ‘C or C++?’ in mind, toss a coin for it!
Step by Step instructions for setting up C++ environment in Windows:
C++ - Environment Setup in Windows:
Want to find out which IDE suits you best?
Top 5 IDEs for C++
Cool VS Code Shortcuts
C Resources: -
CS50x Harvard by David Malan (The classic intro to programming - nothing gets any
better, make sure you’ve setup your C++ IDE before starting with this)
C++ Resources:-
1. CodeWithHarry (Best for Beginner and for CPPS too, advantage being ye Hindi
me hai)
2. Freecodecamp (From Beginner to Advanced)
3. Caleb Curry (Succinct and to the point)
4. C++ - Beginner to Beyond (An amazing C++ course for beginners, requires 2-3
months of consistent efforts but covers everything in great depth. Highly
Recommended)
Java Resources:-
1. Apna College (playlist)
2. Code with Harry
Python Resources:-
1. CodeWithHarry (Absolute Beginner)
2. Freecodecamp(from beginner to advanced and applications of the languages)
3. Harshit vashisth
4. PythonProgramming(OOPs related)
5. 30 days of Python
6. OOPs Python
7. Projects to try out
‘I already know C/C++, what should I learn?’
You can start building projects, learn some other language, choose a domain say web
dev or app dev, learn the technologies used there and build projects in them. And
maybe learn advanced C++, even if you think you do, you don't really know all of C++ :).
For each programming language:
- Focus on basics(syntaxes,lists,conditional loops,functions)
- Do mini projects based on it
- object oriented programming
(Abstraction,Encapsulation,Inheritance,Polymorphism)
How to make notes and revise ?
While watching the videos during the coding part open up the appropriate
IDE’s and code along with tutorials, write comments above or along the
code to better understand it and go thru it once before jumping to another
video
Try out different logical approaches to the problem being solved on your
own, this will build up logic skills and give u confidence to write your own
programs and experiment
Revision: usually we divide the playlist/extremely long video into parts and
view it, before jumping from one part to the next, revise the main concept of
the previous videos and go through/try out the programs on your own. This
continuous evaluation of the previous knowledge and coding along will give
you confidence
Shifting from one language to another
From c++ to python
Once you are comfortable with a language and have created some
complex projects you can shift to another language
Python is an extremely user-friendly, readable language and learning it is
extremely easy.
Keep on revising and working on c++/java based projects so as to not
😂
forget the language(especially the ; )
Programming is like math the better you understand and more you practice
it the better you get
Error Handling:
MOST COMMON ERROR TYPES:
-Logical:
Many times we make logical errors-operations related. i usually create a
pseudocode of the problem i am solving and then code it language specific
making sure i avoid syntax errors
there are many methods of debugging logical errors one common is 'duck'
debugging where you explain the your code to an inanimate object(like a
rubber duck or any other object).you can also go through the lines of code
line by line explain it to a person.this way you realize your mistakes while
explaining and fix it
this also helps to communicate your work and get a better grip on your
concepts
-Missing Syntax Pieces
make sure that the required syntax pieces are correctly ended with ; and
the the curly braces are completed(VS Code helps you match the{}by
highlighting a | between them).many times this error is raised so make sure
that before compilation the {} matches and the ; is placed where its required
-Incorrect Variable Referencing
make sure that you have correctly used the variable name's spelling
wherever required. VS Code temporarily highlights the variable names and
you can map it to its initialization and all references.this way you can know
where you might have made a mistake
I learned xyz language, where should I practice questions?
There are multiple websites for it, each known for their own speciality.
Here are some of the most well known ones -
- GeeksforGeeks - The most extensive website for, well, geeks. You can find
tutorials on all major technologies, and practice questions on them.
- For each data structure and algorithm, they have numerous questions in their
practice questions, with difficulties varying from basic to hard, start with the basic
ones and gradually level up as you get comfortable.
- Hackerrank - Most beginner friendly website. They have practice questions on
specific topics of a language and also data structures and algorithms, you get
badges for completing some set of questions, try to complete those to get more
comfortable in the language.
- Leetcode - Designed specifically to practice data structures and algorithms
questions. They have a good set of questions on each topic. You can filter out
questions based on certain topics you want.
- Codechef - A competitive programming website, if you’re interested in cp and are
a complete beginner, this can be a good place to start, they’ve questions based
on difficulty and you can start practicing with a difficulty level which suits you.
- Codeforces - The real competitive programming website, hard questions, might
be too complicated for absolute beginners. They have questions based on
difficulty level as well, try the ones you can.
Some other websites - Hackerearth, Atcoder.