Created
July 17, 2017 12:00
-
-
Save glava/9b099417f0b586a71d99ec44d9a05dd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
import java.util.Date | |
object IdeOverview { | |
/* | |
* Basic stuff: | |
* | |
* - double shift - access to everything | |
* - cmd + shift + a - access to commands | |
* | |
* - moving lines around: cmd + shift + up/down arrow | |
* - alt + backward - delete word at the time | |
* - alt + up arrow - extend selection | |
* | |
* - deleting the line - cmd + backspace | |
* - cutting the line - cmd + x | |
* | |
* - ctrl + g - expanding selection | |
* - ctr + cmd + g - grab everything | |
* | |
* */ | |
def iShouldBeSecond = "i'm second but why i'm first" | |
def iShouldBeFirst = "sad story bro cause i'm first first" | |
/*navigation and refactoring | |
* | |
* cmd + e - recent files | |
* cmd + o - open class | |
* cmd + shift + - open file | |
* alt + cmd + left/right - going back and forward between files | |
* | |
* */ | |
def grind(q: Int) = { | |
/// code that grinds | |
q | |
} | |
def brew(q: Int) = { | |
// code that brews | |
q | |
} | |
/* | |
* Find usage: alt + F7 | |
* Jump to definiion: cmd + b | |
* What you want: cmd + p | |
* | |
* */ | |
def coffeeTime(q: Int) =brew(grind(q)) | |
/*code formatting and import optimization | |
* | |
* make it [l]ovely -cmd + l | |
* optimize imports - ctrl + alt + o | |
* check for yellow highlighting | |
* */ | |
/*refactoring | |
* | |
* - renaming - cmd + f6 | |
* - extraction | |
* */ | |
/*debugging*/ | |
def main(args: Array[String]): Unit = { | |
coffeeTime(5) | |
val coffee: Coffee = ??? | |
// devil is in the details | |
// variable not used ??? | |
// lets interpolate string | |
// lets pattern match | |
// lets add git | |
} | |
sealed trait Coffee | |
trait GoodCoffee extends Coffee | |
trait BadCoffee extends Coffee | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment