Moved to Wordpress
I got so sick and tired of dealing with comment spam I have moved my blog to Wordpress. I plan on migrating all of the content (that was actually looked at) in the next day or two. Stay tuned…
I got so sick and tired of dealing with comment spam I have moved my blog to Wordpress. I plan on migrating all of the content (that was actually looked at) in the next day or two. Stay tuned…
I know I haven’t always been the biggest fan of pair programming but I don’t think [in my past life](http://www.cabedge.com) it wasn’t a feasible solution. At work the other day we came up with a solution for pair programming while we are working from home. We knocked it out and man it is pretty sweet.
Here are the things you are going to need
You will need to run:
$ sudo chmod u+s /usr/bin/screen
so that screen will allow for multiple users accessing the same executable.
Here is the gist of .screenrc located in your home directory.
Once you have all of this setup you are ready to go.
$ screen
If a screen session is already started then run:
$ screen -r
acladd *user2-ssh-username*
screen -x *user1-username*/
That should be it, both users should be able to see each others work. This functionality only works well with command line editors but Vim and Emacs are great and powerful tools that should be a part of every programmers arsenal.
**Note:** This assumes that all network settings are correct for each individual to access the box accordingly.
Here is my first stab at building a quick clojure library http://sethtrain.github.com/clojure-authorize/
Website: http://www.clojure.org
A buddy of mine told me about a new Lisp dialect called Clojure. I have never used Lisp before (other than setting up my Emacs environment) but this looks cool, if you can get over looking at all the parentheses. The language is built on top of the JVM so you have access to any Java packages from Clojure.
I think this is really huge especially from the standpoint of “enterprise” development. I develop every day in Django and Django is awesome. One problem that I have experienced while working with a web development framework that isn’t built in .NET or Java is that you basically give up working with “enterprise” companies because they tend to not trust anything other than those two languages, which is a problem in and of itself. Since clojure runs on JVM anything written in clojure will run on any machine running the JVM, kinda side stepping the idea that developing for “enterprise” has to be .NET or Java.
So I am going to look at Clojure and see what it has to offer. I like learning new things especially when they make me more of a geek.
I wanted to create a chatting application and decided to create a jQuery polling plugin specifically for that purpose. I don’t know for sure if this is useful to anyone else but it works for me.
(function($) {
$.fn.poll = function(options){
var $this = $(this);
// extend our default options with those provided
var opts = $.extend({}, $.fn.poll.defaults, options);
setInterval(update, opts.interval);
// method used to update element html
function update(){
$.ajax({
type: opts.type,
url: opts.url,
success: opts.success
});
};
};
// default options
$.fn.poll.defaults = {
type: "POST",
url: ".",
success: '',
interval: 2000
};
})(jQuery);
*Usage*
$("#chat").poll({
url: "/chat/ajax/1/messages/",
interval: 3000,
type: "GET",
success: function(data){
$("#chat").append(data);
}
});