勉強日記

チラ裏

2019-11-01から1ヶ月間の記事一覧

phanコンテナイメージを作った

きっかけ 作ったイメージ Dockerfile 学び きっかけ https://packagist.org/packages/phan/phan こーゆーのでいいんだよ、こーゆーので… pic.twitter.com/PjBb3bq1PS— っどさん (@tadsan) 2019年11月29日 @tadsanさんがphan/phanのイメージを作っていた 初め…

Version Control with Git ch12 Remote Repositories (1/x)

shop.oreilly.com Remote Repositories Repository Concepts Bare and Development Repositories Repsitory Clones Remotes Tracking Branches Referencing Other Repositories Refererring to Remote Repositories The refspec Example Using Remote Reposi…

【解決】docker on WSL2 で、docker image build時にネットワークエラー

環境 現象 結論: dockerdの設定で解決 詳細 composerのinstallerが降ってこない composer.pharが降ってこない composerライブラリが降ってこない 解決 所感 環境 Windows 10 PRO 19030.1 WSL2 Ubuntu-18.04 docker on WSL2 docker --version Docker version …

Version Control with Git ch9 Merges (3/3)

shop.oreilly.com Merges(続き) Applying Merge Startegies コラム: Using ours and subtree Merge Drivers How Git Thinks About Merges Merges and Git's Object Model Squash Merges Why Not Just Merge Each Change One by One? Merges(続き) Applying M…

Version Control with Git ch9 Merges (2/3)

shop.oreilly.com Merges(続き) Merge Strategies Degenerate Merges Normal Merges Resolve Recursive merges Octopus merges Specialty Merges Ours Subtree 英語 Merges(続き) Merge Strategies criss-cross mergeで必要となる概念 merge-baseをうまく決…

Clean Cocder ch2 (2/2)

www.oreilly.com Saying No(続き) The Cost of Saying Yes Is Good Code Impossible? The Typical Project Proposal Two Weeks to Completion The Clients Never Care as Much as You Do Result? Rush to Complete, Slow to Market Code Impossible 英語 Say…

Version Control with Git ch9 Merges (1/3)

shop.oreilly.com Merges Merge Examples Preparing for a Merge Merging Two Branches A Merge with a Conflict Working with Merge Conflicts Locating Conflicted Files Inspecting Conflicts git diff with conflicts git log with conflicts How Git Ke…

Clean Coder ch1 Professionalism

www.oreilly.com Be Careful What You Ask For Taking Responsibility First, Do No Harm Do No Harm to Function QA Should Find Nothing You Must Know It Works Automated QA Do No Harm to Structure Work Ethic Know Your Field Continuous Learning Pr…

Version Control with Git ch11 The Stash and the Reflog

shop.oreilly.com The Stash The Reflog 英語 The Stash ユースケース 割り込みタスク indexとworking directoryをWIPとしてすばやく退避する dirty treeへのpull インデックスと作業ディレクトリをstashに退避してからgit pullする cf. ブランチ切り替え ブ…

Version Control with Git ch10 Altering Commits

shop.oreilly.com Altering Commits Philosophy of Altering History Caution About Altering History Using git reset Using git cherry-pick Using git revert reset, revert, and checkout Changing the Top Commit Rebasing Commits Using git rebase -i…

Git Submodule と Git Subtree 練習・まとめ

モチベーション 予習 最初の状態 最終的な状態 git submodule submodule切り出し submodule取り込み git subtree モチベーション Laravelアプリケーションで、docker実行環境とmigrationを別repositoryに切り出したい docker実行環境 ... git submodule 他ア…

PHPUnit自作アサーション/HTMLを解析するテスト3 動線の存在のテスト、negate, composition

動線の存在のアサート phpunit_constraints/HtmlAssertions.php at master · wand2016/phpunit_constraints · GitHub 否定形のアサート phpunit_constraints/HtmlAssertions.php at master · wand2016/phpunit_constraints · GitHub モチベーション 画面遷移…

PHPUnit自作アサーション/HTMLを解析するテスト2 アトリビュートのConstraint

Constraint phpunit_constraints/HtmlNodeAttribute.php at master · wand2016/phpunit_constraints · GitHub Assertion phpunit_constraints/HtmlAssertions.php at master · wand2016/phpunit_constraints · GitHub モチベーション HTML要素のアトリビュー…

The Clean Coder ch2 Saying No (1/2)

www.oreilly.com Saying No Adversarial Roles What about the Why ? High Stakes Being a "Team Player" Trying Passive Aggression 英語 Saying No 権力に対してもNoと言うのがプロ Noと言う勇気 奴隷はNoと言えない 労働者はNoと言うのを遠慮してしまう …

Version Control with Git ch8 diffs

shop.oreilly.com Diffs Forms of the git diff Command Simple git diff Example git diff and Commit Ranges git diff with Path Limiting Comparing How Subversion and Git Derive Diffs 英語 Diffs diffが提供するもの 2つのファイルがどのように異なる…

PHPUnit自作アサーション/HTMLを解析するテスト

github.com モチベーション 作ったもの 依存 つかいかた future work モチベーション '19/11/16時点で、フロントエンドで高度なことをせず、サーバが返したHTMLをそのまま返すような古き良きアプリケーションの開発に携わっている AjaxでJSONに色を付けたり…

はじめてのPHPUnit自作アサーション

モチベーション アサートのロジックをDRYにしたい テストの出力結果をprettyにしたい 雑にtraitとかに切り出すのではなく、プロジェクト横断的に使いまわしたい 作ったもの github.com 参考: 公式ドキュメント 集合の一致のアサーションを作ってみた 正確に…

The Clean Coder Preface

www.oreilly.com 著者本人の序文 チャレンジャー号事件の話 事故の原因は、発射当日の気温が低く、Oリングが弾力を失い、高熱ガスがリークしたこと 気温はセ氏-8度、下限温度よりも華氏で約13度低かった 【補】ググると資料ごとに温度が全然違うんですけど… …

The Clean Coder Foreword

www.oreilly.com Matthew Heusser氏による序文 Matthew氏は技術サイドPM、Joe氏はビジネスサイドのPM 技術チームがJoe氏からプロとして見なされていなかった話 法務チームはマイクロマネジメントされないのに、技術チームはされる 当時は技術チームこそ「プ…

現場で役立つシステム設計の原則 ch10

gihyo.jp オブジェクト指向を学ぶハードル オブジェクト指向の説明は意味が不明 なぜオブジェクト指向で設計すると良いのかがわからない オブジェクト指向をどうやって学ぶか 既存のコードを改善しながらオブジェクト指向設計を学ぶ 実際のコードで設計の違…

WSL2に別ホストからssh接続・X11Forwarding

モチベーション ネットワーク Windows Host1の設定 Windows-> WSL2のポートフォワーディング sshの設定 ファイアウォールの設定 Windows Host2からSSH接続・X11Forwarding モチベーション 2019年11月時点で、WindowsでWeb開発するときはWSL2環境に閉じこもっ…

ブラウザ上端にひっつくテーブル見出し

github.com 必要になったので 動作環境 Chrome FireFox Edge IE Array.fromが使えないがこれは別件 しくみ 同じ内容のテーブルを2枚重ねているうんこ実装だったのをテーブル1枚+CSSのtransformにリプレース <td>,<th>のborderはtransformに追従してくれないので、td:</th></td>…

Laravel5.5 ログ出力内容をテストする

モック?フェイク? (よくわかってない) github.com モチベーション ログ出力要件に対応する自動テスト ログイン成功時 例外発生時 環境 Laravel 5.5 LTS アプリケーションコード routes/web.php get('/', function () { Log::notice('アクセ…

LaravelでPDOのモックテスト2

【Laravel】DBエラー時のシナリオのテスト - 勉強日記の続き github.com モチベーション DBエラー時の雨の日シナリオのテストをしたい PDOモック作成・セット側

現場で役立つシステム設計の原則 ch9 オブジェクト指向の開発プロセス

gihyo.jp 開発の進め方はオブジェクト指向で変わったのか 開発の基本はV字モデル 短期間で開発し修正と拡張を繰り返すことが重要になった オブジェクト指向の開発はうまくいっているのか/どちらのやり方でも変更がやっかいなソフトウェアが生まれやすい ドメ…

現場で役立つシステム設計の原則 ch8 アプリケーション間の連携

gihyo.jp アプリケーションとアプリケーションをつなぐ ほかのアプリケーションとの連携がアプリケーションの価値を高める アプリケーションを連携する4つのやり方 Web APIのしくみを理解する HTTP通信を使ったアプリケーション間の連携の4つの約束事 要求の…

Version Control with Git ch7 Branches

shop.oreilly.com Branches Reasons for Using Branches コラム: Branch or Tag? Branch Names Dos and Don'ts in Branchs Names Using Branches Creating Branches Listing Branch Names Viewing Branches Checking out Branches A Basic Example of Checki…

現場で役立つシステム設計の原則 ch7 画面とドメインオブジェクトの設計を連動させる

gihyo.jp まとめ 画面アプリケーションの開発の難しさ 画面にはさまざまな利用者の関心事が詰め込まれる 画面に引きずられた設計はソフトウェアの変更を大変にする 関心事を分けて整理する 画面の関心事を小さく分けて独立させる 複雑な画面は異なる関心事が…

現場で役立つシステム設計の原則 ch6 データベースの設計とドメインオブジェクト

gihyo.jp テーブル設計が悪いとプログラムの変更が大変になる データの整理に失敗しているデータベース データベース設計をすっきりさせる 基本的な工夫を丁寧に実践する NOT NULL制約が導くテーブル設計 一意性制約でデータの重複を防ぐ 外部キー制約でテー…

Use Case Driven Object Modeling with UML Theory and Practice ch1. Introduction to ICONIX Process (2/2)

ICONIX Process in Theory (つづき) Detailed Design Sequence Diagramming (Allocate Behavior to Classes) Cleaning Up the Static Model Milestone 3: Critical Design Review Implementation Implementation (Coding) Unit Testing Expand Threads for I…