« first day (2714 days earlier)      last day (2459 days later) » 

22:00
I think I've heard likewise
yes, play that one
Is it all right to have a factory object have methods which take multiple sources/formats?
it's on the wishlist :)
move it higher then
somewhere in top 20 (I am basing it on my wishlist's size of 120-is)
lately I've been trying to remove shitty stuff from my wishlist, and it's down to 60-ish
... I sometimes wonder why I add any game that seems remotely related to space ships to that
22:04
ah ... yeah .. that's a loosing battle
in other news, today I spent like 70€ on teas
... I hope they're really good, or there is a lot of it
that's $85, for reference
4 packets of 100g
@Allenph like, buildFromUnknown($stuff) with switches on a type?
checks the weight on tea packets
@FélixGagnon-Grenier No. Multiple methods.
oh wow. is that tea like, 35 years old or something?
22:07
createFromRestResponse(Array $response)
create($some, $thing)
createFromSqlError($sqlError)
I always forget this isn't Slack.
isn't that like, the principle of having factories, to create stuff from multiple sources?
<-- does not really factories
@FélixGagnon-Grenier I abandoned factories because I was using them wrong.
ThW
ThW
I prefer builder objects over static factory functions
Now I kind of get when to use them, and I think I'm going to really need one here.
@Ocramius Hrm.
I don't understand when to do that and when to use a legit factory object.
22:12
I like the expressiveness of User::register(...), User::deSerialize(), User::import(), User::fromThatScammyMailWeSentAround() (all static factories) over having it in a factory that has the same effect. The actual method is usually functionally pure anyway.
I also make my __construct private btw
What does that even do? I've never seen a private constructor.
ThW
ThW
@Allenph It can be called by that factory methods in the same class, but not directly any more
Correct. The reason is simple: as soon as the constructor is used somewhere else, having customisations becomes really hard.
and BC breaks become a real issue
How do you even DIC?
ThW
ThW
@Ocramius for me that puts to many stuff into the user class
22:15
so anything that is either an entity or a value in my stuff does not have a public __construct anymore
@ThW I think the cohesion is actually a win here, plus remember that it's not actually "on the class", since a static method is just a function slammed into a namespace after all
(as long as you don't use static state, but then you'd be laravelishly foolish)
@kelunik I was just numb all over, like a dead man walking.
anyway, crashing - been up since 5 AM =_=
was good to see you, @ThW!
@PaulCrovella Can't log into the machine. :-(
@kelunik it was acting up otherwise too, very slow page loads and such
Yes, noticed that, too.
ThW
ThW
22:18
@Ocramius yeah, the talk was interesting :-)
Sent a mail to Rasmus and systems@
@FélixGagnon-Grenier with "packet" I mean things like this:
(not this cheap one in particular, but similar packaging)
just trying to get set up in case someone tells me github.com/php/php-src/pull/3189 needs an rfc
they are king hard to get in my end of the mud-ball
@PaulCrovella nah ...
22:29
oh sweet, fuck the wiki then. thanks, @joe
yw
trying to hit 100% for extension code is very difficult ... the tests are just looking obscure ...
99 problems, but 100% coverage ain't one
and there are more than 200 of them ...
@tereško was distracted, someone apparently succeeded in injecting some js code in vimeo api snippets.
22:50
@PaulCrovella don't forget docs
what are these "docs" you speak of? never heard of 'em. no habla inglés.
edit.php.net, the worst place in all of php land ...
23:10
I already had to use tabs. Haven't I suffered enough?
so.. I'm working on some code I haven't given love to in some time, and I see this $list = new VideoCollection(new LengthSpecification(6));
I'm not quite sure where I was inspired, but I realize the implementation I did never really was able to manage multiple specifications. Does anyone use that, and could point me towards some kind of principle to do that?
I don't know how to make a new page through edit.php.net
more precisely, generate arbitrary sql to match arbitrary specifications, the second of which would be something like UserAccountStatusSpecification
23:34
Anyone have a good tutorial on collections?
For someone who has never written one.
no, because they are not a specific thing
I have a need for objects which abstract an array. I find myself rewriting methods like "getByKey", "deleteByKey" etc, and it is opening up holes in my type hinting by saying "Array" instead of a class name.
It's my understanding this is exactly what collections are for.
But, I don't know how to write one so that I can iterate over it with loops,
Another problem I had when I attempted to write one is that I STILL ended up rewriting methods like "getByKey", "deleteByKey", etc. over and over again for each collection class.

« first day (2714 days earlier)      last day (2459 days later) »