Has Not Benefited From Peer Review
Has Not Benefited From Peer Review is a blog of random writing by William Grover.
Python has a function called
sys.getrefcount()that tells you the reference count of an object. For example, the following code,
import sys print sys.getrefcount(24601)
has the output
That basically means that 3 things in Python currently have the integer value 24601. Why would Python keep track of how many things have a value that’s a particular integer? Since integers are one of the immutable data types in Python, Python can save computing resources by having all the variables that contain 24601 refer to the same data in the computer’s memory. For example, if we keep running the above and now assign 24601 to the variable
foo = 24601 print sys.getrefcount(24601)
the output is now
because we’ve now created another variable with a value of 24601. We didn’t dedicate any new memory to storing the value 24601; we just created a new reference to the same memory that already contained 24601. And if we change the value of
footo be something other than 24601, like this:
foo = 12345 print sys.getrefcount(24601)
the output is back to
meaning that Python got rid of the unneeded reference to 24601 (and made a new reference to 12345).
In my experience, 3 is the smallest number of references that I ever get out of
sys.getrefcount(). It’s greater than 1 because it includes temporary references created when
sys.getrefcountis called. Receiving 3 from
sys.getrefcount(number)basically means that
numberis used in your current code but isn’t used anywhere else in Python. So based on our experiments above, it looks like the integer 24601 isn’t used anywhere by default in Python.
What happens if we run
sys.getrefcount()on some smaller integers?
import sys print sys.getrefcount(1) print sys.getrefcount(2) print sys.getrefcount(3)
593 87 28
meaning that, in Python on my computer at this time, there are 593 references to the integer 1, 87 references to 2, and 28 references to 3! This means that these small integers are used elsewhere in Python (i.e., in the guts of the program); there are lots of internal Python variables that contain 1, and many (but fewer) variables that contain 2 or 3. I thought that this gave a pretty interesting insight into the guts of Python, and it raised some interesting questions: which integers are most commonly used in Python’s internals? Which ones are least common?
I had so much fun making my last animated GIF of UC Riverside history that I made another one. Here’s the UCR Bell Tower at its dedication ceremony in 1966 and today:
The 1966 photo is from this UCR Today article about the Bell Tower’s 50th anniversary.
In an email sent to the faculty, staff, and students on May 26, 2017, UC Riverside Chancellor Kim Wilcox shared a 100-year-old photograph of The Barn. Today, The Barn is a campus lunch spot where we sometimes treat campus visitors to lunch. But 100 years ago, it was—well—a barn, a working barn on the grounds of the then-ten-year-old Citrus Experiment Station. Nearly 40 years would pass before The Barn and the land around it became the University of California, Riverside. Then The Barn became a noteworthy venue for live music with performers like No Doubt, Sublime, and Doc Watson appearing there. Today it’s mostly a lunch spot, but in his email, Chancellor Wilcox announced plans for renovating the barn next year and returning live entertainment to this historic venue.
Rolling around campus on scooters with my sons this Sunday, I decided to stop at The Barn and take a photograph from roughly the same spot as the 1917 photo was taken. After some trial-and-error in Photoshop, I made a little animation that compares the 1917 barn with the 2017 barn:
On a recent trip to Vancouver B.C. we decided to take TransLink’s SkyTrain and buses from the airport to the Horseshoe Bay ferry terminal. We bought our tickets at the YVR SkyTrain station:
For some reason, the story of the Elixir Sulfanilamide disaster has always fascinated me. If you don’t already know about it, Elixir Sulfanilamide was a drug developed in 1937 by the S. E. Massengill Company of Bristol, Tennessee. Only a month after Massengill began selling it, reports started coming in of patients who endured terribly painful deaths after taking the medicine. Thanks to a herculean effort by the US Food and Drug Administration to collect the remaining bottles of the medicine before anyone else took it, “only” about a hundred deaths were attributed to the drug.
In the time-honored tradition of folks pontificating about stuff they know absolutely nothing about, here is my humble proposal for the Riverside streetcar line in the neighborhood around UC Riverside (click for a bigger version):
I always thought I’d move back to Tennessee. I was born and raised there, and I’m proud of my chemistry degree from the University of Tennessee (class of ‘99). And even though I left Tennessee to get my PhD, I always assumed I’d return. To maybe be a professor at UT. To share my passion for science with the next generation of scientists. To collaborate with some of the world’s brightest minds at Oak Ridge. To start companies and create jobs for Tennesseans. To try to give something back to a state that’s done so much for me.
My friend and former labmate Marcio von Muhlen recently wrote a thought-provoking piece on why we need a Github of science. My take on his central argument: our centuries-old system of for-profit academic journals and peer review could be vastly improved if it included aspects of modern Open Source software publishing tools like Github. For example, instead of relying on the opinion of two or three anonymous (and possibly unqualified) referees to determine whether my research belongs in a high-impact journal, I could post my paper on the “Github of science” and the entire community of my peers could weigh in on its strengths and weaknesses. Like quality hits in a Google search, well-regarded research rises to the top and is rewarded by additional visibility, and weaker research sinks to the bottom. Marcio’s piece was the subject of an enthusiastic discussion on Hacker News.
I’ve been thinking about a backwards approach to Marcio’s argument: instead of adding aspects of Github to science publishing, what would happen if we added aspects of the current science publishing system to Github? How horribly broken would Github become if we recast it in the image of Reed-Elsevier, Springer, John Wiley and Sons, and the rest of the for-profit scientific publishing companies?
Originally published in the Berkeley Science Review
Sixty years ago Berkeley was a campus at war. Plutonium, which had been discovered by Cal chemist Glenn Seaborg and his colleagues in 1940, had been identified by Manhattan Project scientists as a potential bomb-making material; by 1945 it was the subject of intense research at Berkeley, Los Alamos, and the University of Chicago. The frantic pace of wartime research led to numerous accidents: Los Alamos chemist Don Mastick swallowed much of the world’s plutonium when a test tube he was holding exploded in his face. Mishaps like this made Manhattan Project leaders anxious to better understand the health effects of plutonium. For answers, they turned to Joseph Hamilton, a young Berkeley professor who was already an expert on the toxicology of radioactive materials…
subscribe via RSS