CDMoyer's
Ramblings


24
Feb

Fun Presentation on 10 Golden Principles for Successful Web Apps

Fun presentation that Fred Wilson is going to be giving at The Future of Web Apps Conference.

Comments

18
Feb

GitHub has an API — Adding your Repos to Your Site

(This post is pretty old, found it in my tumblr drafts folder, but the code still works.)

So, I was showing Mike Canz my shiny new homepage, and what was his reaction? “How come the list of github projects doesn’t automatically update like twitter and the blog feed?”

“I don’t know,” was my reply.

A bit of reading about the github API and a bit of hacking, and Voila!

<script type="text/javascript">
var nongithub_projects = [
    { "name": "jThrottle",
      "homepage": "http://inarow.net/static/jthrottle/",
      "description": "Throttled jQuery.each() to prevent locking the browser on huge loops",
      "fork": false }
];

var projects_to_skip = {"cdm-s-kol-greasemonkeys": true };

function github(user) {
    var repos = user.repositories
        .concat(nongithub_projects)
        .sort(function (a, b) { return a.name.toLowerCase() > b.name.toLowerCase(); });
        $('#projects .loading').replaceWith('&lt;ul/>'); 
        $ul = $('#projects ul:first');
        for (var i = 0; i < repos.length; i++) {
            var rep = repos[i];
             if (rep['fork'] == 1 || projects_to_skip[rep.name]) continue;
             var url = rep['homepage'] || rep['url'];
             $ul.append('&lt;li>&lt;a href="'+url+'">'+rep['name']+'&lt;/a> - '+rep['description']+'</li>');
        }
 }
 </script>
  

I’m not going to claim that this code is beautiful, but it’s a fun snippet for a few minutes work.

Comments

04
Nov

Postel's Law -- The Robustness Principle »

Be liberal in what you accept, and conservative in what you send

Software should be written to deal with every conceivable error, no matter how unlikely; sooner or later a packet will come in with that particular combination of errors and attributes, and unless the software is prepared, chaos can ensue. In general, it is best to assume that the network is filled with malevolent entities that will send in packets designed to have the worst possible effect. This assumption will lead to suitable protective design, although the most serious problems in the Internet have been caused by unenvisaged mechanisms triggered by low-probability events; mere human malice would never have taken so devious a course!

Not sure why I’ve never seen this before. I guess I never had a call to read the RFC relating to internet host communication layers.

From RFC 1122 section 1.2.2

Comments

02
Nov

RubyKnight Gem Released (v0.2.0)

Well that was fun. I made my first ruby gem, learned Jewelcutter and published my gem to gemcutter.

What does this mean? You can gem install rubyknight and then play chess or write some code using a chess board model and engine.

Comments

31
Oct

One Truth About Technology Architecture: Loose Coupling »

I believe loose coupling is so critical that it should be a board level issue for web companies. Whenever I now hear something like, “we can’t implement x until we have rewritten y” or “x is slow because y is overloaded” I start to dig in, because it suggests tight coupling is the culprit.

Great article by Albert Wenger of Union Square Ventures. [via Scott Rafer’s Blog].

Comments

30
Oct

Put Tumblr on Your Site via Javascript

Tumblr has an easily accessible API which outputs XML, JSON and JSONP. A bit of searching didn’t drum up a cut-and-paste solution, but I was able to roll my own in a few minutes. I’m documenting it here, so perhaps Google will lead the next person who needs this to my solution. Just post the appropriate parts of this script into various parts of your site, and it should just work. See it in action on my site.

Posted In: · javascript    · tumblr    · jquery   
Comments

30
Oct

Ramblings Moved to Tumblr

Not exactly sure why.   I decided to make the home page of inarow.net something else (which isn’t done yet.)  So, I started shopping around for blogging options.  I see too much of wordpress on the clock, so I wrote that off.  I ended up on tumblr because I liked their API, flexibility and capabilities.

Speaking of API, it was about an hour to import all my posts from bloxsom.

Posted In: · development    · ruby   
Comments

26
Jan

Look at me, ma, I made a screencast.

What’s it About?

CouchDB is a “distributed, fault-tolerant and schema-free document-oriented database.” It features a RESTful API, and a pretty slick way to host apps directly on top of it, without any middleware. A great overview of this concept, CouchDB hosted replicatable apps, can be found on JChris’s blog: My Couch or Yours? Shareable Apps Are The Future.

The screencast walks you through the process of installing couchdb and couchapp (from git), running them, and creating your first app. It then steps through some very rudimentary changes to the default app. I hope it’s helpful to someone besides me. ;)

Posted In: · development    · couchdb   
Comments

23
Jan

AutoBlogger Update :: 0.9.4

Version 0.9.4 of AutoBlogger is now available.

This is another quick bugfix release, but includes a patch sent to me by Chris Lewis, who patched it to support sending “>date” attributes from the iPhone mail client. Apparently the iPhone insists on adding whitespace before any line starting with “>”, assuming that it’s an indented reply.

In other news, I’ve moved the main repository to github, as I’m 100% addicted to git.

AutoBlogger Site: http://www.inarow.net/entries/projects/one_evening/autoblogger/
Grab it: Download Tarball or Git Clone (git clone git://github.com/cdmoyer/autoblogger.git)

Posted In: · autoblogger    · projects    · one evening    · git   
Comments

22
Jan

Google’s AJAX APIs Playground

AJAX APIs Playground

Google’s AJAX APIs Playground is an awesome new tool recently released by Google. It allows you to browse through their various APIs and view examples. This is a great way to see what the Google APIs have to offer and get a quick example of each.

Even better, each example can be executed, modified and re-executed right on the page. The final source your create can be copy and pasted, and each API has a link to the documentation.

Definitely head on over and check it out. I follow various Google developer blogs, but I was quite suprised to see the breadth of their API offering. Graphs, maps, search, blogging and more are all included, with great examples and an excellent interface.

As an example, check out this incredily simple way to add a scrolling RSS ticker to a page. This will grab the provided feed, and rotate the articles inside the #content div on the page. You’ll want to check out the full example to see the needed javascript files and provided stylesheet.


google.load('feeds', '1');

function OnLoad() {
var feeds = [{
title: ‘In A Row’,
url: ‘http://inarow.net/index.rss’
}];

var options = {horizontal: true}; new GFdynamicFeedControl(feeds, “content”, options);

}

google.setOnLoadCallback(OnLoad);


Posted In: · javascript    · development   
Comments