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.
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.
Re:You misspelled Jupiter (Score:5, 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.
Re: (Score:1)
has a cutesy "y" in it somewhere
You mean a "py"
Re:You misspelled Jupiter (Score:5, Informative)
Re: (Score:2)
> You are probably confusing it with the name of a well known planet.
Right. As Sheldon said: "Happy coincidence!"
Re: (Score:1)
> Because you want to copyright it and protect your IP. Just in case.
I assume by "IP" you mean "inner planets"?
Re: (Score:2)
Re:psot foest (Score:5, Funny)
print("first post!")
Re: (Score:2)
Thanks for the lols Waffle Iron!
Re: (Score:2, Funny)
Python's rise is pretty amazing (Score:3)
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...
Re: (Score:2)
I've used Tensorflow, and while you are not really wrong about the structure the fact is that it's currently, by far, the smallest steaming pile of crud if you want to work with machine learning models and do lots of quick iteration.
You are also not wrong about how Jupyter is built, but the fact remains the end result works pretty well...
Python at the core though still has a. lot of other compelling uses that have helped it rise in popularity. It's not just one domain that has led to the rise in use.
Re: (Score:3)
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 [tensorflow.org], with no Python needed.
Re: Huh? (Score:3)
Re: (Score:2)
? Forth in it done have should he saying You're
Notebooks are still just a pretty artifice (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
what's hilarious is how much of these python math package enthusiasts are using fortran libraries without knowing it
Speed (Score:4, Informative)
Re:Speed (Score:4, 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.
Re: Speed (Score:2)
Try Golang. Nearly as fast as C++. Feels like writing in Python, only better.
Re: Speed (Score:5, Informative)
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.
Re: (Score:2)
>It's the best of both worlds.
No
Re: Speed (Score:4, 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.
Re: (Score:2)
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.
Re: (Score:2)
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.
Re: (Score:2)
Yuck. Duck typing, as used in Go, is very convenient. But dynamic typing is soooo nasty.
Re:Speed (Score:5, 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.
Re: (Score:2)
Cython (Score:5, 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.
Re: Speed (Score:2)
Re: (Score:2)
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.
Re: (Score:2)
Re: Speed (Score:2)
and it was only slightly faster for doing computer vision
So, no results like this one? [youtube.com]
Re:Speed (Score:4)
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.
Re: (Score:3)
Re: (Score:2)
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.
Re: (Score:2)
Python is the classic example of implementation-defined semantics. The semantics of Python are whatever the reference implementation does. This is always a bad sign, but let me give you an example.
Most Python programmers don't know exactly what the rules are to decide when a new variable is created. People used to Algol-like languages (e.g. C) might naively think that a variable is scoped to a block, since Python seems block-structured. They would be wrong. Python variables are scoped to functions and class
Re: (Score:2)
In other words you hate being forced to write readable code.
No, I just like programming more than I like debugging.
Re: (Score:2)
"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)
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).
Re: (Score:3)
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.
Re: (Score:2)
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
Re: (Score:2)
Re: (Score:1)
As a daily user of R, I can say R is horrible language, full of pitfalls (crazy types, crazy typing and crazy type conversion for the least) with a pitiful ecosystem. Mostly used by bio-informaticians having no clue what they are doing statistically and algorithmically. Packages are a mess of a pile of untested garbage created only to publish one shitty paper and then forgotten.
BUT as bio-informatician, you cannot escape it. Just a big pain in the ass.
I will never forget where I was (Score:3)
.. when I learned about this.
Thank you for this, Python fanboys. May the indentation be with you.
Re: (Score:2)
"I've never seen anyone using Linux as a desktop OS who wasn't a programmer by trade."
That's somewhat fair I think. I think the problem is that you have to be a pretty good Unix system administrator to configure a Linux desktop and frankly the whole permission, sudo, etc scheme is borderline demented. It's necessary for a multiuser system, but that doesn't make it any more likable. Really not well suited to a personal computer.
"I've rarely seen any professional programmers working in Python. It's scriptin
Can't stand Wolfram Research... (Score:2)
Paul Romer is absolutely awesome! (Score:2)
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]
It's not a Nobel Prize (Score:2)
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.
Correct link to the blog post (Score:2)
https://paulromer.net/jupyter-... [paulromer.net]
A programming language endorsement from... (Score:2)
an expert in economics?
"co-winner of the Nobel Prize in Economics" (Score:2)