- 分岐は少なければ少ないほうがよい
- とはいえ絶対に必要なのでどうすればよいか?
- ネストを減らす
- 分岐を仮に愚直にやっていくとn乗オーダーで処理が分かれていき,とてもじゃないが読めない
- 統一感,対称性を持たせる
- 適切なメソッド化をする
- 分岐は処理の流れが変わるという重要な役割をもつため.分岐をするのであれば分岐をするという役割でメソッドを1つ切る(dispatcherが典型)
- ネストを減らす
warden をベースにした Ruby on Rails のための認証管理 gem で、Rails 開発では広く一般的に利用されている。認証まわりの「よくあるやつ」を包括的に提供してくれる。
- database_authenticatable : パスワードのハッシュ登録・検証機能の提供、認証方式に POST か BASIC 認証がある
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
| # coding: utf-8 | |
| CC = "gcc" | |
| desc "clang fizzbuzz" | |
| task :default => "fizzbuzz" | |
| file "fizzbuzz" => "fizzbuzz.o" do | |
| sh "#{CC} -o fizzbuzz fizzbuzz.o" |
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
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>カレーのレシピ</title> | |
| <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous"> | |
| <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script> |
- CAモバイル
- シーエー・モバイル新卒エンジニア技術研修2016 - (2016/06/07)
- DeNA
- 大規模Perl初心者研修を支える技術 - (2013)
- 新人エンジニア研修ですべきことできることを聞いてきた! - (2014/02)
- Developers Summit 2014 で新卒エンジニア研修についてお話してきました
- DMM.com ラボ
- DMM.comラボ16新卒エンジニア研修 - (2016/08/24)
- GREE
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
| <% flash.each do |type, message| %> | |
| <div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
| <button class="close" data-dismiss="alert">×</button> | |
| <%= message %> | |
| </div> | |
| <% end %> |
NewerOlder