Notes for Ruby Beginners' Meetup 2012-08-08

76 views
Skip to first unread message

Igal Koshevoy

unread,
Aug 9, 2012, 11:14:34 AM8/9/12
to pdxruby-...@googlegroups.com, Portland Ruby Brigade
About 14 people came to yesterday's Ruby Beginners' Meetup and we had many good Ruby and other geek-related discussions. For many, this was their first meetup.

For those wanting to get the most out of these events, I recommend coming in with a list of specific things you're having trouble with because this makes it much easier for those of us asking, "What do you need help with?". If you can show us the actual code you're struggling with or the bizarre error message you're getting, that also makes it easier. :]

Also, remember that there are tons of notes linked off the new http://pdxruby.org homepage, and I'll link add this thread shortly after this is posted.

Here are my notes for the discussions I was in. It'd be great if others could post notes about their discussions: 
  • Social stuff:
    • Make it easy for people to find you in the pub by putting up signs. It's as simple as folding a piece of paper in half to make a "/\"-like tent-shape and writing "Ruby" on it.
    • If you don't know someone, introduce yourself. Ask people with laptops nearby if they're here for the event, because they may be, are totally new and either haven't introduced themselves or had anyone talk to them yet.
    • Post notes and encourage others to do so <grin> because many useful things are discussed. Most of those at the event miss out on conversations happening at other tables, so share notes for their sake and those that couldn't attend.
  • Complicated views:
    • Ask yourself and your client if you really, really need such a complicated view, because you often don't.
    • Break views up into partials. Read http://goo.gl/hCKMF and these http://goo.gl/WU2Wp
    • Do as much of the work in your controller, model or decorator/presenter, so your views contain mostly markup, which makes them much easier to work with.  
    • Consider using Draper decorators to avoid writing problematic Rails helpers and polluting your models with view-related code:  http://railscasts.com/episodes/286-draper
  • Blogs, CMS, and static sites
  • Miscellaneous Ruby
    • You'll often see code like:
          link_to "Destroy!", thing_path(@thing), :confirm => "Really?", :method => :delete
      The above may seem very confusing because there's an apparent mishmash of arrays and hashes. The above can be more easily understood as a shorthand for this equivalent code below:
          link_to("Destroy!", thing_path(@thing), { :confirm => "Really?", :method => :delete })
      The above is just an array with three items, and the last one is a hash. The curly braces on that hash are optional, unless you want to add another item to the end of the array, e.g.:
          link_to "Destroy!", thing_path(@thing), { :confirm => "Really?", :method => :delete }, :kittens
  • Tools and their uses:
    • RVM installs and manages Ruby interpreters. This is a big deal because most OSes and distributions  don't ship a sane Ruby environment even if they offer Ruby packages -- e.g. OS X, Debian and Ubuntu have historically been full of fail in this regard. Learn more about RVM at  https://rvm.io/ . I personally prefer RVM to rbenv for development, but rbenv is a similar and useful tool: http://goo.gl/hi48s
    • Ubuntu is a popular Linux distribution. It was the most popular OS seen at the meetup. This is unusual and exciting because for years, I'd often be the only person not using a Mac in the room.
    • SublimeText is a friendly yet powerful text editor that seems to be quickly growing in popularity. It runs on Mac, Windows and Linux. It's not free nor open, but is affordable: http://www.sublimetext.com/
    • Sass makes CSS not suck as much. Learn more at  http://sass-lang.com/
    • CoffeeScript makes JavaScript not suck as much. Learn more at  http://coffeescript.org/
    • Git:
      • `git rebase` is one of my favorite git features because it lets me commit willy-nilly as I experiment and otherwise focus on figuring out how to implement something, and then when done, I use rebase to cleanup my commit history into a set of clean, clear and logical commits that make it look like I knew exactly what I was doing. This makes readingcommits later much easier, which is very helpful if you're working with others. WARNING: Rebasing is about as complex as git gets, but is still worth learning. WARNING: Do not rebase and `git push --force` to your shared repository (e.g. github), because anyone that's checked out your code will have trouble pulling and merging code, which will make your co-workers sad -- only rebase stuff that you haven't pushed yet. Information about rebase: http://goo.gl/9s5RQ
      • `git merge` conflicts can be daunting. Here are some tutorials, hopefully one of their explanations will make this clearer to you: http://goo.gl/oQBjN and http://goo.gl/jkIc4 and  http://goo.gl/hg75f 
      • GitX is a  friendly, Mac-only GUI git tool that makes it easy to visualize commit history, see changes and commit them: http://gitx.frim.nl/
      • git-gui is a cross-platform GUI git client that makes it easy to see changes and commit them. Scroll down this page a bit for a tutorial: http://goo.gl/hCvPq
      • gitk is a cross-platform GUI git  visualizer that makes it easier to understand your commit history. Tutorial http://goo.gl/5PQaM && http://goo.gl/qXQJV

If you have comments on my notes, or more notes of your own, please reply.

Thanks,

-igal

Bryan Paronto

unread,
Aug 9, 2012, 12:52:59 PM8/9/12
to pdxruby-...@googlegroups.com, Portland Ruby Brigade
Thanks for the great notes Igal! 

I'll have to make more of an effort to put myself out there at meetups. Once I started talking to folks the fun really started.

It was great making your acquaintance and I hope to see you around!

- Bryan Paronto
Reply all
Reply to author
Forward
0 new messages