Proposal for xSpep BDD Framework for PHPYuya Takeyama
The document proposes Speciphy, a BDD testing framework for PHP. It summarizes the differences between xUnit (unit testing) frameworks like PHPUnit and xSpec (specification) frameworks like RSpec and PHPSpec that support BDD. Speciphy aims to add more expressiveness to PHPSpec by allowing nested contexts and string-based specifications. An example is provided to demonstrate Speciphy's DSL using namespaced functions like \Speciphy\DSL\describe instead of class methods.
Building Development Environment with php-build and phpenvYuya Takeyama
php-build and phpenv allow developers to easily install and manage multiple versions of PHP on their system. php-build downloads and compiles PHP from source while phpenv manages PATH environment variables to select the PHP version. Other tools like rbenv provide similar functionality for Ruby versions. The document recommends installing prerequisite packages before using php-build and demonstrates commands for installing and selecting a PHP version with php-build and phpenv.
The document defines a fib function that recursively calculates Fibonacci numbers and prints the 10th Fibonacci number. It then defines some unit tests for a Calculator class that test the add method by asserting the expected result. Finally, it defines some unit tests for a User class that test validating a user object.
The document discusses MySQL replication and how updates and limits work in a master-slave replication setup. Specifically, it notes that updates on the master are replicated to slaves and the order of rows may change due to sorting from an ORDER BY clause or the automatic reordering of rows that occurs in B-tree indexes. It also mentions that the LIMIT clause only affects the results returned to the client and does not limit the number of rows updated on the master or replicated to slaves.
This Twitter user shares that they are a web developer who works with LAMP stacks and has experience building websites. They express their love for Apple products like the MacBook Air and iPad2. Recently, they have been learning about Padrino, MongoDB, RSpec, PHPUnit, and PHPSpec testing frameworks as well as the Ruby programming language.
Proposal for xSpep BDD Framework for PHPYuya Takeyama
The document proposes Speciphy, a BDD testing framework for PHP. It summarizes the differences between xUnit (unit testing) frameworks like PHPUnit and xSpec (specification) frameworks like RSpec and PHPSpec that support BDD. Speciphy aims to add more expressiveness to PHPSpec by allowing nested contexts and string-based specifications. An example is provided to demonstrate Speciphy's DSL using namespaced functions like \Speciphy\DSL\describe instead of class methods.
Building Development Environment with php-build and phpenvYuya Takeyama
php-build and phpenv allow developers to easily install and manage multiple versions of PHP on their system. php-build downloads and compiles PHP from source while phpenv manages PATH environment variables to select the PHP version. Other tools like rbenv provide similar functionality for Ruby versions. The document recommends installing prerequisite packages before using php-build and demonstrates commands for installing and selecting a PHP version with php-build and phpenv.
The document defines a fib function that recursively calculates Fibonacci numbers and prints the 10th Fibonacci number. It then defines some unit tests for a Calculator class that test the add method by asserting the expected result. Finally, it defines some unit tests for a User class that test validating a user object.
The document discusses MySQL replication and how updates and limits work in a master-slave replication setup. Specifically, it notes that updates on the master are replicated to slaves and the order of rows may change due to sorting from an ORDER BY clause or the automatic reordering of rows that occurs in B-tree indexes. It also mentions that the LIMIT clause only affects the results returned to the client and does not limit the number of rows updated on the master or replicated to slaves.
This Twitter user shares that they are a web developer who works with LAMP stacks and has experience building websites. They express their love for Apple products like the MacBook Air and iPad2. Recently, they have been learning about Padrino, MongoDB, RSpec, PHPUnit, and PHPSpec testing frameworks as well as the Ruby programming language.
40. +----+--------------------+
Map | id | text |
+----+--------------------+
| 1 | to be or not to be |
+----+--------------------+
↓ レコードを連想配列として Map へ ↓
+----+---------+-------+
| id | key | value |
+----+---------+-------+
| 1 | to | 1 |
| 2 | be | 1 |
| 3 | or | 1 |
| 4 | not | 1 |
| 5 | to | 1 |
| 6 | be | 1 |
+----+---------+-------+
41. +----+--------------------+
Map | id | text |
+----+--------------------+
| 1 | to be or not to be |
+----+--------------------+
↓ レコードを連想配列として Map へ ↓
+----+---------+-------+
| id | key | value |
+----+---------+-------+
| 1 | to | 1 |
| 2 | be | 1 |
| 3 | or | 1 |
| 4 | not
value には JSON で入れるので | 1 |
| 5 | to
構造化データも使用可能 | 1 |
| 6 | be | 1 |
+----+---------+-------+
42. +----+---------+-------+
| id | key | value |
Shuffle +----+---------+-------+
| 1 | to
| 2 | be
| 1
| 1
|
|
| 3 | or | 1 |
| 4 | not | 1 |
| 5 | to | 1 |
| 6 | be | 1 |
+----+---------+-------+
↓ キーで GROUP BY して ↓
SELECT ↓ 値は GROUP_CONCAT ↓
`key`, +---------+--------+
GROUP_CONCAT(`value`) | key | values |
FROM +---------+--------+
`中間テーブル` | be | 1,1 |
| not | 1 |
GROUP BY | or | 1 |
`key` | to | 1,1 |
+---------+--------+