HOW TO GET STARTED WITH PROGRAMMING


Hwo to get started with programming

Before we dive into programming, let’s have a look at the skills that make you a Good Programmer.
  1. Knowledge of one Programming Language (C, C++, Java, Python, …. etc)
  2. Problem solving skills
  3. Basic Knowledge of Algorithms
  4. Need to have an idea about the different online platforms like (Hacker rank, hacker earth, Spoj..etc)
  5. Identify the roles that you are looking for, which could be a Developer, tester, etc
Now, without further ado, let’s go through the step by step procedure that we need to follow to get expertise in the Programming.
  1. Learn the Programming language basics of your choice, try to solve the simple problems in the beginning.
    Note: If you are a beginner, I’ll suggest you to start from C as the preferred language.The reason behind this is that the built-in functions for the C library are less when compared to other programming languages. In this process you will implement your own logic for the problem. Likewise, you can improve your logical and coding skills. Beginners link

    Textbooks for C Language:
    1. Dennis Ritche’s book is the best for learning C
    2. Darrel Graham
    3. C Programming Absolute Beginner’s Guide, Third Edition, Greg Perry, Dean Miller, Pearson Education
    4. Programming in C, Fourth Edition, Stephen G. Kochan, Pearson Education
    5. Let Us CBook by Ashutosh Pandey and Yashavant Kanetkar
    6. Practical C in O Reilly publication
  2. Choose Object Oriented Language of your choice and implement the same. Hands-on experience is the most important thing.

    Textbooks for Java:
    I suggest you refer to ‘ Deitel & Deitel’ completely.
    In addition, O Reilly has a lot of books for each Java package which are extremely good. But it's not suggestable for beginners. If you have basic knowledge of Java, then I strongly recommend you to go for it.
  3. A programmer needs Basic ‘Data Structures’ knowledge and learns the basics crystal clear. Experience hands-on. Make a habit to solve at least 2 problems per day.
    Note: Data structures are more essential when it comes to competing in good computational and programming contests.

    Advanced Data Structures TextBooks:
    Algorithms Part I and II by Sedgewick and Wayne
  4. Choose Cpp as preferred Language and practice the same. Learn the Basic Data Structures and try implementing those.
    Note: The reason to learn Cpp is because Java is not a purely object-oriented programming language. Most of the programmers prefer Cpp because of its flexibility.

    C++ TextBooks:
    1. Let Us C++ by Yashwant Kanetkar
    2. The C++ Programming Language by Bjarne Stroustrup
    3. C++ Primer by Stanley B. Lippman
    4. Programming: Principles and Practice Using C++ by Bjarne Stroustrup
  5. Try to learn about the Complexity of the Programs and try to reduce it by applying the efficient solution.
    Note: Here comes the calculation of the complexity related to time and space. Program should be efficient from all perspectives.

    Textbook for Advanced data structures:
    Introduction to algorithms by LCR (Cormen)



Step By Step Procedure need to follow to get the accurate and efficient solution


Step by step procedure for efficient solution

  1. Before attempting the problem, analyse the problem statement with keen observation. Read the problem statement again and again till you get a clear idea on the given problem statement.
  2. Once the problem statement is understood, think about the logic in different directions and try to optimise the time complexity in every possible way.
    Example: Consider the problem statement of printing all the prime numbers up to a given number.
    • The first and foremost approach of yours will be a naïve approach (brute force).
    • If you think further, you can skip all the even numbers. This will reduce half the computational time.
    • If you think further, eliminating the divisors will be helpful.
    • Further into, you will get another approach i.e the sieve approach which is the best in this case. Likewise, by analyzing the question, try to reduce the time and space complexity, finally ending up with an efficient solution.
  3. Once you get efficient approach to solve the problem statement, don’t directly dive into the program, write your own testcases, cross validate with your logic.
  4. Note: The test cases must be framed for different scenarios such that it makes you think if your developed logic will fail for any of them.
  5. Once done with the testcases, think about the data structure that is apt for your implemented logic.
  6. Once the data structure is identified, choose a programming language that you like. (In rare cases choosing the programming language also plays a vital role).
  7. Finally while implementing the program, it is suggested to follow some best practices.



Best Practices


Best Practices

  1. While writing the Program (of your preferred languages) you need to follow the coding standards. Do not simply add headers/libraries to your program. If the library/header is not used in your program, it might lead to unnecessary consumption of the memory.
  2. Divide the program into a number of pieces, making each piece one function. We strongly recommend that you that the driver program(main) should not contain anything except the input, function calling and the output.The reason behind this practice is if your implemented code is more than 100 lines, then it will get very difficult to identify the mistakes committed. Technically, debugging is very difficult if you implement the entire logic is in one single function (that is :main)
  3. Do not print the output in the function if you get your desired output. Always, return the output to main function and display using the standard output functions, which is very helpful while debugging.
  4. Try to minimise the variables usage as much as possible.
  5. Readability of the program is also an important aspect, your code must be easy to understand. Naming convention must be followed when necessary, that is, do not give random names to variables/methods. The names must be such that they resemble the functionality/usage of the method/variable.
  6. It’s always a good practice to write comments regarding functionality of the function, and anywhere else necessary. This will be very helpful when you revisit your program after long time.



POPULAR ALGORITHMS


Linear Data Structure

Linear Data structures

Basic Algorithms

Basic Algorithms

Popular Algorithm Techniques

Popular Algorithm Techniques

Non Linear Data Structures

Non Linear Data Structures

Graphs

Graphs

By this time, you are already pretty good with programming. You will do better than most of undergrad CS students. If you want to learn more and delve deep read more.

Advance Tree and Graph

Advanced Tree and Graph

String Pattern Algorithms

String Patter Algorithms




L
o
a
d
i
n
g
.
.
.
Sign Up Page
oops

Login to see solution/discussion