- 推測が必要なコードになってないか
- もっとシンプルに書けないか
- コードは読む時間のほうが長い
- 読む時にIDEを開きたくならないか
- 早すぎる最適化が行われてないか
- コードから仕様が見えるか
- どうしても見えない時はコメントを書く
- 不安な部分がないか
- クラス、メソッドは一言で説明できるか
- 参照透過性があるか
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 main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
type simpleHandler struct{} |
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
// 分割代入 | |
// 従来 | |
var numbers = [1, 2, 3]; | |
var a = numbers[0]; | |
var b = numbers[1]; | |
var c = numbers[2]; | |
a; | |
b; | |
c; |
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
import scala.concurrent.{Await, Future} | |
import scala.concurrent.duration._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.util.{Failure, Random, Success} | |
object Example1 extends App { | |
def sleep(time: Long) { Thread.sleep(time) } | |
implicit val baseTime = System.currentTimeMillis | |
// 別スレッドで計算開始 |
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
cl_interp "0" | |
cl_interp_ratio "1" | |
cl_interpolate "1" | |
cl_lagcomp_errorcheck "1" | |
cl_lagcompensation "1" | |
rate "786432" | |
cl_cmdrate "128" | |
cl_updaterate "128" | |
snd_mixahead "0.025" | |
fps_max "300" |
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
object Main { | |
def main(args: Array[String]): Unit = { | |
val v1: Either[String, Int] = Right(123) | |
val v2: Either[String, Int] = Left("abc") | |
v1 match { | |
case Right(i) => println(i) | |
case Left(s) => println(s) | |
} // 123 |
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 tdd | |
import ( | |
"fmt" | |
"reflect" | |
) | |
// Semver a | |
type Semver struct { | |
major uint |
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
# General API Info | |
| annotation | description |example | | |
|--------------------|----------------------------------------------------------|---------------------------------| | |
| title | **Required.** The title of the application. | // @title Swagger Example API | |
NewerOlder