Review
Topics Covered: Charting with lazy_high_charts
Exercises
Some Valuable Gems (Informative snippets, that is)
- Hook up your app correctly. This means making your links and forms go to where the action will happen, not the page that you want to end up at. For example, if you are clicking a link to add a friend, sure you want to end up back at that user's profile page, but you must have that link go to the correct controller/action (friendships#create). You can always redirect later.
- Make the most of sublime. Every time you switch to a file in sublime that is not the one you're looking for, close it. You should really only have 2 or 3 tabs open that you are working on. This will make it much easier to switch between them. Later, when you need those other files, it will be easy to open them with Cmd-T or Ctrl-P.
- Bundle in your server tab. This is a great way to ensure that you never forget to restart you server. Stop your server, bundle, and start it again all from the same Bash tab.
- Be wary of creating new actions/controller. Every time that you are implementing a new feature, think carefully about whether or not that feature fits nicely into a CRUD action in a preexisting controller. For example, if a button says "Add Friend", you may be tempted to add an
add_friend
action to the user controller, whereas really, it should go in the friendship controller create
action.
raise
is your friend! raise
is a great debugging tool that helps you verify that you application is hooked up the way that you think it is. It's function is to stop your application right where you placed it and to throw an error. Used with better_errors
this is sort of like a quick binding.pry
!
Projects
Now that you have some ideas about what makes a good presentation, think about what you want to include in your final pitch and how you want it to go overall. We're rooting for you to create an informative and engaging presentation! Finally, practice, practice, practice as a team and time yourself!