Shell• For years, I used bash • GNU Bourne-Again Shell• I recently switched to zsh• I use the plugin, “oh my zsh”• Did it change my life? No. • But some things are easier
Better things• Easy-to-customize prompt• Saner history (across terminal tabs)• Automatic updates of oh-my-zsh• One conﬁguration ﬁle (.zshrc)
Things I use often• C-z (suspend) and fg• Emacs keybinding• C-r (reverse search• Customized prompt
iTerm2• The OS X terminal is OK• iTerm used to be much better• Recently rewritten as iTerm2• I use very few of the features • Lots of tabs, though!• My favorites: Search, movie playback
rvm• Don’t develop in Ruby without rvm• Really, it’s amazing• I use 1.8.7, 1.9.2, and JRuby day to day • Learn about updates!• .rvmrc for each project I work on• Gemsets vs. bundles — bundles are winning
irb• I use irb (or the Rails console) every day• If you’re programming in Ruby, then you should probably have IRB open always!• Every piece of code I write, more or less, is tried in IRB ﬁrst• Debugging largely happens for me in IRB
Gems for IRB!• There has been an explosion of IRB- enhancing gems• I’ll present some of them• Most or all of these are from the “irbtools” gem, which packages them together
ap• “Awesome print” — and it is!• Data structures look nicer, in color
Sorted methods!• How often do you write foo.methods.sort• Now you can just write foo.methods
every_day_irb• Puts shell commands in IRB! ls cat pwd
;nil after long evals• Cute trick: If you’re reading a lot of data, add ;nil• to the end of your command, so that IRB won’t print it all.
hirb• Shows data in a table• Sort of like ap, but for to_s• Better with ActiveRecord output• If you want to disable it (I do by default), just set Hirb::View.disable, or Hirb::View.enable
sketch• Anonymous edits• Named edits• Great with emacsclient (for Emacs users) sketch sketch :foo
GNU Emacs• One True Editor• I’ve used it since 1988 (yes, 1988!)• More operating system than editor• Conﬁgure it in Emacs Lisp • Full, Turing-complete language with oodles of functions for text, ﬁles, networks, and psychoanalysis
Required anti-vi jokeSubject: Re: HELP: music for cl, vi, vlc, piDate: 14 May 1996 10:35:43 +0200Alan> vi doesnt play music.David> Sure it does.In fact, vi has a special mode just for music. If youare not in insert mode, you are in `beep mode:whatever you press produces a beep. In the besttradition of vi, there is of course just one note(you know: small is beautiful) but this is just oneof those reasons why vi hackers love vi.
Snippets• TextMate fans, rejoice — Emacs has snippets, too! • It has had “abbrevs” forever• Even import TextMate snippets• I don’t use these that much, to be honest
Intellisense?• Everyone in Israel asks about it!• Emacs has a few options that come close• I’ve used it on a few occasions, but never really liked it
Flymake• Check your syntax (with a background Ruby process) as you type!• Errors? The line appears in red
Ruby electric mode• Inserts extra quotes, braces,• Also inserts “end” after class, module, if, etc.
Rainbow delimiters• Fancy braces!• Each set of parens/braces gets its own color• Lovely when you have a hash
Rinari• Rinari Is Not A Rails IDE• Keyboard shortcuts to jump to related parts of the code• Tries to be minimal• There’s also emacs-rails — more functionality, but updated less frequently
ERb and Haml• Handles colorizing, indenting• Flymake works inside of ERb, also!
Switching buffers• From controllers (C-c ‘ f c) — functional tests (C-c ‘ f t)• Models (C-c ‘ f m) — unit tests (or C-c ‘ f t)• Switch to the log (C-c ‘ f o)
Tags• Index of names in your ﬁles• Jump to the right ﬁle/line• Even search/replace• I go back and forth on using tags ... they work really well, but I’m often too lazy, and end up using “git grep”
Emacs server• If you’re starting Emacs more than once a day, then you’re doing something wrong• Open buffers• Connect from outside • e.g., sketch (from before, in IRB)
Magit• Use Git from within Emacs! • Stage, Commit, Stash • Branch, Merge • Push, pull• Fully integrated, and works really nicely
Macros• Record a macro• Replay any number of times• Super-duper useful, especially when converting ﬁles
Firefox plugins• I use Firefox as my main browser• Not the fastest (for now!)• Not updated like Chrome (for now!)• But it has excellent plugins
Web developer• “View Generated HTML” — my favorite!• Also:View HTTP request, response headers• Mark items with boxes
Growl• Notiﬁcation system under OS X• Autotest + Growl gives me nice output for red/green• Just require “autotest/growl” in your ~/.autotest ﬁle
Pow• Finally, I have to run things locally• 37signals recently released Pow for OS X• (There’s talk of doing it for Linux, too)• Super-duper easy: • symlink from ~/.pow/foo to project foo • Now go to http://foo.dev !
Thanks!(Any questions?) email@example.com http://www.lerner.co.il/ 054-496-8405“reuvenlerner” on Skype/AIM