5 ms·
Learning to Code: Lessons from building a simple Rails app with Treehouse
- prezjordan 14y agoCongrats, Jason! Looks great. The thing about Rails, for me at least, is that there's so much to it and it covers so many different bases that it's really tough to "learn it." For me, it's been a matter of two years of starting projects, throwing them out, and starting them again to get where I am - a fairly confident Rails programmer. I was also fortunate enough to get to work with a rails app for two summers [0] where my coworkers helped me a ton. But guides? I don't know, they never really worked for me. It was the hands-on that I really needed, and it looks like your project with Treehouse is exactly that. I'm still looking for the hands-on stuff [1] (shameless plug) to grow as a developer, since as a student I only have so much time for side projects. I've found that teaching Rails to others - I recently started an Open Source Society at my school - also helps immensely. [0]: http://www.evidon.com http://www.evidon.com [1]: http://jordanscales.com/resume.pdf http://jordanscales.com/resume.pdf
- jasonshen 14y agoHey Jordan - thanks for sharing your journey! I realize this is the first step in a long journey and this post is for those people on the other side of the fence, who may be anxious about even getting started. Yes, I agree that nothing beats hands on work! Love the hustle.
- doktrin 14y agoIf you check out the Devise documentation, you'll notice it recommends hand-rolling your own authentication first. This is, IMO, a wise approach - especially if you plan to eventually deploy an app in the wild. To piggyback on that, I personally think Rails is a poor intro to programming - even web development. What it provides in terms of early results is often at the cost of understanding what it does and why.
- tangue 14y agoI second that. To deploy a website you'll have to learn Rspec, Capybara, gem, bundler... all Rails idiosyncrasies. In this respect, I found Udacity CS253 far more useful than Treehouse. It's Python based and the course uses a light framework - webapp2 (plus, you don't get lame jokes and it's free.)
- DeepDuh 14y agoHow about Flask+Flask+sqlite as an intro to (web)programming? It shows you much more of what's going on in the database backend. Plus, Flask is so small you can still look at it's program code in an afternoon and understand what it's doing.
- jasonshen 14y agoHey doktrin - thanks for sharing your perspective! I did see that notice on Devise's documentation. I think Hartl's Rails Tutorial will go through a more basic user auth process. If you think Rails is a poor first choice - what's your recommended language and why?
- doktrin 14y ago>If you think Rails is a poor first choice - what's your recommended language and why? At the risk of being a little pedantic, I think Ruby is a great choice (Rails being a web framework). Sinatra is much more lightweight Ruby framework that I personally think is more appropriate when starting out. It offers far fewer abstractions (or, "magic") and is a radically simpler beast. To put some numbers on that assertion, the codebase itself is less than 1/100th the size of Rails. If working with a different language, I recommend starting with some similar level of abstraction. Sinatra-esque frameworks typically offer enough functionality to make development fun while not obfuscating too much of the logic. Spark (Java) is Sinatra inspired. While I've never seriously developed in Python, web.py has been on my to-use list for quite some time.
- jasonshen 14y ago
- hipsters_unite 14y agoWhile this is an interesting case (having done the Treehouse tutorial myself), I've got to say that you can't beat Michael Hartl's book for a decent intro to working with Rails.
- sergiotapia 14y agoI disagree. It's good to read bits and pieces here and there, but he deviates too much into Git, Github, Heroku, Unit Testing, etc. I want to learn Rails and Ruby. An already hard enough task. There's no reason to smash my face into so many new concepts at once. -Source: Myself when I starting out with Rails. A much better source I found is the book Agile Web Development with Rails from Pragmatic Programmer Bookshelf: http://pragprog.com/book/rails4/agile-web-development-with-rails http://pragprog.com/book/rails4/agile-web-development-with-r... Starts with dumb, .html.erb files, for static HTML, then slowly builds up on previous lessons - WITHOUT GOING TOO MUCH OFF TANGENT. Unit tests, rspec! the second coming! yada yada. I wanted to learn Rails, most newbie want that as well.
- jasonshen 14y agoHey sergiotapia, thanks for sharing your thoughts! What did you think about the top review on Amazon to this book? http://www.amazon.com/Agile-Development-Rails-Pragmatic-Programmers/dp/1934356549/ref=sr_1_1?ie=UTF8&qid=1360106887&sr=8-1&keywords=Agile+Web+Development+with+Rails+%284th+edition%29 http://www.amazon.com/Agile-Development-Rails-Pragmatic-Prog... One must work hard to grasp what is being taught. It requires a lot of motivation, reviewing and double checking. Too much is given at once, in the wrong order and with little explanation (if any). Too much is left open. Proper subject matter review for a consistent explanation isn't available.There is a summary at the end of each chapter, but it is as a statement of goals "achieved" and not an explanation. I could list many examples. One can easily get lost following (or trying to follow...) the book. It can be a real pain.
- hipsters_unite 14y agoThe Hartl tutorial does start with static pages (in fact I believe that's actually the name of Chapter 3), but fair play - I hear good things about the Prag Prog book too.
- jimrhoskins 14y agoCongrats on deploying your app Jason! All of the lessons learned in your article are really good ones, particularly about reading documentation, and even copying code at first. It's something we struggle with at Treehouse, we want our courses to be as smooth and error free as possible, but it's a bit disingenuous to portray building an app as something so smooth. Developers encounter errors, Google error messages, and dig through docs all the time. We're trying to integrate some of the bugs we encounter into the videos, to hopefully shed some insight onto how to troubleshoot when errors inevitably occur.
- jasonshen 14y agoThanks Jim! I loved having you as a teacher. One suggestion: can you make cheat sheets for all the code we write in each module? Would be nice to be able to recreate the app from scratch without watching all the videos.
- jimrhoskins 14y agoWhat a great idea! Thanks!
- hayksaakian 14y agoOne note about copying code: You'll learn syntax much faster if you hand re-type instead of copy pasting code.
- alinajaf 14y agoSeconded. I've been programming for over a decade and this is still how I learn new languages/frameworks.
- TDL 14y agoI have been writing code for only about 18 months now and re-typing ~85% of what I see has been incredibly helpful to me. I couldn't agree more with this point.
- jasonshen 14y agoTotally agree! I did mention "copying and pasting code" but really I only did that with specific bugs where I'd grab snippets of code to fix my problem. Most of my coding was typed in by hand. I would have to pause the treehouse video, type in the code myself, and then continue the video. Sometimes this would result in my missing a comma or colon somewhere, but I agree that typing it feels like a better approach.
- startupfounder 14y agoI have had a very similar experience to Jason learning Ruby on Rails through Team Treehouse. I was sick of just being the Hustler for my startups, I raised seed rounds, but could not get my hands dirty in code. Why I No Get My Act Together?!?!? I have tried to teach myself to code since 2007. I started my first profitable web company at age 20 without being able to afford a computer, but had to pay someone to code it up for me. Why I No Get My Act Together?!?!? I know that I am not a lead developer or even close, but I am learning the fundamentals and am able to build my own prototypes without bugging someone to be my co-founder. Now I can show them even if the prototype is sh*tty (read: less then great). I am now going through the Rails Tutorial by Michael Hartl: http://ruby.railstutorial.org/ http://ruby.railstutorial.org/ after going through: https://teamtreehouse.com/subscribe/plans?referrer=jameshighsmith https://teamtreehouse.com/subscribe/plans?referrer=jameshigh... and have even played around with changing my terminal: http://net.tutsplus.com/tutorials/tools-and-tips/how-to-customize-your-command-prompt/ http://net.tutsplus.com/tutorials/tools-and-tips/how-to-cust... played with heroku, github, html, css, js.... I can't wait to go through more: http://programming-motherfucker.com/ http://programming-motherfucker.com/ as well as learn python and django. So right with you Jason, more non-tech guys should get their act together and put in the time.
- j_s 14y agoGo go gadget self-described hustler, url-shortening only the referral link in your post. Url shorteners are not healthy for the web and are pointless on hacker news. Referrals are fine, just be up-front instead of hiding behind a url shortener. goo.gl/0BUvL -> https://teamtreehouse.com/subscribe/plans?referrer=jameshighsmith&utm_source=Referral%20Program&utm_medium=url&utm_campaign=Referral%20URL https://teamtreehouse.com/subscribe/plans?referrer=jameshigh...
- startupfounder 14y agoThanks for pointing this out, it has been changed back. EDIT: My inner hustler was trying to get out, I put him back in his cage where he belongs.
- nsomaru 14y agoI wonder how new devs feel about learning Rails now that yaml has been discovered to be a serious attack vector, and will possibly (probably) be a source of many security concerns in the future.
- bdcravens 14y agoDepends on whether or not they understand what it does.
- jaredmcateer 14y agoI feel much better now. Rails enjoyed that near invincible status long enough and the other shoe was bound to drop sooner rather than later. Now that we've got this out of the way, as well as the mass assignment issue of last year, maintainers will hopefully take POCs and disclosures more seriously in the future.
- hmart 14y agoQuoting Steve Klabink: “Starting Rails today is like starting to watch a soap opera in the 7th season.” http://words.steveklabnik.com/rails-has-two-default-stacks http://words.steveklabnik.com/rails-has-two-default-stacks
- hmart 14y agoFrom the first chapter of Railstutorial : Ruby , gems, rails, git. Bundler, MVC ... Git Branch,Edit, Commit, Merge, Push. Heroku ... Some of them aren't easy or intuitive concepts, you need to work really hard. I think rails isn't beginner friendly anymore, but that isn't entirely bad.
- jzig 14y agoI've done Hartl, as well as several Code School courses and a couple other tutorials, yet I still don't feel confident enough in my skills or knowledge to begin my own project or contribute to an open source one. I feel like something is missing from these education sites.
- danneu 14y agoThe part that's missing is the part where you start your own projects so that you have something to apply the knowledge to. Else you're just reading about surfing and wondering why you don't feel ready to surf yet. Maybe just one more surfing book? You don't need confidence because your projects don't need to leave localhost. Most don't no matter how experienced you are. They're for your own education. I have 102 projects in my Code/ directory. I have only 5 repositories on Github.