Raj Agrawal

Learnings from software and technology

  • Home
  • Technology
  • Software
  • Work
  • Play

Connect

  • GitHub
  • LinkedIn
  • YouTube

Powered by Genesis

You are here: Home / Archives for Software

To Code Or Not To Code? – Coding Myth #1

July 23, 2011 by Raj Agrawal Leave a Comment

Coding Myths – Like any other rapidly evolving technology/ methodology, ‘programming’ has also been a victim of the wretched myths. It’s very easy for novice programmers to be convinced that manual coding is losing it’s importance and automated software generation will entirely take over in years to come. Some even naively predict that, somewhere in future, programmers will face a dead end in their career as software will be developed straight from the user’s specifications. In this article, I aim to bust this myth and educate the victims of the myth.

wtf code joke
Quality code vs Bad Code

The level of abstraction seen in many high level languages today is phenomenal, take C# (Sharp) for example. It will never eliminate the need for manual coding since all the requirements will have to be accurate, formal and detailed enough so that the machine can perceive and execute it properly. A code is the foundation of an application that represents every minute detail of the requirements; as a programmer, one just can’t ignore these details at any stage of development. Also, a program grows imperfect as the level of complexity increases. We cannot either ignore a universal rule that there is always room for improvement. So, no matter what generation of programming technology/ methodology a program is built with, at some point of time, the source code or a module will definitely need manual alteration/ updates.

Many ambitious aspirants wish to build artificially intelligent machines, aiming to output “What one wants” rather “What one says”. For this, the machines will really have to understand a user, precise enough that it can translate even the most ambiguous decision into perfectly executable programs and succeed.

One really has to remember that a code is the ultimate expression of systems requirements. A programmer may use any language or custom tools to build a program. The need for manual coding will never die, rather exist to seek perfection the built application.

Do share in your valuable opinions on this, using the comments section below.

Filed Under: Software Tagged With: myths, Programming

A Comprehensive Guide To Hone Your Programming Skills

July 14, 2011 by Raj Agrawal Leave a Comment

For a beginner, programming has always been a tricky proposition. Learning a new language is never easy; one which is used to refer computers is even more difficult to grasp. Programming can only be mastered with proper understanding and training.

As an aspiring programmer, it can be really difficult to get the hang of things right away. It is very easy to be intimidated by a 1,000 line code. Most people give up before even trying their hand at a particularly complicated program; as an aspirant, the minute you start doubting your abilities, you lose the willing to even try. Its a defense mechanism etched in the human brain; one which must be dealt with inorder to become a better coder. In the programming world, nothing is impossible. Once you have an idea, you can implement it in multiple ways. It can a be difficult to comprehend this concept in the initial stages, when all you’re trying to learn is the syntax of a particular language. But, the real challenge begins when you become adept to a particular language and try to apply it to create a working program. This transition from syntax oriented to application oriented approach is the most difficult one. Once you get the hang of it, no program is difficult.

For a programmer of any skill level, there are few practices to significantly improve the learning curve and set you apart from the average devs. These practices are not related directly to syntax, but rather with the skills one has to develop to be a better coder. They will act as an aiding mechanism for the programmer to develop software in a more efficient manner.

Debugging

debugging bugs

This is the a crucial skill any programmer must possess. A program code is bound to have errors; this is especially true in the case of large programs. The errors might either be syntactical or logical. The syntactical errors will be detected by the compiler which will issue a warning message along with the line at which the error occurred. Logical errors are not so easy to detect. Most of the logical errors occur during assignments, conditions and looping. Hence, it is important to thoroughly check your logic for those respective blocks. Often the best way of debugging is to print dummy statements just to see if a particular condition is getting executed or a loop is looping the intended number of iterations. Consider the following piece of code,


#include<stdio.h>main()

{

     int i;

     for(i = 0;i<9;i++)

     {
             printf("%d",++i);
     }

}

The above program should print values from 1  to  10.  But the output is 13579

This output might be confusing for some beginners. The error is that i is getting incremented twice, first in the loop, and then again in the printf statement. In such situations, take a pen and a paper and write down the obtained value of i on each iteration. Understanding the code line by line is the best way to debug a program.

Efficiency

chicken comic
!

With the ever increasing capacity of hard disks, efficiency with respect to source code’s file size has become less important now, but its important nonetheless. As a programmer, you will always have multiple ways of solving any given program, but you must choose the one which is the most efficient and time saving. A program might not require much processing power, but there are many such programs running simultaneously in the system, hence it is important to maintain a level of efficiency. Certain aspects of programming like loops, use of decimal numbers, the excessive use of files etc can be quite taxing on the system and hence should be avoided as much as possible. Always refine the code so that it executes the least number of lines possible. Always be on the lookout for alternate methods to solve a program, and evaluate each one of them to find the best possible solution.

Confidence

funny cat confidence
That’s a key

This is not directly associated with programming, but is possibly the most important quality a programmer should have. To an amateur, writing a complex code can be quite a daunting task. Plus with deadlines to meet, one can be easily intimidated with the prospect of failure. In order to solve any program, one should have a clear and calm attitude, which can only happen if one is confident about his skills. As long as you know the syntax, no program is unsolvable. All you need to do is to be patient and look for a solution without getting restless about your inability to do so. The human mind has a tendency to give up on a particular train of thought and look elsewhere if nothing is to be gained from it. The only difference is how much time it takes. For some, its like an epiphany. For others, its a progressive realization. That’s why confidence in oneself is critical for success.

Practice

bart practice
Will you?

Practice makes perfect! The more you practice, the better you will get with programming. There are many standard workarounds for each problem, and it becomes easier to remember them if you practice. It gets you acquainted with several debugging and time saving methods which can be used again and again. It also makes you think out of the box and try different methods to deal with different programs.

Naming conventions

Often you will have to use a large number of variables for different aspects of your program. If their names are not probably defined, then it might get confusing to keep track of all of them. Hence, it is important to name the variables in a manner that makes them relevant to the program. This makes it easier to identify and differentiate between them. It also makes it easier for the other users to understand the code.


#include<stdio.h>
main()
{
     int add1,add2,result;
     add1 = 10;
     add2 = 10;
     result = add1 + add2;
     printf("%d",result);
}

Code documentation

It is critical to document each and every piece of code that you write. Add comments where ever possible; this makes it easier to understand the code, which is especially useful in the case of a large program with several lines. Once a particular program is well documented, it can be distributed to other people, without the need to explain them the purpose and working of the code. A succint code will always have more efficacy than an ambiguous one.


#include<stdio.h>
//This program helps to find the average of 5 numbers
main()
{
     //Declaring variables
     int temp, sum=0, average,j;
     //taking input and adding it
     for(j = 0;j<5;j++)
     {
          printf("Enter input no %d",j+1);
          scanf("%d",&temp);
          sum = sum + temp;
     }
     //taking average
     average = sum/5;
     //Displaying average
     printf("%d",average);
}

If a programmer can incorporate all these skills in his/her repertoire, then he/she should have no problems in solving any code. Its not possible to bring about a sudden revolution; changing your manner of thinking in a fortnight is impossible. Take one step at a time and work on it, and success shouldn’t be far off.

Filed Under: Software Tagged With: Programming

The Youngest IT Administrator At 9, Marko Calasan

January 20, 2010 by Raj Agrawal 5 Comments

Marko learnt to read and write at the age of 2 and started working on computers immediately

He achieved his first professional credential at age of 6 . Marko Calasan is a 9yr old from Macedonia and has been dubbed the Mozart of Computers when he passed the Microsoft Certified Systems Administrator exam. He is managing a network of PCs at a nonprofit that works with people with disabilities.

Marko at work

Marko learnt to read and write at the age of 2 and started working on computers immediately. The news of his extraordinary achievement turned him into a local celebrity and he has even had an audience with the Macedonian Prime Minister, Nikola Gruevski, who presented him with an IT lab with 15 computers to practise on. Source: TimesOnline

This video was taken when he was 7 years old and is in Macedonian language, but people who don’t understand it can easily read between the lines

Marko is speaking to a crowd at Microsoft’s Slovenian offices, discussing Active Directory

The Microsoft officials gave me computer games and DVDs with cartoons when I passed the exams because I am a child. That was nice, but I’m not really interested in those things. I’d like to be a computer scientist when I grow up and create a new operational system – Marko told The Times.

At school, Marko’s favorite subject is maths, and in his spare time he browses internet forums for IT professionals and participates in debates about complex computer engineering problems.

Marko at work

Marko displayed exceptional learning abilities at a very early age. He was able to replicate a computer operation after only reading about it on the internet. Now we ask him for help when we have some IT related problem at work, Marko’s mother, Radica Calasan, 38, told The Times.

Image and data source: TimesOnline and ZdnetNews

Filed Under: Software Tagged With: microsoft

  • « Previous Page
  • 1
  • 2
  • 3
  • Next Page »