Most normal people will probably never even know this is a thing, but Chrome (and other browsers, really) keeps its own in-memory DNS cache, separate from what the OS keeps. For normal use, this is undoubtedly an improvement.
But every now and then, this can be a burden, and Chrome will have cached something you don’t want it to. For example, you make a change in /etc/hosts to hit a development server bypassing its load balancer or the like, but Chrome has already cached the IP, and thus the hosts change isn’t picked up.
It turns out that you can totally flush this cache—and view its contents. Just pay a visit to chrome://net-internals/#dns and voila! A listing of cache entires, and a “Clear host cache” button. (It also provides a look at how many optimistic DNS queries Chrome performs: many of the entries seem to be unvisited links on sites you’ve visited.)
The latest? What exactly constitutes a millennial? And what’s all that Gen X/Y business?
It turns out that there’s actually not broad consensus on exactly what the date are, but they look something like this:
Millennials / Generation Y
They tend to run 15-20 years, which means we’re around the time for needing a new term for those post Generation Z.
Also interesting to me: at the time of this writing, “millennials” are between 20 and 36 years old. I’ve taken a lot of the “kids these days” complaints about millennials to refer to teens, which would more accurately be Generation Z. Ironically, those born on or after 2000 are not millennials. (I used to assume the term referred to those born this millennium.)
For the purposes of this list, “Western world” can be taken to mean North America, Europe, South America, and Oceania. However, it should also be noted that many variations may exist within the regions, both geographically and culturally, which mean that the list is broadly indicative, but necessarily very general.
It seems that virtually no one agrees on exactly where a generation ends or begins, so you’ll see several years of variation depending on the source.
For a while now I’ve read about software-defined radio (SDR), but as an academic pursuit, or as something very expensive. It turns out that I was way misinformed, and you can get in on the fun for $25 ro so as long as you have a computer with a USB port.
As the story goes, tuners like these were originally cheap USB TV tuners. They cut costs by doing much of the processing in software instead of hardware. And, well, that’s software-defined radio! The fact that they were TV tuners had some other nice effects: the TV bands are all over the place, and each TV signal is a few MHz wide, so these are in fact broadband SDRs capable of capturing a couple MHz of spectrum concurrently. And that’s awesome for us!
Here’s the one I have; the specific model is no longer made, but it uses the same R820T tuner that current models support:
On Linux I use rtl_fm for tuning, but on Windows, I use SDR Sharp. And on the Mac, I use gqrx, also available on Linux.
Here it is in action:
(Sorry for the photograph of a computer screen. That’s my old radio-programming laptop that needs to stay on Windows XP, so I intentionally keep it off the Internet.)
You can see it’s tuned to 162.525, which is WNG575, my nearest NOAA weather radio station. SDR Sharp is giving us a spectrum scope view, which is pretty handy.
The receiver has adjustable gain, from 0 to about 47 dB. It’s not abundantly clear to me how this relates to regular receivers; it seems like the 0 dB setting is pretty deaf compared to most of my other radios, but at 47 dB it’s definitely got some gain on the others. The spectrum scope is especially useful for seeing the effects of gain, though: as you increase gain, the noise floor goes right on up with the signal. (This is, of course, not surprising, but it’s a great visual explanation of why you don’t always want a powerful preamp.)
With the scope, you can see that, with the gain turned up, the noise floor is sitting around -65 dBm, while the weather station is up at -20 dBm. Nearly as strong off to the right is 162.55, WXL93 out of Paxton. (You’ll also see 162.475, KHB35 in Boston; as well as, much weaker, 162.45, which is KZZ40 on Saddleback Mountain in NH.)
You’re probably not particularly interested in which weather stations I can receive, but the spectrum view is quite handy.
And here it is during a linked traffic net on the ham bands:
With the GP-15 I just put up, I’m seeing a number of area repeaters active — plus some noise!
The thing isn’t perfect. As an extremely wideband receiver that is so small that I could literally swallow it, it seems to suffer a bit more than other receivers with strong noise and intermod. I receive ghosts of signals in odd places on the band, seemingly related to the bandwidth I sample: at the 0.25 Msps mode, I often see images duplicated 1 MHz off their true frequency. The 0.9 MHz view is more confusing. But, for the cost, and the features that a receiver costing 20x as much doesn’t offer, I’m willing to put up with that.
Oh, it also gets kind of hot, especially as you crank the gain up:
That also points to another problem, in that it often has some frequency error, which seems to vary a bit with temperature. I’ll often have to dial in about 30 ppm correction, and then back off that as it warms up. But, like the performance in noisy environments, that’s a problem I can put up with.
My loving relatives gifted me an Thule AeroBlade roofrack, to celebrate me turning really old and also no longer having a car large enough to shove a Christmas tree in the back of. I figured I’d document the process, for my sanity when I go to repeat this next year, and for anyone else who’s looking at installing these.
My car’s a 2012 BMW 535i, a member of the “F10” series/class. I believe all of the 2010/2011 and newer 5-series cars will fit into that category. The Thule assembly for this model came in three separate boxes:
ARB47, Thule AeroBlade, 47″, “load bars” — the actual roof rack bars.
460R, Rapid Podium, the base onto which the load bars attach
Kit 3089, the vehicle-specific kit for securing to the roof.
Because I’m a guy, I started by assuming I didn’t need the directions. I mean, how hard can it be? The car even has these flip-up mounting points:
They pop up like so, revealing slots you can screw into.
My plans were quickly foiled when I realized I hadn’t even started with the right box of equipment. Apparently, there’s a reason they include the instructions.
Overall plan of attack
What was totally unclear to me when I was figuring all of this out is that you really can’t just do one box at a time. You can mostly install the vehicle-specific kit first, but then you start needing to meld the other kits together.
The rest of the post will go into much more detail, but you’re going to want to accomplish the following.
First, you’ll install the vehicle-specific mounting kit, “Kit 3089” in this case. This will leave you posts the rest attaches to:
Then, you’re going to want to assemble the AeroBlades, and loosely secure them to the “Rapid Podium”:
Finally, you’ll attach that whole mix to the mounting kit you bolted to the car in the first step.
Car Mounting Kit
Have you ever assembled something from Ikea? You know how the illustrations give you a vague sense of what you want to accomplish, but don’t quite tell you how to get there? That’s how I felt the whole time I was doing this, and then I realized that Thule and Ikea are both Swedish companies. Having a little Swedish ancestry was insufficient to intuit what they meant some of the time.
First, screw these bolts into each of the four mounting points on the roof. The mounting point covers on the BMW swivel up to reveal the sockets, but don’t come off. That’s fine; you don’t need them to. One end of the bolt is wider in a small section; that’s the bit that goes into the roof screw-holes.
If the bolts aren’t going in, that’s fine. They include a die that you can use to perfect the threads:
You screw that in with a larger 5mm hex bit, and then unscrew it, leaving pristine threads. I didn’t see a 5mm bit in the box, but there was one in the Rapid Podium box. That die is only to fix the threads; it doesn’t stay in the car.
Once those bolts are in, make four of these:
The metal bracket snaps into the larger piece.
Place them on the bolt, with the “24” facing you, so that the back angles away from you. Secure it with a washer and nut from the package. Also, place the rubber boot over it, like so:
The rubber should sit between you and the metal post.
Note that the rubber pieces have separate shapes for front and back. One will obviously fit and the other won’t.
Note that this whole assembly is going to look ridiculously crooked. That’s normal; the other pieces are angled to make it all work. I never got the rubber boots to sit quite flush.
Partly assemble the load bars
All you should do at this point is put the long rubber strip in the top. Note that it has little feet that snap into the channel. Don’t attempt to thread the whole thing inside. (If that last sentence means nothing to you, that’s good; it means your mind didn’t even conceive the bad idea I had for how it was supposed to go together.)
Do not put the end caps in the box on yet; they’d just be in the way for the next step.
Attach the Rapid Podium mounts to the load bars
When you take these out of the box, there are two parts held together with tape. Remove the tape, and separate them.
You want the part I’m not holding in the picture. The base will slide into the load bar like so:
The underside of the load bars has an adjustable piece to set how far in the mount goes. I only needed to push it in 2-3″ on each side to get it to fit. The goal is to put the podium mount on each side, and get them loosely matched to fit the bases you installed previously. You’ll quickly find that the podium mounts don’t always want to move. There’s a locking mechanism. Looking at the underside of the bar, it’s this thing:
Pull that inward (towards the center of the bar) to allow it to move; push it out to lock it in place. The nice thing is that it keeps things from falling apart as you maneuver it.
Your goal right now is not to get it mounted, only to size it appropriately. It takes a bit of fiddling, especially trying to make it proportional. Mine ended up a little off-kilter. It bothers me a lot, but not enough to take it off and do it again.
Note that the Rapid Podium pieces only come to the inside of the vehicle mount; they don’t sit on top of it. Like this:
Don’t put the bolts through yet, however. All you’re doing right now is a dry fit to get the mounts set at the right points.
Mounting the bars
You should basically be at the above step, minus the bolts. So now, go to install those bolts.
This is by far the most frustrating step. It took 70% of my time and caused 90% of my irritation. If you can’t get the bolts to thread through, I found it easiest to just cast the whole bar/podium aside and put the bolts in first:
Then try to mount it. I still had trouble on a couple of them, which led to yet another strategy. I removed the metal bar from the inside entirely:
Then I ran the pushed through from the car mount to the podium, and then worked on sliding the metal bar back in and getting the screws to thread.
Unless you’re some sort of natural maskiningenjör, this process is going to take a while before everything begins to thread together. Once you get one of the two bolts to start to go, don’t turn it much! Immediately get the other one to thread in. Otherwise you’ll just never get it.
I found, from experience, that if I didn’t get it after a few attempts, it made the most sense to take apart and start over. Sometimes it took several tries, but aimlessly jiggling and shoving things didn’t help anything at all. Try to remain välbalanserad for this.
Also, keep count of how many times you drop a screw on the ground. A true Swede will number fewer than 20; I did not. And I dropped the wrench even more.
Oh, and watch out for this—it’s easy to scratch the paint with the wrench:
The good news is, I had just ordered a bunch of stuff for detailing and getting other scratches and swirl marks out, and I believe this will polish out pretty easily. But that’s the subject of a later blog post!
Once you get this step done, you’re 98% of the way there. The rest is a breeze!
Install the caps
Remember the other half of this? The part I’m holding? Now, you just need to install that.
It just slides into place. Then you use these key-like things to lock it in:
If the slot is vertical, it’s open. Turn it clockwise to a horizontal position (I used a knife blade because that’s what I had in my tool box, but I suspect a coin would work well too) to latch it. Give it a tug to make sure it’s actually latched.
You are done. Hooray!
Perhaps the experience has left you wishing to learn a little Swedish?
A while ago, I read about the concept of micropropagation, a fast way of propagating/cloning plants. Since I learned years ago about how readily the jade plant can sprout from a single dropped leaf, I’ve always found the idea of propagating plants interesting. Micropropagation extends that idea, by growing in a sterile medium and using plant growth hormones to get things just right. While traditional propagation lets you take a cutting from a plant and get it to root, micropropagation allows you to take that cutting and induce the formation of many shoots, then moving each of them along to rooting. It’s a perfectly nerdy hobby for me.
I have an orchid whose blooms are fading, meaning it’s time to cut it back. I also have a hydrangea that I’ve failed thus far to root conventionally, though I think that’s more me lacking a green thumb than anything. So I decided to try this. Everything is in my pressure cooker now, so this is Part 0 of a series.
The Secret Sauce
Key to the process is the “media” the plants are grown in. It is traditionally solidified agar to keep pieces in place, with plant growth hormones and sugar to nourish the plant. You might also use, if you hadn’t forgotten to order it on Amazon, a cytokinenin to promote cell division, encouraging the growth of multiple shoots.
Based on what I’d read, I made a solution of the following:
Murashige and Skoog medium (“M&S”), 4.3g/L per the bottle. This is the exact product I ordered. Note that it’s a powder, but is sold by the final volume, so the 10 Liter container, at 4.3g/L, must be approximately 43 grams of powder. However, I goofed up the math, and used close to double the desired amount. We’ll see how big of a mistake that was. Also a mistake, I think, is that I ordered the version without vitamins, this is the with-vitamins version.
Sucrose, at 30g/L. I used table sugar. Well, I should have used table sugar, but I only had powdered sugar, which I naively assumed was the same. After mixing everything, I realized that powdered sugar is actually sucrose and tapioca, in an unknown blend, so I probably have too little sucrose, and random tapioca in the blend. I would make a horrible scientist.
Water. I probably should have used purified/bottled water, but didn’t.
As you can see, I’m already off to a rocky start. But I’m doing so kind of knowingly, somewhat expecting failure my first try.
Undaunted by my mis-measurement, use of a vitamin-less medium, and my decision to use powdered sugar to fulfill the “sucrose” requirement, I went about preparing the medium with similar regard for proper scientific precision.
This is the solution I mixed. I conducted this in the sterile lab environment of my dirty kitchen stovetop. Lacking a beaker, I used a mixing bowl. I also used a striped drinking straw as an innovative stirrer / pipette combination. The idea was to blend things in the appropriate concentrations, then place them in test tubes, then put them in an autoclave.
As cool as it would be to have an autoclave at home, I do not. I do, however, have a pressure cooker, and those are recommended as a suitable alternative here. As I understand it, the purpose here is twofold: to sterilize the medium, and to heat the agar in the medium to a temperature sufficient to get it to set.
I did try to do things right, and sterilized each test tube with bleach, then with rubbing alcohol. I then rinsed them, and used a pipette drinking straw to fill them with around an inch of the solution I mixed. To contain them in the pressure cooker, I used a drinking glass, partly filled with water.
I covered about 2/3 of them with tinfoil, realizing that perhaps, when heated past the boiling point, the liquid might boil off. (The stoppers are plastic, and would have melted.) I left a few as a control to see how much evaporates. I had only made 4 ounces of solution, but it ended up being way too much for 9 (I broke one of the ten…) test tubes, so I filled a couple ramekins partway as well. Here’s what ended up going into the pressure cooker:
Everything is “cooking” now. In the meantime…
The portion of the plant that’s cut off to be used in tissue culture / micropropagation is called an explant. Keeping things sterile is described as being very important, though I was quite lax in some of my preparation—partly out of lack of experience or proper equipment yet, and partly because I’m curious if things will work at all when done this way.
I tried to use roughly half-inch to 1-inch bits of the parent plant. Each was rinsed in water, soaked in a dilute bleach mix, rinsed, and then dipped in rubbing alcohol, before being rinsed again. The goal is to then move them into test tubes with sterilized tweezers, seating them in the gel.
I’ll try to post an update tomorrow about whether this ends in complete disaster or not. Assuming all goes well, it will probably be a while before anything starts to grow. The results will be anything between 3 orchids and 2 hydrangeas starting to grow, to nine test tubes that start to grow mold and fungus. Tune in next time!
I struggled to find a decent map showing the various neighborhoods of Lowell. The obvious conclusion: I should make my own.
It turns out that Google Maps knows about them, so you can search for, say, The Acre, Lowell, MA and get a map showing the boundaries. Here’s what you get when you combine all of them hastily in Photoshop, draw thicker borders, and add too-large labels:
(Click for a larger, 3MB version)
The old city site has some information which is now hard to find, but it included this small map that turns up a few places… It’s what spurred me to create something else.
What’s interesting about that PDF is that it defines some additional neighborhoods—the Highlands also have the easternmost section split off into Lower Highlands, Belvidere has its northwestern portion as Lower Belvidere, and the section of South Lowell that’s west of the Concord River is known as Sacred Heart. Those neighborhoods don’t seem to be widely referenced anymore.
I follow “God” on Twitter, @TheGoodGodAbove. (He’s on Facebook, too!) I’m not a religious person these days, but having been raised Christian and sent to a Catholic high school, I did learn a good bit about God. The thing I find interesting is that, as much as “God” on Twitter upsets more strict religious folks as heretical, I actually find his posts to be a better representation of what Jesus taught than I’m used to getting in church. His most recent post is something that strikes a chord with me:
As a non-religious person, I’m left wondering what praying for the victims in Nepal even means. I guess you could pray that there won’t be more earthquakes to make things worse. You can’t pray that the whole thing will be undone, because if that worked, we wouldn’t have had the Holocaust or 9/11. About the only prayer that makes sense to me is that they’ll get speedy help.
As a religious person, I was irritated by something similar. I believed that God acted through us. Praying that God will wave a magic wand and make things better is cheating. If you’re praying that someone will help: be that someone, and go help. And if it’s not practical for you to fly to Nepal and help (and I’m quite sure we’d just be in the way if we did), donate to an organization that is helping.
But praying that God will have someone else help is cheating. Do it yourself. Put it down as “fulfilling your own prayers” if you’d like.
I pretty recently learned the phrase dog-whistle politics. The idea is that certain phrases have hidden, extra meaning to certain people. The Wikipedia page gives state’s rights as an example where political comments often have a more nuanced meaning that’s semi-concealed.
I’m not sure if it’s properly the same concept, but one apparent example of this I’ve become really interested in is the “Black lives matter” and “All lives matter” phrases. “Black lives matter” became a common refrain after Michael Brown’s shooting, and came to encompass a general frustration (probably too tame of a term) at the apparent disregard for how many people of color were shot by police. And, much like the proper definitions of feminism, I think that’s a cause that everyone should support.
But then, “All lives matter” and “Police lives matter” became common counter-arguments. And I saw many tweets along the lines of, “People who don’t attack cops don’t get shot. #policelivesmatter.” It started to be associated with people who argued that Darren Wilson was innocent (or even, in some people’s strange opinions, “a hero”), and that Michael Brown pretty much deserved to be shot. (To be clear, that is not my opinion.)
I remember being very upset upon reading a tweet that said something like, “On 9/11, many police officers knowingly ran INTO the Twin Towers. #policelivesmatter” And I realized that it had reached the point where the actual words used were entirely irrelevant.
The literal meaning, and that a person not familiar with a lot of backstory, was one that everyone would agree with: there were so many heroes in the NYPD that willingly gave their lives on 9/11, and saying that their lives matter is so patently obvious that it seems weird to even mention.
But the reason it seems so weird to mention is that there’s a lot of hidden meaning, or at least that I read into it. It reads like a counter to the “black lives matter” people, in a time with a lot of police brutality being discussed in the news. What I read wasn’t a lot different from, “Black people need to quit complaining about being disproportionately harmed by police violence. I side with the police who choked Eric Gardner.”
The point here isn’t whether I correctly read the meaning, nor who is correct. I’m merely fascinated by how some terms or concepts can become so incredibly charged that people read into them meanings that aren’t contained in the actual words said. Because of the specific phrasing and the timing/context of a comment, I took a tweet expressing gratitude for NYPD officers who gave their lives on 9/11 as an appallingly racist, hateful message. And that is utterly fascinating to me.
But this isn’t isolated. Conversations about the Confederate flag, “religious freedom,” or “women’s rights” often conjure up extremely strong emotions and opinions, even where they’re not necessarily intended. And just try to have a rational conversation about gun control or the Second Amendment, or immigration policy. The terms are so charged with meanings you likely don’t even intend.
I’m not sure yet if this is a good idea or not, nor if I want to pay for it long-term, but I’m playing with an experiment that I think is kind of neat. (But maybe I’m biased.)
For a long time now, I’ve been using CloudFront to serve static assets (images, CSS, JS, etc.) on the blogs, and a few other sites I host. That content never changes, so I can offload it to a global Content Delivery Network. IMHO it’s win-win: visitors get a faster experience because most of those assets come from a server near them (they have a pretty extensive network), and I get my server alleviated from serving most images, so it’s only handling request for the blog pages themselves.
Except, serving images is easy; they’re just static files, and I’ve got plenty of bandwidth. What’s hard is serving blog pages: they’re dynamically-generated, and involve database queries, parsing templates, and so forth… Easily 100ms or more, even when things go well. What I’d really like is to cache those files, and just remove them from cache when something changes. And I’ve actually had that in place for a while now, using varnish in front of the blogs. It’s worked very well; more than 90% of visits are served out of cache. (And a decent bit of the 10% that miss are things that can’t be cached, like form POSTs.) It alleviates backend load, and makes the site much faster when cache hits occur, which is most of the time.
But doing this requires a lot of control over the cache, because I need to be able to quickly invalidate the cache. CloudFront doesn’t make that easy, and they also don’t support IPv6. What I really wanted to do was run varnish on multiple servers around the world myself. But directing people to the closest server isn’t easy. Or, at least, that’s what I thought.
Amazon’s Latency-Based Routing
Amazon (more specifically, AWS) has supported latency-based routing for a while now. If you run instances in, say, Amazon’s Virginia/DC (us-east-1) region and in their Ireland (eu-west-1) data centers, you can set up LBR records for a domain to point to both, and they’ll answer DNS queries for whichever IP address is closer to the user (well, the user’s DNS server).
It turns out that, although the latency is in reference to AWS data centers, your IPs don’t actually have to point to data centers.
So I set up the following:
NYC (at Digital Ocean), mapped to us-east-1 (AWS’s DC/Virginia region)
Frankfurt, Germany (at Vultr), mapped to eu-central-1 (AWS’s Frankfurt region)
Los Angeles (at Vultr), mapped to us-west-1 (AWS’s “N. California” region)
Singapore (at Digital Ocean), mapped to ap-southeast-1 (AWS’s Singapore region)
The locations aren’t quite 1:1, but what I realized is that it doesn’t actually matter. Los Angeles isn’t exactly Northern California, but the latency is insignificant—and the alternative was all the traffic going to Boston, so it’s a major improvement.
Doing this in DNS isn’t perfect, either: if you are in Japan and use a DNS server in Kansas, you’re going to get records as if you’re in Kansas. But that’s insane and you shouldn’t do it, but again, it doesn’t entirely matter. You’re generally going to get routed to the closest location, and when you don’t, it’s not really a big deal. Worst case, you see perhaps 300ms latency.
It turns out that there’s a Multi-Varnish HTTP Purge plugin, which seems to work. The downside is that it’s slow: not because of anything wrong with the plugin, but because, whenever a page changes, WordPress now has to make connections to four servers across the planet.
I want to hack together a little API to accept purge requests and return immediately, and then execute them in the background, and in parallel. (And why not log the time it takes to return in statsd?)
Debugging, and future ideas
I added a little bit of VCL so that /EDGE_LOCATION will return a page showing your current location.
I think I’m going to leave things this way for a while and see how things go. I don’t really need a global CDN in front of my site, but with Vultr and Digital Ocean both having instances in the $5-10 range, it’s fairly cheap to experiment with for a while.