HNHacker News
TopNewBestAskShowJobs

technoweenie

1,562 karma · joined July 20, 2008

\m/
submissionscomments
technoweenie··on Ruby Patterns from GitHub's Codebase
Yup, they're all mounted in the same ruby process.
technoweenie··on Ruby Patterns from GitHub's Codebase
GitHub IS a mid-sized company with more than 1 person working on the app.
technoweenie··on Kids are the future; teach them how to code
I took basic in 4th grade (89). We were introduced to Logo in 7th grade math. I hit a limit in the amount of extra credit I could get from Logo drawings :)

I grew up in a tiny town of 3000 in the middle of Kansas.

technoweenie··on Kids are the future; teach them how to code
Check out Codea. In a few minutes I threw a rocketship sprite on there, mapped its position to CurrentTouch, and blew my son's mind.
technoweenie··on Scaling GitHub
Just basic HTML/CSS/Javascript built around the Graphite JSON APIs. We have Hubot integration to build graphs on demand through commands in Campfire, a Graph Store to save graph configurations, and static HTML pages that arrange these graphs nicely.
technoweenie··on Scaling GitHub
http://graphite.wikidot.com/
technoweenie··on Nginx 0mq transport layer for communicating with upstream servers
Mongrel2's ZMQ protocol was designed for lightweight messages against async handlers. Instead of a synchronous ZMQ REQ/REP pair that this nginx module uses, Mongrel2 used a combination PUSH/PULL sockets to send the request, and PUB/SUB to get a response.

Say you want to map /chat to a handler. Mongrel2 opens a PUSH socket, and a SUB socket connecting to one or more chat handlers. The handlers open a PULL and PUB socket. Mongrel2 will spread requests to /chat across the available handlers, and receive all published responses. It's a pretty smart way to handle multiple handlers receiving requests at the same time. It's been a while since I looked at Mongrel2, so it's very possible I have some of the details wrong...

technoweenie··on GitHub releases their CI server, Janky
There's no Heroku requirement. The bottom of the pages have a Rackspace logo.
technoweenie··on GitHub open sources Hubot (chat bot)
Hubot supports IRC too (though probably not as well, we only hop in when Campfire goes down).

We depend on having a nice, customizable native Campfire client. We keep a custom js script in DropBox that Propane (http://propaneapp.com/) loads on startup. We've been able to modify the UI to show avatars, highlight successful/failed builds in Git push notifications, etc.

CF also gives us a few other nice features, like offline transcripts with search, and STARS.

Surely, you can do all this with IRC... and there are other chat apps that people like too. We're hoping that people add support for them to Hubot.

technoweenie··on PUT vs POST in REST
Include pamphlets of the Webmachine Decision Flow: http://webmachine.basho.com/diagram.html
technoweenie··on Riak 1.0
From what I understand, you could build the same functionality on your own if you wanted. Riak has post-commit hooks that you can tap into. I think the multi-dc replication uses them, though I'm not positive.
technoweenie··on GitHub Hits 1,000,000 users
It wasn't you, we already contacted the 1 millionth user. Nice try though!
technoweenie··on How Github uses Github to build Github
Keynote. Some of these slides are a little messed up because the elaborate animations had to be scaled way down for PDF. For instance, the status.github.com pull request slide was actually a tall browser screenshot. Transitions slid to a further point in the pull request to highlight specific events.
technoweenie··on GitHub Flow
Yes, there's always a race condition merging to master. Occasionally I'll want to deploy something, but jenkins builds pile up, or someone is busy test-deploying a feature branch. Since we deploy from our chat room, we naturally talk about what we're doing in the same spot.

Also, if you have too many developers on the same project, break the project up into smaller pieces. We have various systems in separate repos that can be rolled out independently.

technoweenie··on GitHub Flow
Every branch is scheduled to build in Jenkins as soon as it gets pushed. We get success/failure notifications in Campfire.
technoweenie··on A letter from _why
http://www.youtube.com/watch?v=Du_RTMmofWM
technoweenie··on IE9 deletes stuff
It's a vague spec, and IE behaves differently than every other browser out there. It's vague enough that they added additional redirection codes (303 and 307).
technoweenie··on IE9 deletes stuff
We didn't see the issue in IE8 when we developed the feature, or this week when we tracked down the IE bug.

Something changed with IE9. Maybe jQuery detected it supports DELETE requests? I have no idea.

technoweenie··on IE9 deletes stuff
Sure, the code is sloppy. For whatever reason, that action wasn't using "newer" rails practices to return different responses to form and ajax requests.

    respond_to do |format|
      format.js   { head 200 }
      format.xml  { head 200 }
      format.html { redirect_to '/' }
    end
We do something like this in every other case in the code base. This is actually what's more encouraged to Rails developers.

There was another similar issue with Rails and the Google Web Accelerator: http://37signals.com/svn/archives2/google_web_accelerator_he.... In this case, the GWA was "clicking" links on the page to pre cache them. Sucks to be you if your application's delete links are straight GET links!

In this situation, the community encountered the problem and immediately started advocating better practices to get around these problems. Such as using form buttons (and later, ajax-enabled links) for unsafe actions. There's a clear standard practice in the web development community here, and these early Rails apps weren't following it.

However, every other browser with XHR support for years has handled redirects the same way. Even though the spec is ambiguous, it certainly suggests being cautious and only automatically redirecting with safe HTTP methods. IE9 breaks this trend for some reason. I'd feel much differently about this if every version of IE worked this way. At least there would be some consistency with itself. And it surely would've been encountered and added to the encyclopedia of weird IE behavior that web developers have to deal with.

technoweenie··on IE9 deletes stuff
Modified, thanks.
technoweenie··on How GitHub Works: Creativity is Important
I think Firestone Ale and Racer 5. We change it up each time.
technoweenie··on Edit like an Ace
That blog post is about automatically forking with edit. The edit button was discovered by our users nearly 3 years ago: https://github.com/blog/143-inline-file-editing
technoweenie··on Who is Using Node.js And Why? Yammer, Bocoup, Proxlet and Yahoo
Ah right: https://github.com/atmos/camo
technoweenie··on Who is Using Node.js And Why? Yammer, Bocoup, Proxlet and Yahoo
Here's a blog post on Nodeload if you're interested in details: https://github.com/blog/900-nodeload2-downloads-reloaded
technoweenie··on Some People Understand REST and HTTP
Even with all that in place, it doesn't mean every client is actually going to use it. http://www.w3.org/Provider/Style/URI.html
technoweenie··on Some People Understand REST and HTTP
Any notion of HATEOAS in the GitHub API is purely experimentation. With the exception of the pagination links, the rest of them could change format or be removed at any time (until something is properly documented at http://developer.github.com/). I don't think the Link header is descriptive enough, so most of them will probably go away.
technoweenie··on Elegant Markdown for a more civilized age
You can write content faster if you're comfortable with the syntax. It also has the advantage of looking good unstyled and styled. The syntax tends to look like a styled plaintext email.
technoweenie··on Digging around Github's git database API
A few things: API v2 has a read-only object API: http://develop.github.com/p/object.html. Also, the blob content is returned in base64, because JSON does not handle binary data. It's not the raw loose object though. You're better off using the custom mime type.

The API v3 object API is meant to be extremely low level. If you want to update a branch with a new commit, you'll have to:

* Create new blobs for the added/updated files.

* Create updated tree objects. This can get tedious. If you update a file in /a/b/c, there's at least 3 new tree objects that you'll need to update.

* Create a commit that points to the tree at /.

* Update the reference for that branch.

Whew! It's pretty clear we need some higher level API around viewing and updating files, like the Gist API.

Thanks for the feedback!

technoweenie··on Kue - redis backed priority job queue for node.js
coffee-resque and resque work together really well. I didn't mess with the python resque lib much, but I was able to get it to read jobs queued by ruby. With a little work, resque could work as a cross platform queue if you wanted. The main issue I ran into is the way the libs bind resque jobs to objects. For instance, the ruby resque library queues jobs by the ruby class name (Foo::Jobs::Bar), which doesn't translate well to python or node.

A good first step would be defining a spec based on how resque or kue work so that alternate language ports can be written. In the case of resque, other interfaces like its failure or plugin system should also be documented, so that those libs could be ported too.

technoweenie··on Nobody Understands REST or HTTP
The GitHub API uses the Link header for that.

    $ curl https://api.github.com/repos/github/gollum/issues -i       
    HTTP/1.1 200 OK
    Content-Type: application/json
    Link: <https://api.github.com/repos/github/gollum/issues?page=2>; rel="next", <https://api.github.com/repos/github/gollum/issues?page=3>; rel="last"
← PreviousPage 5 of 9Next →