Wednesday, August 23, 2017

August 23, 2017 at 06:57PM

Today's TIL is actually facts from yesterday, but I didn't get a chance to compile them yesterday. So here they are, today: 1) ...about Rho-factor termination in prokaryotes. Rho-factor termination is one of the two main mechanisms that prokaryotic genes use to stop transcription (termination). The *other* termination mechanism is called "Rho-independent termination", and is what I usually think of when I think of a terminator. Rho-independent terminators are (usually GC-rich) regions of DNA at the end of a gene that, when transcribed, form a long hairpin. The hairpin is shaped just right so that when RNA polymerase produces the terminator, it gumms up the polymerase and makes it get stuck, so it sits there until it eventually falls off on its own. Roughly. Rho-dependent termination is a little more convoluted. Rho-dependent termination is dependent on a protein called, uh, Rho factor. Thus "Rho-dependent". Anyway, Rho factor bind to a specific sequence of *RNA* just upstream of a more standard terminator hairpin. When the Rho binding site is transcribed, Rho factor binds to it and starts moving down the still-growing transcript, towards the transcription fork (how it does this isn't entirely know, but it' suspected that Rho factor forms a barrel-like structure and pulls the RNA transcript through the center, spooling it onto the other end of the Rho factor as it goes. In any case, the process is ATP-dependent). Meanwhile, a more normal terminator makes RNA polymerase pause long enough for Rho factor to catch up; when it does, it unwinds the transcription bubble somehow, popping off RNA polymerase, halting transcription, and releasing the new RNA. 2) So-called "cold" plasmas don't have a well-defined temperature. It turns out that, at a stat mech level, the charged ions in a cold plasma act as though they're at a different temperature than neutrally-charged particles. So the whole thing, taken as a whole, doesn't really have a single temperature. 3) You can use MCMC to sample phylogenetic trees. It's basically the same process as usual MCMC, but there are two particular challenges for phylogenetic trees. One problem is mixing, which can be particularly bad in tree-space -- but that's always solvable with more computing power. Another is visualization -- it's not obvious how you plot, say, a collection of 25,000 likely tree reconstructions in a way that's useful. There are some algorithms for calculating distance metrics between trees, which can then be plotted in whatever-D you can visualize (so, 2D or 3D). For more general information about MCMC on phylogenetic trees, see http://ift.tt/2xtANmR. For more information on *visualizing* MCMC results on phylogenetic trees, see http://ift.tt/2wzJQpE.

Monday, August 21, 2017

August 21, 2017 at 05:53PM

Today I Learned: 1) ...why complex eigenvalues in the Jacobian of a dynamical system at steady state always indicate some kind of spiral flow! In short, it's because every eigenvalue of the Jacobian is associated with an eigenvector that represents the direction in which the *direction* of flow doesn't change. When an eigenvalue has an imaginary component, its associated eigenvector *also* has an imaginary component... which means there's no physical vector on which flow doesn't change direction. The only way for that to happen is if the system flows in a spiral. 2) If you ever see reference to a value "crossing the imaginary axis", it really means a change in sign (positive to negative or vice versa). Specifically, a change in *real-valued* sign -- if you ignore the imaginary part of a value, and the value changes sign, that means it had to cross the imaginary axis. This apparently comes up from time to time in dynamical systems, where the real sign of the eigenvalues of the Jacobian at steady state tells you whether a system is stable (always tends toward a state, like a ball rolling to the bottom of a valley) or unstable (always tends to move away from a state, like a ball rolling off the top of a hill). If the aforementioned eigenvalues are negative, the steady state point is stable; if they're positive, it's unstable; if they're complex-valued, the system spirals; if they're real-valued, the system goes straight in or out. 3) Oook, so, I'm now just over 100 episodes into the podcast "The History of Rome", which is about, uh, the history of Rome. The podcast has so far covered everything from the founding of the city of Rome by Romulus (around 750 BC) to the instatement of Elagabalus as Emperor by the eastern legions (218 AD). I've now listened to the brief histories of twenty-five Roman Emperors, and a pattern has made itself clear: Every time a young man or boy becomes Emperor, they are terrible. Every. Single. Time. They have, so far, been universally incompetent, indulgent, and cruel, and every single time a young emperor is deposed, everyone in Rome seems to be happy to move on. So let this be a lesson -- DON'T PUT YOUNG MEN IN CHARGE OF EMPIRES.

August 21, 2017 at 04:05AM

Friday, August 18, 2017

August 18, 2017 at 02:38AM

Today I Learned: 1) You can put incredibly thin coats of stuff onto other stuff using a process called "vacuum sputtering". You be tempted to say "stuff to other stuff? That's pretty vague." And you'd be right. Because it's a pretty general technique. That's part of the awesomeness of it. Deposition techniques in general take advantage of the ability of most materials to easily form reactive species on surfaces. Under most conditions, those surfaces react immediately with oxygen -- that's why metals rust and why many plastics age. In vacuum, though, reactive species will just sit on the surface of whatever material they're on until they get hit with something. So if you want to coat a surface with, say, titanium, you just have to get that (very clean) surface into a vacuum and introduce a "few" titanium atoms into the vacuum. Vacuum sputtering is a technique for getting the coating substance into the vacuum. You set up the substrate (the thing you want to deposit onto) across from a target (a block of the material you want to coat with). Then you hit the target with high-energy gas or plasma (typically argon). The impact of the gas sends atoms/molecules of the target flying off into the vacuum... where they hit the substrate and stick. It's a bit like MALDI, but with ionized gas instead of lasers (for those who know what MALDI is). So, next time you want to coat a wasp with gold, this is how! 2) ...how to use Lie derivatives to determine system identifiability. I'm not going to go into much depth on this, because I'm still in the early, fuzzy stage of understanding Lie derivatives, but basically there's a technique using Lie derivatives that helps you figure out what parameters of a system you can, in principle, figure out by looking at some output of a system. A schematic example -- say you have a car driving along a road, and you want to consider a bunch of variables (parameters) like a) what kind of gas it's using, b) what temperature it is outside, c) what kind of road it's driving on, and d) how hard the gas pedal is pushed down. Now say you have some equations that tell you, given all of those parameters, how fast the car goes. Now say you *only* have a record of the speed of the car, and, say, the temperature of the engine (and say that engine temperature also appears somewhere in the equations you have). From that information, can you figure out parameters a-d? A Lie derivative will tell you at least some things about what parameters you can and can't back out, given the variable you observe. 3) Carbide is steel with little crystals of carbon in it. For some reason, this makes carbide very hard. That hardness makes carbide a good material for drill bits, which wear out quite quickly when used in industrial assembly lines. Apparently wearing out drill bits contributes a surprising amount to the cost of manufactured goods?

Tuesday, August 15, 2017

August 16, 2017 at 02:16AM

Today I Learned: 1) So far this year, there have only been five reported cases of guinea worm. That's down from just over a thousand cases worldwide in 2011, and several million each year in the 1980s. We're really, really close to wiping this one out! 2) When I need a color palette (usually for graphing data), I go to colorbrewer2.org. It has a nice selection of pre-screened color palettes for 3-12 color classes, with options to use only colorblind, print-friendly, and photocopy-safe color schemes. It's designed for maps, but I find it works well for other kinds of data presentation. Today I learned about two other similar services, both of which have far better names than colorbrewer. First is coolors.co*, which wins for best presentation -- it has a very slick interface for quickly iterating through a bunch of colors, picking the ones you like, and filling in the rest. It's better for exploring color palettes than for finding optimal ones, though -- they don't seem especially well-optimized comapred to colorbrewer's. The other site is i-love-hue.com, which easily wins for best name. It does something functionally similar to both of the others, but is algorithmic (unlike colorbrewer) and is pretty transparent about its clustering algorithm (unlike coolors). It's worth taking a couple of minutes to check out those sites, if just to see how they handle presentation differently. * Not to be confused with coolors.com, which redirects to a Spanish-language car dealership page. 3) ...about this delightful set of 23 personality-probing questions: http://ift.tt/1GXeHqA

Sunday, August 13, 2017

August 13, 2017 at 11:32PM

Today I Learned: 1) ...how to make hash browns! It's, uh, embarassingly easy, in retrospect. You start with a potato. You peel the potato. You grate the potato (the hardest part). You heat some oil on medium-high heat, and dump the (peeled and shredded) potato onto the pan. You flip it when it's nice and toasty on the bottom; you take it off the pan when it's nice and toasty on the *other* bottom. Salt and pepper to taste. Eat. (Advanced techniques include pan-flipping the hashes and adding chopped shallots. Yeah.) Thanks to Erik Jue for teaching me hash-brown skills! 2) Watched a talk by Greg Foertsch, the art director on Firaxis Games' XCOM games. Some advice that's specific to art direction for video games: * Don't make textures until the last possible minute! Textures take a ton of time to make, and they *don't help you iterate faster*. If you spend time making textures, you're going to end up texturing a lot of things that don't end up in the final game. Better that you'd used that time to figure out what things work and what things don't. * Presentation > style. How you present your game's art and assets is ultimately more important than the exact look and feel of those things. Also, presentation informs style more than the other way around. * Early on in a game's development, it's insanely helpful to make a "vertical slice", which is basically a playable demo where everything's in place, even if it's only for a tiny chunk of the game. Turns out that usually, the first time you make a game, that first vertical slice isn't very fun. But you need that to tell you what to do to make your *next* vertical slice better. It's also a good rally point to keep everyone focused and engaged. * Level of detail really isn't that important. Or rather, having *high* level of detail isn't really that important. Firaxis ended up scaling *back* the level of detail on a lot of objects (guns and character models, in particular), because they looked better as simple, over-stylized versions. Some advice that's good for team projects (or just complex projects) in general: * An early period of intense collaboration can be really, really good for the team. XCOM's art team was stuck without any engineers for about the first six months of development, so they all crammed into a much-too-small workspace and hammered out a "gameplay video" that helped them work through a lot of the art design elements -- things like what the UI might look like, how tall to make various game objects like houses and cover and people, how and where to place the camera, etc. At the end of that, the combination of a) intense work on b) a concrete goal c) in an enclosed space gave the team a really strong sense of "buy-in" that fueled them through the rest of the project. * Drawing from the same vignette, I suspect what a team does while stuck says a lot about how that team works. At first blush, it might look like an art team can't really do anything useful without an engineer, but XCOM's art team did without one for *six months* and ended up solving a lot of the art and presentation problems of the game. * One of the things that I've seen over and over again from the various stories I've read of XCOM's development is that it's REALLY IMPORTANT to be able to tell your teammates that something sucks. It seems that Firaxis managed to screw up almost everything about XCOM at some point during development. What saved them was a strong culture of criticism. People were expected to say when something did or didn't work, and they *did*. That's what let Firaxis push the game through two complete overhauls and come out the other end with one of the best strategy games out there. * Scale back early. Set production goals early, and if they don't get met, either change the end goals or rethink how you are making things. 3) Matplotlib's colormaps all come with inverses -- just append a "_r" to the end of the colormap name and you'll get the reversed version.

Saturday, August 12, 2017

August 12, 2017 at 11:22PM

Today I Learned: 1) ...what thyme smells like. I know, I know, I really should have known this already -- but somehow I'd only encountered thyme when it was mixed with other spices, and I never knew what part of the smell/flavor to attribute to thyme. I hope to use a lot more of it in the near future. 2) There's a little latin market a couple of blocks from my house. And when I say little, I mean it. I think it's smaller than my living room. But the important thing is that it's close! Today I went there for the first time. There's a wierd mix of stuff crammed in there, including but not limited to: lots of dish soap; tortilla chips (but mostly uncooked tortillas); racks of spices, just like you'll find in the "latin foods" section of most grocery stores around here; bags of "spices for tamales", which seem to be mostly sesame seeds and a few huge hot peppers; super-cheap mustard, ketchup, nutella, mayo, and that kind of thing, mixed with cans of chipotles in ancho sauce and enchilada sauce; vinegars and lemon juice and baking soda all right next to each other; tons of different kinds of snack chips, including some that I'm pretty sure weren't made in the US; and, above and beyond anything else, lots and lots of alcohol and sodas. 3) ...how to make custom legends with Matplotlib. There are a bunch of matplotlib classes called "artists" that each know how to draw something on a plot -- for example, Line2D can draw a 2D line (shocking, I know). To make a legend with custom symbols, you make a list of artist objects, each one of which describes how to draw a thing, and a list of labels so matplotlib knows what to call each thing, and then you do plt.legend(artists, labels) and that's it.