This file contains hidden or 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
public class PascalHumanizerTests(): Spek() {{ | |
val data = listOf( | |
"ThisIsATest" to "This Is A Test", | |
"ThisIsAnotherTest" to "This Is Another Test" | |
) | |
givenData(data) { | |
val (input, expected) = it | |
on("calling humanize", { |
This file contains hidden or 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
public class PascalHumanizerTests(): Spek() {{ | |
val data = listOf( | |
"ThisIsATest" to "This Is A Test", | |
"ThisIsAnotherTest" to "This Is Another Test" | |
) | |
given(data) { | |
on("calling humanize", { | |
val actual = it.component1().humanize() |
This file contains hidden or 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
fun String.extendingStrings() { | |
} | |
data class ThisDto(val nameProperty: String, val emailProperty: String) // DTO | |
// gives me hashCode, toString, equal operator (comparing properties) and two immutable properties name, email | |
This file contains hidden or 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
var REVEALING = function () { | |
var privateProp = "Log"; | |
var PIVALUE = 3.14; | |
log = function (message) { | |
console.log(privateProp + ": " + message); | |
}; |
This file contains hidden or 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
val server = AppServer() | |
server.serveStaticFilesFromFolder("/public") | |
server.useBasicAuthentication("private-area", path = "/private", callback = { (user, pass) -> user == pass }) | |
server.get("/headers", { | |
request.rawHeaders.forEach { | |
println("${it.first}: ${it.second}") | |
} | |
response.send("Hello!") |
This file contains hidden or 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
val http = EasyHttp() | |
http.post( | |
url = "http://httpbin.org/post", | |
contents = Customer(name = "Joe", email = "[email protected]"), | |
headers = RequestHeaders(contentType = "application/x-www-form-urlencoded"), | |
callback = { assertEquals(StatusCode.OK, statusCode) } | |
) |
This file contains hidden or 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
var o = Observable.from(arrayListOf("1", "2", "3", "4")) | |
o.subscribe( | |
onNext = { result -> println(result)}, | |
onError = { (error) -> println(error)}, | |
onComplete = { () -> println("Complete")} | |
) | |
This file contains hidden or 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
fun main(args: Array<String>) { | |
val httpClient = HttpClient() | |
httpClient.get("http://site.com") { | |
println(body) | |
} | |
} | |
This file contains hidden or 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
fun main(args: Array<String>) { | |
val httpClient = HttpClient() | |
httpClient.get("http://site.com") { response -> Unit | |
println(response.body) | |
} | |
} |
This file contains hidden or 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
1. It's a boy's club (by and large) | |
2. The submission process is major pain. 100 fields to fill out | |
3. They want it to be focused entirely around Microsoft products, and giving little attention to other important values of software development. | |
4. They don't cover travel expenses unless you know somebody or fight for it. And covering for some and not all is wrong. | |
5. They want to review your presentation and have the right to modify it if they want. | |
6. It's hardly about development anymore, but IT. | |
and finally, the whole conference is a lot of hype and somewhat arguable formalities. | |