2019-08-01から1ヶ月間の記事一覧
はやい はやくなる前 申し込み 光BBユニットが届く つなぐ 何もわからない。俺たちは雰囲気でパソンココを繋いでいる ソフトバンク光が遅いからIPv6高速ハイブリッド IPv6 IPoE + IPv4にした はやい わあい 別プロトコルを使うことで、混雑している回線を避…
8/31に2月を作ろうとしたら3月になった例 どうしてこうなった 2019年8月31日に実行 Carbon::create(...$args)は大丈夫 Carbon::createFromFormat($format, $datetimeStr)が危険 回避方法 -- Ymd使え 8/31に2月を作ろうとしたら3月になった例 3月!? どうし…
テストコード作成補助まだまだ調整必要だけど捗りそうな感じになった pic.twitter.com/zy8c8IwmGe— 人魚姫ちゃん(D. Horiyama) (@wand_ta) August 30, 2019 ↑コンストラクタの名前を間違ってるのはご愛嬌 __constructが正しい 入れて満足してほとんど使って…
Added BEAR.Sunday contributors https://t.co/1xzI0ign2M @wand2016 https://t.co/RDW0BEFlPY Arigato! pic.twitter.com/2BoB8b2EOG— BEAR.Sunday (@BEARSunday) August 28, 2019 アイコンで草生える issue github.com PR github.com 反省点 静的解析を回さ…
www.pearson.com ISP: The Interface Segregation Principle ISP and Language ISP and Architecture Conclusion 英語 ISP: The Interface Segregation Principle SRPに則ってない User1はop1だけ利用 User2はop2だけ利用 User3はip3だけ利用 op1に変更を加…
www.pearson.com LSP: The Liskov Substitution Principle Guiding The Use of Inheritance The Square/Rectangle Problem LSP and Architecture Example LSP Violation Conclusion 英語 LSP: The Liskov Substitution Principle 置換可能性 o1: S o2: T P -…
martinfowler.com Repository How It Works When to Use It Further Reading コード例 英語 Repository Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects. Domain ModelとData Mapper…
martinfowler.com Metadata Mapping How It Works When to Use It コード例 Metadata Mapping Holds details of object-relational maping in metadata. O/Rマッピングのコードのほとんどは、フィールドの対応づけ DBのテーブルのフィールド メモリ上のオブ…
martinfowler.com Single Table Inheritance How It Works When to Use It コード例 英語 Single Table Inheritance Represents an inheritance hierarchy of classes as a single table that has columns for all the fields of the various classes. RDBは…
martinfowler.com Serialized LOB How It Works When to Use It Example: Serializing a Deparment Hierarchy in XML Serialized LOB Saves a graph of objects by serializing them into a single large object (LOB), which it stores in a database field…
martinfowler.com Data Transfer Object How It Works Serializing the Data Transfer Object Assembling a Data Transfer Object from Domain Objects When to Use It Further Reading Example: Transferring Information About Albums (Java) Example: Ser…
結論 背景 参考 原因 solution -- migrate:freshではなくmigrateを使用する migrate:freshとmigrateの違い migrate使用による高速化 sample code -- RefreshDatabaseトレイトをoverrideする 結論 テスト始動に70秒かかっていたのが一瞬で始まるようになった …
martinfowler.com Class Table Inheritance How It Works When to Use It Furhter Reading コード例 Class Table Inheritance Represents an inheritance hierarchy of classes with one table for each class. 1クラス1テーブル 抽象クラス含む How It Work…
martinfowler.com Principles in Refactoring Refactoring in a Code Review What Do I Tell My Manager? When Should I Not Refactor? Problems with Refactoring Slowing Down New Features Code Ownership Branches Testing Legacy Codes Databases Refac…
martinfowler.com Concrete Table Inheritance How It Works When to Use It Example: Concrete Players(C#) 英語 Concrete Table Inheritance Represents an inheritance hierarchy of classes with one table per concrete class in the hierarchy. 具象ク…
martinfowler.com Defining Refactoring The Two Hats Why Should We Refactor? Refactoring Improves the Design of Software Refactoring Makes Software Easier to Understand Refactoring Helps Me Find Bugs Refactoring Helps Me Program Faster When …
martinfowler.com Identity Map How It Works Choice of Keys Explicit or Generic How Many セッションに1つ クラス/テーブルにつき1つ Where to Put Them When to Use It Example: Methods for an Identity Map Identity Map Ensures that each object get…
martinfowler.com Lazy Load How It Works 種類 Lazy Initialization Virtual Proxy Value Holder Ghost When to Use It Example: Lazy Initialization Example: Virutal Proxy Example: Using a Value Holder (Java) Example: Using Ghosts (C#) 英語 Lazy …
構築後のネットワークのイメージ 背景 Solution: クラウドサーバーにHTTPプロキシを立てる 設定 squidの設定 クラウドサーバーの設定 プロキシ経由してHTTPリクエスト送る 構築後のネットワークのイメージ ブログのサムネ用 背景 外部システムのIFと連携する…
背景 サンプル テスト そもそもアンチパターンなのでは? 背景 /config/hoge.phpの中身を\Config::get('hoge.path.to.value')って感じに読み取れるアレ /config/配下のPHPはarrayを返しさえすれば何でも書ける Facadeとかは動かないけど 業務で、configの中…
martinfowler.com Splitting the Phases of Calculation and Formatting Separated Into Two Files 英語 Splitting the Phases of Calculation and Formatting 1/3 でコード構造化した結果からスタート repos
martinfowler.com The Starting Point 【補】テスト書く Decomposing the statement Function Refactoring 2nd EditionはJavaScriptで書かれている コードを読める人口がもっとも多いであろう、という理由から 「JavaScriptのリファクタリングの本」ではない…
pragprog.com Magic Beans Objective: Simplify Models in MVC Antipattern: the Model Is an Active Record コラム: Leaky Abstractions Active Record Couples Models to the Schema Active Record Exposes CRUD Functions Active Record Encourages an An…
martinfowler.com Inheritance Mappers How It Works When to Use It コード例 英語 Inheritance Mappers A structure to organize database mappers that handle inheritance hierarchys. @startuml abstract class Mapper { + insert(DomainObject) + upda…
www.pearson.com OCP: The Open-Closed Principle A Thought Experiment Directional Control Information Hiding Conclusion 英語 OCP: The Open-Closed Principle 1988, Bertrand Meyer提唱 A software artifact should be open for extension but closed …
pragprog.com Diplomatic Immunity Objective: Employ Best Practice Antipattern: Make Sql a Second-Class Citizen How to Recognize the Antipattern Legitimate Uses of the Antipattern Solution: Esablish a Big-Tent Culture of Quality Exhibit A: D…
martinfowler.com Query Object How It Works When to Use It Further Reading コード例 英語 Query Object An object that represents a database query. SQLを直接使うと生じる問題: アプリケーション開発者がSQLに不慣れ アプリケーションコードとSQLとの…
martinfowler.com Model View Controller How It Works ModelからViewの分離 ViewからControllerの分離 When to Use It 英語 Model View Controller Splits user interface interaction into three distinct roles. 最も多く引用される(そして、もっとも間違…
pragprog.com See No Evil Objective: Write Less Code Antipattern: Making Bricks Without Straw Diagnoses Without Diagnostics Lines Between the Reading How to Recognize the Antipattern Legitimate Uses of the Antipattern Solution: Recover from…
pragprog.com Pseudokey Neat-Freak Objective: Tidy Up the Data Antipattern: Filling in the Corners Assigning Numbers Out of Sequence Renumbering Existing Rows Manufacturing Data Discrepancies How to Recognize the Antipattern Legitimate Uses…