Who can volunteer as a "week 4" project helper?
- Daniel Kirkdorffer
- Mislav Paparella
- Luciano Tavares (I'm a beginner, but I can try - we're all beginners, thanks for volunteering)
- Jenny Rasmussen (also a beginner) -- best days Sunday and Monday, usually on IRC
- Jessica Ledbetter (beginner and unavailable till 3/17)
- Tyler Cipriani - recent helpee, possible helper
- Caley Woods (Available 7pm-12am Central Thurs-Sat night, -5 UTC, or anytime via email)
Who needs help?
- Jeremy Brooks -- I am starting the week 4 assignment again now. I think I have some time today (3/14) and then during the week, so I am going to go forward until I get stuck, then ping the list/IRC for assistance. Sound good? Sure.Yep!
- Tyler Cipriani -
Count me in. I have the vote model made, I just need help on the controller. So you're almost there. You can also check out what others have done in their controllers by looking at their GitHub source via links posted at http://www.balwiki.com/w/index.php/RailsRedditProject. Done! Thanks for the extra push! - Neal Sales-Griffin - I'm in as well team. Sorry for sitting on the sidelines. I've had to step up to work on a project of my own with my team that I could actually really use some help on. But I think working on this project could help me move forward and give me some confidence. Is there any chance one of you is willing to work through a session with a complete beginner - perhaps a screenshare or a beginner-friendly IRC chat to go from rails new my_reddit_app to having some basic models, controllers, and views? I'd also love to get some advice on my current project for which I have to begin development on this week by setting up some simple pages...
- Johannes Weissensel - I didnt really start the redditclone app yet. I looked at some of your examples. I'm not quite sure where to start, but i will figure something out. A one on one screenshare or chat would be complicated, as i live in germany most of you sleep while I am in my sparetime. Maybe a step by step guide would be awesome, not a tutorial more like: what should be done first what last. (Johannes, see below)
- Adam Collado - Still very much interested in learning Rails and finishing this task. I already scaffolded my links, and just need to put in work for the controller and finish making the vote model. I guess the biggest thing for me is that I'm somewhat time constrained, and having trouble just remembering all the finer details about Rails (this is largely because I can put a lot of work into one day, and not get to mess with it again for another couple of days). The guide below is a big help though, I just need some help with writing out some controller object for my links. It's a big help being able to review everyone's code as well.
who is hanging in there but serverly time constrained for now?
- mark van (so you don't need help?)
---------------------------------------------------------------------------------------------------------------------
"Week 4" - Reddit App (General Step by Step Guide):
http://alindeman.github.com/p2pu-rubyrails/week4.html
IRC Chat Link: irc://irc.freenode.net/#p2pu-rubyrails
1) Establish a new rails app (no features, just plain: rails new <myapp>). Refer to the http://guides.rubyonrails.org/getting_started.html page again for guidance.
2) Create a new GitHub repository for it and commit and push it. Look at what you did the blog app to remind yourself of a few things. Reference the http://gitref.org/creating/ page if need be.
3) Establish a new app at Heroku for deployments, again looking at how that was done in the blog project.
4) Install Devise. Keep in mind the Railscast is dated. Watch it, but you'll want to follow the README instructions at GitHub for it at https://github.com/plataformatec/devise. You can always take a look at what others here have done with their configurations (via links at http://www.balwiki.com/w/index.php/RailsRedditProject). Devise will take care of most of your "User" model needs.
5) Scaffold out the "Links", again referencing http://guides.rubyonrails.org/getting_started.html for help. This will produce much of what you need to create, edit, delete links.
6) Think about your data model. You'll have a User and a Link entity, and the project calls for a Vote entity of some sort. What are the relationships? You'll want to be able to track who created a Link, and who voted on it, and what that vote was (up/down). Do you want to allow Users to delete their account? That has implications: would you want to delete their votes, or the links they submit as well? Probably not, but relationships have consequences so choose wisely. You'll probably "rails generate Vote ..." which will create the model and your migration script. Reference the http://guides.rubyonrails.org/association_basics.html guide to determine how you want these to be associated.
7) Add a means to vote for or against a link. Update the routes.rb file. Add def blocks to the links_controller.rb. Again, look at what other's may have done if you get stuck.
8) Add some validation rules for your voting logic. Look at the options detailed at http://guides.rubyonrails.org/active_record_validations_callbacks.html.
---------------------------------------------------------------------------------------------------------------------
Possible Things to Address in Future (add to a specific meeting if you want)
- Introduction to some coding conventions in Ruby
- Tests in Ruby
- Questions about basic Rails, git, or deploying?
Agenda for Meeting: Week 3/4 (~20/21/22 Feb)
- Future Coursework: What do you want to learn next? How can I structure the curriculum in a way that helps you learn it?
- How to balance those folks who have experimented with X technology already when including it in coursework?
- Is there a possibility that the curriculum for every week could be initiated by a Lecture / Screenshare demo ( one or two sessions ) to conclude with submission of coursework?
- I think the course works best when we've got a more defined development activity to perform. I personally find that I'm less focused without a structured assignment. Part of the reason I signed up for this course was with an eye to such a structure, as opposed to trying to learn this on my own. So I'd like to see more programming assignments that exercise Rails capabilities, and less "free for all" type activities.
- Seconded.
- Agreed. I definitely miss more specific topics to build my skills. I think a more open-ended project would be useful towards the end of the course, not at the very beginning where we don't have enough grasp of the language.
- Any suggestions on what such assignments might look like?
- Actually, the first Rails tasks were good (Getting Started). So something that leverages the fact we now all should have a core Rails app to play with. I know you've said we should play, but I'm thinking if you gave a specific task instead that would be better, with instructions of how to get started on the effort at hand. If I knew Rails I'd be able to suggest tasks, but the difference between an exact assignment to complete and making up our own is with the former one is less likely to abandon an effort if one gets stuck. Maybe something that leverages the reading material from this past week. Sorry if I'm not being specific enough.
- I guess I'm "well educated" in the sense that I also need more defined "assignments"... I see some other classmates who could mess around and create something they wanted to build. I think that's great! My suggestion is may be those who had done that can create some assignments for others to follow and build the same things.
- I think most of us did authentication the next week. There are more ideas like maybe do a jquery gem and make form validation? Another idea I was thinking for mine is to have tags pulled out into a linking table or such so that it can be used as finding all blogs under that tag instead of just a string of tags. Maybe hook up the page to pull in tweets? How about file uploads (does Heroku allow that)? Really hope to do some testing frameworks too like cucumber.
- I still have not done the user authentication; so, I would appreciate doing this with maybe 'devise'?
- Perhaps people could submit task ideas. Those who are good at "vision" stuff may be able to provide project ideas for others. Only risk is that the proposed tasks may be too ambitious.
Agenda for Meeting: 30 Jan
Add what you want to talk about as bullet points!
- Ruby Koans Questions
- ./about_iteration.rb:64: def test_inject_will_blow_your_mind #Question: It's blowing my mind alright! (Can you talk a bit about inject?) http://blog.jayfields.com/2008/03/ruby-inject.html
- ./about_scope.rb:33: assert_equal true, Jims::Dog != Joes::Dog #Question: How do u read this?
- ./about_scope.rb:50: assert_equal true, ::String == "HI".class #Question: What's prefix scope operator?
- ./about_control_statements.rb:111 when's the line after "next if" happen? I thought it would happen if the if statement were true
- ./about_methods.rb:112 Is the only reason the method is private because of "private :my_private_method" after the def? Can't do "def private my_private_method"? Later we have private before a def. When does that scope end?
- ./about_hashes.rb: 31 Why was "expected" broken out into a variable rather than used as a literal?
- assert_equal true, "one two-three".sub(/(t\w*)/) { $1[0, 1] } - tried to understand but could not
- ./about_methods.rb:54: assert_equal [1, :default_value], method_with_defaults(1) #Question: not sure what is going on here
- ./about_methods.rb:60: def method_with_var_args(*args) #Question: what is the * ?
- ./about_true_and_false.rb:4: def truth_value(condition) #Question: Is this convention version specific? I get a syntax error when I try to run a test program.
- ./about_classes.rb:162 assert_equal <Dog named 'Fido'>, fidos_self I get the syntax error when I try to solve this.
- Groking "yield" - it's not clear to me when I would use this. <= THIS!
- Week 2 Coursework Overview
- Setting up a Basic Rails Project
- Demo of Deploying to Heroku