-
Zombie Survival Flowchart: http://media1.gameinformer....
Mar 19 15:24
IPCC challenge/response
Some recent reports have suggested incidents of scientific misconduct in the climate science community. While that is not evidence of incorrect conclusions, it does cast some doubt on the findings of the organizations involved--and right so, I believe. The APS newsletters for December and January have been chock-full of climate discussion--arguing for the retraction of the APS's climate change statement or alteration to reflect uncertainty, counterarguments, and so forth.
My personal take on it is this: climate is really effing complicated. I know a little about the scientific method, publishing, data analysis, and review, but basically have no awareness of the intricacies of modeling the world's atmosphere and hydrology. I'm also aware that plenty of people have significant personal and economic interests in the matter, and an underabundance of understanding. The only reasonable conclusion I can come to is this: trust the people who spend their lives trying to understand climate, and maintain some awareness of their methods. It is my belief, from the limited reading I've been able to do, that the vast majority of climate researchers are doing good science, and working hard to understand and explain to others a very complex problem.
Anyway, that's why I think RealCimate's analysis of the recent challenges over the IPCC's AR4 is a good read.
Physics Fail: Conservapedia Edition
I've seen a lot of misunderstood physics out there, but watching Andy Schafly try to insist general relativity is wrong and useless has got to take the cake. Kate Sorenson tries patiently to correct the GR article's mistakes, but is eventually banned for her troubles. Andy finishes with this amazing quote:
One way to evaluate religions, or quasi-religions, is to look at the fruit it bears. What has it helped achieved? In the case of relativity, it has produced nothing. Nil. Zippo. After nearly 100 years and a ton of money. If you find the math in relativity fun, great, but relativity is not going to help anyone. It never has. Pick up a Bible in between some equations. --Andy Schlafly 18:31, 15 November 2009 (EST)
I guess Andy doesn't believe in GPS, which relies completely on GR-derived time synchronization for accurate results. Way to go, Conservapedia. Totally in touch with reality, there.
Engine of Change
Justin and I have been thinking about starting a social justice site for a while now. We've talked it over with some friends and associates who are interested in writing about equality, and launched the site over the weekend. Take a look at the new Engine of Change.
Installing the Android SDK for Eclipse
Here's the quickest way I know to get Eclipse up and running with the Android SDK plugin. To install each of these packages, go to Help->Install New Software, add the given URI as a package source, and install the given package. Eclipse may prompt you to restart after some installs.
| Source | Package |
|---|---|
| http://download.eclipse.org/tools/gef/updates/releases/ | GEF SDK |
| http://download.eclipse.org/modeling/emf/updates/releases/ | EMF SDK 2.5.0 (EMF + XSD) |
| http://download.eclipse.org/webtools/updates | Web Tools Platform / Eclipse XML Editors and Tools |
| https://dl-ssl.google.com/android/eclipse/ | Developer Tools |
That should do it for you!
Droid Power Failure
Last night I left my Droid sitting on my desk, at about 80% charge. An hour later I picked it up and it wouldn't turn on. No response to pressing or holding the power button, and even replacing the battery didn't get it to turn on. I figured the battery was drained and plugged it in this morning--whereupon it booted up and showed 75% charged!
The Verizon store was disappointing. They told me I had installed too many apps and should run advanced task killer frequently. Really, guys? You think I ran out of battery and recharged to 70% in a matter of seconds this morning? No suggestions as to how to hard-reset the device. They also disavowed the autofocus bug... which neatly explains why the camera focuses in under two minutes as of this morning. I guess I should have expected the runaround to begin with.
Other than that, I love the device. It's easily the most responsive UI out of all the phones I've played with, including the iPhone. There are some software oversights--I can't move emails between folders, for example--but by and large it's been pretty solid.
Debugging the Droid on Ubuntu Karmic
$ adb devices
List of devices attached
???????????? no permissionsA few things have changed since the Android docs were written. If you want to talk to your Motorola Droid via ADB in Ubuntu 9.10 Karmic, I recommend the following udev rule.
# /etc/udev/rules.d/99-android.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", SYMLINK+="android_adb", MODE="0666"Restart udev, unplug and re-plug the device, and it should show up! Make sure USB debugging is enabled on your droid.
$ sudo restart udev
$ adb devices
List of devices attached
0403681F17009017 deviceIf that doesn't work, try restarting the adb server:
$ adb kill-server
$ nohup adb start-server
Yamr: A Linux Yammer Client

Sometime in the last couple of weeks, the Yammer AIR client stopped fetching new messages. I've grown to really like the service, especially since it delivers a running stream of commits to the Git repos I'm interested in, so I broke down and wrote my own client.
Yamr is a little ruby/gtk app built on top of jstewart's yammer4r and the awesome danlucraft's Ruby Webkit-GTK+ bindings. No seriously, Dan, you rock.
Features
- Reads messages
- Posts messages
- OAUTH support
- Notifies you using libnotify, instead of that awful AIR thing.
Anyway, feel free to fork & hack away. You should be able to build ruby-webkit without much trouble on ubuntu; I've included directions in the readme. It's super-basic right now, but most of the core functionality is ready to start adding features. Enjoy!
Cortex Reaver 0.2.0 Released
All right boys and girls, I'm all for quality releases and everything, but Cortex Reaver 0.2.0 is raring to go. Just gem upgrade to get some awesome blogging goodness.
Autotags
I threw together a little jQuery tag editor last weekend for Cortex Reaver, since hours of google searching turned up, well, not much. Feel free to try the demo and use it for your projects.
New Vodpod API Bindings
I re-wrote the Ruby Vodpod bindings for the new API I've been writing. It's available as a gem:
gem install vodpod
RSSCloud Callbacks to a Different IP
A bit of context, in case you haven't been keeping up with the real-time web craze:
RSSCloud is an... idea* for getting updates on RSS feeds to clients faster, while decreasing network load. In traditional RSS models, subscribers make an HTTP request every 10 minutes or so to a publisher to check for updates. In RSSCloud, a cloud server aggregates several feeds from authors. When feeds are changed, their authors send an HTTP request to the cloud server notifying them of the update. The cloud server contacts one or more subscribers of the feed, sending them a notice that the feed has changed. The subscribers then request the feed from the authors. Everyone gets their updates faster, and with fewer requests across the network.
The Problem
When you subscribe to an RSSCloud server, you tell it several things about how to notify you of changes:
- A SOAP/XML-RPC notify procedure (required but useless for REST)
- What port to call back on.
- What path to make the request to.
- The protocol you accept (XML-RPC, SOAP, or HTTP POST).
- The URLs of the feeds to subscribe to.
There's something missing! The RSSCloud walkthrough says:
Notifications are sent to the IP address the request came from. You can not request notification on behalf of another server.
That's great unless your originating IP address can't receive HTTP traffic. That rules out users behind a NAT or behind a firewall (without forwarded ports). That's most home users with routers, users on typical corporate networks, etc. It won't work on the iPhone. And, to a lesser degree, it rules out the cloud itself.
One of the common aspects of cloud computing is that compute nodes (and their IP addresses) may come and go as needed. For example, Vodpod.com is served by several different servers which (through a combination of heartbeat-failover, IP routing, and HTTP proxying) may enter and leave the cluster at any time without service interruption. So, if one of those servers subscribes to a feed, it might not be online to receive pings later. You'd have to subscribe to each feed from every host to guarantee that you'd continue to receive responses. The problem only becomes worse when you start looking at cloud services like EC2.
The RSSCloud mailing list has been tossing around the obvious solution for several weeks now: just include a "domain" parameter which says what FQDN or IP address to connect to. On Friday, Dave Winer included it in his walkthrough. Even so, most of the cloud servers (Wordpress, for example) out there don't support it yet.
A Partial Solution
What can you do to get around this?
One solution is to use PubSubHubbub, which uses a full callback URL. Additionally, Superfeedr will even use RSSCloud to offer real-time updates through PuSH, effectively bridging the two schemes.
Alternatively, you can lie (sort of) about your address. This is what we've done at Vodpod to get Wordpress to call us back correctly. When we subscribe, we actually re-bind the TCP socket to a publically accessible IP. That IP is guaranteed to go somewhere in the cluster which can accept the RSSCloud update ping. Here's a truly evil hack to do just that, by replacing Net::HTTP's TCP socket with our own.
res = Net::HTTP.new(uri.host, uri.port).start do |http|
# Replace the socket with one that we bind to the interface we want to use.
# The local IP address we'd like RSSCloud to call back.
local_addr = Socket.pack_sockaddr_in 0, '208.101.30.10'
# The RSSCloud server IP address
remote_addr = Socket.pack_sockaddr_in uri.port, uri.host
# Create a new socket
s = Socket.new Socket::AF_INET, Socket::SOCK_STREAM, 0
# Bind it to the local address
s.bind local_addr
# Wrap for Net::HTTP and connect
socket = Net::BufferedIO.new(s)
s.connect remote_addr
# Replace the HTTP client's connection
http.instance_variable_set('@socket', socket)
# And make the request
http.request(req)
end*Dave says it's not a standard, or a spec. As far as I can tell, RSSCloud consists of a mailing list, a walkthrough of how implementations can handle the pings/cloud tag in RSS feeds, and a bunch of loosely federated implementations with varying degrees of compatibility. Some speak XML-RPC, some speak SOAP, some speak plain-old REST, etc...
Cortex Reaver 0.2
I've been working a lot on Cortex Reaver lately, with several new features in the pipe. I'm using Vim for awesome syntax highlighting, refining the plugins/sidebar infrastructure, creating improved admin tools for long-running tasks (like rebuilding all the photo sizes) and fixing several bugs in the CRUD lifecycle. All that comes in a slick new visual style, including a new stylesheet/js compiler which makes page loads much faster (eliminating something like 20 external HTTP requests in the non-cached case). Finding time to really sit down and hack on CR has been tough lately with all the grad school/work stuff going on, but as new users are coming on board I'm motivated to keep improving.
Awesome News!
I just found out that after six months of fighting with the insurance legal teams, they actually paid almost all of my implant surgery bills! That still leaves the initial dental work and however much for the crown, but I'm $4500 less in the hole for the whole debacle! Wooo!
Oh, and San Francisco is great. I'll post about that in a bit.
Rails 2.3 JSON is a Broken Hack
Rails, what were you thinking? You went and wrote your own ridiculous JSON serializer in pure Ruby, when a perfectly good C-extension gem already does the job 20 times faster. What's worse, you gave your to_json method (which clobbers every innocent object it can get its grubby little hands on) a completely incompatible method signature from the standard gem version. You just can't mix the two, which is ALL KINDS OF FUN for those of us who need to push more than 10 reqs/sec.
Then there's awesome behavior like this:
puts {:rails => /fail/x}.to_json
#=> {"rails" => /fail/x}That's not even valid ECMAScript, let alone JSON. It's a standard for a reason, foo! It's not like you can opt out, either. You're stuck with this pathologically malingering monkeypatch any time you require ActiveSupport.
At least they figured it out eventually.
Fun With PHP Arrays
Reading the PHP documentation has convinced me (again) of what a mind-bogglingly broken language this is. Quickly, see if you can predict this behavior:
<?php
echo "This is the integer literal octal 010: " . 010 . "\n\n";
$things = array(
"The 0th element",
"The 1st element",
"The 2nd element",
"The 3rd element",
"The 4th element",
"The 5th element",
"The 6th element",
"The 7th element",
"The 8th element",
"8" => "The element indexed by '8'",
"foo" => "The element indexed by 'foo'",
"010" => "The element indexed by '010'"
);
// The string index "8" clobbered the integer index 8.
// But the string index "010" didn't...
echo "Now check out what PHP thinks the array is...";
print_r ($things);
echo "\n\n";
// As expected
echo "\$things[0]: $things[0]\n";
echo "\$things[1]: $things[1]\n";
// Okay, so strings are interpreted as integers sometimes...
echo "\$things[\"0\"]: " . $things["0"] . "\n";
// Ah, now things become strange. This integer key gets the string "8" instead.
echo "\$things[8]: $things[8]\n";
// This should refer to the 8th element, but it gets converted to an integer by
// the preprocessor, then to a string, where it matches the clobbered 8th
// element...
echo "\$things[010]: " . $things[010] . "\n";
// This string key returns the expected "8" element...
echo "\$things[\"8\"]: " . $things["8"] . "\n";
// But this string octal key gets the "010" key as expected. Note that it
// *doesn't* get the integer 8, as you might expect from $things["0"]
echo "\$things[\"010\"]: " . $things["010"] . "\n";
echo "\n";
?>Here's the output (PHP 5.2.6-3ubuntu4.1):
This is the integer literal octal 010: 8
Now check out what PHP thinks the array is...Array
(
[0] => The 0th element
[1] => The 1st element
[2] => The 2nd element
[3] => The 3rd element
[4] => The 4th element
[5] => The 5th element
[6] => The 6th element
[7] => The 7th element
[8] => The element indexed by '8'
[foo] => The element indexed by 'foo'
[010] => The element indexed by '010'
)
$things[0]: The 0th element
$things[1]: The 1st element
$things["0"]: The 0th element
$things[8]: The element indexed by '8'
$things[010]: The element indexed by '8'
$things["8"]: The element indexed by '8'
$things["010"]: The element indexed by '010'This is an excellent example of why grafting features onto your language piecemeal to satisfy users who can't be bothered to figure out whether they are working with strings or integers is a Bad Idea™.
Moving to San Francisco in 3, 2, 1...
It's midnight, and the car is almost packed. All our stuff in one little minivan, moving back to the west coast! Oh man it's exciting! Should be there in a little over a week.
0 comments