Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why Python?

Why Python?

Scheduled Pinned Locked Moved The Lounge
questionlearningcsharppythonphp
66 Posts 43 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Frank R Haugen

    A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

    I Offline
    I Offline
    irneb
    wrote on last edited by
    #49

    Python isn't bad, especially compared to C-like languages like C#/Java. You get (out the box) at least the same libraries as you do for DotNet/JVM, and then some (as Python's own built-in libs are enormous compared to most others). The thing which Python does "really" well is the ease of using much more complicated data structures (lists, hashtables, etc. are no more complicated to use than arrays in C). Other stuff are things like a REPL (though not as perfect as Lisp/Hasskell's). Really clean code - it's sometimes referred to as an exact 1:1 translation of pseudo code. It provides some functional paradigms, but not a full fledged FP language. No strict OO - i.e. a function need not be part-n-parcel of a class. Much less code to write than C#/Java to get the same thing. OO concepts in it's imports statement, e.g. you can import an entire "package" normally, then refer to it's internals using the OO-dot-notation, or using the * wildcard to import the internals as if loaded locally, or import a single internal without the rest of the package. It has a very large community, thus mentors and examples are not difficult to find. There are some issues with Python: Dynamic typing - though this isn't necessarily a problem. But for someone coming from a C-like language you'd probably miss the explicit typing. The biggest possible issue I can see with this is some error checks are impossible which are possible in a explicitly- (C) or inferred (Haskell/F#) typed language. Though there are alternatives - e.g. PyLint. It's interpreted by default, though some of its implementations do compile. E.g. CPython compiles to pyc files on the fly (these are similar to Java's class files in that they're bytecode to be run through the PVM. Others also add high optimization (e.g. PyPy), compiling to other VM's (e.g Jython for JVM, IronPython for DotNet), and binary compiling comparable to most other languages (e.g. Nuitka). Non-pure closures, it's version of lexical scoping is a bit weird - and therefore pure FP isn't possible. But this you only notice if you're used to a full FP language (like Scheme / F# / Haskell / etc.) - you'd not notice the difference if you come from a procedural language like C. This has been alleviated a bit in Py 3 with its nonlocal keyword though. Python (as is) doesn't do multi-threading, not easily at least. But there is the multiprocess interface, easy to use, but means more RAM for processes than threads. Only single-line lambdas are possible. It's OO method's a bit "strange" in that

    F 1 Reply Last reply
    0
    • F Frank R Haugen

      A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

      J Offline
      J Offline
      John Clegg
      wrote on last edited by
      #50

      I currently work mostly under Windows in a variety of languages. I prefer C# for getting things done more quickly (and reliably) but often end up having to use Python. You can get off the ground far faster in Python but your maximum altitude, range and reliability are more limited. As an introduction to programming it's OK, especially for students who don't plan on going any further. But I wouldn't use it too much before moving on to something more "structured" for anybody looking at a career in programming.

      1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        Keith Barrow wrote:

        I often think whether there is space for a programming language specifically for teaching,

        Problem with that is that no-one will want to learn it - as it has no commercial use. And if it gets picked up as a commercial language, everyone will just belittle it in the same way they do VB (and probably for the same reasons)

        Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

        U Offline
        U Offline
        User 7862375
        wrote on last edited by
        #51

        There have been plenty of "teaching" languages in the past BASIC, LOGO, Pascal, Modula 2 to name just 4.

        1 Reply Last reply
        0
        • J Jorgen Andersson

          Odd that, at my old school (where I studied EE, not CS) they taught ML, not because it was popular but rather because it wasn't popular, which meant that the teachers could teach programming instead of a language. The students had lots of opinions about that.

          Wrong is evil and must be defeated. - Jeff Ello[^]

          S Offline
          S Offline
          SortaCore
          wrote on last edited by
          #52

          Jörgen Andersson wrote:

          the teachers could teach programming instead of a language

          They should see the Guide to Being a Programmer.

          1 Reply Last reply
          0
          • F Frank R Haugen

            A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

            J Offline
            J Offline
            jibalt
            wrote on last edited by
            #53

            You're ignorant. Leave your poor friend alone.

            1 Reply Last reply
            0
            • F Frank R Haugen

              A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

              F Offline
              F Offline
              Fabio Franco
              wrote on last edited by
              #54

              Frank Reidar Haugen wrote:

              Python is what the programmers need today

              That's very debatable. It depends on where and what he wants to work with. There is no silver bullet. Having said that, I'd urge him to learn C, not because of the style, but of what he can learn with it. Working with pointers and manual memory management can prepare his mind to develop much more efficient code in high level languages. Once you can program in C, you can program in virtually anything else (except lower level assembly and the sorts). It's a great common ground to have.

              To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

              1 Reply Last reply
              0
              • I irneb

                Python isn't bad, especially compared to C-like languages like C#/Java. You get (out the box) at least the same libraries as you do for DotNet/JVM, and then some (as Python's own built-in libs are enormous compared to most others). The thing which Python does "really" well is the ease of using much more complicated data structures (lists, hashtables, etc. are no more complicated to use than arrays in C). Other stuff are things like a REPL (though not as perfect as Lisp/Hasskell's). Really clean code - it's sometimes referred to as an exact 1:1 translation of pseudo code. It provides some functional paradigms, but not a full fledged FP language. No strict OO - i.e. a function need not be part-n-parcel of a class. Much less code to write than C#/Java to get the same thing. OO concepts in it's imports statement, e.g. you can import an entire "package" normally, then refer to it's internals using the OO-dot-notation, or using the * wildcard to import the internals as if loaded locally, or import a single internal without the rest of the package. It has a very large community, thus mentors and examples are not difficult to find. There are some issues with Python: Dynamic typing - though this isn't necessarily a problem. But for someone coming from a C-like language you'd probably miss the explicit typing. The biggest possible issue I can see with this is some error checks are impossible which are possible in a explicitly- (C) or inferred (Haskell/F#) typed language. Though there are alternatives - e.g. PyLint. It's interpreted by default, though some of its implementations do compile. E.g. CPython compiles to pyc files on the fly (these are similar to Java's class files in that they're bytecode to be run through the PVM. Others also add high optimization (e.g. PyPy), compiling to other VM's (e.g Jython for JVM, IronPython for DotNet), and binary compiling comparable to most other languages (e.g. Nuitka). Non-pure closures, it's version of lexical scoping is a bit weird - and therefore pure FP isn't possible. But this you only notice if you're used to a full FP language (like Scheme / F# / Haskell / etc.) - you'd not notice the difference if you come from a procedural language like C. This has been alleviated a bit in Py 3 with its nonlocal keyword though. Python (as is) doesn't do multi-threading, not easily at least. But there is the multiprocess interface, easy to use, but means more RAM for processes than threads. Only single-line lambdas are possible. It's OO method's a bit "strange" in that

                F Offline
                F Offline
                Fabio Franco
                wrote on last edited by
                #55

                irneb wrote:

                but at some point you need to look deeper into the details also - thus it might be very good to move onto C after Python, and then onto a more "normal" OO like Java/C#. And then to really get into the FP bracket, Scheme/Haskell.

                That :thumbsup:

                To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                1 Reply Last reply
                0
                • F Frank R Haugen

                  A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

                  A Offline
                  A Offline
                  A A J Rodriguez
                  wrote on last edited by
                  #56

                  One thing that Python has going for it is its simplicity. It's a simple language, where you don't need a lot of OO cruft to get results from. The other is a truly dedicated set of people who not only love the language, but love to contribute to it. The IPython notebook system is excellent for testing snippets of code, and seeing the results immediately. http://www.pgbovine.net/ipython-notebook-first-impressions.htm[^] I'd disagree with the teacher where he says that "Python is what programmers need today to be hireable", but there's a lot of power in the language, and it's being used by squads of scientists who aren't waiting for a programmer/developer/analyst to get around to resolving their issues.

                  1 Reply Last reply
                  0
                  • R Roger Wright

                    And ASP was already taken...

                    Will Rogers never met me.

                    A Offline
                    A Offline
                    AspDotNetDev
                    wrote on last edited by
                    #57

                    *flicks tongue-in-cheek*

                    Thou mewling ill-breeding pignut!

                    1 Reply Last reply
                    0
                    • F Florian Rappl

                      Mono is definitely fine.

                      T Offline
                      T Offline
                      thomas michaud
                      wrote on last edited by
                      #58

                      Sorry - I would never trust mono.

                      1 Reply Last reply
                      0
                      • F Frank R Haugen

                        A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

                        K Offline
                        K Offline
                        Kirk 10389821
                        wrote on last edited by
                        #59

                        Frank, Honestly my first language was BASIC (on a Timex Sinclair, no less). Having programmed in over 30 languages and more than a few "custom" languages, I like the idea of Python for a first language. (C was always my favorite language, but is requires running before you can walk for most new programmers). Here is why I like Python: 1) It teaches INDENTATION (and requires it), which makes code more readable to humans, a big point for beginners 2) It is quite forgiving, and does not require that ; 3) It has the basics, and even the advanced iterators 4) You can leverage libraries very early, very easily 5) It can grow to handle large problems And frankly, the argument over what language is best is TOUGH. Whatever language someone is teaching, and if you enjoy the class, and really sink your teeth into the work, it really does not matter that much. I think of the language as a TOOL, like a TYPE of Hammer... The problem, many times, screams for a specific language. I learned this lesson when I tried to write a BASIC "renumber" program using COBOL (ANSI 76 Cobol). I gave up. The string handling/parsing was near impossible for me. I was still in high school, and I challenged myself. I switched to Fortran, and it got was easy. I always felt it would have been easier to use the MACRO-11 Assembly over Cobol (and later when I taught myself the Assembly, I realized it would have been). So, don't get all religious on the choice of the first language. As long as he doesnt get a disease from his "first", he will be fine, and able to choose better according to the problems he has to solve. Instead encourage him to READ a lot of the code, and IMPLEMENT something interesting.

                        1 Reply Last reply
                        0
                        • F Frank R Haugen

                          A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

                          R Offline
                          R Offline
                          rellips
                          wrote on last edited by
                          #60

                          Programming is more about how you solve the problem, not what language you use. If the teacher can teach this process best with python,then go for it. I've coded in multiple languages (including python) and the syntax is rarely the issue for me.

                          1 Reply Last reply
                          0
                          • F Frank R Haugen

                            A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

                            K Offline
                            K Offline
                            Kenneth Kasajian
                            wrote on last edited by
                            #61

                            I think you're overthinking this. What he needs to do first is to learn how to be a good programmer -- the language doesn't matter. If he's an awesome Python programmer, how long will it really take him to pick up C#? Good programmers can learn new languages fairly quickly, especially if they are to use on the job with others who know the language. Also, it not be a bad idea for you to learn Python. For your next personal project, try using Python -- real Python, not Iron Python, and see what you think. In the end, it will make you a better C# programmer. Give yourself one afternoon and watch these two videos: http://youtu.be/tKTZoB2Vjuk[^] and code along with it. You'll know enough to write Python code after that.

                            ken@kasajian.com / www.kasajian.com

                            1 Reply Last reply
                            0
                            • F Frank R Haugen

                              A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

                              S Offline
                              S Offline
                              suzuwatari
                              wrote on last edited by
                              #62

                              I haven't used Python for long, still I think it's clean and friendly enough to be a good choise to learn programming. Sure I think it may not be the best option when talking about market share, but if you really like programming, you will learn a new language; it has never been a stoper for somebody that really likes programming. And Python will give you a fine setup for everything else. There's also the advantange of knowing a scripting language to do those little or repetitive tasks that sometimes big languages are not the fastest (on development time, at least) options or the best fit. For example, I like Ruby when it's time to process text files. If we are talking about the languages used in "the real world", why has nobody said a word about Java? From my understanding, Java is the most widely used language (if we take apart C/C++ since it is innecesarilly complex nowadays, at least for line of business applications). I'm mainly a C# developer, so I can't say a lot about Java, but I can't deny its importance in the business. What do you think?

                              1 Reply Last reply
                              0
                              • M mikepwilson

                                Python is really well structured, especially for a beginner. It's forgiving, multi platform and pretty powerful. I know of a major bank that uses python to do their risk analytics, after doing rather a lot of technology performance comparisons. PHP is a godawful mess, and C# is tightly platform specific. It's a really nice language. Sure, people whine about the whitespace/tab thing. But once you get over it (it takes about 2 hours), it yields a much cleaner block of code. Frankly I'd be using it now if my code base wasn't already in perl. I'd say give it a shot. It'll almost certainly surprise you.

                                L Offline
                                L Offline
                                Luiz Monad
                                wrote on last edited by
                                #63

                                No, CSharp is not platform specific. And CSharp is free, not like Java that is Oracle's property. CSharp is like JavaScript, it's standard by ECMA. Why people think that only because it was created by Microsoft, it is platform specific. This is stupidity. Haskell was created inside Microsoft too. I Also suggest you to learn it.

                                M 1 Reply Last reply
                                0
                                • F Frank R Haugen

                                  A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

                                  R Offline
                                  R Offline
                                  RafagaX
                                  wrote on last edited by
                                  #64

                                  Whatever language he choses as his first language is fine, but he must understand that to be hirable he must learn other languages too.

                                  CEO at: - Rafaga Systems - Para Facturas - Modern Components for the moment...

                                  1 Reply Last reply
                                  0
                                  • L Luiz Monad

                                    No, CSharp is not platform specific. And CSharp is free, not like Java that is Oracle's property. CSharp is like JavaScript, it's standard by ECMA. Why people think that only because it was created by Microsoft, it is platform specific. This is stupidity. Haskell was created inside Microsoft too. I Also suggest you to learn it.

                                    M Offline
                                    M Offline
                                    mikepwilson
                                    wrote on last edited by
                                    #65

                                    See, this is why I'm so very glad I asked everyone what languages they think I should learn.

                                    1 Reply Last reply
                                    0
                                    • F Frank R Haugen

                                      A friend of mine has started his journey to become a programmer. His class is learning Python, and I mus wonder, Why Python? I want him to have a look at C-like languages in-stead, (for when he's finished with his current course), but he is adamant that his teacher must be correct in saying that Python is what the programmers need today, to be hireable. I am a big fan of C# and PHP, and I see little in Python that makes them comparable, (granted I haven't used much time with Python), But I can't see it even begin to compete with the big ones, (The C-like languages). But am I wrong? The real question is really: are there really any big differences between the top 15 or 20 most popular programming languages? -frank

                                      B Offline
                                      B Offline
                                      budryerson
                                      wrote on last edited by
                                      #66

                                      Perhaps the next class is about hardware implementation and everybody uses something like a Raspberry Pi. That's why I'm learning Python.

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • World
                                      • Users
                                      • Groups