« first day (2928 days earlier)      last day (2246 days later) » 
00:00 - 19:0019:00 - 00:00

19:00
Such a funny Sjin playing Stardew Valley playlist. youtube.com/…
19:12
the first line is the table headers
Is this still slow in PHP 7?
37
A: PHP Readonly Properties?

too much phpYou can do it like this: class Example { private $__readOnly = 'hello world'; function __get($name) { if($name === 'readOnly') return $this->__readOnly; user_error("Invalid property: " . __CLASS__ . "->$name"); } function __set($name, $value) { ...

@JBis It's less slow, but it's still slow
Compared to implementing it as a getter method, that is
@Tiffany What does the query look like?
@PeeHaa explain select * from databasename.versions;
19:28
ah
That will not use indexes as there is no where or order by
It just gets it all
In whatever sequence the sql engine feels like
so try to run something that the website would be using to aggregate data?
Find a slow query. Run explain on it. Check what indexes are being used. Add idnexes where needed
Also make sure the queries are the bottleneck :-)
What are the highest number of queries you have ever run in a single execution of a command or page opening? (ex. navigating to a page that runs a lot of queries before presenting data or information.) Any idea? @PeeHaa
@StatikStasis Very much not that high
Unless you are asking about one of my first jobs doing zend framework 1 stuff where I had a lot
In general I am more afraid of calls to external services which I cannot prevent from running on demand
I'm working on a login page for some production staff. It basically displays a lot of stats for them...
19:35
@PeeHaa hm, not sure if it's database or code. There a bit of code where it pulls all of the children pages and adds them to the (slowass) page. I can't imagine that's doing well for performance...
Takes the current day- gives them their daily, weekly, and weekly team goals...
Plus their progress for those kpis
The times I worked with stats (ads business) I generated them in a different system instead of (mostly) calculating them on demand
Also shows them their results for their last day, last week's results, and the team's results from the previous week...
But those were high enough calculations to warrant that
Notifies them if they missed a goal and they have to acknowledge and comment...
19:37
@Tiffany Before trying to tweak stuff try to profile it
@NikiC thanks. That's stupid though.
@PeeHaa the query, the code?
@StatikStasis All that stuff can be calculated once and stored
Plus tracks a lot of personal records for them to add a game-afication <--don't know how to spell that) factor to their work.
Again if the need is there
19:38
@JBis Why?
@PeeHaa Well... it's a little more complicated than that.
@StatikStasis gamification
@Tiffany Thanks for that.
@Tiffany Stored with the code to understand where it is spending time
It should tell you soon enough whether it is the database which is gobbling up the time
@PeeHaa would I be able to google "profiling php code"?
19:39
Yes
@PeeHaa I don't have a lot - I think maybe 5 or 6 queries that execute upon page load.
@Tiffany There are things like xdebug and fire something who can help you with this
@PeeHaa I've tried getting xdebug to work with my environment. I couldn't figure out a sane way to do it.
@StatikStasis It depends on what the queries are doing
I wonder if I can write a sample page that does what this page does, and test the speed that way, instead of including the microtime functions inside this file
this code is really hard to write tests for
19:43
@PeeHaa I have a table that stores the staff, their usernames for this system, as well as from another database in another system, activation status, and a missed_goal_flag. I have another table that stores their daily goals (each day is different), weekly goals, monthly goals, plus the team's weekly goal, and monthly goals...
I have a table that stores their personal records (production stats) for gamification. And a table storing their raw production data.
One of the tricky things is we're on a 4-4-5 calendar month, aka a retail calendar. So October for us starts on September 30th and ends on October 27th.
> So October for us starts on September 30th and ends on October 27th.
Retail...
Yeah...
I have spent a lot of time coding stuff to fit this calendar in many different modules of this application- but I am used to it.
yeah it's valuable if you are used to it. It's wtf if you are not familiar with the domain :P
Oh no- it's still aggravating.
Not to mention every 5 years you have a 6 week December to keep the calendar on track which I have to account for.
@StatikStasis lolwat
I'm trying to stave off a craving for chocolate. It's not working. I want chocolate.
19:49
Our next 6 week December is in 2020- I have one section of code that I did right after our last interval that I basically skipped factoring that in that I have to go back and add in in 2019. =/
@StatikStasis What the actual fuck?
@StatikStasis Yeah it always amazes me the things businesses / industries can come up with sometimes even actually make sense for them and their business
@Allenph They're pretty common.
It sounds like something that would happen with an accounting team
It's so that every month starts on a Sunday and ends on a Saturday. So that when comparing this year to last year you are not comparing a month that ended strong on a Saturday versus a month that ended weak on a Tuesday or something.
19:50
some of the stuff our business office spews off relating to accounting makes my eyes glaze over
then again, they probably do the same when us IT go into a technical ramble
@Tiffany My degree is in accounting. =D
@StatikStasis do you enjoy it?
@StatikStasis Are those hard coded calculated values?
Things like Dec in 2020 has 6 weeks. Or there is actual algorithm you use for that?
@Tiffany I love it. Numbers don't lie.
@Tpojka Sorry was on phone call. You mean like the calculated date ranges for each week?
Maybe I misunderstood that you have some calculation of 2020. December has 6 (yours) weeks. Are those weeks?
19:56
"The 4-5-4 Calendar, which is widely followed by retailers today, was derived in the 1930’s during an informal inter-industry discussion. Prior to and during the 1930’s, retailers used a straight calendar to report monthly sales."
"This calendar became problematic as Saturdays and Sundays became an increasingly large percentage of sales, since the number of weekends in a month varied year to year."
Ahh. I get it.
"The 4-5-4 Calendar serves as a voluntary guide for the retail industry and ensures sales comparability between years..."
Looks like time sucks for everyone, not just programmers.
The 6 week month: "Due to the layout of the 4-5-4 Calendar (52 weeks x 7 days = 364 days), which results in one remaining day each year, and the occurrence of Leap Year, it is sometimes necessary to add a 53rd week to the end of the calendar for sales reporting purposes only. This occurs approximately every five to six years"
@StatikStasis wonder what drove you to programming
19:59
@Allenph I've learned a lot about working with dates because I've had to code for this thing.
@NikiC I want it to be fast
@StatikStasis Much clear, thanks.
According to week (order) number, year starts on 1st no matter what day is that, right?
@JBis Good thing php is open source in that case so you can do just that :)
!!dad
If prisoners could take their own mug shots, they'd be called cellfies
20:03
I know a lot of you are sad because it's a Monday, but don't forget, only 48 hours ago, it was a sadder day.
@Tpojka No. January 2019 starts on December 30 2018 for us.
@Tiffany Are you saying friday was sad? How dare you? :P
Aha. Ok.
And hence why it has required some extra code to factor in when building.
@mega6382 Saturday
Sadder day
Wes
Wes
20:05
you would think a simple thing like setting the summer/winter time would be simple for a computer, but it's not
@Tiffany I don't know whether to laugh or be mad :P
Wes
Wes
i have windows with english locale but dates in the italian format
@Wes don't you know? computers are stupid.
Wes
Wes
every time there is a summer/winter time switch i get several of them
@Wes I don't think there's anything less simple than DST changeovers
Wes
Wes
20:06
:B
@Tpojka I'm not terribly proud of this- but I didn't want to be bothered with creating a class at the time for calculating the start and end dates of each week for a given month, while factoring in whether it was going to be a 4 or 5 week month- or even a 6 week month. So I just created a table and put all of the dates in there for the whole year. // cc: @PeeHaa
I add in the dates for the next fiscal year towards the end of each year.
It's on a to-do list... that is several years old now. =/
That's probably what I would do at first too :P
It's actually simple as you can just look it up easily
Wes
Wes
essentially i have to disable this or it will keep changing from one time to another
20:09
@PeeHaa That's good to hear! I felt like I was being lazy... well I am. But it was the easiest thing to do at the time so I can get started on the functionality.
It just has maintenence
@PeeHaa When I look at that task id on my list I have thought about progressing a little bit by just creating a button I could hit that would take the dates from the last entry in that table and generate the next month for me so I don't have to manually do it.
I procrastinate fixing certain things.
@StatikStasis That's not to say I always make the best decisions though ;-)
@StatikStasis I would do that, bt take it a step fursther by setting up a cron so I don't hate myself for forgetting to press the button
@PeeHaa I'm going to pretend I didn't read this and have the mindset that "Well- one of the PHP contributors said he would have done the same thing so..."
Template and text tweaker is the actual official term for what I do :P
But I guess that is contributing too if that helps you give you peace of mind :D
20:13
@PeeHaa HA! I've actually built into any parts of the codes that use dates to handle execution properly if a date range is not in the table- in case I'm on vacation and forget. I think it reads out something like "Statik is an idiot- please call him."
That shows how set I was on fixing it soon.
But that has never happened so- that's good.
@PeeHaa I've never thought to do something like that. Would think they knew better :)
@StatikStasis Worked on PHPBB (Symfony based) functions of various pages (post;profile...) and files have bunch of queries.
@Tpojka What would you define as "bunch"?
I remember using PHPBB years ago.
@StatikStasis 6-7(10?) tables on page through 7-8 queries with lot of joins on page as far as I remember. I remember there is some query every 20-30 lines of code. It was years ago.
20:21
ok- interesting. I think this one is 5.
Not 100% but something like this.
If I find that code I'll check, worked on old machine and I am not sure of source if available. It was PHPBB plus some add-ons/modules as like/liked for posts etc maybe something more.
It's not that important. I'm just always questioning whether I have broken some cardinal rule for number of queries. lol
stepping away for a bit
Just increase script execution time in php.ini (You're welcome)
:P
@Tpojka or using ini_set, you're welcome
20:27
@PeeHaa so you've edited comments too?
lol
my claim to php source changes: github.com/php/php-src/blob/master/php.ini-production#L517 reworded the "this is only effective" sentence, it was originally something like "this has only effect..." and changing "affect" to "effect" github.com/php/php-src/blob/master/php.ini-production#L673
@PeeHaa Where do I find the function?
!!lxr __get
@Tiffany Nothing went wrong but I couldn't find a suitable definition
@JBis use the search bar near the top in github, type __get
@Tiffany oh boy. 11 pages
20:34
@Jeeves Nothing went wrong, except that you just suck
jk, <3
@JBis filter options on the left are your friend too :)
@Tiffany I'd put it on my resume. =p
@Tiffany yep just found those. I guess filter to c?
though, looking at the C code, I'm not sure which of these do the formal definition for the function
@StatikStasis I plan to. "It says here you've committed to the PHP source... what'd you do...?" "Oh...you know...bug fixes...tothegrammarinthecomments..."
!!lxr zend_compile.h
@Tiffany Nothing went wrong but I couldn't find a suitable definition
20:36
aslkdjjkdfjkdfsdfikl
you're useless
@Tiffany "Yeah, that's right. I've contributed to multiple sections."
:44349747 You have to remain vague.
@StatikStasis "I made it easier to understand" ;)
BTW, this isn't something random off the internet, I took this from my phone just now at work, someone's desk is blocking the fire exit
17 mins ago, by mega6382
https://img.devrant.com/devrant/rant/r_1837972_TtFNX.jpg .
@mega6382 do you guys not have a variant of OSHA?
@Tiffany Too much code
20:39
"Some minor edits and fixes to the DateTimeImmutable class" Regardless of whether it was a comment or code- a fix is a fix, baby!
since @Jeeves is useless
idk where its defined
@Jeeves MUDA MUDA MUDA MUDA MUDA erm, never go full Dio.
@Tiffany I am pretty sure that we do, but they are most likely useless
@mega6382 It's to keep everyone evacuating in a single file line.
20:41
lol
although it doesn't return anything...
Jehovahs Witnesses are apparently evil quora.com/…
Heading home- later all.
@mega6382 Extremists from any religious groups are usually considered "evil" or radical by the majority non extremists
@JBis I meant evil, as in they are a danger to themselves
20:51
@mega6382 The same applies
21:03
wow, PHP 7.0 reaches EOL by the end of this year
@Tiffany Yeah, I believe 8.0 is planned to be released in 2020
So, most likely, it'll 7.2+ for the entirety of 2019
just crazy for me to consider. When I first came in here 7.0 was still somewhat new, and I guess 7.1 wasn't released yet
Someone should make a ML shit code converter
takes shit code and makes it good
build it into all the IDE's so it can learn
(although it may learn bad habits...)
can do that already do about half of that with a static analyzer
Love this:
21:16
Is there anything sweeter than being told something is not your problem and to not fix it?
@Allenph Doesn't bug you its not done properly?
Nope. At least not anymore.
@JBis too many other things to worry about to care
What if you have to use it?
Then I can tell everyone it wasn't my fault! :D
21:19
XD
Good answer
@JBis That is the "holier than thou" behavior that I believe no experienced programmer would ever have.
@mega6382 wdym?
@JBis I mean "Oh, I don't write code with bugs in it like you do"
if(!($somevar == 1)){
    // more shit
} else if($somevar == 1){
    // even more shit
}
^^ that doesn't annoy you
@JBis I wouldn't write anything like this myself, but if I ever saw it in a codebase, I wouldn't change it.
21:25
@mega6382 interesting
Unless I am explicitly working on refactoring the codebase or something
@JBis it's part of working on a team ;P
plus there's code reviews to help filter out the crap
@Tiffany Ah. See I don't have the luxury of code reviews. The shit I work with (not to say I don't put out more shit but hopefully its less shitty) is type and publish. No checks.
@Tiffany I'm not to good at that. Maybe I should take a lesson. :)
@JBis as long as you're not working on a team where politics reign, you have to have the mentality of working together as part of that team. Acting like your code is better than someone else's will make you appear arrogant and people will not like working with you.
@JBis learn humility ;)
being humiliated several times helps... I have firsthand experience with that
@Tiffany Well currently I am trying to help and teach the person, they do seem appreciative. I am never am rude on purpose.
21:30
@JBis that's different than working on a team though
you're essentially mentoring another person, not working together with that person on a project to produce something
@Tiffany Sorta. He started on top and I climbed ranks eventually working side by side and then taking over the project, he asked for help on something and I offered to teach him. Fortunately, he did not seem unhappy.
@JBis but do you feel like you're superior to him now?
@Tiffany Officially? or what?
@JBis mentally
@Tiffany Mentally? No, I don't think so. Although it depends how you measure it. Do I think I know more about PHP? Probably. But that doesn't make me 'mentally superior`. And there are plenty (basically anyone in this chat) of people who know 10x more than me.
@Tiffany How you measure mental superiority?
21:44
What I'm getting at is don't let your head get bigger than it should. It is easy for it to happen when you're not used to keeping at a certain point. I was egotistical and proud growing up. I had to unlearn this (to some degree).
@Tiffany Are you suggesting a feeling of superiority (mentally) is a bad thing? Or just the consequences of feeling that way?
@JBis feeling superior to another person? yes. en.wikipedia.org/wiki/Egotism
@Tiffany Do you consider yourself mentally superior to no one?
@JBis I feel that people have differing strong areas. For example, I know a lot about computers. My sister does not know as much. However, she's does really well at socializing with other people, I fail at this.
I've learned social skills, but I am not a natural at it. She is.
@Tiffany Stereotypical XD.
21:51
@JBis I have what was used to be diagnosed as "Asperger's" so yeah... it is stereotypical
But it is possible that the (strengths - the weakness) in one person can be greater than the (strengths - the weakness) in another person?
@Tiffany Oh. Didn't mean to offend if I did.
No, not offended. I find it humorous. A lot of my in-person social characteristics can be drilled down to that diagnosis. I've had to learn coping mechanisms for it so that it doesn't negatively affect my job and work.
@Tiffany I don't believe that all are mentally equivalent. And if that is true then a comparison can be made in which one will be superior and another inferior (or equivalent ov). If one makes that comparison, while it may make someone feel bad (as people value mental abilities), that does not make it false. But having the superior mindset may lead to negative things, such as that person not liking you/feeling bad.
Or vice versa, a person may not try if they think they are inferior.
@JBis I have felt superior to people, but I've had to learn that people are different, and people have a variety of strengths and weaknesses. Where I can write code (though it's bad), I can't do a back flip. It's a matter of valuing people for their strengths, and supporting them through their weaknesses. Don't have a "me vs them" attitude.
21:59
@Tiffany Psychology: A topic that has always been intriguing to me.
And I know, there are times my behavior in chat is counter to what what I said. I strive to be like that, but I'm not perfect. When I'm having a bad day, it sometimes feels good to take it out on another person, and I shouldn't do that.
@Tiffany I guess I have trouble not having a "me vs them" attitude
think of it like good sportsmanship versus bad sportsmanship. An excellent example of good sportsmanship - twitch.tv/videos/325730676?t=2h47m59s
@JBis Accentuated after lottery win (where them are [even non-known until date] relatives). :D
@Tpojka Oh you mean the people who don't care about you until they need/want something?
22:08
Was a joke. But something like that.
There is joke:

- Dude, what would you do if win a lottery?
- I'd return debt.
- And rest?
- Rest can wait.

:D
@Tiffany In response the criminal statistics
24 mins ago, by Tiffany
@JBis feeling superior to another person? yes. https://en.wikipedia.org/wiki/Egotism
May play into that :)
evenin
22:12
I want to do this but its not original now XD
^ \o
Then again I wouldn't know that I wanted to do it if I didn't see it. Sigh deadlock
Steven Seagal as professor?
I've thought about getting a tattoo where </head> on the back of my neck, and <body> right below it
It's been done a lot, but I still think it's neat, even if a bit cliche/cringy for web developers
Have no opinion. Not a tattoo fan. Like careless if there is one (31) or not.
22:24
I've never had a tattoo or piercing. I've wanted some over the course of my life, but ultimately didn't. Tattoos last forever, and I can't think of anything I'd like to have on my body permanently
I've considered numbers of pi
my sister has a tattoo on her wrist of our mother's signature. I really like it. She got it shortly after our mom passed away.
@Tiffany In format of IEEE 754? ---------------------->
Apart from formalities, I'm finished with university now and looking for some interesting work... Feel free to contact me at [email protected]. My main interest is in compiler and performance work, as well as Rust.
@Tiffany I have :P
@Tiffany Check this one.
22:38
@PeeHaa what comments?
@mega6382 user notes :P
@Tiffany yes but very clever.
@PeeHaa you can edit those?
That doesn't seem right
Why not?
@Tiffany Sorry for your loss :( How does that work? How do they copy the signature exactly?
@Tpojka you'd never get a job XD
22:41
How so? I am not one who made that. :D
@JBis my sister had a copy of it. I'm not sure if they stenciled it or drew freehand
@Tpojka horrifying
speaking of which... it's October...
@PeeHaa i don't know, seems like false representation
opcache segfault when enabled – #77048
I need to dig out my @Wes-created Halloween avatar
@Tiffany I agree that artist achieved that character line in eyes. :D
22:44
@mega6382 Nothing is stopping editors from adding a line stating they edited it
Also 99.999% of user notes are a false representation of everything that is holy any way
lol, thats true though
@PeeHaa I could write a letter and you could finish the sentence. If not bothering you, of course.
@Tiffany cool
@Wes I can't find your avatar you made for me, halp
either one is fine
It was the hanged one right?
22:57
@Wes You said you are gonna make Christmas avatar for people, but whats the point the winter bash is gonna start by then, huh?
@Jeeves 24 hours later
lol
- And when we want it? - Browsers.
23:14
lol
@bwoebi Is stackoverflow.com/a/47168065/778719 something that should be explained better? It seems people have fixed on a negative word.
00:00 - 19:0019:00 - 00:00

« first day (2928 days earlier)      last day (2246 days later) »