How You’ll Die On Mars

Over at Popular Science they provide some insight into the technical hurdles which must be overcome in order to establish a colony on Mars. Here’s a small taste:

Growing crops on Mars isn’t just for feeding hungry astronauts; plants will serve as a vital source of renewable oxygen for the habitat. It’s a much better option than consistently sending heavy oxygen tanks to the red planet, which will take up too much precious space on resupply missions and cost a lot of money to transport.

Studies have shown plants may be able to grow in Martian soil, however crops have never been grown in the Mars gravity environment, so further testing is required to see if vegetation can survive at all. But if that works, the plants required to feed a multi-person crew will be producing a lot of oxygen. And that’s not necessarily a good thing.

According to Do’s report, too much oxygen in a closed environment can lead to an increased risk of oxygen toxicity for the crew, and even worse, spontaneous explosions. So O2 will have to be vented from the habitat. To do this, the astronauts would need a specialized method for separating oxygen from the gas stream. There are a number of methods for doing so here on Earth (cryogenic distillation and pressure swing adsorption) but none of these technologies have been tested for a Martian environment, and considerable research and development would be needed to make these techniques viable on another planet.

[Popular Science: How You’ll Die On Mars]



Sometimes It Feels Like Work….

Your JoeDog distributes this software and hosts this site mostly as a hobby. He loves to code and he likes sharing his thoughts with you. Still, some days it can be aggravating. Some days it can be drudgery. Some days it can be both. Today was one of those days.

Yesterday evening an automated Turdpress update exposed a problem in Your JoeDog’s theme. This site came to a screeching halt. dowload.joedog.org was zippy quick but www.joedog.org lumbered along like a drunken walrus. Those sites share the same infrastructure so for once we couldn’t blame Amazon. It wasn’t a hosting issue. Something else brought the site to its knees.

Then Your JoeDog found this in his error_log:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 
940175 bytes) in /content/joedog.org/wp-includes/functions.php on line 380

So Your JoeDog went to line 380 of the functions.php file in his theme directory.  Line 380 was the end of the file. At that location, he discovered were several functions no longer in use. He deleted those functions and — bam! — the site was zippy again. But here’s the thing: He misread that error message. The functions.php file wasn’t the one from his theme, it was a core Turdpress file.

So what happened? The current working theory is the one expressed at the start of this post. An upgrade exposed a flaw and Your JoeDog pulled a Homer. So we’re running again but this Saturday feels like just another day at work….



An apt-get Easter Egg

Do you run a Linux variation which uses APT for software distribution? You do? Good, let’s have a little fun. From the command line I want you to run this:

$ apt-get moo

Pretty cool, huh? Okay, let’s try another one. Do you have aptitude installed? If not you can get it like this:

$ apt-get install aptitude

Okay, now that you have that package run this command:

$ aptitude moo

It’s not serious, is it? Let’s add some verbosity:

$ aptitude moo -v

I still don’t believe it, do you? Let’s increase its verbosity with even more v’s:

$ aptitude moo -vv

You get the point now, don’t you? Keep adding v’s to that command until it finally grants your wish….



Bill Gates and the 1918 Spanish Influenza

Bill Gates simpsons characterBill Gates seems to have everything: financial security, a lovely wife, a place in history and a parody on the Simpsons. Yet despite his basic level stability, Gates’s a bit of a worrywart. What’s he worried about, now? Well, according to Vox, his big concern is influenza. He’s worried about another global pandemic.

From the article we learn that in a good year, influenza kills 10,000 Americans. In a bad year the number is 5 times that many. Vox is an American publication and therefore Amero-centric. For our international readers here are the global numbers: between 250,000 and 500,000 people die annually from influenza.

The event that scares every epidemiologist with an interest in influenza is the 1918 pandemic. Spanish influenza killed around 50 million people. That was about three to six percent of the global population. Approximately one-fifth of the world contracted the disease.

Now that he’s retired from Microsoft, Bill Gates spends a great deal of time on disease eradication. His agency developed a computer model to help its quest to eliminate polio. Recently the team used that model to see how an infectious disease like Spanish influenza would work in the contemporary world.

The results were shocking, even to Gates. “Within 60 days it’s basically in all urban centers around the entire globe,” he says. “That didn’t happen with the Spanish flu.”

The basic reason the disease could spread so fast is that human beings now move around so fast. Gates’s modelers found that about 50 times more people cross borders today than did so in 1918. And any new disease will cross those borders with them — and will do it before we necessarily even know there is a new disease.

That seems scary but I think we need to tap the breaks. The 1918 pandemic occurred under extraordinary circumstances. We can’t assume its transmission and mortality rates would be the same in contemporary society. Had Spanish Influenza struck just three years later, would its mortality rate been nearly as high? Probably not. Same disease, different results.

Fifty times more people may cross borders now, but in 1918 larges sums of the right kinds of people traveled to the epicenter of the disease. The “right kinds of people” depends on your perspective. If you were an influenza virus, they were the right kinds. If you were one of its victims, then you probably had a different perspective.

The pandemic was unique in that it mostly killed young adults. In 1918, 99% of influenza deaths occurred in people who were under 65 years old and nearly half of the victims were between the ages of 20 and 40. Where were larges numbers of men from that age group in 1918? They were congregated on the battlefields of Europe which was the epicenter of the disease.

Imagine, if you will, that during the 2015 ebola outbreak a large majority of the earth’s young people packed their bags and moved to Sierra Leone. That unique travel pattern would have certainly pushed mortality rates considerably higher. If more people travel to the epicenter, then more people contract the disease.

The Spanish influenza struck the world in 1918 and any model which attempts to project its contemporary mortality rate must consider all the factors that made the 1918 incident so lethal. It’s not clear if the Gates team did that. Since that would be such a lengthy undertaking, it might be safe to assume they didn’t. So while a contemporary strain of Spanish influenza is a troublesome thing to consider, Your JoeDog will indulge the Gates claim with a grain of salt.



Food Pills and Flying Cars

The Jetson's robot, RosieThe future is now and it kind of sucks.

Paul Krugman reminds us of that in today’s column. He takes us back the 1979 cult classic, The Hitchhiker’s Guide To The Galaxy. In that book, Earth is dismissed as an archaic planet whose life forms “are so amazingly primitive that they still think digital watches are a pretty neat idea.” Yeah, well that was before the technology revolution. Now we have iWatches that remind us to stand when we’ve been sitting too long …. ugh.

So what happened to the future? We were supposed to have flying cars and they gave us 140 characters. We were supposed to have witty housekeeping robots. Instead we’re watching rumbas terrorize the dogs. We were supposed to have food pills but we’re still feeding ourselves. What do you want to eat? I don’t know, what do you want? Why can’t I just take a pill? We have pills for everything else. Can’t get a boner? Here’s your pill. Can’t pay attention? Have a pill. And what is hunger but a medical condition? It’s 2015 and we still haven’t cured that chronic disease.

Well things are looking up, you guys. Silicon Valley entrepreneurs are concocting food shakes to get you through the day. Hunger pangs? Drink this protein pancake batter. It’s not a food pill, but it’s a start. You still have to drink it but the only thing you dirty is a spoon and glass. If you use disposable plastic, clean up is a snap. Gulp, gulp, gulp, toss. Your JoeDog had a protein shake for lunch. Gulp, gulp, gulp, toss. Two hours later, he’s hungry as hell. Stupid science. Where’s my food pill?

 

 



The Security State

Shopping tripSo imagine — because why the hell not — you returned to your vehicle after a concert in Washington D.C. Police are everywhere. Your windows are bashed in and your new cookware is exploded into little tiny pieces. That would be odd, huh? Well, that’s what happened to an Alexandria man this week. He returned to his car and found his shit was destroyed by local law enforcement.

Huh?

Your JoeDog read many accounts of this incident. As best as he can tell this is what happened: Around 5:00 p.m. on Sunday, officers on foot noticed a vehicle that they characterized as “suspicious in nature.” It was parked along a public street. What made it suspicious? The vehicle contained a pressure cooker and other “items of concern.”

What’s not clear is how those items were stored. Were they in bags or out in the open? Was this the result of a shopping trip or something more nefarious? The investigation continued and officers became more suspicious. An “odor of gasoline was detected.” Interesting. A vehicle with an internal combustion engine omitted an odor of gasoline. So then what happened?

The bomb squad arrived and police broke into the vehicle and blew up all the shit inside. Catastrophe averted! The country remains safe and sound. So what did they protect us from? After destroying everything in the car, police conducted a thorough investigation to determine exactly what they saved us from. They conducted  thorough “hand search” of the vehicle and concluded their investigation “with negative results and nothing hazardous found.”

In other words, they saved us from a shopping trip.



Write-error on swap-device

Your JoeDog was down this morning. This site is hosted on the free plan at Amazon Web Services. Through the EC2 web portal, he was able to read the console logs of the downed instance. It was filled with entries which looked like this:

9443.085875 Write-error on swap-device (202:0:10258840)
9443.085875 Write-error on swap-device (202:0:10295632)
9443.085875 Write-error on swap-device (202:0:10320576)
9443.085875 Write-error on swap-device (202:0:10336216)
9443.085875 Write-error on swap-device (202:0:10395280)

So Your JoeDog plugged that error into the Google machine and it produced this Amazon EC2 forum entry. The Amazon rep asked that troubled soul if he could stop and start his instance. So Your JoeDog did a stop and start. That didn’t solve his problem, either. In the end, he was forced to clone the volume and bring up a whole new server. He took the opportunity to add more memory. Yeah, that means he’s no longer on the free plan but he can’t deal with the low-memory micro instance for another second. Not. One. More. Second.

So if you’re a troubled soul who found this entry because you googled “Write-error on swap-device” for your downed EC2 instance, here’s how you bring up a clone.

  1. EC2 Dashboard => Instances (select downed instance)
  2. Actions => Image => Create image (that’s going to take a while)
  3. On the left nav: Images => AMIs (select the new one)
  4. Select it, then hit Launch. (follow the instructions)

Once your new server is up and running, log in and scrutinize the environment. You should have all the content that was one the old one. It is, afterall, a clone. Once you’re feeling good about the new server, you can terminate the old one and delete the old image.

 



Things I Have In Common With Richard Stallman

Your JoeDog found Richard Stallman to be the same in real life as he is on the Internets: a complete pain in the ass. He’s not just the how priest of free software, he’s also the choir. For example, most of us understand that when you buy hardware it comes with proprietary firmware. He gets worked up about that. The dude will inconvenience himself rather than compromise his commitment to free — as in freedom — software.

Actually, he’s a very nice guy but I’m still surprised to learn we have a anything in common. Yet we do! For example, did you know we

  1. Both prefer console based editors although Stallman uses that god awful emacs.
  2. Think C++ is one ugly-ass language
  3. Think java is elegant although we don’t use it often.
  4. Both consider C our favorite language.
  5. Don’t care for 4Chan.

That’s about it, but it’s more traits than Your JoeDog would have thought possible. Click that and you’ll see what I mean. If the rich aren’t like the rest of us, then neither is Stallman. And that’s a good thing because the guy’s a treasure. (Even if he is a pain in the ass.)



Siege 3.1.0 Release Candidate 3

If you’re following the 3.1.0 thread, then you know siege clients are essentially capped by your operating system’s FD_SETSIZE. For most of us, that means 1024. You can increase its capacity by recompiling your kernel, an operation Your JoeDog hasn’t attempted in over 20 years. In all likelihood, you don’t feel like doing that either.

To overcome this limit, we switched from select to poll in siege-3.1.0 rc2. If your OS supported poll, then you’d use that mechanism to test socket readiness. So while that increased our capacity, it wrecked our performance. Why? It’s still not clear why but that’s the feedback we received from several testers. It also matches our own experience.

Which brings us to release candidate 3. We now use both mechanisms. If a socket descriptor is less than FD_SETSIZE, then we test it with select. If it’s greater than that, we use poll. Thus far it seems like a good compromise until we develop better method for high volume socket testing.

NOTE: If your web server is not configured to run a pool of 1024 threads, do NOT configure siege with that many simulated users. If you use more siege threads than available web server threads, connections will back up while waiting for handlers and before you know it, you’ll have a mess. You’ve been warned. 

http://download.joedog.org/siege/beta/siege-3.1.0-rc3.tar.gz



Helpful Heuristic: Quick Links In WordPress

Here’s a handy-dandy labor saving tip for you. Let’s say — and why not? — we want to make a linky-link like Pittsburgh Pirates in WordPress. With the URL copied to your clipboard, highlight the link text in the WordPress editor then hit Ctrl-v. Done and done. No need to use the chain link icon. You’re welcome.

NOTE: Andrew McCutchen tied the game for the Pirates in the bottom of the eight as Your JoeDog was working on the Pittsburgh Pirates link for this entry….