Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Intellij IDEA: The Superior Code Editor

Intellij IDEA: The Superior Code Editor

An internal talk @SeatGeek given by @sddamico and @rickhanlonii

The gifs embedded in this talk do not work or function as intended, for more information on the slides without animations, consult the intellij documentation or the keybindings guides at the end. Thanks!

Stephen D'Amico

August 06, 2015
Tweet

More Decks by Stephen D'Amico

Other Decks in Programming

Transcript

  1. Learning [intellij] isn’t just important for your future; it’s important

    for our [company]’s future. – Barack Obama* Head of the Free World * he didn’t really say that
  2. When Your Editor Understands the Code You’re Writing… Navigation is

    Easier Navigate to class, method, symbol, declaration, etc. Editing is Faster Autocomplete, live templates, postfix completion, etc. Refactoring is Painless Extract methods, change method signatures, renames, etc. Testing is Simple Generate test classes, navigate to tests, Debugging is Powerful Breakpoints in code, tests, library sources, etc.
  3. Navigation • The editor is able to keep your code

    in memory and provide smarter navigation • Most editors have Find, Open, Jump to line, etc. to open specific classes or files, Intellij has that too • But when you have access to the AST… everything gets better • Intellij: Navigate to [class | symbol | symbol in class | line | declaration | implementation | super method | test for class | more and more ] • Key thing: camel case completion on everything: “SGTV” completes to “SeatGeekTextView”
  4. Live Templates • A few characters tab out to common

    code • psfs = public static final String • fbc = findViewById() (with cast) • fori = new for(int i = 0; i < x; i++) {} block • sout = System.out.println() • Tons more + you can create your own! Examples:
  5. Intent Actions • alt + enter • Auto-fix or perform

    common actions • Invert “if” condition • Select correct import • Inject language (more in a second!) • Bring variable into scope • Many more, can be expanded with plugins Examples:
  6. Language injections • Declare a string contains a certain language

    • Gain syntax highlighting, autocomplete, etc. • JSON • XML • SQL • Any language you have installed via plugins! Examples:
  7. Postfix Completion • Act like “fake” methods that autofill code

    • Improve speed and ease with common tasks • Creating a for loop over a collection (.for) • Making result of method call a local var (.var) • Casting a variable to another type (.cast) • More can be added by plugins! Examples:
  8. Inspections • Built-in static analysis to catches problems/smells • Classes

    exposed beyond scope • Spelling errors (great for Stephen) • Unused methods/parameters/fields • Naming convention violations • Methods with too many parameters warnings • As with all of these, many, many more Examples:
  9. AST Highlighting • Option Up / Down • Highlight increasing/decreasing

    scope • Highlight variable to rename • Highlight local block to extract method • Highlight method to extract method object • Highlight class to move to new location Examples:
  10. Testing • Navigate to Test • Auto create - template

    class • Running test method/class/file
  11. Debugging • Step through execution stack • See variable values

    next to their usages • Explore every value in entire stack call • Execute statements at position in stack
  12. Plus! • The whole IDE is customizable • Themes •

    Plugins • Editor Tabs • Code Style • Run Configurations • Fonts/Tabs/File Headers/and more! • The IDE is open source, so if there’s a particular bug that impacts you, or a feature that you want, you can fix it/build it yourself!
  13. Links and More • JetBrains Official Site: jetbrains.com • CheatSheet

    (for keybindings): www.mediaatelier.com/CheatSheet/ • ShortcutFoo (more keybindings): www.shortcutfoo.com/app/dojos/intellij-idea-mac • Key Promoter Intellij: plugins.jetbrains.com/plugin/1003