The document discusses dependency injection in PHP. It begins with a real-world web application example to demonstrate dependency injection, showing how the User class depends on a SessionStorage class. It then explains how using constructor injection for the dependency rather than hardcoding it makes the code more customizable, configurable, and testable. Dependency injection decouples classes and makes them more reusable and replaceable. The document advocates using a dependency injection container to manage object instantiation and dependencies.
This document discusses Perl testing libraries and frameworks. It provides an overview of the history of Perl testing including Test::More and Test::Class. It also introduces some newer testing libraries like Test::Pretty, Test::Ika, and Test::Kantan that aim to improve on Test::Builder and provide additional features like BDD-style testing and improved output. The document encourages trying out these new testing libraries and frameworks.
The document discusses how to contribute code to the Ruby programming language. It provides instructions for obtaining the Ruby source code, running tests on the Ruby codebase, and submitting patches to the Ruby bug tracking system. The tests include language tests, framework tests, and extension tests. The goal is to help developers get started testing and contributing to the Ruby core.
Esoteric, Obfuscated, Artistic Programming in Rubymametter
The document describes a talk given by Yusuke Endoh on esoteric and obfuscated programming in Ruby. Some key points:
- Endoh is a committer for MRI Ruby and works on performance improvements at Cookpad.
- He demonstrates programming in Ruby using only symbol characters to produce "Hello, World!" output.
- Endoh also shows code written using only alphabetic characters to produce the same output, by abusing features of Ruby's open classes and control structures.
- The goal is to explore Ruby's power and flexibility by writing very unusual code, inspired by esoteric programming languages like Brainfuck.
This document discusses features that could make Norikra, an open source stream processing software, even more "perfect". It describes how Norikra currently works and highlights areas for improvement, such as enabling queries to resume processing from historical batch query results, sharing operators between queries to reduce memory usage, and developing a true lambda architecture with a single query language for both streaming and batch processing. The document envisions a "perfect stream processing engine" with these enhanced capabilities.
This document discusses using Ruby for distributed storage systems. It describes components like Bigdam, which is Treasure Data's new data ingestion pipeline. Bigdam uses microservices and a distributed key-value store called Bigdam-pool to buffer data. The document discusses designing and testing Bigdam using mocking, interfaces, and integration tests in Ruby. It also explores porting Bigdam-pool from Java to Ruby and investigating Ruby's suitability for tasks like asynchronous I/O, threading, and serialization/deserialization.
直接 repository, service を触るようなレイヤでもないし、usecase が必要とする repository, service に引っ張られて handler を修正するのが面倒だからですね。
本来であれば、repository, service にちゃんと依存させた方がいーですね。