« first day (2524 days earlier)      last day (2424 days later) » 

12:04 PM
@salathe in a way that would be good, as it would be a clear violation of behaviour that should result in git access being removed.
 
@kelunik sure
 
3rd time the charm.
\o/
 
^ /cc @PeeHaa @bwoebi @Trowski
 
Yeap\
\o/
Will need some time to wake up before being able to read
 
12:08 PM
@PeeHaa what time is it there? o_o
 
14:08 :P
 
lol
what're you going to do when you get a job?
 
Breaking the edge cases. \o/ github.com/reactphp/promise/issues/102
 
@Tiffany Waking up earlier :P
tbf I have been working until late the last two days
 
Anonymous
'working'
 
Anonymous
12:12 PM
is there a flag? Why is horse boy in here.
 
@JayIsTooCommon Also 'late'
:P
Got the last calls yesterday at 2000 :P
 
Anonymous
pffft
 
I'm slightly baffled how it's 7AM here and I "woke up" at 5AM... and you just woke up
 
@MadaraUchiha Are you alive?
 
12:18 PM
@Tiffany It's kinda easy :P
 
Can I poke you in a seperate(/private) room, I want to inquire if you can unfreeze rooms.
 
I can unfreeze rooms, just ping me with the link (if you want it in a separate room that's fine too)
 
12:34 PM
this is going to be fun... installing PHP 7 on a server and seeing what breaks in the website
 
12:46 PM
@Ocramius What's wrong with declare ticks? Don't all event loops use it?
 
@Jimbo if you are looking into 10 year old code that has nothing to do with event loops...
 
Also, pcntl_signal needs it :P
(doesn't it?)
 
1:06 PM
If Apache's ErrorLog and php's error_log are both used, do PHP errors get written to two different logs? o.o
 
Anyone used \AMQP::consume()? It just hangs when it hits the C library and I can't debug
 
tip please? (laravel 5.4)
https://stackoverflow.com/questions/46198540/laravel-5-4-reusing-a-if-else-statement-throughout-site
 
@Darius remove laravel
 
^ hollly moly.
 
Not a fan of Laravel, but client had asked for it. :p Just learning it now for this one project, and I find it kinda awkward. Atleast to what I'm used to.
 
1:16 PM
 
I think it's the learning curve talking still, I see a lot of benefits for it, but the model to controller links feel awkward when you want to do lots of joins and still utilize the roles in multiple ways.
 
Can't you use middleware for auth?
 
Because those are neither controllers nor models
 
I do, but I only use it for restricting access at the moment, but can I use the middleware to do the logic of if admin, send admin's requested id, if not admin, send id linked to user/role ?
 
@tereško I hate that shitt on twitter
 
1:21 PM
@Jimbo I think they are all insane
 
@Jimbo Why do you use AMQP?
 
I have so many of these people blocked on twitter, it's such a cult
@kelunik Legacy system
I figured it out, needed to declare exchange :)
 
@Jimbo if you read about cults, then you start to see how true it is
 
I'm so glad it's predominantly in the states
 
It's also strong in UK, Canada and Australia.. and Sweden and Germany
 
1:30 PM
I'm trying to discern if the error I'm encountering is related to the fact that the website codebase has mysql_ functions and I'm trying to run PHP 7 (yes, I know it won't work), or if I set the webserver up incorrectly. I just receive a 404 error page, doesn't look like an IIS error, and there is no PHP error...
 
Good morning
 
\o
 
Anonymous
o/
 
@kelunik can you please move bugs.php.net/bug.php?id=75202 to "Class/Object related"? So it stays on "my" list :P
 
@pmmaga Done.
 
1:34 PM
thanks!
 
Can you have "too many" classes? Am I stupid for basically creating a million classes to handle different things?
 
@Naruto come back ;o
 
ej?
 
@JustCarty a million is a lot
having lots of small classes is usually a good thing
but I also think that you can take it too far
 
@Patrick I'm culpable of exaggeration;)
@Patrick That is what I thought. That does it get to a point where it's like "Why have you made that class?"
 
1:49 PM
@JustCarty No. If a "senior" says "you have too many classes" and that's it, it's entirely subjective and dependant on the level of skill of the developer reading it
If you're adhering to SRP, you'll probably have a lot of classes. The onus is on you though to organise them well enough so that they make the most sense to the next developer (and the person reviewing it)
Your response to "why have you made that class" should probably be along the lines of: "a class has a single responsibility (SRP). This class does this". Although I usually place at the top of my classes in the docblock: "Responsible for"
And for interfaces "Represents an object capable of"
 
so ... what would be the best approach for storing timezone in a cross-RDBMS compatible way?
 
If you have an "and" in those, then you're likely violating SRP
 
just go with signed INT in minutes?
 
@tereško Depends
What do the timestamps represent? A time in the future?
 
@PeeHaa what timestamps, where?
 
1:53 PM
idunno. You are storing timezones for a reason I thought? :P
 
@JustCarty basically you have taken it too far when your class doesn't really have a responsibility
only real example that I have come across so far was a value object for every single scalar value. I thought that was too much, but others think it's perfectly fine (ocramius for example... ;))
 
@Patrick If I have any validation for a string, or an int for example, it goes in a VO :)
For example, "this campaign name must be no > 50 chars". Therefore Name with a 50 char limit in constructor
 
@Jimbo Okay, thank you. This is not something anyone has questioned me about but something I have recently thought about myself. Thank you for clearing that up for me.
 
@Jimbo but if you have a name with firstname and lastname, do you really need a separate VO for both first and lastname or do you just validate it in the name object?
depends of course, but if you only ever use the name one I would keep it at one
But for most codebases, more is better
 
@Patrick If they have separate validation, like lengths or characters, sure
Otherwise no, I just make a Name that takes two parameters
Or you could group them, they're basically the same
I think at that granularity it doesn't matter really until the business requires something extra
 
1:58 PM
Making a Validator Class is a thing then? $validator->forename($str); which would validate a forename for instance?
 
Some people also have middle names, some countries have multiple middle names...
 
Names are an utter snakepit btw
:P
@Jimbo Exactly. Some people only have 1 name
 
@JustCarty You shouldn't be able to construct an object in an invalid state. So it goes in the constructor
And if it fails, \InvalidArgumentException
 
Working with names is almost as hard as working with times
 
@PeeHaa we had a problem with a student who legally changed their name to a single word... it made it difficult for generating tax forms
 
2:01 PM
yep :)
Asshole
:P
 
I think we ended up using their new name as the first name and last name, lol
 
@JustCarty wouldn't do that. that's the job of the value object
and validate the user input of course
 
sounds ridiculous, but when it's federal BS, what can you do
 
Curse and move on :)
 
If I wanted to validate input for a form and ensure it is not longer than a column. Is the best solution:
1) hard code the max value for the field (I created the database so I know that; a problem of it is if it changes for instance)
2) Query the database and get the max length from that?
 
2:02 PM
The first
 
@Patrick I'm new to OOP (if you can't tell) and so I have no idea what a Value Object (VO) is
@PeeHaa phew;)
 
There are also other constraints you want to enforce not possible / hard to do in the db
 
@JustCarty that's why I linked a blogpost ;)
 
@Patrick I miss things when I just glance at other other screen;) Thank you :)
Another noob question coming your way.
Why use $obj->getRed(); over $obj->red;?
 
@JustCarty because then you can add logic to the accessor. and people can't modify it (see immutability)
but that could be another blogpost by itself :)
 
2:10 PM
Encapsulation. If your aggregate root is a SetOfColours object, sometimes your Colour Value Objects are internal. Maybe it should only return strings at this top level, not the internal VOs themselves
Think about what your objects are exposing, at some level you eventually just want to deal with scalars
(int, string etc)
 
alright, I'm getting the hang of this. thanks for the help guys.
 
aggregate root?
 
@Fabor Good. I don't do much on the missions side though. Mostly just running around shooting ghouls with my trusty buddy at my side :D
 
@Tiffany DDD term, don't worry about it just yet :P
 
mmm, alright
 
2:17 PM
@tereško I don't think my brain is sufficiently evolved to understand all the levels of indirection in that thread
I have no clue what any of them think, believes or really stands for
I'm not even sure I want to cringe reading it
 
Just a quick question, when i use composer to install dependencies, if i take that project folder and upload it, will i need to use composer on the server as well or is it not needed ?
 
Anonymous
@KristianHareland yes, you should gitignore the vendor folder
 
@KristianHareland ideally, you would be using git, and .gitignore the vendor folder, to reinstall composer on the server
 
Oh jesus, who wants to see some awful code.
 
but, if you do upload all the folder, the vendor directory will be present as well
 
2:28 PM
@Sean o/
 
Alright, thanks @FélixGagnon-Grenier
 
so technically, you could deploy in that way, but pls no ;)
 
Anonymous
@Sean o/
 
o/
Yo Jay, still angry at me?
 
i mean, the issue is that this is a dev server, but the network i am on does not allow sshconnections and i need to share my progress
 
2:29 PM
@KristianHareland you mean, the dev server cannot interact with github?
 
its not CI ready so not really
 
"not really". you mean like, 48% of the packets never reach the web? I mean, could you git push or not?
 
@Sean ...
 
I can not push to remote repos from my current network no
 
Anonymous
2:31 PM
@FélixGagnon-Grenier pfft I'm never angry. You did single handedly destroy the morale of R11 though
 
ok, sorry for making you repeat, I'm somewhat dense
 
@PeeHaa Every time I look at it I see something worse than the last thing I spotted
 
no worries lol, but if i upload the entire directory, will it run as i just used composer ?
 
@Sean :P
 
2:31 PM
yeah, it will
 
Anonymous
@FélixGagnon-Grenier 10 points
 
thanks!
 
@KristianHareland be aware though, that if some of the packages require a specific extension that is present on the dev server, you won't be assured that it also is on the prod server
 
@Sean Are you a gatekeeper? As in can you at least prevent it landing in stable branhces?
 
@Sean ModelManager seems like the kind of stuff @tereško would positively love
 
2:33 PM
nothing wrong with a model manager
 
@FélixGagnon-Grenier that sounds like a job in Victoria's Secret
 
That ^ :)
 
@PeeHaa This has been in our codebase since conception I think. it's been in when we moved repositories and our history was lost.. in 2014
 
@FélixGagnon-Grenier Yeah i am aware, but my idea is to push it to a test server for preview by client i mean, i have installed almost all packages from earlier and its just the AWS SDK, idk if it makes much difference but i guess ill have to research
 
2:34 PM
@Sean :D
 
@KristianHareland that's cool, you seem to be aware of how to lace your shoes, you should be alright
 
yeah @rlemon. Enjoy your sexbot!
 
I wish, js isn't that capable yet
:crosses fingers for ES9:
 
:P
 
Anonymous
don't pretend you have fingers.
 
2:37 PM
If you're actively trading crypto you can help me test my weekend-project @ etheroi.com
 
I must admit I have no idea how to respond to that Jay lmao
 
can someone explain what's wrong with the code @Sean linked?
 
Anonymous
1) the Author
 
oh, I see it's not using prepared statements
 
Anonymous
Nessworthy is not to be trusted
 
2:41 PM
I feel like he wasn't the one who authored it
 
don't make assumptions now
 
Anonymous
It certainly looks like something he would do..
 
soooo, what's so wtf about it?
 
let's start with the first line $m = Model::create('Contact');
You know of types? Well, this very line destroys any usefullness of types, right away. Moreover, you may have noticed that we kind of prefer the triads of Mappers, Entities and Services when approaching the Model, whereas here, there's some semantic strange stuff
 
need to read about mappers, entities and services
 
2:47 PM
start here
somewhere in Latvia, @tereško laughs manically while popping champagne. his evil plan to take over MVC is starting to get around.
Meanwhile, Otwell, the rightful founder of a sane vision of MVC, cries in his basement, knowing he's lost the holy war
 
@Sean That's kind of idiomatic active record stuff......
Also:
Jul 14 '16 at 19:02, by Danack
They are nuts. Seriously, I consider some groups of programmers to have gone collectively insane, and you should do the opposite of what they do, even if you're not 100% sure why you should do the opposite.
 
@Danack Any chance I can get that on a tile for my birthday next year? :)
 
@FélixGagnon-Grenier the poor poor twatwell
 
headache I had this morning is coming back, dammit
 
2:52 PM
I'm glad the irony was not lost ;)
 
I guess my brain can't process new information today :|
 
> Well, this very line destroys any usefullness of types
No, no - it's adding more capabilities to the model object, which makes it more useful!!1!
 
Also; Poe's law in action: news.php.net/php.internals/100560
5
 
hehehehew
 
2:57 PM
@Danack oh god, sounds like something our DBA would say
almost word for word
 
he is a firebird dba :P
 
I need to get this off my chest: I really, really, really dislike ASP
 
classic asp? asp core? .. asp what?
 
she clung to OpenVMS for far longer than we should've, and curses Linux's case sensitivity
 
@DaveRandom You good?
 
2:59 PM
@PeeHaa mostly
 
k
 
too much to do as always but yeh :-P
 
raid shit fixed in the end?
 
@RonniSkansing I have no idea. To be honest, the document starts with Language="VBScript" so really I probably just dislike that. Someone asked me to do some work for them and it's just infuriating
 
@PeeHaa sent to a DR company, still waiting for the full story
 
3:00 PM
@JustCarty lolwat
 
Not to mention the person who wrote the initial website is clueless, but that's a different story
 
@JustCarty lol
 
"no longer my problem" is the tl;dr
 
@JustCarty sounds like classic ASP
I was unfortunate to work with classic ASP like the first couple years of working here
 
@Tiffany Okay, so: Among things people have already said: SQL Injection, violation of SRP (the function appears to just check if a record exists, welp, turns out if also tries to make it if it doesn't), terrible variable names
 
3:03 PM
The person that created this website is a university lecturer in England.
An example of some of his work is a page, with a few lines of code, which redirects to another page of a few lines. This goes on for 4 redirects. It could be contained in one page. I cry for the people taught by that person
 
I mean, no validation on input at all, no splitting of arguments. The purpose of it is to take data from $_POST and try to load or create a new record with it.
 
irk
 
Some other offenses:
- Access Databases (yeah I hate those)
- Creating fields to store data rather than a table with multiple rows (so if as user is awarded more than 15 times the database throws a fit as it tries to add any more)
- Storing passwords in plain text (is that even legal??)
- Multiple databases with date suffixes (this isn't a problem if they want backups, it's just that some files reference the old databases)
 
that makes more sense. SQL injections should have been obvious to me, I noticed it wasn't using prepared statements, but wasn't sure if some other kind of validation was done to try and prevent it.
 
3:18 PM
I just replied to the list regarding Tony Marston's opinion about case sensitivity. I hope it was appropriately scathing. Let me know if you think it was out-of-line.
 
> Let me know if you think it was out-of-line.
On that, I was expecting something along the lines of calling him a gobshite.
 
Which also would have been fine by me :P
 
@Sean my code base violates SRP so much that I don't notice it happening anymore, granted I didn't know what SRP was before I started working with this code
 
Over in Dusseldorf this weekend. Wat do
 
3:33 PM
you may originally get shit faced
 
@Sean Drink beer
Although @Gordon laughs at me try altbier
 
such fancy names. that's just red beer, what's wrong with it?
oh I forget you Europeans have a very broad choice of beers: blond and black.
 
lager and stout?
 
@FélixGagnon-Grenier Blond beers are wonderful
 
@Tiffany yeah
@JustCarty beers are wonderful
 
3:44 PM
It's finally time to get a new computer...disappointed in 8th gen Intel. :p
 
@Allenph So buy AMD?
 
There is actual competition now right?
Or did the internet lie to me?
 
@PeeHaa In high-end desktop market, yes. Not generally.
 
wasn't there always?
It was my undersatnding that tech savvy people with overclocking skills were better served by amd
 
@FélixGagnon-Grenier Depends on what you were doing. Historically their floating point performance was pure garbage.
It was fixed in their new architecture.
 
3:58 PM
@LeviMorrison I didn't know that last bit.
Plus I'm getting a laptop. A lot of times when you shift to AMD build quality and RAM speed reduce if ever so slightly.
At least that's been my experience in the past.
(RAM speed as in the speed of RAM that comes with the machine.)
 
Oh, if you are getting a laptop I am unsure if AMD is suitable.
 
I assume integrated graphics are better with Intel too.
Laptops with dedicated GPUs are few and far between if you want a workhorse and not a gaming laptop.
 
Why does this work?
echo isset($var) ?: "";
 
@JustCarty What value is stored in $var?
 
@JustCarty someone bastardized ternary?
 
4:04 PM
@Allenph Well, I just mean that it is like the new operator added in PHP7 (??). If $var is set then it will return $var and if not it returns "";
 
@JustCarty Didn't know that.
 
it looks like it's using ternary and skipping the "then" block altogether, and going straight to the "else" block
 
My bad
I got the syntax wrong
 
Okay, Tony is crazy.
 
$var = "worked";
echo $var ?: "failed"; // returns "worked"
$var = null;
echo $var ?: "failed"; // returns "failed"
 
4:07 PM
He basically advocated giving non-English users the middle-finger.
 
gets out popcorn
 
@Allenph Just get a gaming laptop
 
Someone other than me should call him out on it so it doesn't look like a personal flame war. Would be helpful if English was not their first language. /cc @NikIC, @bwoebi because you guys may know such people
 
@PeeHaa Meh.
 
looks like he suffers from a geocentric thinking... i.e. the world revolves around me
 
4:10 PM
The markup is insane.
 
nevermind, I originally thought that was a popular used way of using geocentric, but google is proving me wrong
 
Meh, maybe I will just say:
> We currently allow `Υear` and `Year`. Can you even spot the difference? That's a much worse issue than `Info` and `info`, in my opinion.

PHP is intentionally a multi-lingual and multi-national language. Telling Turkish users (and others) that *their locale* is the issue is blatantly rude.
 
@Tiffany ethnocentric
 
4:25 PM
@Dereleased thanks
 
@LeviMorrison it being "rude" does not make it any less "true"
:P
and if you want to localize input and output, there are special modules for that, like: php.net/manual/en/class.intldateformatter.php
 
@tereško he implies that changing to a different character set is the problem
 
it is a problem
 
why?
 
I have spent two days doing only MySQL
 
4:31 PM
@Sean why u there and what do u fancy doing?
 
@LeviMorrison if you do not know English, you should not be a programmer
 
Converting between locales is definitely an issue. However, it's not this issue. If you consistently use one locale throughout you should not end up with these issues but they still happen. That's why it's particularly pernicious.
 
... it's actually a citation by one of professors deans I had
 
Levi, you're always good at putting to words what I'm thinking, but I struggle to come up with the words
 
Thanks :)
 
4:36 PM
</html>
<!-- end of document -->
only comment in file
 
... I don't think it's technically permitted there either lol
Could be wrong though; not every day I care to look up what exactly is allowed outside of the document root.
 
I would hope that parsers would make sense of that but HTML so ¯\_(ツ)_/¯
 
evening to all masters
 
> We currently allow `Υear` and `Year`. Can you even spot the difference? We also allow `foo` to simultaneously be a function, constant, and class name! Your concern over case sensitive identifiers is legitimate but we already have similar but worse issues, at least in my opinion.

I repeat: *if* we change sensitivity of *any* type of symbol it should go in the direction of being case sensitive.

Lastly, PHP is intentionally a multi-lingual and multi-national language. Telling Turkish users (and others) that *their locale* is the issue is blatantly rude. I encourage you to not be so English
^ Diplomatic enough?
 
@Linus I'M OFFENDED (this is a joke)
 
4:43 PM
@LeviMorrison I think technically PHP is accidentally "a multi-lingual and multi-national language" but aside from that, good :-P
 
shh
that's a secret
 
mmmm, if we go with the route that it's accidentally multi-lingual, should it be written in Hebrew?
 
I am personally of the opinion that source code (possibly excluding string literals) should be restricted to ASCII, but my perspective is that of someone whose first language is English. I still think it's pretty bananas using anything other than \w in symbol naming though.
it's just asking for trouble with encodings and fucky diff problems
 
@DaveRandom I completely agree ... and english is my 4th language
 
4:50 PM
^
s/4th/2nd/
 
Hi All,

I'm trying to apply the logic below to a problem I'm having:

1. Construct HTML Select
2. Listen to change event on select.
3. Get the value of the selected option using jQuery.
4. Pass the value to "Ajax", then "construct a new object and call a method, passing select value as param"
5. Display result in the specified div below.

I'm not quite sure if 4 makes sense.

Is this possible? Any pointers will help. Thanks.
 
well, I have totally fucked myself by letting two branches get too far out of sync and now I have to merge ~40 HTML files by hand :-/
 
@Tiffany ... i m serious:)
 
@hello does the "new object and call a method, passing select value as param" depend on the ajax call return valued?
or you can just fire the request and build the object?
 
@FélixGagnon-Grenier Does it matter if it is a PHP object?
 
4:56 PM
gist.github.com/ircmaxell/ec278d0d8d0b2c1566a76e1d9742050f <-- just incase you thought I was messing around :D
 
@FélixGagnon-Grenier No, value is gotten before Ajax call is made, then Ajax should construct the php object, call method passing value as param.
 
@hello ugh... yes, it matters a lot. your point 4 is "receive the value in PHP, create an object from it and send back html"?
wait a second there. Ajax can't construct a php object. AJAX is the name we give to a http request originating from a browser
what you mean is, user selects a value on web page, selected value is sent to a php script using ajax, php script builds an object based on value, yes?
 
bool usort ( array &$array , callable $value_compare_func )
 

« first day (2524 days earlier)      last day (2424 days later) »