There is no reason to think that there is intelligent life on other planets

Nevermind Where. *When* Are the Intelligent Aliens?

I only just came across this, from 2011, but I have to respond. Note that I’m not an astrophysicist, or a biologist, or a chemist, or… you get the idea. Seth Shostak is an astronomer at SETI. But I’ll make my arguments and you can decide for yourself.

“Indeed, it seems a good bet to guess that at least a few percent of all stars are blessed with “habitable” worlds. That would tally to billions of life-friendly sites, just in our galaxy.”

The first part is reasonable enough. Recent research has indeed found many of our near neighbors have “habitable” planets. But check the definition a few sentences earlier of “habitable”:

“…worlds with solid surfaces at the right distance from their host star to sport temperatures amenable to the presence of watery oceans and protective atmospheres…”

So we’re jumping from solid, not enormous, and in the right orbital zone, to “life-friendly.” That’s a huge leap. As far as I know the debate continues on just how big the “habitable zone” is. Take a look at the table at http://en.wikipedia.org/wiki/Circumstellar_habitable_zone and note that recent estimates for both the inner and outer bounds of the region vary by 2x. That’s not certainty.

Estimates of the number of terrestrial (rocky) planets in the habitable zone in our galaxy range from 500 million to 150 billion, but again, it’s important not to read too much into “habitable” or “terrestrial.” All that means is that if you we’re there in a spacesuit, you wouldn’t collapse under your own weight, or sink into the planet’s surface, and a cup of water, at least somewhere on the planet, would neither freeze nor boil. That’s a long way from “plant some corn and build a cabin.”

Finally, all of this ignores the simple fact that given a rocky planet where the water is liquid at least some of the time, at least somewhere, assuming there’s water there in the first place, we don’t know how likely life is to spring into existence in the first place. if it does happen, we don’t know how likely it is to become multicellular, or any of the other hurdles on the way to becoming the Klingons or the Vulcans. Or us. One data point does not allow for reasonable estimation.

The article insists that there are hundreds of billions of rocky, habitable-zone planets in our galaxy. Well, my estimate of the likelihood of life coming into existence on a given planet is a trillion to one, and no argument I’ve heard can disagree except on the basis of incredulity. “A trillion to one? That’s absurd! How did we get here then?” The simple answer is that if we weren’t, we wouldn’t be here to debate this.

Advertisements

Apparently, other mobile OSes assume you don’t do much

Here are screen shots of four phone home screens. The question asked is: which do you prefer? But consider a different question: what do you want to do? Or, putting it another way, how many different things might you want to do?

Each home screen has a number of different icons or other items that seem as though they might launch an app, allowing you to do some separate thing. I’m not familiar with all of these platforms, so I’m guaranteed to get this wrong, but:

Android: 11, counting the notion that clicking on the clock does something, and assuming that the bar across the top does something (more than what opening Chrome and searching, one of the other options on the screen, does), and assuming that the plain icons at the bottom do something, but not counting the back arrow at the bottom left, on the assumption that it is a function, not an app.

iOS: 22, not counting the two empty spaces, which could obviously also include apps, because all of these home screens could presumably be configured to have more options.

Windows Phone 8: 13, assuming that the blue rectangle at the lower right is unused.

Ubuntu: 13, assuming that “Home,” is a command and not just a label, and that tapping the photo stream does something, and that each of the small icons at the bottom does something.

Given the “style over substance” argument often made against Apple, it’s interesting that iOS is the clear choice for presenting access to the most app choices just one tap away from the home screen.

Six towns math problem

I thought of this on my way to work and did the math in my head. When I get to a piece of paper I’ll see if I came up with the right answer.

Suppose there are six towns located at the points of a regular hexagon two miles on a side. Every town has a straight road to every other town, and there are no other roads.

People live and work along each of the roads (not just in the towns), and everyone bicycles to work along the shortest route available.

What is the longest distance anyone could possibly have to bicycle to get to work?

The Universe is Smaller Than You Think

To understand how small the universe really is, you must first understand how large it is — it’s larger than you think, if you haven’t read about the expansion of space. The best current estimate for the age of the universe is just under 14 billion years, so the simple value for the size of the observable universe would be just under 14 billion light years in every direction from Earth. With expansion it’s much larger than that: about 46 or 47 billion light years in any direction, or 93 billion light years across. I can ride a bicycle 100 miles in a day — it would take me 15,000,000,000,000,000,000 years to ride across the universe. I’d better get started.

Translate that into volume and the number gets crazy. If our solar system has a radius of 124 astronomical units (that’s how far out Voyager I is about…now) then the universe is about 13,000,000,000,000,000,000,000,000,000,000,000,000,000 times the volume of our solar system.

Okay, so the universe is really big, right?

No

In fact, it’s quite the opposite. Allow me to explain. The estimate for the mass of the universe ranges from about 8×10^52 kg to just under 4×10^54 kg. To quote Marty McFly, “Whoa. This is heavy.”

But not heavy enough. The universe is almost unimaginably sparse. There’s a lot of space, but not a lot of stuff. If you gathered all the mass in the universe together, it would be incredibly large in terms of days to bicycle it, but incredibly small compared to the space it normally occupies: the universe.

For comparison, the nearest star to our sun is Proxima Centauri, a little more than four light years away. Round that up to five light years. Fill a sphere with water, centered on our sun and with radius 5 light years, and in addition to having the deepest swimming pool in history, the resulting mass would be about 4.3×10^53 kg, or about the same as the mass of the observable universe. So:

Everything we know in the universe — every planet, every star, every galaxy, the dark matter, the dark energy, all of it — weighs about the same as a sphere of water that barely reaches our nearest neighbor star.

That sphere is large compared to us — it would take about 1.6 billion years to bicycle across it — but it’s really small, even compared just to our galaxy. If you were looking at an image of the Milky Way on your monitor, you wouldn’t be able to see that ball of water. Yes, even with a retina display. And compared to the universe, the sphere ridiculously small. The universe could contain about 1,000,000,000,000,000,000,000,000,000,000 of those spheres. Not so big, eh? Another way of looking at it is to say that on average the universe is 1/1,000,000,000,000,000,000,000,000,000,000 as dense as water.

Note that if this hypothetical sphere of water suddenly popped into existence, it would immediately start collapsing in on itself at near the speed of light. At the surface — 5 light years away from the center of mass — the water would experience a gravitational force roughly a billion times that at the Earth’s surface. Did I say immediately? Ignoring relativistic effects, it would take the water at the surface about a thirtieth of a second to accelerate to near light speed.

I’m not sure what would happen to the sphere of water as it crushed itself, but I’d be happy to observe from a distance — let’s say a few billion light years away, just to be safe.

You might be thinking about calling shenanigans, based on those really big stars like NML_Cygni. It’s the largest known star: if it were put in place of our sun, it would engulf Jupiter, but not reach Saturn. But for all its size — about 5 billion times the volume of the sun — it has only about 40 times the sun’s mass. At its surface, it’s more vacuum than matter. It might be hard for NML Cygni to burn you using thermal heat alone, because it’s so thin. Don’t try it though, the radiant energy would easily cook you.

Water is great for comparison, but at a molecular level it’s still mostly empty space. To pack a little tighter, consider the density of a neutron star, generally over 1 billion times the density of water. So if you pack it into one big nuclear mass, the entire universe would fit in a sphere only about 300 astronomical units in radius — give Voyager I a couple hundred years and it will have traveled that far. The gravity at the surface of that sphere would be almost unimaginable.

If we traded the current universal setup for either of these spheres, the entire rest of the universe would be empty — completely empty. Of course, it’s very nearly empty now.

Keeping a clean desktop and downloads folder

I decided I’d had enough of my Mac being slow to reboot because of too many items on the desktop. Why that should be a dealbreaker, I have no idea, but when the Finder is starting you can watch the things render one… by… one… I don’t keep a particularly messy desktop — there are 42 items on it right now — but apparently that’s too much.

It’s also a usability thing. The desktop and the downloads folder are where things get put by default. I rarely need the things there for more than a few days in the case of the desktop, or a few minutes in the case of the downloads folder.

I already have folders where I toss things when I clean up. Those folders are a mess. They have hundreds of items, but I don’t care. I’m going to use an AppleScript and put it in cron. I haven’t touched either of those technologies in years, so it should be interesting.

The AppleScript

First forgotten fact: Macs use “:” as a delimiter in paths. Everything else I use shields me from that. Also, AppleScript doesn’t understand “~geoffcanyon:Desktop” Still, getting all the files and folders on the desktop is easy:

       tell application “Finder” to every item of folder “Macintosh HD:Users:geoffcanyon:Desktop”

Ah, it’s been some time since I used AppleScript. I forgot about

       path to desktop folder

So it’s:

       tell application “Finder” to every item of folder (path to desktop folder)

Hmm, what’s the property name for “Date Modified”? Time to open the Finder’s dictionary.

RANT INTERLUDE

Many articles complain about AppleScript’s syntax. Here’s an example from John Gruber. He says, “…it turns out that an English-like programming language didn’t really enable a large number of users to become programmers. And conversely, AppleScript’s English-like syntax often made (and to this day continues to make) things more difficult and confusing for scripters, not less.” That’s typical of complaints against AppleScript, and it’s clearly wrong. There are two points:

Beginners
Look at HyperCard, or LiveCode, and it’s clear that an English-like language can ease non-programmers into programming. Thousands of people programming today got their start in HyperCard. So while it might be that, as Mr. Gruber says, “…the number of programmers in the world who consider AppleScript their favorite language could fit in a very small car…” the number of programmers who consider an English-like syntax their favorite would fill…okay, maybe not a stadium, but they’d crush that car.

Syntax
AppleScript syntax isn’t challenging, unclear, or ambiguous — the application dictionaries are. They can (and often must) be incredibly detailed, and the documentation is often non-existent. I once spent several hours figuring out how to add a page to a document in an application. It turned out that the application’s documents don’t contain pages — they contain spreads, and spreads contain pages. But blaming AppleScript for the complexities of application dictionaries is like blaming the english language for Gravity’s Rainbow.

END RANT

The Finder’s dictionary tells me “modification date” is what I’m looking for. A quick google search tells me that I can do date math using seconds. So to find everything on the desktop older than a day:

       tell application “Finder” to every item of folder (path to desktop folder) whose modification date < (current date) – 86400

Nice, this is starting to look like a one-liner, albeit a long one. There is one item I want to exclude from this. I keep an alias to one of our servers on my desktop, so I don’t want to lose that.

       tell application “Finder” to every item of folder (path to desktop folder) whose (modification date < (current date) – 86400 and name is not “Public”)

Wait, that’s not a good way to do this. I make it more flexible with labels. Back to the dictionary! Looks like it’s “label index” so:

       tell application “Finder” to every item of folder (path to desktop folder) whose (modification date < (current date) – 86400 and label index is not 6)

(It happens that green is 6 on my Mac) Okay, I’m selecting the items I want. Now it’s time to move them to the archive:

       tell application “Finder” to move (every item of folder (path to desktop folder) whose (modification date < (current date) – 86400 and label index is not 6)) to folder ((path to home folder as string) & “Desktop Archive”) with replacing

“With replacing” is easy — no error checking for duplicated file names — and it’s unlikely the archive will contain something that has the same name that isn’t the same file, and that I would want that earlier file back. Maybe that will bite me someday. I added a line to do the same for the downloads folder, but without the label restriction. The end result is:

       tell application “Finder”
              move (every item of folder (path to desktop folder) whose (modification date < (current date) – 86400 and label index is not 6)) to folder ((path to home folder as string) & “Desktop Archive”) with replacing
              move (every item of folder (path to downloads folder) whose modification date < (current date) – 86400) to folder ((path to home folder as string) & “Downloads Archive”) with replacing
       end tell

Now to cron this thing…

…okay, a little reading tells me that cron isn’t the preferred tool on Macs, so I’m looking at launchd and launchctl, particularly this tutorial. I saved the AppleScript as an app as “/Users/geoffcanyon/Scripts/Archive.app” I opened “/Users/geoffcanyon/Library/LaunchAgents” to see what examples were there. A little reading online and I created a new plist file at “/Users/geoffcanyon/Library/LaunchAgents/com.apple.cleanupfiles.plist” Viewed as text (I used the Property List Editor app to create it) it’s:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.apple.cleanupfiles</string>
    <key>Program</key>
    <string>/Users/geoffcanyon/Scripts/Archive.app</string>
    <key>StartInterval</key>
    <integer>86400</integer>
</dict>
</plist>

To load that, in the terminal use:

    launchctl load /Users/geoffcanyon/Library/LaunchAgents/com.apple.cleanupfiles.plist

To test it immediately (again, in the terminal):

    launchctl start com.apple.cleanupfiles

Note that the load command uses the actual file path, while the start command uses the label string from within the file.

I tried the above, and it doesn’t work. For some reason launchd doesn’t want to run the AppleScript app. Well, you can also execute an osa script. So I changed the plist to try that. I saved the script itself as “/Users/geoffcanyon/Scripts/Archive.scpt” With that in place, here is the plist to execute the script. I also changed the interval to 3600 so it runs every hour:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.apple.cleanupfiles</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/bin/osascript</string>
        <string>/Users/geoffcanyon/Scripts/Archive.scpt</string>
    </array>
    <key>StartInterval</key>
    <integer>3600</integer>
</dict>
</plist>

Save the files, then

    launchctl unload /Users/geoffcanyon/Library/LaunchAgents/com.apple.cleanupfiles.plist
    launchctl load /Users/geoffcanyon/Library/LaunchAgents/com.apple.cleanupfiles.plist
    launchctl start com.apple.cleanupfiles

That works. While I was at it I modified the AppleScript so it checks to see if a backup is needed, then creates backup folders and names them with a time-stamp. That takes care of duplicate file names. I also changed the label filter to exclude all labeled items. Here’s the AppleScript:

       set myDateString to ((10000 * the (year of the (current date)) + 100 * the (month of the (current date)) + the (day of the (current date))) as string) & “-” & the time of the (current date)
       tell application “Finder”
              set itemList to (every item of folder (path to desktop folder) whose (modification date < (current date) – 86400 and label index is 0))
              if itemList is not {} then
                     make new folder at ((path to home folder as string) & “Desktop Archive”) with properties {name:myDateString}
                     move itemList to folder ((path to home folder as string) & “Desktop Archive:” & myDateString)
              end if
              set itemList to (every item of folder (path to downloads folder) whose modification date < (current date) – 86400)
              if itemList is not {} then
                     make new folder at ((path to home folder as string) & “Downloads Archive”) with properties {name:myDateString}
                     move itemList to folder ((path to home folder as string) & “Downloads Archive:” & myDateString)
              end if
       end tell

Conclusion

Now my desktop and downloads folder are neat all the time, with just the most recent things I’ve been working with in them. Here are the steps without all the commentary:

  1. Create a folder “Desktop Archive” in your home folder.
  2. Create a folder “Downloads Archive” in your home folder.
  3. Create an AppleScript with the above script in it, and save it someplace. Note the path to the file.
  4. Create a plist file with the above plist in it. Substitute the path to your .scpt file, and save it in your /Library/LaunchAgents/ in your home folder. Note that your Library folder is likely not visible, so this part can be a bit tricky.
  5. In the Terminal, use launchctl load <your plist> to schedule the agent to run.
  6. If you want to see immediate results, use launchctl start com.apple.cleanupfiles in the Terminal (assuming you haven’t change the label string).

That’s it!

UPDATE:
I found a flaw in the above: if the above script runs while a file is downloading, it will go ahead and archive it, screwing up the download. This script should fix that (pending testing):

       set myDateString to ((10000 * the (year of the (current date)) + 100 * the (month of the (current date)) + the (day of the (current date))) as string) & “-” & the time of the (current date)

       tell application “Finder”
              set itemList to (every item of folder (path to desktop folder) whose (modification date < (current date) – 86400 and label index is 0))
              if itemList is not {} then
                     make new folder at ((path to home folder as string) & “Desktop Archive”) with properties {name:myDateString}
                     move itemList to folder ((path to home folder as string) & “Desktop Archive:” & myDateString)
              end if
              set itemList to (every item of folder (path to downloads folder) whose (modification date < (current date) – 86400 and label index is 0 and not (name extension is “download”)))
              if itemList is not {} then
                     make new folder at ((path to home folder as string) & “Downloads Archive”) with properties {name:myDateString}
                     move itemList to folder ((path to home folder as string) & “Downloads Archive:” & myDateString)
              end if
       end tell