5 ms·
I find your comment about Rails facinating, as it teaches me a bit about how I'm a Blub programmer. I've tried to learn Rails multiple times and the "generate"
by rprospero 12y ago
I find your comment about Rails facinating, as it teaches me a bit about how I'm a Blub programmer.
I've tried to learn Rails multiple times and the "generate" and "console" commands have always been a massive stumbling block for me. With ever other language and toolkit I've ever worked with, the tutorial starts with opening up a text editor, writing some code, and producing a lousy, "Hello World" website. With Rails, I went through three pages of the tutorial before I even saw a single line of Ruby. I grew to hate the "generate" command, as it produced ever expanding reams of unexplained code each time the tutorial had me call it.
I had always assumed that the elimination of the need for commands like "generate" would be the top priority of the Ruby community and that their existence was a recognized design wart, like Python's GIL or Haskell's unsafe prelude. That "generate" would actually appeal to someone is something that I'd never even considered. That makes me a Blub programmer and tells me that there's another whole philosophy of programming that I need to learn about.
- TeMPOraL 12y agoI don't think this is about being a Blub programmer. Rails is a complex web framework that is designed to help solve many common problems in web development. Therefore, it has tons of code organized in an arcane way you won't understand until you know what problems it's trying to solve. That's why I always found teaching RoR (or equivalent frameworks in your language of choice) to beginners completely backwards. What the newcomer learns is how to tweak this huge blob of arcane magic here and there, and gains almost zero actual understanding of how things work. My preferred way of teaching webdev is showing how text goes from server to browser, how the browser parses it to render a page, and how a programming language is used to generate such text. And then I build up from this base. Sure, this approach won't make one a Rockstar Full-Stack Code Ninja in half a week, but at least the student has some solid foundation of understanding to work from and can comprehend why Rails looks the way it looks. It also seems to me that the current trend in web development is people using huge complex tools, of which they need 1% and understand 0.1%, and thus generating layers upon layers of bloat. But my opinion here is probably biased as I hate webdev more and more with every single day I spend working in it.
- beat 12y agoThe problem, then, isn't that we shouldn't use complex frameworks like Rails, but rather we shouldn't teach with frameworks like Rails. In order to teach Ruby-based web development to the n00bs, use Sinatra. This forces them to address the Ruby language right away, learn http verbs, learn unit testing (well, if I'm teaching them anyway), learn templates, and learn to organize code from a single file up to a simple structure like a gem. Once they grok a simple Sinatra app, they can move on to Rails, understanding that it's doing a lot of magic, but at least having a grasp of how the magic works.
- TeMPOraL 12y agoExactly this. > Once they grok a simple Sinatra app, they can move on to Rails, understanding that it's doing a lot of magic, but at least having a grasp of how the magic works. How the magic works, and why it's needed in the first place.