Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Python Math Programming

Economics Nobel Laureate Paul Romer Is a Python Programming Convert (qz.com) 106

Economist Paul Romer, a co-winner of the 2018 Nobel Prize in economics, uses the programming language Python for his research, according to Quartz. Romer reportedly tried using Wolfram Mathematica to make his work transparent, but it didn't work so he converted to a Jupyter notebook instead. From the report: Romer believes in making research transparent. He argues that openness and clarity about methodology is important for scientific research to gain trust. As Romer explained in an April 2018 blog post, in an effort to make his own work transparent, he tried to use Mathematica to share one of his studies in a way that anyone could explore every detail of his data and methods. It didn't work. He says that Mathematica's owner, Wolfram Research, made it too difficult to share his work in a way that didn't require other people to use the proprietary software, too. Readers also could not see all of the code he used for his equations.

Instead of using Mathematica, Romer discovered that he could use a Jupyter notebook for sharing his research. Jupyter notebooks are web applications that allow programmers and researchers to share documents that include code, charts, equations, and data. Jupyter notebooks allow for code written in dozens of programming languages. For his research, Romer used Python -- the most popular language for data science and statistics. Importantly, unlike notebooks made from Mathematica, Jupyter notebooks are open source, which means that anyone can look at all of the code that created them. This allows for truly transparent research. In a compelling story for The Atlantic, James Somers argued that Jupyter notebooks may replace the traditional research paper typically shared as a PDF.

This discussion has been archived. No new comments can be posted.

Economics Nobel Laureate Paul Romer Is a Python Programming Convert

Comments Filter:
  • by SuperKendall ( 25149 ) on Monday October 08, 2018 @10:35PM (#57449094)

    The language never did much for me, but I have to say the language has done a great job attracting converts and many practical uses in recent years.

    I've had a chance to use the notebooks before, they are especially well done in terms of mixing code and text and output...

  • You get to see what the researcher wants you to see and that's rarely enough in all context the research might be used. You want to know the "dead ends", you want to know the real motivations which led him down a particular path rather than the one he retro-actively constructs when he wants to put it in a pretty format. Whether that be a paper or a notebook.

    VCS are more fundamental in reproducible research than pretty formatting. Show it all, final results, intermediate failures, lab notes ... everything.

  • Speed (Score:4, Informative)

    by hcs_$reboot ( 1536101 ) on Tuesday October 09, 2018 @12:12AM (#57449300)
    Depends for what. Python is slow, and if research involves tree searches or monte-carlo ... algorithms, even PHP is faster. I'd go for Java or, faster, C++.
    • Re:Speed (Score:4, Informative)

      by TechyImmigrant ( 175943 ) on Tuesday October 09, 2018 @12:49AM (#57449364) Homepage Journal

      Depends for what. Python is slow, and if research involves tree searches or monte-carlo ... algorithms, even PHP is faster. I'd go for Java or, faster, C++.

      I hit upon compute bottlenecks all the time doing numerical analysis. However the parts that need writing in C to speed things up mount up to a tiny fraction of the code I write in python that does the data handling and general information plumbing.

      • Try Golang. Nearly as fast as C++. Feels like writing in Python, only better.

        • Re: Speed (Score:5, Informative)

          by TeknoHog ( 164938 ) on Tuesday October 09, 2018 @06:31AM (#57449918) Homepage Journal

          Try Julia. Nearly as fast as C. Feels like writing in Python, only better.

          FTFY. https://julialang.org/benchmar... [julialang.org]

          As for the syntax, Julia uses significant line breaks (replacing semicolons of C-like languages) but none of the indentation issues of Python. Blocks are closed with the "end" statement, replacing the braces of C-like languages. It's the best of both worlds.

          • >It's the best of both worlds.

            No

          • Re: Speed (Score:4, Insightful)

            by drinkypoo ( 153816 ) <drink@hyperlogos.org> on Tuesday October 09, 2018 @09:48AM (#57450702) Homepage Journal

            Nope. Terminating lines with a semicolon permits indent to trivially reformat your code if all the line breaks are lost. Dropping them but not using indents means it's only half as retarded as python, not that it's the best of both worlds.

            • Terminating lines with a semicolon permits indent to trivially reformat your code if all the line breaks are lost.

              Er sure, but I can count the number of times that's happened to me on the fingers of one nose.

            • Nope. Terminating lines with a semicolon permits indent to trivially reformat your code if all the line breaks are lost.

              I also want a tornado-proof language, in case all the characters in my source code get completely shuffled. But protection against natural disasters does not belong in the language syntax. The kind of redundancy where you always write ";\n" rather than just "\n" belongs in the physical transmission/storage layer, along with checksums and the like.

          • Yuck. Duck typing, as used in Go, is very convenient. But dynamic typing is soooo nasty.

    • Re:Speed (Score:5, Informative)

      by vikingpower ( 768921 ) on Tuesday October 09, 2018 @12:54AM (#57449382) Homepage Journal

      Scientists who start out as non-programmers balk at learning Java or C++. Python is easier to learn, which accounts for much of its widespread use in academia.

    • Is PHP faster than PyPy, too?
      • Is PHP faster than PyPy, too?

        "PyPy is an alternative implementation of the Python programming language, which often runs faster than the standard implementation of Python".
        So, maybe, maybe not.

      • by f00zbll ( 526151 )
        last time I tried Pypy it wasn't 100% compatible with standard python and it was only slightly faster for doing computer vision. In the end, the hassle of getting Pypy setup in Raspbian just wasn't worth it. The worse parts of Python is the VM lacks a rich set of debugging API like JVM and CLR, so people are still forced to use command pdb, the documentation kinda sucks and the multi-threading still sucks after all these years. As a functional language, the syntax is a little weird and quirky. Smalltalk and
    • by Pseudonym ( 62607 ) on Tuesday October 09, 2018 @01:58AM (#57449474)

      Economists routinely publish papers based on results calculated in Excel. I can't stand Python (although significant whitespace is one of its less obnoxious features) but it's a definite improvement.

      • Based on your sig, you can't stand python because it's decipherable?
        • I can't stand Python because it has broken variable semantics and a broken object model (made worse by the fundamentalist "everything is a broken object" approach).

          I'm pretty certain that Python is designed for programmers who like writing tests and debugging running systems more than they like writing features.

          You did ask.

      • "Economists routinely publish papers based on results calculated in Excel. "

        Excel, eh? Possibly goes a long way toward explaining why no one has had much faith in economic modeling since the 1970s.

    • Re:Speed (Score:5, Informative)

      by ath1901 ( 1570281 ) on Tuesday October 09, 2018 @04:59AM (#57449742)

      Scientists don't use it for the language, they use it for the libraries. Numpy is extremely fast (since it is written in C, C++, Fortran or Cython or whatever) and very convenient to use (since it is wrapped in Python).

      • Scientists don't use it for the language, they use it for the libraries. Numpy is extremely fast (since it is written in C, C++, Fortran or Cython or whatever) and very convenient to use (since it is wrapped in Python).

        I wouldn't say it's very convenient, though it works for me. It gets quite verbose because you have to write things like np.complex() and np.array() for simple things all the time. Conversely, some languages like Julia have native complex/matrix/vector types so you can write things as you'd write math. But these are more specialized languages so they don't have all the nice libraries of Python.

    • Well if performance is an issue, and you're already using Jupyter, why not go for the "Ju" part of the name and use Julia? It's pretty much perfect for the job.

      Julia has syntax that's pretty similar to Python (replacing significant whitespace with more robust end tags), performance that closes in on C and Fortran, and offers Lisp like metaprogramming capabilities. Also makes access to C, R, Python, and Fortran very easy if you need it, and parallel and distributed programming is easy to implement.

      I'm a math

  • by mapkinase ( 958129 ) on Tuesday October 09, 2018 @07:34AM (#57450128) Homepage Journal

    .. when I learned about this.

    Thank you for this, Python fanboys. May the indentation be with you.

  • ....namely how they are ultra paranoid about people stealing their damned software. I had a legit copy of Mathematica that I purchased through school. Installed, it, never used it. Several hardware upgrades later, I had a class where it would have been useful, went to reinstall, and it refused to do so saying that my hardware specs didn't match the profile for my key. Cut a support ticket and they told me I had to prove that I purchased the software (they wanted a copy of the damned receipt along with
  • I loved this paper where he calls B.S on most macroeconomics because the concepts they talk about in their papers can never be identified in the actual real world with certainty so they are essentially not falsifiable because they can never be matched up with any empirical observations.

    https://paulromer.net/wp-conte... [paulromer.net]

    For more than three decades, macroeconomics has gone backwards. The
    treatment of identification now is no more credible than in the early 1970s
    but escapes challenge because it is so much more

  • It's 'The Sveriges Riksbank Prize in Economic Sciences in Memory of Alfred Nobel'. Pretending it is a 'real' Nobel just serves the interests of those who like to pretend Economics is a 'real' science. Let's not give them a legitimacy they don't deserve.
     

You know you've landed gear-up when it takes full power to taxi.

Working...