« first day (1521 days earlier)      last day (3427 days later) » 

12:00 PM
@FlorianMargaine do you know if the generated hashes are based on previous commits? That might be a good reason for not being able to do it
I occasionally get the urge to open pandora's box with the git src, I've so far not been brave enough though
 
@tereško implementing MVC for web is futile anyways, so why bother? Having a single class that handles a route is much simpler to implement. Naming it controller is not that bad imo.
 
@bad_boy you will see the headers pushed in the controller, if the view is anemic (or simply replaced by template)
@Patrick the point is that you either attempt to implement it, or stop calling it "MVC"
 
@Bas In some logic in neither of those classes. Those are both VOs, the validation logic would go in a DriverValidator (or something)
 
somehow nobody wants to choose the Door Nr.2
 
That's a terrible example though, no-one writes code like that
 
Bas
12:02 PM
@DaveRandom thanks :) But where would that in this case be called then? Before instantiating the object?
(the driver object)
 
@FlorianMargaine rtyley.github.io/bfg-repo-cleaner has the capability of doing it probably /cc @DaveRandom
 
@tereško I am all for #2. I tried #1 and did not like the result at all... But I still name my route handler controllers for lack of a better name
 
@tereško I've considered it. I've thrown the idea away. A few times. It's not necessarily hard but it's big and fragile. That's the fault of web tech in general though, it wouldn't be any easier in any other web arch.
 
How does this commit work, removing } and adding } on the same line? github.com/illuminate/support/commit/…
 
12:06 PM
@RonniSkansing change in whitespace
 
@Bas The answer to that is: it depends. If you are populating the VOs from the DB then obviously you wouldn't validate the data at all (you have to assume that data which you already chose to persist is good). If you are updating an existing object, you'd only validate the fields you were updating. If you were creating a whole new one, you'd probably validate everything. Exactly what you are validating dictates how/where you do it.
 
@HamZa lol
 
Bas
Hmm.
 
This question appears to be off-topic because it is about using common sense. — HamZa 2 mins ago
:D
 
@Danack it's only 4 commits ago, I'm fine with the branch/reset/commit/cherry-pick approach here. I've looked at that before and it's not really any less scary that filter-branch... simpler interface but hidden magic is scary. Swings and roundabouts.
 
12:08 PM
@PeeHaa *sighs*
 
@tereško thanks
 
@DaveRandom yeah hashes are based on code changes + commit message... Which is why you need a rebase to replay all history
 
@RonniSkansing git bitches if there's no trailing new-line at the end of the file. Kind of annoying sometimes.
 
@DaveRandom Nope it's annoying when it is missing
Just put the fucking newline in there dawg
 
Most of the time
 
12:11 PM
:)
 
@PeeHaa e.g. occasionally I want to commit minified things. I know one byte doesn't really matter, but I hate Linus telling me what to do.
Who does he think he is, Crockford?
 
Maybe there's an option :P
 
What, like Linus --Crockford or something?
 
:-P
 
12:13 PM
@DaveRandom heheheheh
@RonniSkansing I think @SergeyTelshevsky meant exactly that ;)
 
damn, how can I see which message some other message is replying to if it's off the screen?
 
The festive jumper is out! http://t.co/fl6b3NArum
I love how it says just "ho" @Fabor
 
@PeeHaa My mother in law gave me it too.
 
We need better SO chat / github issues integration :P
@Fabor A.k.a the dragon :)
 
12:17 PM
lol, she's a lovely lady :)
 
@PeeHaa What do you want it to do?
Might be doable using the IRC bots or something
 
@DaveRandom I want to have the option to click on reply on github and post it here and the other way around :P
 
That... could be harder
hmmm...
 
:D
 
might not be that useful overall tbh, message length limit in here is pretty small
 
12:19 PM
@PeeHaa lol =] I need to improve my reading
 
Could get annoying in a public room as well
 
@RonniSkansing I need to improve my writing
 
@PeeHaa WIP ;-)
 
This is what mondays are like =]
 
12:24 PM
unclear since:
- didn't show any attempts
- not really clear if he wants to "rewrite" or "redirect"
 
Done
 
@Rikesh [tag:cv-pls]
 
@HamZa - thanks..came back after long time :)
 
12:48 PM
Whoever did that: very funny. Stahp.
 
Bas
Is this a good way?

$bmw = new Car('BMW super');

if (CarValidator::isValidated($bmw)) {
$bas = new Driver("bas", $bmw);
}
 
@Bas =] why do you use static functions?
 
Bas
Owyea.. I think thats better because then i dont have to instantaite the object?
Should i better instantiate it then?
$bmw = new Car('BMW super');

$carValidator = new CarValidator();

if ($carValidator->isValidated($bmw)) {
$bas = new Driver("bas", $bmw);
}
 
Same thing...
 
@DaveRandom: I need help, please reply in private thread ..
 
Actually it tends to be better if you have if ($car->isValid()) { ...
 
Winter Bash is coming
 
3 hours ago, by PeeHaa
@SergeyTelshevsky I hate cats
 
12:56 PM
I wish more conference code of conduct policies would ban the practice of unit testing private methods.
 
@JosuaMarcelChrisano Please don't flag
 
@SyedQarib I am not a moderator, I cannot help you
 
It's annoying to others
 
lol @ flagging swear words
 
Bas
@tereško But you cant have your logic inside your VO right?
 
12:57 PM
@JosuaMarcelChrisano you just now proved that you shouldn't be here
 
@DaveRandom Yeah fuck that shit
 
Bas
Thats what daverandom said :p
 
Poo
Willies.
 
lol @ willies
 
12:58 PM
@DaveRandom: lol, but where can I find a moderator?
 
bum
 
lolwut
 

 Tavern on the Meta

MY GOD, IT'S FULL OF STARS AND BACKLOG! General friendly chit-...
 
Bas
class Car extends CarValidator then?XD
 
12:59 PM
@Bas NO.
 
winterbash is coming again so prepare yourself for an influx of people trying to hatwhore (if chat is one of the hat things like other years).
 
@PeeHaa it is
 
11 hours ago, by Danack
shitshow detected.
 
Bas
@DaveRandom :C alright, sorry mate xD
 
I'm pretty sure we're being actively trolled by whoever designed those rewards requirements.
 
1:01 PM
It looks like @tereško is the first victim of the winterbash 2014
 
nevermind
wrong person :-P
 
Bas
@DaveRandom Yeah :P
 
can we not use if statement in echo ? — Imran Khan 28 secs ago
^ stackoverflow makes me sad
 
1:05 PM
^^ supercool
 
Bas
Well, can i forget this $car->isValid then?? :P
 
$validator->carIsValid($car)
Unless isValid is a simple boolean value property
 
Bas
^^ Yes.
 
@ HamZa using ternary operator you can try if in a line
 
Bas
$bmw = new Car('BMW super');

$carValidator = new CarValidator();

if ($carValidator->isValidated($bmw)) {
$bas = new Driver("bas", $bmw);
}
 
1:06 PM
@Fresher it's not me who asked the question
 
Bas
I can forget that BMW with those skills * ba dum tss *\
 
sorry @HamZa i missed it was Imran Khan :) Cool
 
@Fresher Its like you are asking the inventor of BMW to have a test drive :D
 
@Rikesh ;)
 
Hi @DamienOvereem
 
1:34 PM
hi everyone ^^ has anyone ever ran into an issue with Zend Collections and Validators not working in them?
 
ZF1 or ZF2?
 
ZF2 I believe
 
wow, read the section on garbage collection: phpclasses.org/blog/post/…
 
@Bas why do you want a "validator class" ?
what the point of it ?
 
Bas
To split the logic and the value object.
 
1:40 PM
I'm looking for where Symfony parses the "@Template" annotation and I can't seem to find it anywhere on github. Anyone able to point me in the right direction?
 
as I see it, said class will just end up as a huge dumping ground for one-off validation rules for various classes
@Bas why do you need a value object ?
 
Bas
@tereško Because @DaveRandom said so. lol.
 
morning
 
@DaveRandom did you really tell him to use value objects ?
 
@tereško I told him not mix business logic into a value object
 
Bas
1:42 PM
close enough.
 
@Jimbo it's in the FrameworkExtraBundle
 
@Bas no, it not
can you explain, why do you need a value object there ?
 
Bas
Well, i aint mixing business logic with a value object anymore
I dont even know what a value object is..
One second..
 
@ircmaxell somehow for all those years opening phpclasses pages causes headache and it stops after closing the tab/window, like a sign of some sort
 
Bas
1:45 PM
Whats up with the critisizing man.. :
 
@Bas why not consult google and/or ask before you implement it then?
 
... I give up
 
Bas
I got this out of it: split the logic from the class.
never typed the magic word value object :p
 
@Bas in how many places will you have to validate this data? and is it always the same?
 
Bas
@Patrick Just once actually.
 
2:02 PM
@Patrick you haven't mentioned repository/value objects in your tutorial yet, have you?
 
22 mins ago, by tereško
as I see it, said class will just end up as a huge dumping ground for one-off validation rules for various classes
@FlorianMargaine .. and I hope he doesn't
 
value objects are primarily artifact of java-like code
in php we have arrays
in js we have object notation
 
value objects have the ability to be immutable
 
@FlorianMargaine nope
 
2:04 PM
@FlorianMargaine yes, but do you really think that immutable object is something that he wants there
 
well, I think it's something that enables people to go with clean objects, so I'd say yes... but it's @Patrick's call, really.
@tereško and repositories?
 
also, "immutable" comes with this funny situation where you really cannot have may values .. constructor and all
@FlorianMargaine I have never seen repositories as immutable of containing something immutable
 
@FlorianMargaine @tereško [this](https://github.com/PatrickLouys/example/blob/master/src/Page/FilePageReader.php) is pretty much where I am at right now. I am thinking about introducing entities/repositories in the future, but I am also playing with the thought of just using arrays...
I am so slow at writing this because I need to make up my mind about things first :)
 
@tereško regarless of VO, I mean
 
i hate this chat markdown
 
2:08 PM
@FlorianMargaine for me repositories are closely linked to usage of units-of-work
haven't really used them .. at least not as "proper repositories"
 
@FlorianMargaine I wrote this a while ago. It works but I don't really like it. Also it's doing too much. But then I also don't want to edit 50 classes when I add a field to a user for example... If you have a better idea about how to approach this, let me know :(
 
@Patrick Markdown
 
2:27 PM
@Fabor sentiment analysis says... stupid fucking Markdown!
2
 
lol
 
@JosuaMarcelChrisano Shit
Dammit, late to the party
 
Has anybody played with github.com/enygma/shieldframework framework before?
 
@Patrick overall I'd just move this in its own repository, but it's fine
@Patrick however, isn't this vulnerable to SQL injection? github.com/PatrickLouys/auth/blob/master/src/…
do you really need all these setters?
 
@FlorianMargaine Could try binding the values?
 
2:34 PM
@FlorianMargaine Not unless $field is user input... It is "vulnerable", but wouldn't be exploited...
 
@webarto well, yeah.
 
@FlorianMargaine He should SHOW COLUMNS + in_array and that should be fine...
Or just use Doctrine2 :-P
 
@FlorianMargaine no, field is hardcoded (see methods above). Couldn't get it to work otherwise... :(
@webarto After using it at work for a year, I'll never touch that again for a new project :D
 
@Patrick I'm just trolling :-)
 
@FlorianMargaine I wanted to write something that uses reflection to set the values, but never got around to do it...
 
2:37 PM
@Patrick or just pass them in the constructor
 
@webarto then we'd say there's a vulnerability, but no vector
 
@ircmaxell Thank you, was chasing words :-)
 
I don't think you can bind a column name though? At least it wasn't working if I remember correctly...
 
@Patrick also, why are you not using . 'last_login = CURRENT_TIMESTAMP' ?
 
@tereško I don't want it to change on every update, only when the user logs in
But I don't like that whole thing anyways, there has to be a better way
 
2:42 PM
aah , yes
that's why I keep user's credentials separate from user's profile
 
@Patrick why do you even update it? :s
 
@FlorianMargaine I'm using it in a project... :x
 
@Patrick so? only update it when you login...
ah, you mean BC?
 
@FlorianMargaine ah.. well I wanted to do the whole entity/repo thing here. But as I said, I don't like what came out in the end. Or do you mean something differently?
 
@Patrick I mean, this value should only be updated when the user logs in, not at every update
 
2:47 PM
it will only be updated when a user logs in, the logic for that is not in the repo.
But not using a repo and just updating it directly would probably make more sense
 
@Patrick every time you call $repository->save($user);, it updates the last login
and since you have to call save() when the user logs in, you just generalized the method
 
the value will stay the same if that is not called. But I agree, it's not optimal as it is
 
<h2> tags, inside the <form> tag or outside? Or it doesn't matter.
 
@Duikboot Doesn't really matter?!
 
OK!!
 
3:02 PM
posted on December 15, 2014 by kbironneau

/* by HeberCosFer */

 
3:22 PM
=] hi
 
@RonniSkansing ghello
 
Hi @Naruto, enjoying the mondays
 
offcourse.. mondays, my favorite day! ;)
 
[= meh mondays rarely my day.. I will go see if I can answer a few questions on so, push to the 1k barrier... (w o w.. ..)
 
3:40 PM
SO chat is like the most resource hungry web page ever :-(
 
You've not opened a twitch stream before then :P
 
The Chrome process was using >600MB mem a minute ago, reopened it, climbing steadily now
 
@DaveRandom lol
 
@DaveRandom yeah, it ALSO uses up at least 2 hours daily productivity
 
That time would only be spent looking at cat gifs otherwise
 
3:53 PM
@DaveRandom …you give up cat time for PHP chat?
 
that's not sustainable.. the internet will break if you don't make enough time for cat pictures and videos
 
@LeviMorrison I read that as, "...you give up cat time for PHP cat?"
And now, I want a PHP cat.
 
@CarrieKendall Need to invent something like theelectricmonk.com/ElectricMonk.html especially for cats on the internet.
 

« first day (1521 days earlier)      last day (3427 days later) »