Anyone else out there tired of Twitter-spam? Every new web 2.0+ application that hits the web today asks you for your twitter credentials so they can post a 140 character spam about some various task you are performing at some website I don’t care about. However, there are times when I do care about those other various tasks my friends are performing on various websites, and that’s where FriendFeed comes in.

But I ask you, WHY BOTHER? Why am I going over to FriendFeed when I have a perfectly good Twitter timeline, full of friends I already know and trust, and chock-full of useless and semi-interesting pieces of information that I can’t seem to live without. Why are we duplicating all that information, when we could combine it into a master timeline (using Twitter), through a much more secure medium?

The as it stands today, If you want to broadcast your activities on a specific site through Twitter, you have to be ready to hand them over your username and password, that way they can essentially pretend to be you and make a post on your behalf. For some reason, that doesn’t seem to phase most people, but the ramifications of that act are sort of dangerous. As you may have heard, Twitter and the people who use it control many different spheres of influence, and that information falling into the wrong (and insecure) hands could be disastrous.

This is 2009! We’ve solved these sorts of problems in the past, lets put our thinking caps on! API, bitches. Twitter needs to introduce an API so that third-party vendors can post to your Twitter account without you having to fork over any nuclear secrets. Flickr has figured out how to do this very well…eons ago

“But Derek! Didn’t you start this post off by saying you hate Twitter-spam?”

Yes, I do. Thats why the next thing we need Twitter to do is setup “Twitter Feeds”, which will be where all of the twitter-spam is sent and categorized for when that information is sought after. Don’t think anyone will go out of their way to see that information? Friendfeed.com and its 5 million dollars in funding beg to differ. Twitter is the most natural place for this information to exist!

Why bother with FriendFeed at all when your “Twitter Feed” can say the last netflix movie you’ve watched, or that digg article about “the top 10 cats laying on their backs” that you thought was so awesome. This information, once officially supported by Twitter, can then be properly segmented and keeps my timeline about what it should be, you know, pictures of my cat and how many times I hate internet explorer.

This idea, however, is going to seriously impact the current load that Twitter is used to, even at 1.2 million new users a month (I read that somewhere, could be wrong). FriendFeed works through RSS, so the responsibility of that information’s existence is placed on the RSS provider, and not FriendFeed. So I could imagine their would be a substantial increase in data that is sent to Twitter, but having said that, they seem to be doing pretty good at handling themselves these days, and that would only make Google want to swallow them whole faster.

So basically, Twitter needs a ping API, and the pings sent by the API (that are theoretically web 2.0 spam) need to be segmented into their own grouping, that way we can do away with social networking social networks and utilize a popular technology we already love.

The iPhone is hot. Its a badass micro-computer-internet-having-app-installing-jizz-casting-awesome-machine that can also make phone calls, but I have to bitch about one major flaw in the entire thing, and that flaw is Mobile Safari. Don’t get me wrong, I am a big fan of the mobile browser, it is leaps and bounds greater than anything else out on the market, but I ask you Apple, why not make it the greatest mobile browser on the market?

So what am I bitching about specifically? The iPhone has immense data harvesting capabilities, from geo-location, to the accelorometer, etc. But all of these fantastic API’s are available only to native, objective-c based applications, not Mobile Safari!? Explain this to my Apple, why is this not exposed through a JavaScript API? That is absolutely trivial to provide to the lowly web developer!

Apple and the iPhone are doing amazing things with the types of datasets it makes available to developers in the native context, all I am saying is, make it available to every context of applications! Libraries like PhoneGap are attempting to make this a reality, but again, the biggest limitation is the fact that PhoneGap still requires you to create a native application to act as a wrapper to your web application, this seems like a stop gap solution (heh) or an unfortunate hack.

Its also very apparent that Mozilla sees the future of location-based services being able to provide very personalized and exciting experiences to the web through their efforts in Mozilla Geode. Perhaps its true that at this point, that sort of data availability in a web browser could be seen as negative, but I am not sure I agree. I am willing to bet that within the next 6 years, Apple will be introducing GPS into their laptops, providing application developers with the same location-awareness capabilities on their computers that exist today on their phones.

Hopefully Apple will wise up in the future, but I highly doubt it. Something tells me this is a designed limitation, they are probably doing their best to keep control over what people are doing with that data through the app store vetting process. Oh well, one can dream!

Today I was faced with an interesting dilemma, how does one programmatically define migrations into a plugin so you can essentially “plug-n-play”. I did a little bit of research into Rails Engines, and I wasn’t too terribly excited about the notion of having a dependency for such a small plugin, if this were something more integrated…I’d probably use it, but for this, I really only need to have these migrations run once you’ve installed the plugin, and be on my way.

So, I decided to do a little bit of research on the ActiveRecord::Migrator class to see how I could approach programmatically executing the migration outside of the standard rake task, so I could build my own custom migration rake task for my plugin.

It turns out, there are a bunch of functions you can utilize to build your own custom migration tasks for your plugin, that I wasn’t immediately aware of. Here is how I did it:

namespace :myplugin do
  desc "migrates my plugin's migration files into the database."
  task :migrate => :environment do
      ActiveRecord::Migrator.migrate(File.expand_path(File.dirname(__FILE__) + "/../db/migrate"))
      Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
  end
end

I simply saved that block of code into my plugin’s /tasks folder and named it custom_migration.rake. Next, I went to the root of my application and ran rake myplugin:migrate, and huzzah! it worked!

Nothing too amazing, and I actually based this entirely on the vanilla db:migrate function. The first line of the task essentially tells the ActiveRecord Migrator to search through my plugin’s db/migrate folder for any migration files it can find, and then brings all of them up! It would be nice if the vanilla db:migrate supported a MIGRATIONS_PATH constant so we could just use the same mechanics and build on top of them, rather than essentially re-write them just to do this.

OR better yet, wouldn’t it be nice if rails db:migrate actually scanned our plugins directory for migration files as well? That sounds like the best option to me.

Now, I am not sure if this is “the ruby way” to handle this problem, and as I stated earlier, Rails Engines is probably the way to go if you have a much larger plugin you are designing, but for me, this seemed to work just fine.

Limitations

There are some limitations to that custom task. For instance, if you were to run db:rollback, it would not be aware of the migration files that I have previously run that live within my plugin, you’d have to build another custom task to manage revoking the migrations you installed. Also, if they end up changing the way you actually migrate migrations, you might be screwed. But, alas, here is hoping for that MIGRATIONS_PATH constant!

I love my AppleTV. One of the coolest home entertainment systems I’ve played with, but unfortunately it does lack some pretty important functionality like being able to play DivX/XVid, any sort of file storage capabilities, and no way to surf the web or anything cool like that.

Well, it turns out, The good people over at Apple Core, LLC agree that these things were important and have created a nice utility for making these dreams a reality! Here are some of my favourite features:

It was easily one of the best $50 I’ve spent in a while. It creates a nice bootable USB stick, just restart the device and go! It has also not conflicted in any way with the other core functions of AppleTV, and yes, it works with the very latest firmware (2.1).

If you have an AppleTV, I definitely recommend this upgrade.

Wordpress has just released version 1.0 of their mobile blogging application for the iPhone. At first, the thought of blogging with any substance from my iPhone was kind of funny, but quite frankly, they’ve designed a tool that is awesome at doing just that.

One of the coolest things about it, is its ability to work with not only Wordpress blogs from wordpress.com, but ALSO custom installs! Thank you XML-RPC! You can also manage multiple blogs via the application.

You have the ability to write drafts, and save them locally to your iPhone, you can edit and manage drafts or previously published articles from your iPhone, and you can even take pictures on the fly and post them! How neat! One thing I wish it had that it does not, however, is the ability to manage comments. It’d be nice to be able to approve comments on the road if I needed to.

All in all, a must have if you are a Wordpress user, very impressed with this application!

The good peole at FiveRuns have just recently released a gem to the Ruby community that allows their ActiveRecord-managed data models to now have built-in sharding and/or replication functionality…with just a few lines of code!

What do I mean by Data Sharding? Read on:

Specifically we needed two features to scale our mysql database: application-level sharding and master/slave replication. Sharding is the process of splitting a dataset across many independent databases. This often happens based on geographical region (e.g. craigslist) or user account (e.g. flickr). Replication provides a near-real-time copy of a database which can be used for fault tolerance and to reduce load on the master node. Combined, you get a scalable database solution which does not require huge hardware to scale to huge volumes.

They call this new gem, DataFabric. DataFabric makes it super simple (and DRY) to make your application scales to multiple database shards, or even just provide basic replication to different database servers if you so choose.

For me, the idea of having something so complex as data sharding built into the core of ActiveRecord is absolutely fascinating! You don’t have to have any sort of mysql_proxy business, or other strange DRb services running in the background, just essentially plug and play.

Granted, I have not done a ton of personal research on this problem, but I have looked around a bit…anyhow, here is the problem:

My company is 100% Mac, except for our debian-based production environment. We are all running iCal to manage our milestones and meetings, but its really an adhoc solution, not as integrated as say…Exchange calendaring. I do know for a fact that there is an iCal Server, but I don’t really think its feasible to think I will be investing in an xserve + OS X server just to get my company a unified calendar.

Are there Unix-based solutions out there I can install on one of my Debian servers? I haven’t found anything very specific. I know that WebDav plays a part in all of this, is it just so elementary that there is no direct “solution” ?

Curious to see what others have done in this situation.