General Thoughts

Being my first WyzAnt post, I figured I'd just ponder on a fallacious belief new programmers generally have. But before that, allow me to introduce myself! My name is Jaffer, I am a student at APSU, a senior with a major in Computer Science and a minor in Mathematics. I chose to become a CS major because, well, I love video games and I've always wanted to make them. That is why I really got into C# and XNA, as it makes the life of a game programmer significantly easier. I've used C, C++, Java, C#, Ruby, Fortran, Erlang, F#, VB, HTML, PHP, SQL and who really knows what else, and this is over the course of just 2 years really.

So, onto the biggest fallacy a new programmer probably believes: Fallacy: Learning my first language was hard and took a long time (it usually does!). I don't want to learn another language because it will take forever.

Truth: Learning a programming language is not about memorizing syntax or semantics, nor is it a test of if you can place each semicolon or carriage return in the right place. Programming is a process of problem solving -- for example, lets say you want to sort a list of numbers in ascending order. What steps do you need to take to solve such a problem? Well first you need to look at each item, and compare it to another item. If they are not properly ordered, you need to swap them. You repeat this until all the items until the list is sorted.

Well, considering this, lets break it down into pragmatic steps: Look at each item in a list - for a "list" of items, you will likely need a mechanism to hold these items. Well, an Array can do that! With a quick reference manual or internet search, you could find out how to make an array in any programming language. You can also find similar data structures (such as a List or ArrayList, Vector, et al).

Compare the items - To compare items and take the appropriate action is two steps. First, you need to compare them. If x is greater than y, do this. Otherwise, do that. Finding out how to compare two entities is equally as easy as the previous step, though using the general >, <, >=, <=, ==, != will most likely work. Finding out the syntax of an if statement should be no problem.

Swap (if necessary) - Swapping items is the same in any language in the most general sense, although there may be better alternatives. To swap two integers, all you need to do is this:

int z = x;

x = y;

y = z;

And viola, the items are swapped. However, if the language supports parallel assignment like Ruby, you can simply do this:

x, y = y, x

In a single line! When the process is broken down in to general steps, you match the programming concepts to the process, not the other way around. After really learning how to program, picking up a new language could take 5 days for simpler languages (like Visual Basic), or two weeks for more bulky languages (C#, Java). But it will certainly not take as long as your first language.


The first programming language is always the hardest. Once you get the concepts of decisions, loops, and breaking a program into smaller pieces using functions, methods, subroutines, paragraphs, or what ever the language calls the smaller pieces, you can pick up the basics of another language fairly quickly.  While you can pick up the basics in a few days or a couple of weeks, you will not learn all of the capabilities of a language that quick. Do not expect to become an expert in any language in a few weeks. Programmers become experts in a language only after writing multiple programs and many, many lines of code, and taking other programmer's programs and making maintenance changes to them.


Jaffer I.

Computer Science Tutor in Clarksville

if (isMyPost) { }