Live data from Hacker News

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

gilesbowkett.blogspot.in

111–120 of 143 posts

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

#111

This is garbage, why is it being voted up? Rails is not bloated it's modular and quite simple if you understand ruby and can read - look at the source. That said his to address his _complaints_: * Rspec / Testing is slow as it has to reinitialize a whole rails stack every time it runs - run it async smartass it's what you're preaching, use inotify or fsevent with watchr or guard. * Bundle exec for Gemfile changes? Th…

> Rails is not bloated it's modular and quite simple if you understand ruby and can read - look at the source.

You've got to be kidding. The Routing has got to be the canonical example of bloated and confusing code.

Is inotify/fsevent built into the "full stack" framework? No?

"Hey guys, I wrote/found/whatever this code to solve a problem that another bit of code I chose to use caused for my development. Oh BTW you're a complete tool if you aren't already doing the same."

You must be awful proud of that Yak.

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

#112
post #111

This is garbage, why is it being voted up? Rails is not bloated it's modular and quite simple if you understand ruby and can read - look at the source. That said his to address his _complaints_: * Rspec / Testing is slow as it has to reinitialize a whole rails stack every time it runs - run it async smartass it's what you're preaching, use inotify or fsevent with watchr or guard. * Bundle exec for Gemfile changes? Th…

> Rails is not bloated it's modular and quite simple if you understand ruby and can read - look at the source. You've got to be kidding. The Routing has got to be the canonical example of bloated and confusing code. Is inotify/fsevent built into the "full stack" framework? No? "Hey guys, I wrote/found/whatever this code to solve a problem that another bit of code I chose to use caused for my development. Oh BTW you'r…

Confusing? you map resources to URL's it's confusing if you are inept. Inotify / fsevent and such aren't built into rails just as they aren't in _EVERY OTHER FRAMEWORK_ because it's complete voodoo to make side effects of editing a file default.

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

#113

tl/dr Rails is not the new hotness anymore, the Rails 3 rewrite was a waste of time and it's strayed far from its initial ease of use. Node & Coffeescript, the new hotness, are awesome, here's my new video series, the first one's free.

I feel like a lot of complaints about Rails 3 being harder to use are coming from Rails 2 developers who don't know it as well.

I've only played around with Rails 3 (I'm following Michael Hartl's tutorial) and have never used Rails 2, but I don't see how new Rails features like `has_secure_password` or the asset pipeline (which is super dead simple) make Rails 3 any harder. It seems like the opposite — perhaps someone who has developed on both major versions can enlighten me?

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

#114
post #29

Earlier quoted context omitted.

In fact I have no doubt that within 5 years something else new will come along and perhaps Giles will be writing another article about "Node Went Off The Script: Why I'm Rebuilding Clyde In TheNextBestThing" Which possibillity he mentions in TFA. But this is what we call progress (or, to a more bitter viewpoint) change. It doesn't stop.

Aside from async, I don't see a single drop of progress moving from Rails to Node.JS.

Much smaller memory footprint, faster execution times, consistency of writing your server code and client code in the same language, etc.

You could say all of these things are subjective, but so is the word "progress".

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

#115

Earlier quoted context omitted.

All the examples, github repos, books, and tutorials I'm seeing with my dive into node say exactly the opposite - the code becomes a mess of callbacks. It looks like enormous work goes into avoiding callbacks, similar to the amount of work that went into Rails in 2005 so that server-side folks could avoid writing JavaScript. I'd love to see this framework you wrote. Is it open-source? or is it something you're unable…

You have to think about async code differently than you think about synchronous code. In PHP you might write: $data = getData(); And people want to substitute the return for a callback in js. getData(function(data) { // Do something with data. }); That indeed does lead to callback mess. But when you are coding in js you rarely should use anonymous functions. I mostly just use them when I might want to perform recursi…

> JavaScript is an object-oriented languages; use objects! They make async painless.

In the example above, you're unable to use ''this'' in the ''dataGot'' function (when invoked as a callback).

Object orientedness is very easy to get wrong in JavaScript, if you're coming from C++/Java/Python background.

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

#116

Earlier quoted context omitted.

I'd go further and say, that it will be very hard to have a good MVC framework with Node before the async callback mess is brought under control. Maybe we'll even need something like Iced CoffeeScript for this.

I'd caution against any "I'd go further to say" statements. Either you know because you've tried, or you don't and are simply guessing. As someone who has made an MVC framework in Node.js and launched a production site using that framework, I can assure you that it's not hard to avoid async callback mess. I can also assure you that many others have had success doing this. It's really not difficult to write beautiful,…

Your assumption that I have no experience, and have therefore based my statement on hearsay is incorrect.

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

#117
post #115

Earlier quoted context omitted.

You have to think about async code differently than you think about synchronous code. In PHP you might write: $data = getData(); And people want to substitute the return for a callback in js. getData(function(data) { // Do something with data. }); That indeed does lead to callback mess. But when you are coding in js you rarely should use anonymous functions. I mostly just use them when I might want to perform recursi…

> JavaScript is an object-oriented languages; use objects! They make async painless. In the example above, you're unable to use ''this'' in the ''dataGot'' function (when invoked as a callback). Object orientedness is very easy to get wrong in JavaScript, if you're coming from C++/Java/Python background.

Right, I excluded the bind for the sake of simplicity.

I also forgot that it's this.dataGot. dataGot doesn't exist in that context :)

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

#118

Rails has always been bloated. That's what you get from frameworks that come with automation for common tasks. However, let me provide a counter-point ... I think that Rails 3 is finally a good framework that I want to use. Blogs written in 5 minutes (which you can still do in Rails 3) have never impressed me. What impresses me is code-reuse, modularity and readability. Which is why I preferred Django instead of Rail…

What it ultimately comes down to is you do what you feel is best for you. And this has been said many times, but, a tool is a tool is a tool. Whether it be js, Ruby, Python, Assembly, Lift - they're all tools to get the job done.

I started a new project a few months ago and spent a day almost agonizing over 'the new hotness'. I talked with a friend about doing it the 'old way' (Rails mvc) or the 'new way' (backbone, node, etc). In the end, I just wanted to get my work done, so I chose the 'old way'. I don't see anything wrong with this. I feel like I'm still creating, I love getting up every morning and making progress on the app.

At some point, I'll probably go back and revisit. Maybe start sprinkling in some new hot here and there. The one thing that DHH has said that's really stuck with me is (paraphrasing): "Love the tools you're working with". So, I leave it at that.

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

#119

The people who learned with Rails always make me chuckle. The only reason Rails got anywhere was because of scaffolding and the hype that surrounded it - which of course already existed in some form in other platforms. It's completely revisionist to think that platforms like Java or .NET didn't already have application creators and ORM. The genius of Rails and DHH was the marketing which isn't surprising seeing as ho…

I don't know where you got that from. Struts was my first proper web framework- the kind where adding a column was an all-day affair. The simplicity of Rails, even now, is that you'd only need to put it in two places- the migration and the view. You don't need to mess around with Hibernate XML configurations all day. Just add the damned column and get on with your life.

Struts was hardly the be-all end-all of web development. Sure, Rails was a lot better than Struts--but so were a lot of other platforms.

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

#120

Earlier quoted context omitted.

I've used Isolate[1] pretty happily on a few things (command-line tools and/or Sinatra apps). I haven't tried it with Rails, so I can't speak to how well it works in that context. But the readme's first example is Rails, so it's worth a look if you really want an alternative. [1] https://github.com/jbarnette/isolate

Hadn't seen Isolate before- looks awesome. I'll try it out. Autorequire is one of my biggest complaints against bundler.

Is autorequire even a real problem? You can quite easily put your gems in a separate group if you want to manually require them. Installing is another issue, that is opt-out, but I don't see the install process as the real bottleneck.
Post reply on HN