Jump to content

C# or Python?

- - - - -

  • Please log in to reply
7 replies to this topic

#1
avidgamer

avidgamer

    Newbie

  • Members
  • Pip
  • 3 posts
Hello all,

I'm looking for the best language for a person with 0% knowledge of programming at all. I want to start with a language that gives me a solid foundation of basic programming concepts while making it easy to migrate to harder languages. I've done quite a bit of research and managed to narrow down 2 languages, C# and Python.

I hope you guys can help me, as I'm eager to begin ASAP. If you have other languages that achieve the above traits, please do suggest them and I'll take a look. Also if you think I've picked the wrong languages for a beginner please explain why.

Thanks.;)

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
C# has C like syntax and is a lot more powerful than python, but many times more verbose and complex. You will need to learn many things such as low level data types to work with C#, Python is a scripting language (not needed to be compiled first) so it is simpler to perform and write functional code much speedier than a C-like language, so you may wish to start with Python first.

Some beginner (to non-programmer) guides for Python can be found here:
BeginnersGuide/NonProgrammers - PythonInfo Wiki
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
avidgamer

avidgamer

    Newbie

  • Members
  • Pip
  • 3 posts

Nullw0rm said:

C# has C like syntax and is a lot more powerful than python, but many times more verbose and complex. You will need to learn many things such as low level data types to work with C#, Python is a scripting language (not needed to be compiled first) so it is simpler to perform and write functional code much speedier than a C-like language, so you may wish to start with Python first.

Some beginner (to non-programmer) guides for Python can be found here:
BeginnersGuide/NonProgrammers - PythonInfo Wiki
Thanks a lot, I figured Python would be the No. 1 choice for beginners. Thats one thing I need to know, by learning Python, would it be easier to migrate to other languages such as C? I mean will it create any bad habits that would make transitions to other languages difficult?

#4
avidgamer

avidgamer

    Newbie

  • Members
  • Pip
  • 3 posts
Are there anything in Python that would make transitions to other languages such as C++ harder?

#5
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Algorithms (and learning them) is great in python because they are more simple to implement with less code, you can surely use much of what you learned such as functions, basic data types and structures like loops in C-like languages. They are too different to learn something "wrong" in one. Many people start out with higher level languages.

A sample of a sort of arrays in C#:
using System;

class Program
{
    static void Main()
    {
        string[] a = new string[]
        {
            "Egyptian",
            "Indian",
            "American",
            "Chinese",
            "Filipino",
        };
        Array.Sort(a);
        foreach (string s in a)
        {
            Console.WriteLine(s);
        }
    }
}
And in Python (something like this):
myarray = ["Egyptian",
            "Indian",
            "American",
            "Chinese",
            "Filipino"]

myarray.sort()

for val in myarray:
    print val
As you can see the syntax is much easier to follow in python when working with "low level" structures like arrays or lists.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#6
DarkLordofthePenguins

DarkLordofthePenguins

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 409 posts
Personally I don't think C# is a good first programming language because it doesn't really teach you programming practices and principles. I can't say anything about Python because I've never used it, but I have programmed in Java and I hated it (C# is basically the same thing as Java). But I suppose different things work for different people.

That being said, if you plan on programming in C#, I suggest using the Mono framework. It's an open-source implementation of .NET that works on all platforms. It has its own IDE called MonoDevelop, which, unlike Visual Studio, you can get the full version of for free.
Programming is a journey, not a destination.

#7
mrlemke

mrlemke

    Learning Programmer

  • Members
  • PipPipPip
  • 68 posts
  • Location:Redding, CA
As long as you understand programming concepts you can migrate to any language from any language. All you need to learn is its syntax.

#8
DarkLordofthePenguins

DarkLordofthePenguins

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 409 posts

daniel-lemke said:

As long as you understand programming concepts you can migrate to any language from any language. All you need to learn is its syntax.

With the obvious exception of brainfu¢k.
Programming is a journey, not a destination.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users