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
<?php | |
class Car | |
{ | |
public function __toString() | |
{ | |
return 'I am a car'; | |
} | |
} | |
$ferrari = new Car(new Model("Ferrari")); |
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
<?php | |
$mongo = new Mongo(); | |
$widgets = $mongo->onebip->widgets; | |
for ($i = 0; $i < 5000; $i++) { | |
$value = rand(); | |
$widgets->insert(['value' => $value]); | |
echo "Inserted $i!", PHP_EOL; | |
sleep(1); | |
} |
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
trait RepositoryContract | |
{ | |
public function testAdd() { ... } | |
public function testRemove() { ... } | |
} | |
class MongoDBRepositoryTest { | |
use RepositoryContract; | |
public function setUp() | |
{ |
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
Effective teams with third party dependencies, or those that rely on external specialist knowledge, generally dedicate one or two people to investigate those dependencies a week or two before starting a story. The results of the investigations are a great starting point for the story analysis discussions. Some teams analyse stories twice as a group: once a week or two ahead of the iteration to collect open questions and focus the upfront investigation, and the second time just ahead of the iteration to communicate and agree on the details. | |
avoid feature requests. If you have only a short summary on a card, it must not be a solution without context. So, ‘How much potential cash is in blocked projects?’ is a valid summary, but a ‘Cash report’ isn’t. | |
Independent and valuable are often difficult to reconcile with small. The value of software is a vague and esoteric concept in the domain of business users, but task size is under the control of a delivery team, so many teams end up choosing size over value. | |
De |
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
Generator\seq( | |
Generator\nat(), | |
Generator\pos(100) | |
) |
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
sort($array); | |
for ($i = 0; $i < count($array) - 1; $i++) { | |
$this->assertTrue( | |
$array[$i] <= $array[$i+1], | |
"Array is not sorted: " . var_export($array, true) | |
); | |
} |
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
function fromZeroBasedDayOfYear($year, $dayOfYear) | |
{ | |
return DateTime::createFromFormat( | |
'z Y H i s', | |
$dayOfYear . ' '. $year . ' 00 00 00', | |
new DateTimeZone("UTC") | |
); | |
} |
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
$this->forAll( | |
Generator\int(2000, 2020), | |
Generator\int(0, 364), | |
Generator\int(0, 364) | |
) | |
->then(function($year, $dayOfYear, $anotherDayOfYear) { | |
$day = fromZeroBasedDayOfYear($year, $dayOfYear); | |
$anotherDay = fromZeroBasedDayOfYear($year, $anotherDayOfYear); | |
$this->assertEquals( | |
abs($dayOfYear - $anotherDayOfYear) * 86400, |
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
Time: 95 ms, Memory: 6.00Mb | |
There was 1 failure: | |
1) DateTest::testFromDayOfYearFactoryMethodRespectsDistanceBetweenDays | |
Days of the year 2016: 59, 0 | |
2016-03-01T00:00:00+0000, 2016-01-01T00:00:00+0000 | |
Failed asserting that 5184000 matches expected 5097600. | |
/home/giorgio/code/eris/examples/DateTest.php:53 |
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
- nella scheda Revenues é un po' controintuivo che non venga mostrata la linea rossa corrispondente alle Total Revenues ma solo quella verde (quella blu é a 0 nell'esempio, ok) | |
- mi piace la presenza di onError() nel codice generato, che propone di gestire esplicitamente il caso di errore | |
- molto forte l'android-1dk-example | |
- anche l'approccio alla documentazione molto dinamico | |
- in alto a destra ci sono due link che si aprono nel menu, User Profile e Settings, che portano a pagine vuote. Forse andrebbero nascosti se tanto sono vuoti? |