-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event Manager Re-Write #326
Comments
👍
👍
Seems okay, I guess. I'm torn; people should almost never be writing their own parsing stuff, so I like giving them the idea that they should go straight to the library.
👍, though I'll miss the refactoring fun of phone numbers.
👍
👍, and it comes with Ruby.
I don't think bindings are a big deal. "We need some sort of context to evaluate options when it's being generated," done. We gloss over lots of things, I don't think one more is a big deal.
Exactly. I've been wondering if maybe gasp we should make our Rails projects stick to Rails defaults, like ERB and minitest.
I haven't read this part yet, but I really think that stressing refactoring as you go is a good idea. |
The tutorial does some refactoring throughout. Like creating a method for zipcode cleaning, refining the way zipcodes are processed, etc. It just adds a bonus full refactoring to classes for more of the sub-components and moving classes into separate files. |
I like your thinking. |
Hey guys, I hope it is okay to jump in. I am a Ruby newbie that just started this tutorial. I've hit a wall and thought I would check it out on GitHub. I've been trying to refactor "clean_number" into its own method for about 30 minutes now. I'm guessing it's because I'm a complete newbie and missing something very simple, but that is also why I would like to help make it easier for beginners like myself. Personally, I enjoy the refactoring until it gives me problems. =) Please let me know what, if anything, I can do to help. Also, if someone could help me out with my current bug, I'd greatly appreciate it and would love you forever. Thanks! |
Hey @Drekonus ! How about this: send me an email, and we'll work through it. Then, if there's a way we can make the tutorial better, we can bring the discussion back here. What do you think? [email protected] Just show me where you're at so far. :) gist.github.com is useful to share code through emails. |
@burtlo This sounds cool, but could it be ready when we need it on 1/29? |
Is this going to happen? |
I sat down to re-create the event manager tutorial awhile back thinking about how I would build it and I came up with a different solution. Before I actually write the accompanying text to support the tutorial I would like to talk the changes that I am proposing.
https://github.com/JumpstartLab/event_manager_tutorial/commits/master
The current tutorial has you generate a class and class structure way before I believe it is necessary.
I distilled down some of the important rows of the attendees file into a smaller file. This makes it easier to view the output when you run the application. It does not make thousands of queries to the sunlight API.
Previously the tutorial goes right to the CSV library. I felt it was important to show them how to use File first. The tutorials uses the CSV library when starting to deal with the difficulties of the header row, the column names etc.
The first task for the student is to parse and clean phone numbers. However, nothing is done with the phone numbers. Jeff had suggested that he would like for the tutorial to get to the fun parts (e.g. Using an external service like Sunlight) sooner and so in this version the phone number parsing has been removed.
The zipcode problem is interesting enough and most importantly gets you good data which you can use immediately with the Sunlight API.
Steps through the building and collecting specific legislators information to populate in a form letter.
The tutorial previously used a custom template solution. I felt it was clear and effective. I thought that it would be a good idea to introduce students to ERB.
When I finished writing this section I realized that ERB uses
binding
and that might be large of concept to explain at this stage. So I am torn.I like the idea of using ERB, because it sets the student up for familiarity with ERB later when working with Rails.
I dislike the idea because of having to work with bindings.
At the end, as opposed to various parts in the middle, some refactoring is done to create common objects (e.g.
EventManager
,Zipcode
) and separated into individual files.The text was updated successfully, but these errors were encountered: