Showing posts with label logic. Show all posts
Showing posts with label logic. Show all posts

Thursday, 18 July 2013

Which Programming Language to learn?


              If our era was of 1800 or before, then this question wouldn't have a relevance. Unfortunately or fortunately, now we are living in a world designed by a numerious programming languages. Every beginner or geek or job seeker are stunned and trying to cope up the race where the man with deep knoweldge as well as the domain knowledge on the latest hot programming language trend, earns the race medal. So, which language we have to learn so as to qualify this race and earn a reputation. I won't give the answer for this as simple as you think. Infact, I'am no one to give the answer. It' all upto you to decide after reading this.
 
                  There is no point in narrating the whole history and evolution by saying " first it was called "code" then one of the major languages FORTRAN and COBOL came, after that...." .  There are no shortage of languages already and yet the individuals & I.T Giants are launching object oriented, scripting, functional languages and many more. It's obvious that a person cannot study all languages in a short time. But it's a difficult task rather than an impossible task. That means, a person can study any language he wants provided some conditions he should meet.

 For a beginner, i would like them to pick from the shopping cart consisting of Java, C++, C & SQL.

Studying C is for the basic beginners. They will be introduced with the concepts of programming languages and the first division in programming language -> Functional Level Coding. So to be thorough with that, you can got for C learning. But it won't be a demanding one nowadays but all it can do is that, it can make your rest of the journey smooth. Otherwise it's like aiming for Black Belt directly without learning to attain White Belt,Blue belt, Purple belt and Brown Belt.

By learning Java and C++, you can make up yourself prepared for any other Object Oriented Programming Languages. First you learn C++ and then Java. It's said that If you can learn the logic behind C++, then you will find an ease to grasp Java. And if you can learn logic in Java, then you can study any other Object oriented programming language very easily.

Database is a demanding area for now and ever. Data is the only thing which our world and we deals with. Success of a new technology and language solely depends on how efficient it is in dealing with data (storing as well as presenting or processing data). So, studying a Database Language is a must for all who wants to long live in techy background. Regarding Database Language, as all I will also suggest SQL. It's a nice language which can aid your journey to a Database world. It all deals with the logic on how to insert, delete, update the tables and the over all view of tables and it's characteristics.


For printing a fibonacci series, we can write several logics, using a while loop and by using recursion also.



1.Normal Method in C++


#include<iostream>
using namespace std;

main()
{
int n, c, first = 0, second = 1, next;

cout << "Enter the number of terms of Fibonacci series you want" << endl;
cin >> n;

cout << "First " << n << " terms of Fibonacci series are :- " << endl;

for ( c = 0 ; c < n ; c++ )
{
if ( c <= 1 )
next = c;
else
{
next = first + second;
first = second;
second = next;
}
cout << next << endl;
}
  return 0;
}


2. Recursive Method in C++


#include<iostream.h>
#include<conio.h>

rec_fibo(int);

void main()
{
clrscr();


int n,i;

cout<<"Enter the total elements in the series : ";
cin>>n;
cout<<"\nThe Fibonacci series is:\n";
for(i=0;i<n;i++)
{
cout<<rec_fibo(i)<<" ";
}

getch();
}

rec_fibo(int n)
{
if(n==0)
return 0;
else if(n==1)
return 1;
else
return rec_fibo(n-1)+rec_fibo(n-2);
}



         Both ways yield same output. But what matters is the logic behind which yields output as well as efficiency. Efficiency means efficiency in time of processing, using memory space etc. All it brings you on the other level of coding. To reach the 2nd way, you have to study the 1st way. It's a natural philosophy that, you can run only after learning to walk. Same applies here !!! .....


   

         
                   

              

Thursday, 18 October 2012

Blinking Tips for cracking GATE exam




              I was a GATE 2012 aspirant. Still now I wonder how i cracked that GATE exam..surely it was about some luck that made my brains to think about the logic instantly which worked at the time. I went to Gateforum for gate coaching...out of 3 months training after the first month training..every saturday and sunday, I dropped the coaching due to the lack of interest when i got placement. I was in the dream of getting salary as soon as engineering course gets completed. Still, I want to do Mtech..as Btech being a common degree among us(though it's difficult to gain :-P ).

           Only thing you have to be sure is that, YOU SHOULD BE STRONG WITH YOUR BASICS.

Means, you will think the GATE questions will be damn tricky and all. Actually the questions are framed so that it can be cracked by those who understands the basic v.well. For eg: If you want to find first and follow, then you should be thorough with all the rules for finding it. Should not study partial..partial knowledge is more worse than ignorance. Because as there is negative marking,,if you believe on your partial basic knowledge ..then you are gonna mark the wrong one without even a doubt.


                  If you have some doubt among the options..then what you have to do is..compare the options..it's sure that you will find some oddness among the options and can extract the right option. This logic became very helpful for me to face the questionnaire battle.

                 When u get question paper..just get an over view of the question paper when the seal is broken. After that, you should go through the question paper 3 times.

First time, you should solve the questions puzzles in which you are sure of marking the right choice.

   Second time, Go with the doubtful questions and now you extract the option as mentioned in previous paragraph. Probably your time should almost get over by the end of second round.

Third, which is the last round...here you should be little more beware of negative marking..you should know the fact "IT'S NOT THE NUMBER OF CHOICES YOU MAKE MATTERS..IT'S THE NO: OF RIGHT CHOICE YOU MAKE MATTERS". So on the last round you should try to solve out the remaining puzzles with little more brain...don't matter if you break it or not..but leave the last 10 minutes for revising the whole question paper once..just to make sure you haven't left anything you know.If so,then you should need time to figure it out and solve..that's what for the  last 10 minutes.


http://gateforumtests.com/Onlinetest2013/register.php --> sites like these offers GATE mock tests.. try it..Each and Every aspirant can have the chance of knowing the answers of same number of questions as you know.So what makes you the best is "Faster & Sharper" ...just be fast in choosing the right choice..for that you should practice..practice...practice...

       So guys/gals solve the mock tests with timeouts..Strengthen up you basics..be Faster..more Specific... Gear up yourself for cracking GATE.