IDE, Terminal and SCM to work with Ruby on Rails
description
Transcript of IDE, Terminal and SCM to work with Ruby on Rails
IDE, Terminal and SCM to work with Ruby on Rails
Henry Le
1. Integrated Development Environment (IDE)
1.a IDE vs Editor• IDE (integrated development environment): make software
development faster, usually provide code auto-completion; refactoring support; fast find of files, function, class; debug support; integrated build tools; source control management …
• IDE examples: Netbeans, Eclipse, Sublime, Ruby Mine, Aptana Studio…
• Text Editor: provide plain text editor, sometimes also provide syntax highlighting
• Text editor examples: notepad, gedit, TextMate, vim, …
1.b What IDE is popular for RoR?
• In Ruby on Rails community, Sublime and Ruby Mine are the 2 most popular IDEs that everyone usually use in Mac OS and Linnux.
• For Windows Rubyist, they usually use Netbeans, Aptana and Sublime.
Ruby Mine
Netbeans
Sublime
1.c Sublime Packages
• Sublime Packages are the way Sublime organisation its plugins, settings.
• For RoR developer, we can add more syntax plugins to have much better code highlighting.
Sublime Packages
Without sass plugin
With sass plugin
1.d Sublime Key Bindings and Settings
• Sublime settings store our config about writing code, page format, font type, highlight line, tab size … We can refer the Setting - Default file for the options supported.
• Sublime key binding store short cut definitions for Sublime commands. We can refer in Key Binding command for some examples to customise or add new ones.
Sublime Key Bindings
Sublime Settings
1.e Are Sublime Settings is important?
• This is short but important!
• Why? When work in a group, we need to make our code consistent with everyone and the code convention is one of the best key here.
Mix indentation formats
We don’t see the different in Editor but in Github they show very clear. It make reviewing pull requests more
difficult and confusing.
Indentation for 4 spaces or tab
Long indentation distance make it hard to follow the code follow, reduce ability to focusing when the line so long.
The best practises
https://github.com/bbatsov/ruby-style-guide
2. Terminal
Command line format customisation
• https://github.com/robbyrussell/oh-my-zsh
• https://github.com/zsh-users/antigen
Sample screenshot
Sample config
3. Source control management (SCM)
Git• Almost RoR developer use git as source control
management system.
• Why? Becasuse it’s very flexible, easy to use and make developer life happier. :)
• For more information and comparision, you can find at:
• http://stackoverflow.com/questions/871/why-is-git-better-than-subversion
• https://git.wiki.kernel.org/index.php/GitSvnComparison
Git flow overview
• Gitk (Linux)
• Git-cola (Mac, Linux, Windows)
• SourceTree (Mac, Windows)
• Linux user can not use SourceTree so a combine of gitk and git cola work fine also.
Git cola
Gitk
SourceTree
4. Conclusion
• Tools for software development are flexible and depend on which languages, platforms that your software written by.
• For Ruby on Rails, this slide has covered some tips and techniques on Sublime, Command Line customisation and Git flow tools.
Happy coding
Hope this help!
Preference
• http://sublimetext.info/docs/en/
• https://github.com/bbatsov/ruby-style-guide
• https://github.com/styleguide/ruby