Genetic Testing: 23andme

A while back, the personal genetic testing company 23andme offered a special sale. They discounted their normal price from $500 to $99 for one day only. Naturally, I jumped on it.

Just got my results back. Nothing particularly surprising here, but it is neat.

  • My blood type is A (A/O). I knew this, good to see it backed up by genetics. :)
  • I have an elevated risk for Type I and II diabetes (no news here, my sister is diabetic).
  • Apparently, I can’t taste “bitter”. This does explain why I love Brussels Sprouts.
  • I’m lactose intolerant. I was pretty sure of this already.
  • I have a natural resistance to norovirus (stomach flu). Didn’t know that.
  • I am a carrier for Cystic Fibrosis. I don’t have it, but it’s possible that my children could.
  • I am a slow caffeine metabolizer. It says that drinking coffee increases my heart attack risk (duh), but I’m not sure what this really means. Caffeine typically doesn’t do a thing to me, at least not immediately. I go through a fair amount of it on a regular basis.
  • Paternal Haplogroup: I1*, Maternal Haplogroup: H1. This basically makes my ancestry 100% European. Very vanilla there. However, this does conflict with my known ancestry slightly, in that it says I don’t have any Native American ancestors (within 5 generations). But then again, I don’t have a whole lot of reliable information on that branch of the family tree.

There’s a ton more information (apparently I’d respond really well to Interferon Beta Therapy, whatever the hell that is), and I haven’t gone through it all yet.

One thing I did note is that they do allow you to download the raw data, which is pretty cool. However when I looked at it, I noticed that it’s not a complete record of your DNA, just a sampling. Basically it’s like 500,000 markers of it instead of the full 3 billion or whatever. Clearly you don’t need the complete sequence to draw useful information out of it.

Still, kinda neat that this is within the reach of the average person.

Simple Twitter Connect

Since people have been emailing me and asking for it…

WordPress Plugin: Simple Twitter Connect

It’s similar in concept to the Simple Facebook Connect plugin. In fact, it rips off quite a lot of the same code. But instead of Facebook, this integrates your WordPress site better with Twitter.

Now, there’s a lot of Twitter plugins out there already. And this plugin by no means competes with them (yet). This plugin can’t, for example, send a post to Twitter (yet). Nor can it pull posts from Twitter to display on your own site (yet).

What it does is to provide the framework for a more complete Twitter integration. Right now it can do:

  • Login via Twitter
  • Comment via Twitter

Not much, really. But it has the backend code necessary to make it easier to connect your site to a Twitter Application, and to make plugins surrounding it that won’t interfere with each other. That’s the same basic reason for the Simple Facebook Connect plugin.

So yes, eventually this plugin will send and receive stuff from Twitter. But for now, it lets you allow users to Login and/or to have users Comment using their Twitter credentials.

Expect frequent updates.

Don't include wp-load, please.

Edit: This post has moved to here: http://ottopress.com/2010/dont-include-wp-load-please/. Take your comments there.

Time for Otto’s general griping: WordPress plugin programming edition.

Here’s a practice I see in plugins far too often:

  1. Plugin.php file adds something like this to the wp_head:
    <script src='http://example.com/wp-content/plugins/my-plugin/script.js.php'>
  2. Script.js.php has code like the following:
    <?php
    include "../../../wp-load.php";
    ?>
    ... javascript code ...
    

The reason for this sort of thing is that there’s some option or code or something that the javascript needs from the database or from WordPress or whatever. This PHP file is, basically, generating the javascript on the fly.

Usually, the case for this turns out to be something minor. The code needs the value from an option, or some flag to turn it on or off. Or whatever.

Problem is that finding wp-load.php can be a bit of a chore. I’ve seen extreme efforts to find and load that file in plugins before, including searching for it, examining the directory structure to make decent guesses, etc. This sort of thing has existed even before wp-load.php came around, with people trying to load wp-config.php themselves and such.

But the real problem is simpler: This is always the wrong way to do it.
Continue reading “Don't include wp-load, please.”

How to Setup your Facebook Connect Application

Note: This post has been moved to here. Please leave comments there instead.

The majority of the email I get from users of the Simple Facebook Connect plugin is questions regarding how to setup their Facebook Application. It’s really not that hard to do, but the plethora of options can seem somewhat intimidating. So here’s the basics of what you need to do.

Continue reading “How to Setup your Facebook Connect Application”

SFC Chicklet

I saw this morning that Jesse Stay had created a rather neat little chicklet for his FBFoundations plugin. I thought it was a clever idea, so naturally I stole it and added it to Simple Facebook Connect as well.

Of course, just copying an idea is no fun. So I had to improve upon it a bit for my version. :)

I ended up not using any of Jesse’s code, but I did (mostly) keep the format of his chicklet output the same, so as to try to be compatible with it for styling rules and such.

Continue reading “SFC Chicklet”

Twitter Geolocation

Heard of geotagged tweets yet? Not surprised, a lot of my friends seem to have not caught on to it, so I’m writing this in a possibly futile attempt to get them to try it out.

How to add your location to your tweets

1. Turn on Geotagging. To do this, go to your Twitter settings page. Down under the “Location” section is an option to enable geotagging. Turn it on.

Twitter Settings

2. Get a Twitter client that supports Geotagging. These are generally mobile applications. Tweetie 2 for the iPhone added support for it in 2.1. Several other clients support it as well. Find one.

3. Turn it on in your client. How you do this depends on the client, but it can usually be enabled on a per-tweet basis.

Here’s an example of how it works and looks in Tweetie 2 for the iPhone.

First, you type in a new tweet, and pull open the drop down.

Next, you enable the geotag feature, and you'll see a little red pin appear.

You'll see little maps on tweets with locations attached to them.

Click on the map icon for greater detail.

You can do more with your Twitter location too. For example, this website will read your twitter feed and get your latest location, then send it over to Fire Eagle, which is Yahoo’s location service. Fire Eagle can do all sorts of things, but basically it’s just a service that stores your location for other programs to use. So if you want to display your location on your blog, or on Facebook for your friends to see, or anything else you can think of, you can do that, using nothing more than your already existing tweets.

WordPress Settings API Tutorial

Edit: This post has moved to here: http://ottopress.com/2009/wordpress-settings-api-tutorial/. Take your comments there.

When writing the Simple Facebook Connect plugin, I investigated how the Settings API worked. It’s relatively new to WordPress (introduced in version 2.7), and many things I read said that it was much easier to use.

It is much easier to use in that it makes things nice and secure almost automatically for you. No confusion about nonces or anything along those lines. However, it’s slightly more difficult to use in that there’s very little good documentation for it. Especially for the most common case: Making your own settings page.

So, here is my little documentation attempt.

Continue reading “WordPress Settings API Tutorial”