Slashdot Mirror


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

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.

19 of 106 comments (clear)

  1. Re:You misspelled Jupiter by MightyYar · · Score: 4, Interesting

    You fork the open source code and move on with life?

    Almost every single Python project has a cutesy "y" in it somewhere, it's just the way it is done. Besides, Google searches are much easier when you have a unique search term.

    --
    W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
  2. Python's rise is pretty amazing by SuperKendall · · Score: 2

    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...

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  3. Re:psot foest by Waffle+Iron · · Score: 4, Funny

    print("first post!")

    Traceback (most recent call last):
      File "psot foest", line 1, in slashdot.org
    IndexError: "first post" must not be preceded by other comments

  4. Speed by hcs_$reboot · · Score: 3, Informative

    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++.

    --
    Slashdot, fix the reply notifications... You won't get away with it...
    1. Re:Speed by TechyImmigrant · · Score: 3, Informative

      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.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    2. Re:Speed by vikingpower · · Score: 4, Informative

      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.

      --
      Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
    3. Re:Speed by Pseudonym · · Score: 3

      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.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    4. Re:Speed by hcs_$reboot · · Score: 2

      Based on your sig, you can't stand python because it's decipherable?

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    5. Re:Speed by ath1901 · · Score: 4, Informative

      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).

    6. Re: Speed by f00zbll · · Score: 2

      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 LISP have a more consistent and well thought-out design. Python grew organically, and still doesn't have an official specification.

    7. Re: Speed by TeknoHog · · Score: 4, Informative

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

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

      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.

      --
      Escher was the first MC and Giger invented the HR department.
    8. Re:Speed by TeknoHog · · Score: 2

      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.

      --
      Escher was the first MC and Giger invented the HR department.
    9. Re: Speed by drinkypoo · · Score: 3, Insightful

      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.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  5. Re:Tensorflow by ShanghaiBill · · Score: 2

    You should see Tensorflow, a huge steaming pile of crud built on python and its legacy libraries.

    Tensorflow has bindings for other languages. For instance: Tensorflow C++ API, with no Python needed.

  6. Re: Huh? by K.+S.+Kyosuke · · Score: 2

    You're saying he should have done it in Forth?

    --
    Ezekiel 23:20
  7. Re:You misspelled Jupiter by c120plus · · Score: 5, Informative

    The name is constructed from the names of programming languages. They are Julia, Python and R. Hence Ju-Pyt-e-R You are probably confusing it with the name of a well known planet.

  8. Cython by JBMcB · · Score: 4, Interesting

    All the number crunchers I know use Python as a glue languages to tie libraries together. There are Python bindings for nearly everything. If they are doing something really weird they'll do their data massaging in Python, then analyze it in R.

    --
    My Other Computer Is A Data General Nova III.
  9. I will never forget where I was by mapkinase · · Score: 2

    .. when I learned about this.

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

    --
    I do not believe in karma. "Funny"=-6. Do good and forbid evil. Yours, Oft-Offtopic Flamebaiting Troll.
  10. Can't stand Wolfram Research... by Mahldcat · · Score: 2

    ....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 a copy of my drivers license. I promptly told them to get bent (in more colorful language than that), grabbed my copy of Matlab (it was also gathering dust), and spent the bulk of my time figuring out how to use it instead.