Mystery science


Stuart Feinstein on science and uncertainty:

Questions…go places, take you down new avenues, generate curiosity and inspiration. They are the critical ingredients to new experiments. Of course, answers are important, but too often they are treated as an end. Think about the word “conclusion.” It is an answer drawn from data, but it can denote the end of the process, of the story, of the adventure. It is at once a determination and a termination. We may hear about the conclusive results in this or that study, or the conclusions to be drawn from this work, but the last thing a scientist wants is a conclusion in the sense of, “there ain’t no more to do.” For all the talk about drawing conclusions in scientific studies, there is relatively little in science that is conclusive.

You don’t expect an answer to everything, or you probably shouldn’t. Instead, you’ve got a workable way to live with provisionality. Science and science fiction both have at their hearts something sad and hopeful and warm and wry: stories about people running up against the edges of their answers and trying to live with endless questions.

Cyrus and Tara


Cyrus and Tara got married the weekend before last, in a ridiculously beautiful ceremony on a ridiculously beautiful day.

Weirdly good roasted chicken


Nothing fancy here, but I’m forgetful. More a checklist than a recipe, but it’s also my only meal in regular rotation that feels pretty fail-safe:

  • Get a ~4lb whole chicken
  • Put a lot of pepper and garlic powder on it, also some salt and lemon zest
  • Cook on stovetop briefly, just until color starts to change
  • Set the chicken on a cooking sheet, put a head of garlic inside, surround with maybe brussels sprouts, sweet potatoes, chopped onions, and more garlic
  • Cook at 375 for 1hr and 15mins

Still brusselsing


Not dead yet!

Python: pip and virtualenv


pip is a package manager for Python modules; virtualenv turns a given directory tree into an isolated Python environment so you can use different module versions for different projects on the same machine. They really go hand-in-hand, and I realized pretty quickly that they’re more or less mandatory if you’re working on multiple projects in Python. This guide explains both modules and the setup process super well – below is a quick-and-dirty reference for feeling out your Python environment and then getting up and running.

While not strictly necessary, I’d like to see which modules I have installed by default. So in terminal:

pydoc modules

Okay, no pip (which is itself just a Python module). To install it, we can use the older, creakier, and not-particularly-recommended package manager, easy_install. This is fine for grabbing pip, but you don’t really want to use it for anything else. (This may require sudo.)

[sudo] easy_install pip

We could use this installation of pip to install modules globally (which may require sudo too)

[sudo] pip install [module]

but we’re probably not looking to do that too often. Instead, just as we used the not-quite-recommended easy_install to grab a better tool, we’re going to use this global pip to grab virtualenv:

sudo pip install virtualenv

Now we can head to the directory where we want to work on our first project. I made a directory called pyground for fooling around, so I cd to that and enter

virtualenv env 

This creates a new Python virtual environment inside the current directory, storing everything at your_directory_name/env/. Now (automatically packed in with your virtual environment!) you have a version of pip local to this environment, and this is what you’ll want to use to install a module to your working directory. To use this version of pip:

env/bin/pip install [module]

Note that you won’t have to use sudo here, because you’re not installing globally. You can check to see which modules you’ve installed via pip in this environment with

env/bin/pip freeze

And to run virtualenv’s local version of Python, you’ll use

env/bin/python 

And that’s it. You can repeat this process for as many environments as you like. The walkthrough linked above offers a way to cut down on typing and temporarily make your shell recognize a given environment’s pips and pythons as the default, but I kind of prefer to type out the env/bins.