Live data from Hacker News

Went Off The Rails: Why I'm Rebuilding Archaeopteryx In CoffeeScript

gilesbowkett.blogspot.in

141–143 of 143 posts

Re: Went Off The Rails: Why I'm Rebuilding Archaeopteryx In CoffeeScript

#141
post #125

Earlier quoted context omitted.

Write your own? I'm sorry but if Bundler doesn't solve your problem (or introduces other problems) either try and fix those issues OR write your own dependency management lib.

The unfortunate reality about writing your own new Bundler is that you'll inevitably end up rewriting Bundler. Isolate is basically just a mini-Bundler with a different (arguably simpler) storage location, but the storage location is really not where the complaints about Bundler are coming from. Rewriting things just to shed complexity or "bloat" will often just put you in a position where your library just can't do…

I agree. I just hate to see this ― "zomg bundler sucks at ! I hate using it! It has to be fixed for me!"

Any open source project needs help. The maintainers of Bundler have 200+ issues on the issue tracker. If people could help them replicate and confirm issues, write failing tests and if possible write patches ― it would do a world of good. But instead it's EASIER to complain and whine. So...

Re: Went Off The Rails: Why I'm Rebuilding Archaeopteryx In CoffeeScript

#142
post #43

Earlier quoted context omitted.

OK it's mad funny, but what's so hard about `alias bx 'bundle exec'` in your .(bash|zsh)rc file?

or if that's too much use --binstubs to use "bin/rake balls" or if you are really, utterly crazy, use --binstubs AND set $PATH to contain './bin' and then use "rake balls".

I use rbenv with rbenv-bundler which runs the bundled binstub from my current directory when I run the command.

Re: Went Off The Rails: Why I'm Rebuilding Archaeopteryx In CoffeeScript

#143

Earlier quoted context omitted.

Wrapping things in objects doesn't seem to help me. I'd still end up with this, thanks to callbacks. app.get('/documents', function(req, res) { Document.find().all(function(documents) { // 'documents' will contain all of the documents returned by the query res.send(documents.map(function(d) { // Return a useful representation of the object that res.send() can send as JSON return d.__doc; })); }); }); Seems to me that…

I would create a DocumentRequest object that takes your req and res, then break apart your callbacks to separate functions on the DocumentRequest prototype. Then you would simply consume it with: app.get('/documents', new DocumentRequest);

Thanks for this. Been thinking about this. Could you recommend a book on patterns like these?
Post reply on HN