Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Saturday August 05 2017, @03:47PM   Printer-friendly
from the ALL-programmers-know-profanity dept.

Among developers, Python is the most popular programming language, followed by C, Java, C++, and JavaScript; among employers, Java is the most sought after, followed by C, Python, C++, and JavaScript.

Or so says the 2017 IEEE Spectrum ranking, published this week.

IEEE Spectrum, a publication of the The Institute of Electrical and Electronics Engineers, a technical advocacy organization, says it evaluated 12 metrics from 10 sources to arrive at this conclusion.

It claims to have culled data from Google Search, Google Trends, Twitter, GitHub, Stack Overflow, Reddit, Hacker News, CareerBuilder, Dice, and its own digital library.

https://www.theregister.co.uk/2017/07/21/python_java_c_programming_languages/


Original Submission

Related Stories

MATLAB vs Python: Why and How to Make the Switch 30 comments

MATLAB and Python are both rather popular languages. Real Python has an overview of the two with an eye towards encouraging use of Python. There is a lot to say when comparing languages, so this is a long read.

MATLAB® is widely known as a high-quality environment for any work that involves arrays, matrices, or linear algebra. Python is newer to this arena but is becoming increasingly popular for similar tasks. As you’ll see in this article, Python has all of the computational power of MATLAB for science tasks and makes it fast and easy to develop robust applications. However, there are some important differences when comparing MATLAB vs Python that you’ll need to learn about to effectively switch over.

In this article, you’ll learn how to:

  • Evaluate the differences of using MATLAB vs Python
  • Set up an environment for Python that duplicates the majority of MATLAB functions
  • Convert scripts from MATLAB to Python
  • Avoid common issues you might have when switching from MATLAB to Python
  • Write code that looks and feels like Python

Earlier on SN:
Python's Guido van Rossum Steps Down (2018)
What's Today's Top Language? Python... no, Wait, Java... no, C (2017)
GNU Octave - Open Source Answer to Matlab - Hits 4.0.0 (2015)
You Want MatLab on Your Resume to Get a Job at Google (2014)
Why Python is Slow: Looking Under the Hood (2014)


Original Submission

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 2, Funny) by Zoot on Saturday August 05 2017, @04:04PM

    by Zoot (679) on Saturday August 05 2017, @04:04PM (#549127)

    They're all good languages Brent.

  • (Score: 1, Informative) by Anonymous Coward on Saturday August 05 2017, @04:58PM (1 child)

    by Anonymous Coward on Saturday August 05 2017, @04:58PM (#549136)

    Duh

    • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @07:15PM

      by Anonymous Coward on Saturday August 05 2017, @07:15PM (#549169)

      Duh, me too

  • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @05:07PM

    by Anonymous Coward on Saturday August 05 2017, @05:07PM (#549137)

    Perl 90.2% JavaScript 6.2% Other 1.7% CSS 0.7% Makefile 0.6% Shell 0.3% HTML 0.3%

    Heck of a job, Burgundy.

  • (Score: 3, Disagree) by fritsd on Saturday August 05 2017, @05:40PM (14 children)

    by fritsd (4586) on Saturday August 05 2017, @05:40PM (#549143) Journal

    Why is Python such a popular language??

    The syntax seems designed to make mistakes in.

    • (Score: 2) by iwoloschin on Saturday August 05 2017, @05:45PM

      by iwoloschin (3863) on Saturday August 05 2017, @05:45PM (#549145)

      What kind of mistakes? Tabs vs spaces? Well, yeah, that's hard to spot, but no one uses hard tabs anymore anyways. Right?

    • (Score: 1, Informative) by Ethanol-fueled on Saturday August 05 2017, @05:48PM (2 children)

      by Ethanol-fueled (2792) on Saturday August 05 2017, @05:48PM (#549147) Homepage

      It's a language designed to make complicated things easy for idiots. And modern college kids most certainly are idiots. They start crying because they don't know where the missing closing parenth goes in a single-nested if statement.

      Guido van Rossum created it because his kid wouldn't stop crying during his programming lessons. Shut the little fucker up, you know?

      • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @06:52PM

        by Anonymous Coward on Saturday August 05 2017, @06:52PM (#549162)

        TIL: EF is more of an idiot than anybody thought!

        ** I know I know, some of you may claim you knew EXACTLY how much of an idiot he is, but c'mon, the answer is "endless"

      • (Score: 0) by Anonymous Coward on Sunday August 06 2017, @12:25AM

        by Anonymous Coward on Sunday August 06 2017, @12:25AM (#549298)

        Stop the presses! Stupid person makes stupid comment. Again.

    • (Score: -1, Troll) by Anonymous Coward on Saturday August 05 2017, @05:58PM (4 children)

      by Anonymous Coward on Saturday August 05 2017, @05:58PM (#549149)

      Web celebrity thought-leader Randall Munroe told code monkeys to code in Python, and they fucking do as they are fucking told. There are only two paths in the world: The Trend or death.

      http://www.xkcd.com/353/ [xkcd.com]

      Ram-Hole Man-Ho admits he's a lucky fucking asshole:

      http://www.xkcd.com/1827/ [xkcd.com]

      Never stop reading XKCD, no matter what anyone tells you.

      • (Score: 1) by Ethanol-fueled on Saturday August 05 2017, @06:05PM (3 children)

        by Ethanol-fueled (2792) on Saturday August 05 2017, @06:05PM (#549152) Homepage

        Haw. My seething hatred for Randall knows no bounds. Regarding the first link, it makes sense that the coward gets his highs from DXM and wine coolers because he's too much of a pussy to handle liquor much less real psychedelics.

        I have worked with many scientists and engineers throughout the years, and the handful who studied physics (as opposed to math/compsci/engineering) in college were extremely mathematically capable but otherwise autistic retards.

        • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @06:12PM (1 child)

          by Anonymous Coward on Saturday August 05 2017, @06:12PM (#549153)

          Randall has you all figured out.

          Physics tells us that negative reviews are really just positive reviews from people traveling backward in time.

          http://www.xkcd.com/1869/ [xkcd.com]

          • (Score: 2, Funny) by Anonymous Coward on Saturday August 05 2017, @07:01PM

            by Anonymous Coward on Saturday August 05 2017, @07:01PM (#549165)

            There's a spit of reason there. After all, you'd be hard pressed to find anyone suggesting Ethanol-fueled is moving forwards with the times.

        • (Score: 0) by Anonymous Coward on Sunday August 06 2017, @12:28AM

          by Anonymous Coward on Sunday August 06 2017, @12:28AM (#549300)

          I have worked with many scientists and engineers throughout the years...

          Yet not even a bit of their smarts rubbed off on you. You do know that learning doesn't stop when you leave school, right?

    • (Score: 5, Informative) by andersjm on Saturday August 05 2017, @07:16PM (3 children)

      by andersjm (3931) on Saturday August 05 2017, @07:16PM (#549170)

      Two of the Python language's design tenets:

      Errors should not pass silently.

      In the face of ambiguity, refuse the temptation to guess.

      It's a language where programming errors tend to express as exceptions, instead of silently doing the wrong thing. Which means you get a chance to fix it, and a traceback text that very often points you at exactly where the error was made.

      I don't know what it is about Python's syntax that makes you make mistakes, but for me it's a language that helps me produce robust code.

      • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @08:08PM

        by Anonymous Coward on Saturday August 05 2017, @08:08PM (#549194)

        Usually when I see that sort of language, what the person is actually trying to say is, "I can't copy-paste my code from one place to the other and it still works." While that is true, because Python uses white space to denote most blocks of code, it is also true that the same things can happen in languages that use braces. Sure, Copy-paste of a simple if block is more likely to be a problem in Python than other languages, but there are other constructs that will get you in more trouble being copy-pasted in other languages than Python.

        The real problem is that people need to not blindly copy-paste, regardless of the language.

      • (Score: 4, Insightful) by lentilla on Sunday August 06 2017, @03:14AM (1 child)

        by lentilla (1770) on Sunday August 06 2017, @03:14AM (#549362)

        I didn't realise "errors should not pass silently" was an explicit part of Python's design. Aside from the whole indentation thing, what we could term "silently introduced errors" is what trips me up again and again when using Python.

        For example:

          object.color = 'red'
          # do something else for a while
          object.colour = 'blue'
          print object.color

        Autovivication. The gift that keeps giving. (The program prints "red", by the way - as it should, but it probably wasn't what the programmer expected.)

        I find myself using spell-check on variable names (!!) a great deal when programming Python! At least in Perl, when autovivication ceases to be useful (in programs longer than a few lines), a simple "use strict;" at the top expunges that entire class of mistake.

        It's a language where programming errors tend to express as exceptions

        Which is sort-of-cool, but in many cases I'd prefer an error at compile time. Exceptions are nice but I don't want to have to manually hunt down every logic path to find all my stupid mistakes.

        I love Python, idiosyncrasies and all. Van Rossum has been very clear about documenting Python's behaviour and rationale from the start (doesn't mean I always agree with him) but at least the contract is clear. And when I shoot myself in the foot, as I do on a regular basis when writing Python - like that sample above - I laugh and think "did it again, you fool, eh? At least it only cost a couple of hours."

        • (Score: 0) by Anonymous Coward on Sunday August 06 2017, @11:48PM

          by Anonymous Coward on Sunday August 06 2017, @11:48PM (#549691)

          Well, you could always use one of many static analysis tools for Python programs. Most will catch that specific error, due to an initial assignment outside of __init__ or thinking you are missing a property decorated function definition. A quick run through a test suite or bytecode compilation (PYCMD -m compileall -fq -j0 -d /tmp INPUT_DIRECTORY) will find many as well. Also, if you have a problem with indentation (PYCMD -m tabnanny INPUT_DIRECTORY) can catch many of those as well.

    • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @10:49PM

      by Anonymous Coward on Saturday August 05 2017, @10:49PM (#549265)

      Several very large companies and industries went all in on it. I mean toss out all the other langs and use ONLY python. They are all realizing it was a terrible error at this point though. As it was not the language that was their problem but the culture they had for coding.

      Python is pretty good at the 'medium' program as I call it. A 100-2000 line bit of glue code. Outside of that it usually collapses on itself because it does not have strict typing and mediocre speed. So you spend a lot of time managing the language instead of managing the problem. C has a similar issue with you end up managing the memory instead of managing the problem. There is no good 'fix' for those issues. So we make due and re-invent new languages thinking 'we got it this time' (rust/go).

      My real issues with python. One the spacing issue. It is dead easy to create a scope problem. The non typing of variables. You can ducktype into bad problems and not even realize it until your QA/end user is saying xyz is crashing. The mentality of shorter is better. So you end up with semi cryptic bits of code that are not 'faster' but certainly are much more clever. We also have 2 versions of python 2 and 3. It is not clear what we should do. When ambiguity reigns people get antsy.

      Do I stop using a language because of that? No. I work on the problem at hand.

  • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @06:14PM (6 children)

    by Anonymous Coward on Saturday August 05 2017, @06:14PM (#549154)

    How hard would it be to add optional brackets to python? I find them extremely useful when used with tools like this: https://github.com/facelessuser/BracketHighlighter. [github.com] It is actually one of those annoyances that has slowed down my use and learning of python a lot.

    • (Score: 1, Insightful) by Anonymous Coward on Saturday August 05 2017, @06:51PM

      by Anonymous Coward on Saturday August 05 2017, @06:51PM (#549161)

      I believe there are scripts to help with nesting that will mark up code with braces, then remove them and fix spacing when the source goes back to rest. But what a fucked up choice to add lexical significance to whitespace.

    • (Score: 2) by fyngyrz on Saturday August 05 2017, @06:59PM (4 children)

      by fyngyrz (6567) on Saturday August 05 2017, @06:59PM (#549164) Journal

      How hard would it be to add optional brackets to python?

      Probably not that hard. I wrote a pre-processor [github.com] to add extension of built-in classes [my main target was str(), but it works for any class] since the Python crew can't seem to wrap their head around why that's useful and appropriate.

      Basically, you write a parser that understands the syntax you like, and then converts it to the syntax that Python understands. Aside from being useful, it's a worthy exercise. 🏋️‍♂️

      • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @07:09PM

        by Anonymous Coward on Saturday August 05 2017, @07:09PM (#549167)

        Pre-processor? Oh, you mean something like Ratfor, don't you? http://www.dgate.org/ratfor/ [dgate.org]
        (showing my age!)

      • (Score: 2) by opinionated_science on Saturday August 05 2017, @07:49PM

        by opinionated_science (4031) on Saturday August 05 2017, @07:49PM (#549185)

        that's kinda awesome!

        I got use to no brackets (less typing), and from perl python lacks the intutive regex stuff.

        Something I have not found a replacement for is "for(inti=0; i10 ; i++)" type syntax, being stuch with "while i10:".

        I know there is for i in range(): type expressions, but having the for manage increments etc seems neater.

      • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @09:11PM

        by Anonymous Coward on Saturday August 05 2017, @09:11PM (#549224)

        Yes well so what. I made up my entirely own language. The best way to describe it is like FORTH but for strings instead of integers. It has the advantage that it's impossible to make a syntax error. All calculations are done in double precision floating point. You can use it to draw pictures. It isn't called PostScript though. I got bored with it years ago and gave up.

      • (Score: 0) by Anonymous Coward on Saturday August 05 2017, @09:13PM

        by Anonymous Coward on Saturday August 05 2017, @09:13PM (#549226)

        Thanks Ill probably do this.

  • (Score: 2) by jmorris on Saturday August 05 2017, @09:29PM

    by jmorris (4844) on Saturday August 05 2017, @09:29PM (#549240)

    Arduino is now a programming language? If we are going to go that route, where is Qt, Win32, MFC, gtk, etc. Programs written for those libraries certainly LOOK like totally different languages instead of just different frameworks for C / C++. And Processing is just a predecessor of Arduino.

    Same for HTML, despite their handwaving over the obvious problem, HTML itself is not a programming language but HTML + DOM + CSS + Javascript certainly is. So the counts for HTML should be rolled into Javascript, pushing it up the rankings. Think of the HTML portion as UI design, which is of course a perfectly valid part of programming.

    I'll give them listing Delphi and Visual Basic instead of Pascal and BASIC since they are the last maintained implementations of those languages. But it does set a bad precedent and the same thinking that allowed that branding to creep in probably explains the hype machine around Arduino to get it a slot of its own. That or the guys doing the research aren't programmers and do not understand these sort of issues.

  • (Score: 0) by Anonymous Coward on Tuesday August 08 2017, @02:41AM

    by Anonymous Coward on Tuesday August 08 2017, @02:41AM (#550414)

    Since they let Edson S Gomi be the chairman of one chapter.

    S must stand for shit and Gomi is japanese for garbage (he is a japanese descendant).

(1)