Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: First Programming Language

  1. #1
    Join Date
    Jun 2007
    Posts
    678
    Rep Power
    0

    Exclamation First Programming Language To Learn

    Newbies wanting to learn choose there first language should go for a good language (along with many other hackers) recommend python as a first language

    Of the various popular scripting languages, Python is probably closest in form to traditional system languages (Laird & Soraiz, 1998b). It also, arguably, has the best constellation of features to recommend it as a first programming language. It is not the intent of this paper to give a Python tutorial; several good references are available for that purpose (Lutz, 1996; Watters, Van Rossum, & Ahlstrom, 1996). A host of good Python resources can be found on the Internet at http://www.python.org.). Instead, I will focus on the features of Python that make it a particularly good choice among scripting languages as a first computer programming language. In the course of the discussion I will compare Python to C++, currently the most common first language, and Java, the language most commonly listed as ``in consideration. (McCauley and Manaris, 1998)''


    Python is simple
    In general, scripting languages are much simpler than system languages like C++ and Java (Laird & Soraiz, 1998b). Python has a simple, regular syntax. Statements are terminated by end of line, and block structure is indicated by indentation. Python programs look like executable pseudo-code. This eliminates a host of troublesome errors for beginning programmers, especially placement of semi-colons, bracketing and indentation. For example, a common error in C++ and Java is the failure to enclose a block in braces as:

    if (x < 0)
    cout << "x was negative";
    x = -x;


    In Python the corresponding code executes as expected, since the indentation itself determines the block:

    if x < 0:
    print "x was negative"
    x = -x


    Python supports the use of functions and classes but does not force it. Simple programs really are simple. For example, consider the ubiquitous ``Hello World'' program in Python:

    print "Hello World!"

    C++ requires this program to be wrapped in a function and preceded by a preprocessor directive:

    #include <iostream.h>
    int main()
    {
    cout << "Hello World!";
    }

    In Java, the situation is even worse, as all code must be inside of a class:

    public class helloWorld
    {
    public static void main(String [] args)
    {
    System.out.println("Hello World!");
    }
    }

    Semantically, Python is also simple. Python is dynamically typed, so there is no need for variable declarations. This reduces the amount of code that students have to write and also eliminates common errors stemming from misunderstanding the subtle distinctions of declaration, definition and use. For example, students in C++ and Java often ``accidently'' redeclare variables where they really only want to use them (typing int count = 0; when they mean count = 0). Such mistakes can be hard to track down.

    Python has a minimal but complete set of simple control structures: one selection construct (if-elif-else), one definite loop (for) and one indefinite loop (while). Python also has a modern exception handling mechanism similar to that found in C++ and Java. Unlike Java, however, you do not have to understand the exception mechanism to write simple programs. From a pedagogical perspective, Python's for loop is illustrative. It allows a control variable to take on successive values in a sequence. It can be used to iterate through any sequence such as a list (array) or string. For example, the items in a list can be printed as follows:

    for item in List:
    print item

    The range operation produces a sequence of numbers in a given range. For example, range(5) produces the list [0,1,2,3,4]. This can be used to provide numerically-controlled loops. The previous code could have been written (less clearly) as:

    for i in range(len(List)):
    print List[i]

    The for loop is simple and safe, allowing it to be introduced very early with no fear of infinite loops.

    Python has a simple uniform data model. Variables are always references to heap allocated values (objects). The model is consistent, avoiding the confusion over heap versus automatic variables in C++ or primitive versus object types in Java. Both of these languages require the teaching of multiple allocation models to implement even relatively simple programs.

    Similarly, Python has only a single parameter passing mechanism (by value). Parameter passing is simply assignment of actual to formal parameters at call time. Once students understand the simple assignment model, they get parameter passing for free.


    Python is fun
    The simplicity of Python makes it easy to learn. In addition to the list (dynamic array) data structure, Python provides tuples (immutable lists) and dictionaries (hash tables). Together with the class mechanism, these can be used to quickly build sophisticated data structures for interesting projects. The absence of type declarations makes for less code and more flexible programming. There is also a huge library of standard and contributed modules providing components for programming GUIs, client-server applications, html viewers, databases, animations, and much more. The rising popularity of scripting languages is directly attributable to the ease with which sophisticated applications can be built by combining off-the-shelf components. Interesting projects can be developed with only a fraction of the code that would be required in a system language. If we are serious about designing engaging introductory courses, Python seems to be a natural choice.

    NB: STRONGLY RECOMMEND PYTHON AS A FIRST LANGUAGE

    Information was drawn from books and sources viewed. All of the respective authors ave been credited

    References
    Laird, C., Soraiz, K., (1998). Getting Started with Python, SunWorld Online, February, http://www.sun.com/sunworldonline/sw...02-python.html

    Laird, C., Soraiz, K., (1998). Get a Grip on Scripts, Byte, June, pp. 89-96.

    Lutz, M., (1996). Programming Python, O'Reilly & Associates, Inc.

    McCauley, R. and Manaris, B., (1998). Computer Science Programs: What Do They Look Like? Proceedings of the 29th SIGCSE Technical Symposium on Computer Science Education, February, pp. 15-19.

    Ousterhout, J., (1998). Scripting: Higher Level Programming for the 21st Century, IEEE Computer, March.

    Watters, A., van Rossum, G., Ahlstrom, J., (1996). Internet Programming with Python, M & T Books, New York, New York.
    Last edited by ferronrsmith; Jun 22, 2007 at 06:45 PM.

  2. #2
    Join Date
    Oct 2005
    Posts
    745
    Rep Power
    0

    Default

    3.14159265358979323846264338327950288
    4197169399375105820974944592307816406
    28620899862803482534211706798 pi 101

  3. #3
    Join Date
    Feb 2006
    Posts
    4,242
    Rep Power
    0

    Default

    C was my first language then C++
    just the basic though.
    |--- www.RealJamaicaEstate.com ™ ---|
    Invest small = small returns [micro enterprise] | Invest Big = returns Big [macro enterprise]
    --- www.fashionsJAMAICA.com ™ -|- www.ChampsJamaica.com

  4. #4
    Join Date
    May 2003
    Posts
    229
    Rep Power
    0

    Default

    I don't think there is a best first programming language for everyone. The programming language is just a one part of the overall learning experience. I figure that other factors are also important such as:

    1. Quality of the teaching (if not self taught).
    2. Quality of the course (tutorials, references, examples, etc).
    3. Quality of the programming environment.
    4. Background of the student.

  5. #5
    Join Date
    Mar 2003
    Posts
    492
    Rep Power
    0

    Default

    C++ is a good first language because its syntax is the precursor to many so called 'first languages.' Besides, it is the language of the most populous operating system on the planet.

  6. #6
    Join Date
    Jun 2007
    Posts
    678
    Rep Power
    0

    Default

    all you guys think about is popularity. hmm....

  7. #7
    Join Date
    Apr 2007
    Posts
    1,259
    Rep Power
    0

    Default

    "N" that cam up how anyway....... As i was saying blunty killer you r right i read in a forum and they said the best language to learn first is C++ but what i wantto know is how ya start write and all a dat??
    www.carhuntja.com - Buy and Sell Cars in Jamaica! - Coming Soon
    www.blackspade-ent.com - Jamaicas #1 Online Community
    www.mybbunlock.com - Instant Blackberry Unlocks Only 9.99 USD
    www.starallianceja.com - Negril's #1 In Entertainment

  8. #8
    Join Date
    Mar 2003
    Posts
    492
    Rep Power
    0

    Default

    An Introduction to C++ Programming. This article also includes styles of programming.

    Ferron, are you serious? Yes, the reason why it is popular is because it is a gold standard. And a gold standard is the yard stick, it is that which you judge others by. Just as x86 is a standard for desktop processors. If you are to study processor design as an engineer, you are going to looking at the x86 architecture more than SPARC or PowerPC (A/M) processors. Why because the x86 is a gold standard, it runs probably 90% of desktop computers. In the same way C++ is used to write probably 60-70% of the programs on those desktops. The most popular operating system, Windows, is written in C++. Isn't Linux written in C++?

  9. #9
    Join Date
    Jun 2007
    Posts
    678
    Rep Power
    0

    Default

    You see Blunty Killer what you fail to understand is i wasn't talking about who's more popularity. I suggesting what language a newbie should yous when first learning programming, it seems to me that you never programmed python so i guess you fail to see the difference between it and C++. C++ is a very popular language, but i wouldn't suggest for a first language, praises to you if it was your first. Because a language is popular doesn't mean a person should learn it first.

    I learn C++ and it ain't good first language, but is needed for compiling OS as you said.

    Python is a good first language asked the reverse engineers

  10. #10
    Join Date
    Mar 2003
    Posts
    492
    Rep Power
    0

    Default

    Quote Originally Posted by ferronrsmith View Post
    Python is a good first language asked the reverse engineers
    Reverse engineering is a very small subset of the programming population. People dont go into programming to become hackers. People going into to create, and today the language most often used in that creation process is C++. That's it, there is nothing more to the picture.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •