« first day (2663 days earlier)      last day (2511 days later) » 

16:12
I just wear shirts… my webcam doesn't cover the lower parts
so
you swing your meat in the wind?
is that a rhetorical question?
who doesn't?
@tereško You should have view services?
what would those be?
@Gordon and then you remember that you forgot to close the fridge and it becomes slightly awkward
Wes
Wes
16:34
cqrs has view services.
@tereško the fridge will beep when I leave it open for too long
@Wes I was not asking you
Wes
Wes
/me runs
Can anyone tell me how do I autoload Mobile_Detect with composer?
I wanted to know what he means by it and if he understood what he was actually asking
16:36
I mean, how do I get the namespace?
@tereško The examples are doing require_once 'Mobile_Detect.php';
Wes
Wes
!!should i coffee or nap
You should nap.
I am not sure about psr-0 autoloading.
  "autoload": {
        "classmap": ["Mobile_Detect.php"],
        "psr-0": {
            "Detection": "namespaced/"
        }
    }
Should I be doing use Detection\Mobile_Detect?
16:40
@CoderDudeTwodee open the linke told you to, then on the right side you will see the github link, you click on thant
and then you read the fucking readme file of the repository
@tereško Still can't find anything about autoloading it.
They are simply doing require_once 'Mobile_Detect.php';
I need a beer
@tereško Well, I can see two options. The first is that the view class has the same service used by the controller injected into it. The second is that it's an entirely different one. I'm leaning towards the first way.
Also @Patrick, how specific do you make your repositories? I have seen people making classes like MySQLThingRepository which seems...not right. The data mapper should be the one worrying about the persistence layer, not the repository, yes?
CC @Wes
@Allenph you should use the approach that better fits your implementation of model layer
@tereško But this is the general gist?
16:47
yes, those are the two general options
Also, interface wise do you usually have an interface for every aggregate factory, or an interface for all factories in general?
@Danack a smart guy - he has his employment locked down
Or entity in your case Terekso. You catch my drift.
@Allenph heh. I use interfaces only when I have instances multiple unrelated classes, that can be passed to some method
16:50
So you're essentially free-balling.
yes - I add interfaces only when they have a practical purpose
@Danack Procedural for changing goals?
Dear lord :o
@Allenph You don't have generics in PHP
So I don't see how you can have a generic Factory interface.
(Unless you're willing to give up the little type safety you have in PHP)
I have a private repository which does not have a vendor directory, when I pull it in via composer it installs and creates the vendor directory within that package, this causes me to have vendor/guzzlehttp and vendor/mypackage/vendor/guzzlehttp - any ideas what this could be caused by?
@MadaraUchiha This was the part I was struggling with. I wanted to be able to very specifically type hint, but also wanted all of my factories to follow some common rules.
I suppose I could do both.
@Allenph This is exactly where Generics come in and save the day.
16:52
@Moak sounds like you forgot to add /vendor to your .gitignore
@MadaraUchiha Expound?
@Allenph are they actually different factories? Or is it the same factory, but with different configuration?
interface Factory<T> {
  function create(): T;
}

class MyFactory extends Factory<SomeService> {
  function create() {
    return new SomeService();
  }
}
@tereško The methods are the same, the implementation is not because the keys of the entities are different.
@Allenph Something like that. Then the compiler/parser knows that MyFactory is expected to create SomeService instances, and nothing else.
16:55
I've never seen some of that syntax before.
And you don't need to create interface SomeServiceFactory { function create(): SomeService; } for each type of object you want to have a factory for.
@Allenph You need to leave PHP some more, my friend :)
The world is nice out there.
@tereško that's what I meant, vendor is not committed to the repository, it's in the gitignore.
it creates the vendor during installation when it's being pulled in as dependency
@Allenph Think about a simpler example, how would you have a List interface without losing type safety?
List of ints, List of strings, List of Lists of ints, etc.
Wes
Wes
don't make him confused
Sure, you could just not specify the types for add() and get() and insert() etc, but that would mean that compile-time allows for a string to be added into a List meant for ints.
Wes
Wes
16:58
baby steps
@MadaraUchiha I've noticed this also. How to enforce keys in arrays, etc.
Wes
Wes
php doesn't have generics anyway
@Wes You're saying that like he can't just go pick up a Java tutorial or something and learn this stuff.
@Allenph Exactly, in PHP, you can't, because PHP doesn't have this feature.
@MadaraUchiha Simple you don't have a List interface because it's a reserved word
:P
Wes
Wes
ahaha
16:59
In most other mainstream languages with types, you have generics, which allows you to make an interface which applies to an entire "family" of types.
So basically at this point interfaces in PHP are really just sugar. You can't enforce all the way down.
Weird my IDE is highlighting the composer files from the troubled package
@Allenph Sure you can
But you'll need to create an entirely new interface for each type of thing you want to create
@Allenph you do not need to connect all the classes via contracts. Don't get too attached to the "new shiny thing, that you managed to use". That's really wide-spread affliction among junior devs - they see someone using an object in JS and next day you return to all of the JS reshaped into objects
interface IntList {
  // ...
}

interface StringList {
  // ...
}

interface WhateverList {
  // ...
}
17:03
That's why you guys are implementing your own collections and DTOs and iterators, huh?
@tereško How does JS not reshaped into objects look like?
Because you can't force like array key compliance or array value compliance easily.
@Allenph Actually, most of us try really hard to not implement our own collections and DTOs and iterators.
Those things seem mutually exclusive.
@MadaraUchiha every function being wrapped into an object and being called by string
17:04
If you're in PHP-world, you're screwed on that front, but you get other things easily (WordPress, Laravel, etc)
@tereško Uh... huh. Talking from experience, I'm guessing?
@Allenph The more experienced you get, the more you realize that there are no bugs in code that you don't write.
@MadaraUchiha being overly focused on the "new shiny" is a terrifying affliction among juniors. it's gotten to the point, that I am dreading to answer their questions ... but I kinda need to
That doesn't mean "write less lines of code", it means that you should know when it's time to write your own abstraction, and when to leverage an already written (or better yet, natively provided) tool.
@tereško The real problem isn't that juniors are focused on new and shiny.
The real problem is that they do so at work, with no code-reviews and no supervision.
Wes
Wes
poll: early return or wrap?
{
    if(...){ return false; }
    // actual code
}
{
    if(...){
        // actual code
    }
}
17:07
@Wes Return early.
@MadaraUchiha oh, there are code reviews, but you can't really sit behind them like a piano teacher with a lineal
I'm just going to forgo that stuff for now...
Well...in this case I am the code review-er.
It's worth noting that we, at work, use the latest version of TypeScript/JavaScript/React, we just instinctively (or we learn very quickly) which features we "like" and which we avoid.
Wes
Wes
@MadaraUchiha question is purely about cosmetics, not performance
@Wes Both.
17:08
@Wes return early
for readability
Extra columns of indentation on the entire function? Nope.
Wes
Wes
@tereško we agree on something
that melts my heart
you'll get over it
// What if you have multiple stopping conditions?
if (something) {
  if (something) {
    if (something) {
      // stuff
    } else { return 1; }
    else { return 2; }
  }
  else { return 3; }
}
@MadaraUchiha then you need to be shot, for the good of the gene pool
17:10
// vs

if (!something) { return 1; }
if (!something) { return 2; }
if (!something) { return 3; }
// do stuff
Wes
Wes
do you prefer multiple nested ifs, or big ass conditions if(...) with mixed negations, && and || ?
@Wes If you have nested ifs with crazy logical operators, I'd argue your function does too much.
Wes
Wes
in the real world, shit happens
@Wes I hate that claim.
And I wholeheartedly disagree with it.
Wes
Wes
in the "separation of concerns" world, you are programming a hello world application
17:13
"We know we're not supposed to do X, but this is how it works in the real world"
Wes
Wes
there, that works better
on a side note, I love this new monitor <3, finally I can see the whole star list without overflowing the container
Then enjoy your real world.
@Wes early return 4 life.
"We know we're not supposed to use globals, but we had to!"
Wes
Wes
17:14
dude i try @MadaraUchiha but sometimes shit has to be crammed together in one place only
Meh, there's a balance
@Wes The usual solution for this is to get more eyes on your problem.
You can't preach ideals when you work to a hard deadline (that isn't set by you)
Your eyes are tightly coupled to your brain. Involving another pair (as well as another brain) can help you see the path to simplification you're missing.
@Sean I do, and I can.
Then you are a greater programmer than I
17:16
Most developers don't realize that in nearly every place you work, it's the developer that has the power, and not product/business/sales.
If you say "no", it's a hard "no", and no one can really tell you otherwise, they'll make faces, and complain, but eventually they'll make some excuse to the client and no one will care.
The pressure middle management and sales/product puts on you is their way of "negotiating" a faster delivery time out of you, and make no mistake, it's always a negotiation.
There could obviously be exceptions, like when you program things that peoples' lives depend upon (in which case the dead-line might be quite literal)
@MadaraUchiha "I know I'm not supposed to drive on the sidewalk but that's what my boss wanted!"
@Darius he spent 20k, he said he's paying off a 0% credit card, owes 9k. He's not completely off grid like I originally thought, he's doing something called net-metering
@Sean If your boss told you "we want a feature-complete Facebook clone by next week, we already sold it, it's a hard requirement" Would you say "sure thing"?
@MadaraUchiha Nope, but the difference to me is that is outside my realm of possibility
@Sean I argue that it is your job to actively reject demands that are unreasonable and/or would cause a lot of grief in the future, or at the very least surface those.
17:21
And admittedly quality of code is a variable when determining that
An answer like "I can do it in a week, but that means that any new features whatssoever past that would take a month each" is reasonable.
If your boss is willing to take that cost, which could be a reasonable thing to do, go for it.
But saying "This is the real world, and we have to meet every demand we're given" is not a healthy mindset in my opinion.
You are the expert, you are the person knowing the code and only you can estimate what it would really take to develop anything.
And if you say that X will not happen within a week, (even if you know that you technically could, if you signed off your soul to the PHP devils), it will not happen within a week, and your boss will not have a choice but to accept that.
There's an entire chapter in "The Clean Coder" that talks about communication between dev and management, I warmly recommend.
Still chewing my way through Robert C Martin's Clean Code, but it's on my list
and I do agree with you
posted on January 30, 2018 by CommitStrip

When I started, I didn't know that I could negotiate times, or how to negotiate, and lowballed time estimates frequently... took me a few years to understand to not give the absolute minimum time as my time estimate.
I stated above that we use the latest JS/TS/React features, we are able to do that because we include the maintenance and upgrading of those packages in our estimations. We clearly communicate our intent to upgrade X package, what it could affect, and what kind of regressions QA would need to perform outside the norm.
17:26
Back then, I thought I was giving myself enough time, but then XYZ issue came up, and pushed me back by a day or two.
You'll find that your boss won't mind that it takes a week longer than originally planned, as long as it's clearly communicated in advance and everyone are aware of the reasons.
@Tiffany Yup
Especially when XYZ issue comes up by the client/product manager, who suddenly demands a change here and a change there and that we can't release the version without those changes.
@MadaraUchiha Not always
I am using Symfony's HttpFoundation\Session and twig. Yet {{ app.session.get('foo') }} isn't working.
@Machavity This is when you gradually realize the R&D usually hold the power in the situation
@Machavity that was another thing I had to get across to my supervisor, she did learn though :D
17:31
Do, I need to inject the session object to twig or something?
And you slowly and carefully educate everyone else on what it means to interrupt the daily work, and why it's harmful.
The thing is, most of those people don't understand "programmer mode"
They work on "interrupt mode"
I'm fortunate enough to have my own office, and usually when I need to program, I close my door
So they don't understand instinctively what it means to make a focus-intensive worker lose focus.
because the noise from the hall is too distracting. People tend to not bother me when my door is shut, unless it's important.
@Tiffany I'm guessing you work in a place where real-estate is actually affordable.
17:32
> isn't working.
Here in Tel-Aviv though? Open-space, open-space everywhere.
!!doritos
Nov 15 '14 at 23:43, by Danack
Do you mean it stays at home eating cheetos and play xbox?
@MadaraUchiha yes, I do actually
my rent is 375 USD
@Tiffany Mine is about thrice that.
Although I have no idea how large your place is.
17:34
@Danack $session->get('foo') is showing the output fine but {{ app.session.get('foo') }} isn't.
it's decent sized. I have a living room, half dining/half kitchen, bedroom, bathroom and laundry room
I've a fairly comfy room in a really good spot, so the ~1k USD I pay is actually a pretty good price in my opinion, when compared to other buildings in the area.
my bathroom is tiny as fuck, and my kitchen isn't large, but it's mostly enough for me.
@Tiffany Oh, I'm with a roommate :D
We both pay ~1k USD
I'm with...cats
17:35
I think Tiffany lives in a concrete tube
Alright, quick shower.
lol, if I wasn't embarrassed by how my apartment looks, I would take pictures
Seriously though, my life became a lot better when I realize that the actual power is in my hands
I get to say "no" (as long as I elaborate) and it would be received as law 90% of the time.
I need to document so much stuff
17:40
I've begun to learn that anything that requires something out of the ordinary and I do at least once a month, I ought to write down.
@MadaraUchiha 1k for a room ?!?
you live like in Manhattan or City of London?
@tereško Room + shared kitchen, bathroom and living room
@tereško Tel Aviv prices are similar.
hmm ... yeah ... technically Manhattan does not come equipped with active missile defense
@CoderDudeTwodee session is a form of storage. The UI parts of your code should not be aware that storage even exists
@tereško So you mean I should pass on the things as params to the template?
@MadaraUchiha up for a game or two, tonight?
17:54
Sure
@Wes How do you usually treat cookies or sessions? As a domain object with a service over it?
I'd be getting on in about 20 minutes
Or do you have data mappers, factories, etc for it?
@Allenph as something that mapper fiddles with
well, not cookies
17:55
Expound?
cookies are either part of user's input or part of your response
@CoderDudeTwodee they should be there. You could try dumping them with twig.symfony.com/doc/2.x/functions/dump.html to see if the session is available. But it's likely that you've either configured something so there actually isn't a session, or something else dumb is happening.
Makes sense. Handling the content of a cookie though...
For instance, your favorite, JWTs.
JWT does not deserve even to be pissed on ... even if it was on fire
it's solves the same problem as TLS ... well ... tiny part of what TLS does
@tereško Not exactly, but close.
JWT shifts the responsibility of "knowing" data to the client, without actually granting the user real knowledge.
17:59
Regardless...do you just treat session as a persistence mechanism and make a data mapper for what you wish to store in it?
It absolves you from having a redis storage for sessions in a cluster environment, for example.
I have to say, I don't have a clear opinion on JWT.
I just know they make it so I don't have to manage session. I like that.
Save from one layer of the code, however, the rest doesn't care whether it came from JWT or $_SESSION or redis.
@Allenph You still have to manage the session.
That was not a good way of putting it. I don't have to manage the session across multiple machines.
In fact, one of the things PHP got right in my opinion are the superglobals
$_SESSION['userId'] boom, magic happens and you have the correct ID
Wes
Wes
18:01
meh
You don't manage it, you don't care where it's from or how it's really stored.
@MadaraUchiha try sending a form-data PUT request to php
For a beginner, this magically not caring about these things is a great thing.
For a senior, not so much.
@tereško Remember that PHP was written in a time where PUT requests were far less common.
It is entirely PHP's fault for not adapting, though.
I don't want to remember things - that's effort
it's 20:00 and I am still at work
@tereško The previous developers where I work had made a habit of proclaiming any and all tools as "trash" and then promptly developing their own, shitter versions.
Want to talk about remembering things? About wasted efforts? I can go pretty much all day long.
18:08
@MadaraUchiha So your strategy is to just store the account ID in the session in the authentication service and call it good.
And that that's what that superglobal is for.
Can someone who knows stuff about XML/DOM please read the comment thread here and check that I am making sense please github.com/php/php-src/pull/3012
I feel like either I'm not explaining well or I'm missing something
or both
(warning: it's long)
@MadaraUchiha I have been in that position quite often ... the one telling people, that all their tools are trash. That's how I got my experience in CodeIgniter, Yii, Kohana and others
Wes
Wes
looks like weltling is saying what i was saying @DaveRandom (still reading)
@tereško Yeah, but saying "react router is shit" and then implementing your own, worse version of react router is slightly different.
yeah, I once thought of learning react
opened the "for beginners" tutorial and save mixing of html, js and css all in the same file ... my brain just went:
18:14
@Wes The DOM standard actually makes no distinction whatsoever between namespace attributes and regular attributes, aside from the fact that xmlns is a reserved word. The issue is really around PHP is interacting with libxml, which is not following the DOM standard and nor does it claim to be trying.
@tereško The unholy concoction of code you describe is colloquially known as The World Wide Web
@Machavity behavior in one file, presentation in one file, content in one file
@Tiffany naah, nobody cares about those outdated things in <current year>
@tereško I found an article that said the separation principle is dead... I'm reading it
wunderbar
18:19
...it used the wrong word for role
I've read about 1/3 so far, it actually went into a different direction than I thought it would. blog.teamtreehouse.com/…
it's just the word-salad to dress it up
it doesn't mention React at all
it talks about how <input> elements have behavior using type="email" or type="tel", and ::before affects content
@MadaraUchiha I'm on
@Tiffany I remember the same talking points from msdn.microsoft.com/en-us/library/ms532147(v=vs.85).aspx
if you live long enough, you find out, that people just keep repeating the same historical mistakes
:hover is widely used though, and it's a behavior
18:29
I don't think it counts
nobody is using those elaborate CSS-only dropdown menu hacks anymore
@tereško that looks like a sound argument in favor of not living too long
make humans extinct...
@tereško You underestimate the power of the Dark Side Wordpress
@FélixGagnon-Grenier I intend to live till 800 and die in a star-diving accident
Heh. You better start working on that forehead of yours, so the facepalms you'll get when approaching 700 years old don't get right through your head
in any event, /me gets to the demo room to prepare, I hope I'll still have a job in an hour
o/
18:36
@FélixGagnon-Grenier good luck
Wes
Wes
gl
18:50
gl!
also, night o/
Wes
Wes
@LeviMorrison want the name of whoever thought that case insensitive constants and case sensitive constants at the same time was a good idea :B
took me ages to figure out how to collect usages correctly
@SaitamaSama Entering
Or did you finish already? :(
@MadaraUchiha sorry >.< I'm already in bed
>_<
Ah well, next time
yeah :(
and my Overwatch experience is not that great these days anyways
I get like 24 fps (on my older monitor) after the new update and this dual monitor setup
Wes
Wes
18:59
@DaveRandom dunno, dom is a mess
i think the authoritative dom is modern browsers'
and get frequent fps drops to ~16/15 fps
Wes
Wes
if that works in modern browsers, then it would be nice if php matched it
seems like I need to get a GPU finally
@SaitamaSama What GPU do you have?
and even 1080p/1440p playback lags in this new monitor because of my shitty intel hd4600
19:01
Or is it the standard intel shite?
@MadaraUchiha none :-P
I play at 1440p at 144Hz consistently.
what GPU?
w/ GTX 970
I'm looking for GPUs around ~$250-300 range
those are the only ones I can afford with the moneyz I earned working for some projects for my brother :B
Anonymous
19:23
I am going to ask a Shafizadeh question. Who is ready?
Anonymous
hello btw
@samayo google it ;-)
Anonymous
what does "google it" mean?
@samayo Search for "it" on Google.
Any other questions?
Anonymous
19:32
Yes. Which one is correct? "Any other questions?" or "Questions any other?"
Anonymous
On a serious note though. I am not sure if there are situation where you have to send an HTTP header with a GET request
Anonymous
I thought only PUT, POST, DELETE usually require a header payload and not GET
@samayo the former
Anonymous
specially if you are hitting an API
@samayo All HTTP requests have headers.
In fact, the verb you use is one such header.
19:42
This quote is especially true for PHP
> Language bigots everywhere, beware! It is not the language that makes programs appear simple. It is the programmer that makes the language appear simple!
@Wes I'm sure it wasn't a decision. It was probably a bug that proliferated into a feature.
Wes
Wes
:(
Possibly done to preserve BC.
Makes me think of a certain argument on internals
@Tiffany I like languages that work for me, and not having to work for the language, though 😀
19:46
then you do you :D
Wes
Wes
@bwoebi why not? 3v4l.org/VMbJQ
yay, that went well
since I'm happy, let me ruin your day and remember you that visual debt has once been a thing
your welcome
Wes
Wes
fu
@Wes looks like we missed that case when implementing it
ah
well
dunno
Wes
Wes
was it on purpose?
@Tiffany not sure if i want to read that
20:05
@FélixGagnon-Grenier remind, you're :X
@Wes probably for the better
nah, it's definitely your welcome, since you are most definitely not welcoming that thing
@Wes Not sure but be sure to consider how references affect any feature or non-feature.
Wes
Wes
yeah, damn references
you indent html with 2 of 4 spaces?
20:12
@FélixGagnon-Grenier yes. And jabbascript, as it gets so 'depthy'.
So mote it be.
a pleasure, even
Wes
Wes
< 4 spaces, also js. i minimize
2 spaces confuses me
You sound old.
20:14
@FélixGagnon-Grenier 2
now to refactor the whole project while I'm the only one in the code
prolly they won't notice
3 messages moved to Trash
Wes
Wes
i am old
I'm almost always nervous when I have to call a student x_x
but the only way to get over that is to keep doing it
@Tiffany what are you going to call them - 'nice but dim'?
Wes
Wes
20:18
teenagers are so annoying
@Danack most of the time, yes
and this student is experiencing a problem I can't pawn off on the help desk
more or less need to get over my anti-socialness with the phone
you'll manage
@Danack Slagathor
Apparently, Slagathor is fed a regular diet of stake
In Auryn can you use alias to avoid typing out the entire namespace instead of just defining an alias for an interface type hint?
20:32
@Allenph it uses fully qualified class names................so maybe?
$injector->alias("Request", "Symfony\Component\HttpFoundation\Request"); without use in the class file?
@MadaraUchiha Syntax: wotd on|off|status [frequency]
Oh wait. Never mind. That's a PHP error.
@Wes implying that, I am annoying as well? ;-; I cri
20:33
@MadaraUchiha it's just starred in the left right
@Tiffany Stale.
oh yeah, it is
@Allenph no, it needs the fqcn. you can 'use' namespace classes and then SomeClass::class if that helps.
I really need to sleep now, been browsing 4ch for ~an hour, need to wake up in about 3.5 hours as well, because school ;B
!!reboot
20:36
Restarting now! o/
obsequious characterized by or showing servile complaisance or deference; fawning: an obsequious bow.
cc @DaveRandom ^
Although I guess it's generic timer issues
@Danack Ahh.

« first day (2663 days earlier)      last day (2511 days later) »