Git-R-Done

I’ve been a long-time fan of using Subversion for source code version control, but recently I’ve been turned onto using Git, which is the version control system used by huge projects like the Linux Kernel, Ruby on Rails, Merb, Samba, VLC, and a lot more. It was designed by Linus Torvalds so it really has some geek street cred.

Why is it so cool? Git is distributed, for one thing. That means that while you may have a central location for your repository, each client clones the repository on their system. So if you lose a machine you don’t lose all your history for the project.

Being distributed like that makes it fast, because looking up history is done locally instead of over the network, so you gain a lot of performance. It has been shown to be very fast and scalable by a significant amount.

Branching, tagging, and merging are a lot easier in Git because they are treated as core concepts. Every working directory of a Git repository is in itself a branch. Handling those branches is something Git excels at and keeps track of merging the changes from different branches with ease, preserving the history of who did what a lot better than subversion does.

You can see more comparisons and contrasts between Git and Subversion on the Git Wiki.

Another (personal) reason I like Git is because of a certain tool: Github. Github is a repository host that acts almost like a social network: you can track projects you are interested in to see the latest activity as well as giving you the ability to maintain your own projects. It is a sweet little setup. If you are into development at all you might take a look.

I have decided to move my Guilder project to Github, and so far I love it. My endorsements, they are ringing!

Includes and dependencies in Javascript

For a while now I have been wrestling with a way to easily manage dependencies in Javascript.I absolutely hate having a mess of script tags in my documents, especially on a dynamic page that only uses maybe one or two of those scripts.

So when I started using jQuery, I was delighted to find that I could write an easy method to include files on the fly using Ajax and synchronous loading and execution of Javascript files. This gives us the ability to utilize lazy-loading to load scripts as they are needed and not clutter up things or waste resources if a particular Javascript is not needed.

It is easy to define a method like this (utilizing a class so as not to pollute the main Javascript namespace):

SLAGGLE = function() {};
SLAGGLE.include = function(filename) {
    $.ajaxSetup( { async: false } );
    $.getScript(filename);
    $.ajaxSetup( { async: true });
};

This uses jQuery’s getScript method to load a script, but first sets global Ajax configurations to load it synchronously so we can use it right away. So now if I want to load a script on the fly, I can do so with this:

SLAGGLE.include('/path/to/js/script.js');

You can even go a lot further and create a method to translate a package heirarchy like what Java uses into a path structure and load that instead.

I’ve been using this method for a while, but this morning I stumbled across this: using.js

using.js gives stronger dependency management to Javascript by allowing you to declare potential dependencies beforehand, and load them on the fly. The upside to doing this is that not only do you get lazy-loading, but the using.js script will only load a particular dependency only once, which cuts down on overhead quite a bit. It’s real easy to use, too. Just register your dependency like this:

using.register("jquery", "/path/to/jquery-1.2.3.js");

or even multiple dependencies:

using.register("yui-datatable",
    "/path/to/yui/script1.js",
    "/path/to/yui/script2.js"
);

Then later, when you need to make use of the dependency, you can do the following:

using("jquery");
// Use jQuery features
$("document").ready(function() {});
using("yui-datatable");
// Use YUI features, etc...

The using.js script really adds a lot of power to your Javascript coding. It has the potential to make your code much more efficient if you rely on a large number of external dependencies. Give it a try and let me know what you think!

Introducing Guilder

I’m announcing a fun part-time project I am starting called Guilder: The World of Warcraft Guild Management System. The project has just started so there isn’t any code yet, but it is a serious effort I am undertaking to both solve some problems of guild management and to learn more and more about Ruby on Rails.

Yes, the code will be Ruby on Rails. Why not Grails like I have been fond of? Well, mainly personal reasons. After spending time with both platforms, I really feel like the best fit for the web is Rails. Grails is quite derivative and doesn’t have as large a community behind it, plus personally I feel it has more elegance to it. So back to Rails I come, and find a familiar friend with open arms.

Guilder will be licensed under the MIT License, an OSI-approved open source license. Why did I choose the MIT license over something like the GNU GPL? The MIT license is very flexible and not as restrictive as some of the other open source licenses out there. I can link my code to commercial libraries, people can fork the code and sell it, and basically do whatever. I dig that type of openness.

Progress will probably be slow on this because like I said it is a part-time endeavor, but it is there and I will be working on it. If you are interested in helping, let me know.

Other ideas for web applications

I’m tossing around more ideas for web applications, just to see if there is anything I can really latch onto as a project to hone my ruby skills. One idea that came up arises from a need my World of Warcraft guild has for guild management. It would be awesome to be able to manage and maintain the following items in one application:

  • An updated roster, periodically synced from Blizzard’s Armory website
  • A forum for communication
  • A calendar for scheduling raids
  • An application with ability to manage what classes are needed for recruitment
  • Integration with WowJutsu for guild rankings
  • Integration with Wowhead for item links
  • Server status polling

That’s just a few use cases that I can think of off the top of my head, and really the list could be expanded upon to make it attractive to guilds/clans for a variety of games. Right now people have to spend money on services to provide this sort of thing for them, having an open source guild management system they can put on whatever webhost they want (as long as it supports Rails) would be awesome. I might consider this and start hacking away on it.

Giving up on dynamic languages

Faithful readers, the time has come for me to give up on dynamic languages all together. Utility, speed, innovation all leads to maintenance headaches down the road so it is time for me to pick up something tried and true. I talked with a good friend of mine, a Dr. Sloof Lirpa, head of the CS department at the University of Oklahoma, and he suggested something that blew my mind.

Yes, I am going to program solely in COBOL.

COBOL has been around for ages and has been time-tested in the enterprise. That’s what is important, right? Why change when COBOL worked just fine in business for our fathers?

But I can’t forget years of innovation that has happened since the advent of COBOL in the business. So to bring a bit of modern innovation to the world of COBOL, I found a great framework for developing applications: COBOL on Cogs. This will be a great way to develop code and make it enterprisey enough to land the Big Bucks!

Who is with me in this venture?

Ruby Hackery

I’ve had an idea for a quick one-off project that I can do easily with Ruby and deploy to my VPS server without much fuss. It involves looking at my friends and followers on Twitter, and showing me a list of people who follow me but I do not yet follow. I would implement it by using Net::HTTP to fetch the data and REXML to parse the XML feed (I could use json, but I am an XML guy and I totally love the REXML library now that I know how to use it effectively).

The idea is to help find people who are interesting in my Twitter social neighborhood that might be good to befriend. The problem with looking at just the unrequited followers is that a lot of those people are twitter spammers–people wanting me to follow them and click on their links. What an abuse!

So my idea is to look at my current friends, and get their friends list. Then I can compile a single list of say the top 10 people who show up on a majority of my friends’ lists that are not currently on mine. I can then show both lists along with their profile image, current status, and a link to their profile. Then I can choose to friend them or not. Each time I add a friend I would get better results!

I’d also like to take it a step further and find brand new people. I could try something with Twitter’s tracking feature where you get notified when someone posts a status update based on a certain keyword, but that gets spammy really quick and isn’t always the best way to find someone with similar interests. I’ll have to think about this particular problem for a while.

The only problem I see with this option is fetching the data for each user. The more friends lists I pull, the longer it takes, and the closer I come to exceeding Twitter’s rate limit. Ideally I could fetch all of my friend’s friends in one call, but right now as the API stands I would have to make one call per friends list. This means it will be hard to aggregate this data into something useful for this purpose. It’s just a small engineering problem that I’m sure I will resolve, even if I have to ask the Twitter guys for help or suggestions.

Steps Toward Social Convergence

I’m reading more and more about initiatives that are moving towards what I have been calling “social convergence”. The way I see it, social convergence is aggregating the assets from various online social mediums, and providing many views into that data. The views could potentially be a single page, or many. The important thing is that the assets have a relationship with each other.

But what are the assets? An asset could be a blog post, a tweet from twitter, an event shared in Pownce, an image uploaded in Flickr, a Facebook status update, and so on. You get the idea. It’s any content created on any social networking website.

Assets are more than that, though. Assets should include your identity: your image avatar (if any), your profile, and most importantly your friends. Your friends are what make social networks social, and not just a database of your own thoughts. It is vitally important that those carry on to different sources.

Consider how frustrating it is right now. I create an account on Twitter and make a bunch of friends . Now I create an account on Flickr or Digg and a majority of those people are on that service too. But now I have to remember to look them up, add them to my friend’s list, and hope they sign on and approve me as a friend for the millionth time.

Robert Scoble talked about this very same thing in a blog post on data portability:

When a new social network comes along (say your company turns one on this morning) I’d love it if it noticed that 15 of my friends who join up there are also on Twitter, etc. Why is that important? Because if there were some way to bind these social networks together they could do a lot more for you. For instance, I know that Scott Beale is on almost all of my social networks listed above. Why don’t the systems know that?

Thinking about this problem has made me realize that the problem of social convergence is a lot larger than just aggregating data feeds from various services into one location. At that point, it is just data. It isn’t meaningful and nor does it have any real context outside of the person the data is being aggregated for. To be really useful, all assets, especially friend data, needs to be propagated and shared from one participating service to the next.

One big issue I see is the question of authority. Who takes the lead on maintaining this data? Should we go the full-on Data Portability route and use OpenID along with other services? And at that point do you really know who controls your credentials and friend assets? And what happens if that central source is compromised? Having a single source of this data makes it very valuable to malicious people.

Maybe there is a good compromise that can meet security and privacy concerns while at the same time allowing our social networking converge to actually happen. Maybe authentication and authorization can be left in the hands of the individual service providers and each of those services can utilize a service to share the assets. But even doing that doesn’t address Scoble’s concerns about what happens when your authentication information (like an e-mail address) changes.

This is a difficult problem, and the person to come up with an elegant solution to converging our data in a secure and easy fashion will make quite a name for himself.

Social Convergence and FriendFeed

I’ve been thinking more about converging the data from various social mediums (as I blogged about previously) and lo and behold, Twitter comes to the rescue!

Robert Scoble mentioned a service called FriendFeed that takes the RSS feeds available from a large variety of web 2.0 social applications and combines it into a single feed of data. You can also keep track of your friends in the same data stream.

The idea is almost exactly what I had in mind. I want to provide people a single place they can come and see what I’ve been up to on the web (in a Truman Show way, if you think about it). FriendFeed provides this, but I only wish it were more customizable.

For instance, instead of linking to a blog post, it would be nice if I could include the entire text of the blog. It would also be nice if the feed they provide contained more semantic data (such as the source of the entry or even preview icons/images) so I could more easily change the presentation based on where the data is coming from.

Another drawback is that the FriendFeed atom feed contains inline CSS in the code, which really makes it hard for me to syndicate into my own site. So really this application is close, but not quite what I want.

There’s another application that is supposed to provide closer interaction with social application API’s and provide a similar tool to FriendFeed. This application is called Socialthing!, and looks pretty promising. It is in closed beta right now, so unless someone is nice and can throw me an invite (hint, hint) I can’t evaluate it for my convergence needs just yet.

If neither of these work, I may have to consider my own solution. I need something simple that provides more semantic data than what is currently available, for the sole purposes of syndicating it and making it a part of my own site. Does any of this make sense?

Comment on this if you have any ideas, or shoot a tweet to @bratta.

Consolidation

Anyone who knows me knows that I am a big fan of being connected on the web. I’m really into the social aspect of the way the web is evolving and I am usually among the first to try new things online. I’m also very fond of having an idea and immediately trying to do something with it.

That last part gets me into trouble sometimes. I will have an idea for a web site, start putting it together, and then realize that it is just not what I want to do. I have about half a dozen “idea sites” out there that don’t get any real traffic and don’t really do anything important. I’m too impulsive, I guess.

So over the past few weeks I’ve been doing a lot of thinking, and I think it is time to buckle down and get serious about my online presence. I can’t just start something spur of the moment without putting a lot of thought into it, and whatever I do it has to be something I can pour my heart and soul into. It can’t be something that I only have a marginal interest in maintaining.

That being said, I’m going to go through my domain list on my web server and start shutting some things down so I can focus. This in and of itself isn’t an impulsive act, but something I’ve really been considering for a long time. It is time for me to choose what I am going to be serious about.

As of now, I plan on keeping slaggle.com up and running, because it has become my de facto weblog for many years. It started out as a test site for new ideas for Cold Hard Slag as a new search idea for toy price guide info (now you can see where the name came from!) but eventually it just became a blog.

I’ve already decided what it is I’m going to focus on, but I don’t want to be very hasty in announcing it. I need to solidify some ideas first, to see if it is viable. Feel out the waters, so to speak. Once that is done, I’ll just have two web sites. This one and the other.

I will give you a hint about what I plan to focus my energies on: It will be something huge. Very big. And it is a dramatic evolution of something I’ve already done before. Don’t worry, I plan on moving forward with this so you will know very soon what it is I have planned.

Starting Tempest Keep: The Eye

My World of Warcraft guild is progressing onward from raiding Karazhan and Gruul’s Lair. We’re moving on to tackle The Eye in Tempest Keep, a 25-man raid that is the starting point for Tier-5 raiding. It marks an exciting step for our raiding group because we are maturing quite a bit and starting to work together well.

To learn the first couple of bosses and to become more cohesive as a group, we’re raiding The Eye on two nights. Tuesdays and Saturdays. Tuesday nights we are working on learning to fight the first boss, Al’ar, and on Saturday we will work on the second boss Void Reaver.

The reason we are doing it like this is that there aren’t as many trash mob pulls to Al’ar so it fits well with our limited play time during the week. Yes, most of us have real life obligations to consider. But the weekend isn’t as limited on time, so we can spend more time on the arguably harder trash mobs to the second boss.

I know a lot of people focus more on Void Reaver first. You can actually get to him and skip the first boss, and Void Reaver is easy to the point that people call him “Loot Reaver”. But really the mobs you have to fight before him require a LOT of coordination we’re finding.

Al'ar

Anyway, last night we made our first attempt at Al’ar. People telling us that “oh you don’t have the DPS for this” and “he’s so hard, let’s just skip him”. I am happy to say that while we didn’t get him down, it wasn’t because of a lack of DPS or healing. We wiped because we’ve never faced him before and don’t know the fight very well. Our tanks were struggling to keep coordinated so we kept getting Flame Buffets hitting the raid, and some tanks couldn’t get away from the Flame Quills . Nothing that practice won’t solve even if we don’t change up our gear too much. It was pretty exciting.

I had the privilege of being the Warlock to stay on top of the threat meters. I removed the Blessing of Salvation buff, changed up some gear to output more raw DPS, and threw everything I had at Al’ar constantly. The reason behind this is that in Phase 1 you can’t pull aggro from the tanks but in Phase 2 the main tank needs to build up a lot of threat. So the idea is for me to get as much threat as I can, and as Phase 2 starts and Al’ar makes a beeline for me, the main tank Taunts him and I Soulshatter, dumping all my threat. It basically slingshots a ton of threat to the main tank. Quite a neat idea!

Doing that gave me the honor of easily topping the damage meters for that fight. I was quite pleased by that and look forward to continuing our progress in this raid.