As a n00b trying to learn how to program, I completely agree with your points about Ruby on Rails. After getting in over my head going through a few rails tutorials, I took a step back and realized that while I could create really basic web apps and go through the keystrokes to write code and commit to Git, I didn't understand what the hell I was doing from a conceptual level. It was rote code copying from a tutorial or a book while leaving out the layer of actually understanding what and how the program works. It felt hollow.
I then took a step back and went to MIT's OCW courses that use Python to teach the basics of CS. None of the lectures introduced Django or other web frameworks, rather, they used Python as a means to teach core CS concepts. From there, I used the basics of what I learned to create simple scripts and conceptually understand what I was coding.
Then, I slowly ventured into Django tutorials. But even with the Django tutorials, I'm taking a step back because I'm having difficulty wrapping my head around databases, structuring data models, and basically, learning how to PLAN an app before I write code.
At the end of the day, I think it is really difficult to learn how to code on your own because it is so much more than learning syntax. This is where mentors and the community comes in. Mentors matter a whole lot more than great tutorials and working on a real project with other, more seasoned developers (basically, an apprenticeship) completes the circle of going from complete newbie to "entry level programmer".
First: Good for you going through the process of learning stuff The Hard Way.
I know exactly what you mean about the databases and proper modeling. I ended up reading through a basic book[1] and it really gave me a good perspective on how to decide what objects in your model will have database tables, which ones should have foreign keys into others, how to think of the relationships involved, etc.
I think you're right that you need to have some understanding of these concepts before you can build a web app. But fortunately, it's not that tricky! Keep at it, you're almost there. :)
I just Kindled the book and worked my way through chapter 1. Seriously - I can't think of a better way to introduce someone to "classes" and explain what a "class" does within a program. This book is great thus far! If you have any other recommendations, I'm all ears!
In particular, these 2 topics come to mind:
- Algorithm design
- Data structures
I personally think software "engineering" should be considered a craft/trade. We should be apprenticed and developed under the direction of masters.
You can learn this discipline on your own, but you'll always be second rate to a developer who learned under tutelage from someone else. Whether it's in school or in the workplace, learning from others is incredibly valuable.
I think "always" is too strong a word. That's not necessarily true. I think it's more accurate to say that it's far harder to master the concepts yourself and you'll have a better chance of mastering it by learning from another expert but I see no reason why you can't master these things yourself. As long as you don't try to jump ahead and make sure you teach yourself in a logical, stepwise fashion from concepts to fundamental implementations, to working with implementing multiple concepts at once and beyond then you'll be okay.
I think what gives the person with a teacher the advantage is the structure of the lessons. People, especially newbie coders, want to build Facebook on day 1 and they're crazy enough to actually attempt it! A person who can control that impulse will fare just as well as someone with a mentor I think. You can take a million baby steps and accomplish great things or you can take one giant leap and fall flat on your face.
And if you're a total newb and need to go over basic programming concepts in a simple language, try "Tcl for Web Nerds" (http://philip.greenspun.com/tcl/) -- it's what many Web developers cut their teeth on in the late 90s.
I too am a n00b with Rails but I'm more of a reformed PHP programmer like the article describes. I can confirm that most framework tutorials are difficult and, as you say, feel hollow. The reason for this seems to me to be because there are about 10 different things going on and the tutorial can only really put a major focus on one or two at a time.
You first have to understand programming concepts themselves. This means iterations/loops, variables and assignment, etc.
Then you have to learn how language X implements those concepts. So you find out if you have to declare types and get the hang of the syntax itself.
Then you have to get into databases, how those work and the planning as you say.
On top of all that you then have to learn how MVC works which means you'd better get comfortable with OO programming, then learn at least 3 more languages if you don't know them already (HTML, CSS, js). Then you have to know how the server interacts with your code, and on and on. Oh, and don't let me forget learning your tools. The command line, your deployment tools (even if it's just FTP), version control, servers, and your text editor. There's a ton of stuff to wrap your head around just to write a simple blog script!
If you're new to programming and learning any framework you're screwed. You end up just copy-pasting code that you have no idea what it does and you haven't learned a thing. I think the article makes the real common sense point that in programming, just like any skill, you have to master the fundamentals before anything else. A lot of words and explanations just to say "learn the basics before moving on or you'll never learn anything". But I'm glad he said it, it was a good article and made sense.
I think part of the problem for beginners is that both the breadth and depth of the skills required for web development have increased so much. This post focuses on the depth required to learn Rails properly: you must understand Ruby (which is much more sophisticated than, say, PHP 3) as well as MVC, REST, and so on.
But at the same time, you are expected to develop for multiple platforms (desktops, mobile devices), to understand how to integrate with a wide variety of other services and APIs (Facebook, Twitter, S3, payment gateways), to know how to measure and optimize performance and other factors like conversion rates, and to understand SEO (which, just on its own, has a much larger learning curve than it did a few years ago), and that's just a limited selection.
There is, of course, one standard way to gain all of this knowledge: go and get a formal education in the field. But if you want to just dive in without that, these days that approach requires remarkable dedication and discipline, even if years ago it was a reasonable approach to learning.
Exactly my thoughts. I'm close to finishing a formal CS education and I've been working on learning Rails (off and on) over the last couple of months. Granted, I'm a full-time student with a close to full-time development internship, so I don't have a ton of time, but I've found a pretty steep learning curve on Rails. There's so many concepts that I haven't and won't be exposed to in my CS education that I have to learn on my own. I'm pretty good at Ruby, but beyond that, I've got a huge list of topics I need to dive into before I feel I could be a good Rails developer.
Rails isn't for beginners, but neither is any web development framework that you intend to use seriously. Sure you can use Sinatra or Padrino in the Ruby stable to get a web app out, but if you want a medium to large scale, comprehensive application, you'll almost inevitably go with Rails (again, the Ruby stable) if only for the gem ecosystem.
I've just entered my 13th month of Ruby/Rails learning coming from an HTML background (I say with my tongue in my cheek), and had no prior database or OOP exposure. A LOT of time since I've started has been wasted, where days and weeks would go by without me touching Ruby literature or exercises, but here I am. I wouldn't say I'm a noob anymore, and I won't say I'm great, but I've definitely got enough of a grasp to build things with it.
If you're going to go ahead and skip the advice of the OP's post, then let me give you this advice, be persistent. As steep as that curve can be, just keep at it, and don't expect to have "the web app that does..." ready any time soon.
Rails is a compilation of best practices collected over years while developing web applications. It's not a "Hello World" framework like Sinatra where you can be as simple or as complex as you like--inevitably reinventing the wheel in the process. It's framework designed for large codebases with templates, ORM, caching, views, MVC, etc. It requires you to think about your entire system and all its parts up front.
So no, Rails is not for beginners. Don't let the 15 minute blog video fool you.
I've been on Rails for close to 15 months, before that about 10 years on PHP. It took me a little bit to grok Rails, but it was mainly about trying to understand where Ruby ends and Rails begins.
I had done a ton of OO PHP and MVC stuff on Zend Framework, so I quickly grasped the questions around what code goes where.
The hardest parts for me to understand was the ways you could redefine classes on the fly, modules, blocks and closures. For a self-taught programmer coming form PHP-land those are all new concepts.
(Though I had a smidgen of experience with closures via JavaScript, I don't recall any tutorials making a direct comparison. It was only later one that I saw the similarities.)
Not everyone can learn it and building something that is useful requires skill and experience.
Doesn't matter the language, toolkit or number of tutorials at hand - building software is a difficult profession. You can't learn how to practice law or be a doctor by spending a month reading tutorials - why would anyone expect this to be the case in software development?
My path to web development was as follows: learn how to think properly (BA History) ;) -> learn software development basics (2 year certificate in Software development, primarilly Java) -> First job maintaining Basic (BBx) code for application built in 80's -> contractor working with prior built custom PHP code -> Full time developer working with Symfony, Drupal and now Rails. Not to mention all the basic sys admin knowledge I've picked up (apache, zeus, perl, shell scripting, networking, etc...)
If I had walked into Rails right off the bat, I would have had no idea what was going on. Having a solid understanding of Java servlets, MVC in general and 4 years of prior programming experience meant I picked Rails up rather quickly. Rails isn't my barrier, it's ruby, and syntax isn't' much a barrier for a good programmer.
One thing I wish I had was a better background in Computer Science or Computer Engineering. The actual physical reality of how computers work often baffles me and having knowledge of how a CPU works at a base level would definitely make me better at my job. As would a real knowledge of algorithm design.
Definitely not, and I cut my teeth with Ruby on Windows, way back when. You can learn on Windows, but it is so much easier on a *NIX machine. As I said in the supplemental article that I wrote to go with this piece:
> [If you choose to use Windows,] you need to understand that Rails—and indeed, most modern, cutting-edge programming stuff—is not meant for you. Accuse me of elitism, sure, but it’s a simple fact of the matter that many, if not most big-name programmers program on one of these two platforms (or some more extreme variant). You can program and do Rails on Windows, but you are swimming against the current. You are going to fight battles learning to program, so ask yourself: is using this operating system the battle you wish to fight? The correct answer is no, but you might have your reasons. Nevertheless, you can download and install a copy of Linux so amazingly easy these days that you’re making it hard if you choose not to.
These theories all miss the basic point. Yes, Rails is not a good way for a beginner to learn proper professional programming. The proper way to do that is to write nice, fairly-mathematical code in Scheme or Python until you understand recursion, algorithms, etc.
But learning to become a professional programmer isn't most people's goal. Rails is the fastest way to go from "I want a webapp that..." to "I have a webapp that sorta..." and it is that ability to build useful, visible things very quickly (even if they have lots of bugs and problems) that gets people interested enough in programming to actually sit down and learn the hard parts.
I'm not talking about 'professional programming', really—I'm talking about being able to achieve a reasonable outcome in a reasonable amount of time.
I'm not even interested in people becoming good programmers. My point is that people who will spend the time to learn the hard parts will benefit more from learning from the lowest level that makes sense to them, rather than trying to learn Ruby and the CLI alongside Rails as they muddle through an app. We'll see better conversion rates if we encourage beginners to start from the beginning, and to spend even a modicum of time learning those technologies.
A while back there was a post about how great http://teamtreehouse.com 's tutorials are. I added the following comment:
"But don't you think in an industry like software development, you need to be able to self-educate. Software just moves too fast. So a person that needs hand-holding is not going to 'get' what it takes to be a good programmer."
I got downvoted for it =)
So I think people are all over the map when it comes to how to learn and how to teach. But in the end, I maintain that you only get good by being self-motivated and driven - no other way.
I am learning rails only 4 months after my first code line in html(your typical Joe Beginner), knowing absolutely nothing prior to that exept cracking a game or unzipping a file.
I found myself able to do very basic stuff and advancing at somewhat tollerable pace, but I figured derailing a bit and learning the core basics is essential for any meaningful progress. Frustration for me comes from not knowing what happens under the hood and why the particular commands are the way they are. I see what they do, but I dont understand where they come from, nor their potential, nor their proper usage.
So I started to watch Harvard cs50 course online as well as getting my hands on anything that can help me better understand the underlaying architecture of hardware and software.
Allthough not sexy, imho, this decision is the best a beginner can make. Yes it will take you longer to make something concrete. Yes, you will find yourself touching languages you will seldom (if ever) use afterwards. But understanding the roots is essential and pays in the long run much more than hacking your knowledge learning rails immediately. Remember it is a marathon, not a sprint. Bet on deeper understanding and you will win.
PS paralel with essentials, I am learning linux (so far I have only used windows) and vim. Yeah, learning curve is rediculous. Any learning tips and resources are more than welcome. :)
This article touches on asking questions. There's a distinct separation between people that won't learn for themselves and those that have the focus to learn for themselves. You need the knowledge on how to seek things out for yourself if you want to be successful at a computer related occupation in general. Asking questions is fine, as long as you ask the right questions. And finding out the right questions to ask is solely on the person.
A good example is in the article itself, with the person asking how to use Google. This is an example of a bad question. Using a search engine on the internet is trivial, but it does require the person to have the drive to read and think for themselves. Learning how to identify the right questions will help you immensely in understanding the concepts(for rails or otherwise).
As an educated CS professional with a reasonable amount of experience in non-web development fields (database design and embedded systems), the roadblocks I hit always had to do with understanding web development concepts.
I also got frustrated finding meaningful help on some of these subjects. I found it next to impossible to find straightforward explanations of things like routing. The help always seemed to consist of either advanced material that assumed the viewer knew about routing or "Suck it, noob." type responses like the OP talks about.
I think the ideal person who starts learning Rails from scratch is somebody who already has a strong familiarity with concepts of database design and object-oriented programming but is not necessarily greatly experienced in setting up web applications.
Rails takes the underlying concepts of database design and the client/server relationship and makes them very easy to implement. That should not be confused with making the process of learning how to program very easy. For now, there really aren't any shortcuts to learning the old-fashioned way.
It might not be designed with the beginner in mind, but I can easily say that Rails has been my entry to web programming and Rails has been very helpful in that regard. Have I understood all the concepts in the first place? Probably not. Did I need to? Not really.
I am a big fan of learning by doing and Rails gives the beginner a very quick, gratifying experience, and I believe that is one of the reasons why Rails is so popular among beginners
I would never recommend Rails as a project for beginning programmers. Having to juggle syntax, convention, and well, everything backend related, is not something that will ever be beginner level.
But I could still see it being something for programmers trying out web-app development. It's convention and opinions is kind of helpful in showing how things could be organized.
Enterprise Rails applications aren't for beginners. But this pervasive attitude that all of Rails is beyond beginners is an abdication of responsibility.
If a newbie still can't build a Rails blog in ten minutes, let's address that. "Rails is not for beginners" is shorthand for "I can't be bothered to support beginners"
I don't think that all of Rails is beyond beginners; and certainly, some people do manage to learn the prereqs while they learn Rails. But I'm advocating being blunt and telling people to learn the prerequisites, instead of mindlessly answering inane questions. People who try to bullshit program their way through an app aren't learning anything but how to copy and paste.
I feel like railstutorial.org is a perfect introduction. If you crank through it (not just get the app working, but understand each part) it gives you enough of a foundation to start watching railscasts and read documentation for a certain gem.
Without it I think the Rails scene would be pretty hard to jump into.
I can't speak for any one else, but I'm sure glad I decided to learn rails about 4 years ago...It forced me to take several detours and learn things like ruby, css, html some linux admin etc
I would heartily recommend rails to all beginners
For what it's worth, I feel the same way: learning Rails has sent me down a lot of roads and inspired me to learn a lot of new, interesting, valuable things. I knew Ruby before I started... but even just the conceptual elegance of Rails has taught me something.
Inspiration is what drives us to learn more on our own and get through the tough parts. This is what Rails does so well. Look at the way someone's eyes light up after running rails g scaffold for the first time and playing in their very own web app.
I then took a step back and went to MIT's OCW courses that use Python to teach the basics of CS. None of the lectures introduced Django or other web frameworks, rather, they used Python as a means to teach core CS concepts. From there, I used the basics of what I learned to create simple scripts and conceptually understand what I was coding.
Then, I slowly ventured into Django tutorials. But even with the Django tutorials, I'm taking a step back because I'm having difficulty wrapping my head around databases, structuring data models, and basically, learning how to PLAN an app before I write code.
At the end of the day, I think it is really difficult to learn how to code on your own because it is so much more than learning syntax. This is where mentors and the community comes in. Mentors matter a whole lot more than great tutorials and working on a real project with other, more seasoned developers (basically, an apprenticeship) completes the circle of going from complete newbie to "entry level programmer".