- 今後コードレビュー時に「これってリーダブルコードの◯◯だよね?、こう直したほうがいいよね」と引用できレビューの時間の短縮化が実現できる。
- リーダブルコードに登場する特殊ワードをチームのコーディングの共通語とする。デザインパターンのカタログ的な考え。
- リーダブルコードを読んでない人も内容を短時間で把握できる。
- チーム全体のコードを読みやすくメンテナンスしやすくし品質をあげる。
- リーダブルコード教になりチーム以外にも広める。コードの品質が悪い人にはリーダブルコードの読書を進めてみる。ひどいコードのままコーディングしてもらうよりその時間を読書の時間に割り当てることも考える(結果的に時間が還元できるなら)。
- リーダブルコードに書いてあることが全てのプロジェクトに適用てきるわけではないけれでもコーディングルールを考える際の指針にすることはできる。
#リーダブルコード適用 チェックリスト
- コーディング初心者はコードを書いた後、コードレビューしてもらう前にこのチェックリストでセルフチェックをする
- (コーディング中級者の)レビューワーはこのチェックリストをチェックつけながらコードレビューをする
- コーディング上級者(もしくはリーダブルコードを暗記してる人)はこのチェックリストは必要ないが、プロジェクトのレビュー運営のポリシーによって使うこともある。
- チェックリストの内容がわからなかった場合はリーダブルコード要約、もしくは「リーダブルコード」自体を読んで確認する。
- 今すぐ直せないコードもあるため全てにチェックがつかないといけないわけじゃない、チェックできなかった理由をレビュー対象者と共有し議論し、改善できる点は今後に活かそう。
- チェックにひっかかった、悪いコードはアンチパターン集としてプロジェクトの大事な資産としてwikiなどに記録して勉強会などで紹介してみよう。
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
Siori@Siori-no-MacBook-Air:~/code/git_akb428/chino (master)$ brew install iftop | |
==> Downloading http://www.ex-parrot.com/pdw/iftop/download/iftop-1.0pre4.tar.gz | |
######################################################################## 100.0% | |
==> ./configure --prefix=/usr/local/Cellar/iftop/1.0pre4 --mandir=/usr/local/Cellar/iftop/1.0pre4/share/man | |
==> make install | |
==> Caveats | |
iftop requires superuser privileges. You can either run the program | |
via `sudo`, or change its ownership to root and set the setuid bit: | |
$ sudo chown root:wheel /usr/local/Cellar/iftop/1.0pre4/sbin/iftop | |
$ sudo chmod u+s /usr/local/Cellar/iftop/1.0pre4/sbin/iftop |
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
{ | |
"contributors": null, | |
"text": "ツイッター動画投稿テスト http://t.co/y9hjEfABw1", | |
"geo": null, | |
"retweeted": false, | |
"in_reply_to_screen_name": null, | |
"possibly_sensitive": false, | |
"truncated": false, | |
"lang": "ja", | |
"entities": { |
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
# A sample Gemfile | |
source "https://rubygems.org" | |
gem 'shangrila' |
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
SELECT h.follower, h.updated_at | |
from twitter_status_histories as h, | |
(SELECT id FROM bases WHERE twitter_account = 'usagi_anime' order by id desc limit 1) b | |
where h.bases_id = b.id AND h.updated_at < ? order by h.updated_at desc limit 100 |
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
$curl http://api.moemoe.tokyo/anime/v1/master/cours | jq . | |
{ | |
"4": { | |
"id": 4, | |
"year": 2014, | |
"cours": 4 | |
}, | |
"5": { | |
"id": 5, |
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
defmodule UnixTime do | |
def convert_date_to_unixtime(created_at) do | |
#JSTの場合9Hにしておく | |
epoch = {{1970, 1, 1}, {9, 0, 0}} | |
epoch_gs = :calendar.datetime_to_gregorian_seconds(epoch) | |
{{year, month, day}, {hour, minute, second, msec}} = created_at | |
gs = :calendar.datetime_to_gregorian_seconds({{year, month, day}, {hour, minute, second}}) | |
gs - epoch_gs | |
end |
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
USD | 日経株価 | ||
---|---|---|---|
2015/9/17 | 120.539 | 0 | |
2015/9/18 | 120.539 | 0 |
NewerOlder