« first day (2130 days earlier)      last day (2833 days later) » 

3:00 PM
@tereško seriously, I'm still waiting for an answer, what is a Model then?
 
@Tiffany That's never an excuse to not do it. I've been working with a team to convert a legacy site into a Symfony one over the past year (almost done), still worth it, because now the way forward is going to be so much easier. But it all comes down to how much time you can spend on it I guess ;-)
 
without letting the controller and view make redundant queries through services
 
@Oldskool it doesn't help that I am the only person on my team for web. I'm the head of two other services, so the time I get for building new stuff is usually pretty limited.
 
@Trouner he's written on the topic: stackoverflow.com/questions/5863870/…
 
Also worth noting he is the only person on SO with a gold MVC badge
 
3:01 PM
naah
 
@Tiffany Ah no, that sucks. You need a bigger team then :-)
 
@Oldskool to give an example, I've had to focus a few weeks rewriting a web form, and I'm starting to get a back log of tickets for the other services.
 
@Fabor also, I really should update tat post, since there are some structural mistakes (the dependencies between view and controller are fucked)
 
Anonymous
@Tiffany But remember, just because it's custom and not using a mainstream framework doesn't mean it's bad. Yes, no documentation is V bad but the code may still be good.
 
@Oldskool yeah, I wish. :( though, it's kind of my own fault. but right now, trying to justify getting extra help with the way how the IL state budget it is.... yeah, good luck :(
 
3:02 PM
@JayIsTooCommon I doubt it.
 
Is great you have a gold medal, but I came here to learn, if you don't give me any answer is usless saying I'm wrong
BTW thanks @jeremy
 
Anonymous
@Oldskool Yeah lack of documentation doesn't give much confidence but you never know. Custom doesn't always mean bad :>
 
@jeremy I'm struggling with applying DDD anywhere on web. It seems to be a huge overkill. Also, I am bit pissed that DDD is changing the definition of various terms.
 
@JayIsTooCommon @Oldskool the code is alright. It definitely could be improved. The dude that wrote it, wrote it a few years before we started using it. The only upkeep he's done to it is extending it for clients that need different features. He's not a bad programmer, but the code he's written could use some updating.
 
so, I'm getting to the point where I'll be passing a github repo to someone else and try to explain to them the state of the app. Of course, it's a terrible undocumented incoherent codebase. Any hint on how to approach that with them in a way that they can not run away?
 
3:03 PM
@JayIsTooCommon It usually means it's made by a stubborn idiot who believes another framework cannot do what he "needs", which usually means they're thinking in the wrong way of how to create something.
 
@Oldskool @JayIsTooCommon I think he wrote it as a pet project like ten years ago, which got him hired to the vendor he's currently working for, and they just use his pet project as a CMS for clients, extending it as needed.
 
the problem: services should be stateless. they are also the how controllers and views interact w/ model layer. the controller will send a command to a service, and the results of this command are returned. the view needs a way to access this returned data
 
@Oldskool Well that's a little subjective.
 
@Fabor It is, based on personal experience ;-)
 
Jul 19 at 12:25, by tereško
> if you need a reclining chair, you usually dont want it to come with the Boeing 747 attached to it
 
3:05 PM
@tereško i agree, but i also see value in keeping services stateless. the struggle is how to deal w/ their statelessness in a web app
 
Anonymous
@Oldskool I disagree. Using your own framework instead of a pre-made one does not make you a stubborn idiot. If you had the time and ability, why wouldn't you want your own framework? Completely customisable, you don't have to learn someone else's way of doing things and you know exactly what your code is doing.
 
For example, he's using mysqli for database connections instead of PDO.
 
@jeremy I just leave the handling of state to the mappers (sql, cache, session)
 
His code is injection-proof, but still, mysqli is outdated by how many years?
 
mysqli is not outdated
 
Anonymous
3:07 PM
@Tiffany nope :P
 
@JayIsTooCommon I wouldn't want my own framework, because it just causes too much hassle and upkeep. You'll have to continually keep it up-to-date with the latest standards (like remove stuff that's deprecated) and whenever you have an issue with it, there's no community to back you up, you could be stuck for days on a problem and if someone would need to help you out, they'd first have to get an understanding of your custom work.
The benefits just don't outweigh the problems IMHO.
 
I OH someone say this yesterday "I predominantly work on Laravel PHP" when describing the languages they use. facepalm
 
@tereško so re your answer here, is this still how you would do it? would getSalesFigure get data from the service, or would getSalesFigure look through cache?
 
@Oldskool thanks bro (y)
 
@jeremy in real world, it would employ two mappers: first tried to fetch data from cache and if taht fails, then check the DB (and store the result from DB in cache)
 
3:11 PM
@Oldskool Frameworks are great when you need to pump out stuff after stuff. But for more bespoke or small apps or where a budget is available, selecting your own libraries or writing your own is ideal.
 
@JayIsTooCommon mysqli isn't outdated?
 
Plus performance orientated things
Though some would argue if perf is your goal why use PHP
 
@jeremy btw, it too is one of those examples, that is a bit wrong regarding view and controller: view should not be a dependency of a controller
 
@tereško if not, how would the controller alter the state of the view?
 
I guess I will be going through my old posts instead of finishing the 40k Spacemarines campaign
2
 
3:12 PM
heh
 
@jeremy controller should not be altering the view
 
Shrug, all I know is when we're up for a website redesign in the next year or so, if we stick with the current vendor, I'm demanding documentation for the codebase. If we switch to a different vendor, that will be one of my requirements for a different codebase.
 
Anonymous
@Oldskool I see benefits in all of that. To me, what you're saying is you can't be arsed to maintain your code, you would rather someone else just did it for you. You need to continually update your code? Good, that's a great thing. It means you have a reason to always be up to date with the latest and best practises. Community thing is a meh, R11 is here and I doubt people would need to understand your whole framework in order to resolve an issue :P
 
There's no excuse for not having documentation for their API
 
3:14 PM
/s/excuse/good excuse :P
 
:P fair point
 
@tereško i thought: the controller may change the way the view is presented
 
Anonymous
@Tiffany Nope, are you getting confused with mysql :P? mysqli and PDO are fine to use. Both have different advantages/disadvantages.
 
the client shouldn't have to write documentation for the vendor's code
 
@jeremy that was the reason why I added it there, but in practice it is not necessary
it only increases the complexity and gives people bad ideas
 
3:15 PM
ok, i imagine it would be useful for a persistent desktop app but limited on web
 
@JayIsTooCommon nah, it's mysqli... though I think in some places there is mysql, and not mysqli. I thought after the inclusion of PDO that mysqli became old news.
 
@jeremy in those apps the model layer is persistent too. It's a completely different environment.
 
yes
 
@JayIsTooCommon Well, based on what I've seen in such cases it that a framework is created when a company is founded and then they start creating projects with that. Soon (if succesful), the requests for new projects become too great, so maintenance of the framework is put on the bottom of the to-do list and therefor it usally turns into old legacy crap. It doesn't have to be that way of course, but I've just seen that happen one too many times.
 
Not a problem with the framework but the company then
 
3:17 PM
That's true, it just seems to be a common problem.
 
Indeed.
 
@Oldskool the problem is that they decided they need to use a framework to begin with
 
@tereško Which was my original point ;-)
 
All code bases become poop over time though, well I am sure there's a rough calculation about lines/time/ability that = crap.
 
Anonymous
@Oldskool Yeah, i meant what I said earlier about time. If someone doesn't have the time to build a framework and are constantly pushing out projects, I get the reason for using one. I just wouldn't presume that someone using their own is a stubborn idiot ;)
 
3:18 PM
14 mins ago, by Oldskool
@JayIsTooCommon It usually means it's made by a stubborn idiot who believes another framework cannot do what he "needs", which usually means they're thinking in the wrong way of how to create something.
 
Anonymous
Which again, is completely untrue.
 
@Oldskool I think the problem, in my case with this vendor, is that their code is proprietary. If the vendor made it open source, it could be improved significantly, but then that's opening a can of worms I think they don't want to open...
 
@JayIsTooCommon If you have someone that can dedicate most of their time to maintaining it, it can be perfectly fine. That's just not very common.
 
@Tiffany - Then benefit of PDO is that it allows you to switch your database, e.g. from MySQL to Oracle or MSSQL, but how many people ever really do that? MySQLi is still perfectly adequate, just limited to a MySQL database
 
we're going downward in a fractal here
 
3:19 PM
@Tiffany wrong. Just because you make something open-source, it does not magically attract free labor to your project
 
Anonymous
@Oldskool Agreed but it shouldn't be that time consuming if the initial developments are done well.
 
@tereško in this scenario, do you imagine that the view is interacting w/ the same service the controller did? to me, for this service to: know to choose an item, get info regarding that item, store that item in cache, look for an item in cache and if not existing, choose an item seems like too much responsibility
 
Jay
how do I make the last keys the main array?
 
@tereško if they're the only ones reviewing their code, and it's a small team, the room for improvement is slim
 
3:20 PM
@MarkBaker The reason for picking pdo over mysqli is not api that doesn't make you puke
 
@tereško true
 
Anonymous
@Tiffany Get rid of the mysql functions, make that a priority :) But no, mysqli is fine as is PDO.
 
Jay
I want to make the 238 and 248 the main keys
so 238 will merge
 
Anonymous
(I prefer PDO)
 
@Jay if two 238 keys do not have the same value, what then?
 
3:21 PM
BTW @MarkBaker you going to phpnw?
 
Jay
it will just be another key
So basically 238 can merge because it will always be the same result
 
@JayIsTooCommon I'll have to do a review and make sure mysqli is being used instead of mysql. If I go through and just add the "i" to any mysql functions, I shouldn't have to rewrite anything? I don't want to devote a lot of time to it since there may be multiple places it occurs.
 
@PeeHaa - yup, I'll be there as always
 
coolio
 
$item->setId($id);
if ($cache->fetch($item) === false) {
    $sql->fetch($item);
    $cache->store($item);
}
@jeremy this ^
 
3:23 PM
@PeeHaa - And at the phpnw hackathon with PHPSpreadsheet
 
(where $cache and $sql are mappers of the $item)
 
i see, easy enough
 
@MarkBaker Still thinking whether I am willing to carry my laptop with me
 
Anonymous
@Tiffany Not always, to be honest I would say dedicate time to it. It's important. Make sure they're all prepared and using mysqli. A blanket change of the term mysql > mysqli is not the best approach :P
 
@tereško why don't you pass $id to fetch() directly?
 
3:24 PM
I love how the loading bar for phpstorm extends past its window constraints...
 
I really do like my current "lightweight" (2kg) laptop, can carry that almost all day without it becoming too heavy
 
@MarkBaker ? replacement for PHPExcel?
 
@JayIsTooCommon I guess I'll add it to my to do list. Not sure when I'll get to it though :/
 
Oh didn't even realize you said sphpreadsheet
 
@PeeHaa - indeed it is, not constrained by maintaining PHP 5.2 support; allowing us to use a lot more efficient, modern PHP (>= 5.5)
 
3:26 PM
@PeeHaa Going to a dev conference without laptop is like going to Ibiza without condoms. It's just a stupid idea (unless you like getting STD's ;-)).
 
@MarkBaker Nice
 
@tereško ohhh..the item is directly built in the cache or sql mapper, then used right as is? I have this misconception of having to build it elsewhere using the id
 
@MarkBaker why not just dive straight in for 7?
 
@Oldskool I don't need a puter to drink beer
:P
 
@PeeHaa LOL, no I guess you don't.
 
3:27 PM
brb food run
 
He doesn't even need trousers for that
 
Anonymous
@Tiffany I recommend making it a priority :) stackoverflow.com/questions/12859942/…
 
@DaveRandom - userbase, PHP7+ is still a tiny minority of users; though we have implemented a PHP-EOL+6 months policy for PHP version support
 
@DaveRandom Then where does he keep his beer money?
 
Anonymous
free bar ;) (apparently)
 
3:28 PM
he pays in nature
 
@DaveRandom - The idea then is we can channel people gradually toward the more recent versions of PHP
 
@Oldskool This is a question that you both already know, and do not want to know, the answer to
 
hahaha
 
No need for money when you have that
 
3:28 PM
heh
 
@MarkBaker Sounds reasonable :-)
Oh wait, this is the internet, erm, I mean, HOW VERY DARE YOU!!!1111one
 
@JayIsTooCommon what I make a priority isn't my decision :/
 
Jay
is it just array_shift?
 
It's that HOW VERY DARE YOU that has kept us shackled to PHP 5.2 for years beyond its shelf life :(
 
@Tiffany ah, you are using SplPriorityQueue then
 
3:31 PM
I actually received a death threat for recommending a PHP 5.3 minimum version a few years back.... some people take life way too seriously
 
@MarkBaker Just write software that no-one uses. Easy fix
@MarkBaker lol
 
@MarkBaker I know :-(
although it seems to me that those people are still using 5.2/3 @MarkBaker, so thankfully they are swiftly becoming so irrelevant that they will end up forming their own little network that we never need to worry about
 
@PeeHaa - I do write software that nobody uses as well, like my PHP console maze game; it's just some of the software that I write has a very large userbase
 
@MarkBaker No way!? That is sick.
 
@DaveRandom essentially, yeah. Development is just one of my job duties. I'm developer, devops, QA, tech support, anything else web-related...
 
3:33 PM
@MarkBaker wut
 
now I'm really brb
 
o///
 
@JayIsTooCommon apparently there are several usages of mysql. I'll have to create a ticket for it and maybe when I get some other tickets cleared up, I can convince my superiors I need to work on it.
 
Clearly that person has never met you and doesn't realise that you are actually a 9ft tall olympic boxer with a huge personal arsenal that would make @DejanMarjanovic weep
 
3:34 PM
@Tiffany Sounds like you need to find a company that knows how to structure departments that focus on a specific discipline, rather than "You know IT, you do everything with anything that has a power plug from now on!".
 
@Oldskool I'm not IT for everything, just web-related stuff. Our IT department is one of the larger departments in the college, but I basically get assigned to support everything that's web-related.
 
Which is still way too much.
 
indeed
 
but well, off to head into traffic, talk to you guys later
 
at least my resume will have a list of semi-related bullshit, whenever I decide to jump ship
 
3:38 PM
@nikita2206 we are using entities and mappers here
 
yup, using mysql and not mysqli
welp....
 
@FélixGagnon-Grenier no, the item is fetched & propagated by the mapper.
 
@MarkBaker lol?
2 hours ago, by Jeeves
is should PeeHub.
so that's what the last tab was
 
@nikita2206 because I prefer my mappers not to act as factories
 
@jeremy you're right. what I meant was $item contains the fetched data already. no further steps are needed.
 
3:44 PM
@FélixGagnon-Grenier not built in. It is just passed to them for "alteration" and also used as a source of "conditions"
 
does any of you know a good PDO-based library for dealing with a DB clusters?
 
what is a mapper?
or is that too open-ended of a question?
 
@tereško how would you deal with conditions that multiple item match?
like $item->setName('foo'); // what if multiple items are named foo
 
3:46 PM
@littlepootis yes
 
@FélixGagnon-Grenier when would you be setting a condition that's not a unique identifier on a single entity?
 
for search results, for instance
 
@FélixGagnon-Grenier then it's a collection: stackoverflow.com/a/11943107/727208 ... and the "factory" part of offloaded to the collection
 
@Saitama you've got weird interests
 
@tereško I'm vaguely reminded of the update Oracle is pushing out with Oracle 12c and the DBA was throwing a tizzy over
 
3:48 PM
that's not what I was talking about
 
are you referring to me?
 
yes
 
to elaborate, and I can't remember the specifics right now, but there's something coming in Oracle 12c that I think is similar to a mapper, and my coworker, DBA, was going into a tizzy over
 
no, it is not
 
alright
 
3:51 PM
so, how about that library? @PeeHaa maybe you have seen something?
or maybe there is some Doctrine component, that I could cannibalize for handling DB clusters, @Ocramius ?
 
@Tiffany DB Proxy?
How topical I was just looking at this today
 
Wes
afternoons
 
Jay
will this work in mysql
 
3:57 PM
Anyone have an example of a closure they've passed to array_map, or filter, or some function like that where they captured something (by either ref or value)?
 
Jay
I have a date in a variable like: 2016-07-18 and in mysql the column is like: 2016-07-18 01:34:22. I want to get all results that is this date 2016-07-18
 
I'm looking for some more real-world usage of actual closures in PHP.
 
@jay LEFT(column, 10)
 
My cousin wanted to try the game I play. He asked if he could change the name and profile pic. I said, "why not?" steamcommunity.com/id/uselesschien
 
Jay
whats that mean?
 
3:58 PM
!!? MySQL LEFT()
 
Search for "MySQL LEFT()" (https://www.google.com/search?q=MySQL+LEFT%28%29&lr=lang_en)
• MySQL :: MySQL 5.7 Reference Manual :: 13.5 Strin… - Bits in bits are examined from right to left (from low-order to high-order bits). Strings are adde… (http://dev.mysql.com/doc/en/string-functions.html)
• MySQL LEFT() function - w3resource - MySQL LEFT() returns a specified number of characters from the left of the string. Both the number… (http://www.w3resource.com/mysql/string-functions/mysql-left-function.php)
 
@Fabor I'd have to dig through my email to find it exactly. Not something I'm feeling up to right now. It's not that important, either way.
 
Jay
1 moment guys
 
@Tiffany I'm pretty sure it's related to that. Some feature oracle was releasing to support that same thing
 
@Fabor probably
 
Anonymous
4:01 PM
@DaveRandom :P
 
I have a question: I have an array defined on one page, and I'm setting it into a $_SESSION variable, $_SESSION['borrowers_rights'] = $borrowers_rights;. I am trying to access it on a second page, but var_dump($_SESSION['borrowers_rights']; returns NULL. What am I missing?
 
session_start();
 
when I do a var_dump on the first page, it works fine
I have session_start();
 
well, you haven't given any information to indicate you're doing something wrong
so it's impossible to say
 
hmmmmm
I tried putting the var_dump() at the top of the second page, and it outputted data correctly
rather, outputted the array
and now it's outputting at the bottom too
wat
I guess it's working fine now. Nevermind.
 
4:08 PM
@tereško doctrine does not handle anything about clustering, sorry
 
@Tiffany var_dump($_SESSION['borrowers_rights']; is bad syntax, could have been the issue
 
@Ocramius ok, so it is expected to be handled outside PHP
 
@jeremy you're correct. I wasn't copying and pasting though, just typoed when I was typing my message.
@jeremy I've gotten used to phpstorm pointing out my typoes :x
 
Jay
thanks guys it worked
 
@NikiC Serious: why do you think arrow functions isn't going to pass?
 
4:18 PM
No idea sorry
 
Mr Phil Sturgeon has apparently just realised that the PHP-FIG has been a shitshow for ages.
 
@LeviMorrison What exactly do you mean? Are you annoyed by people writing //code//?
 
// and /* */ comments are italicized on wiki.php.net. Drives me crazy, so I thought I'd poll it to see what others think.
 
@Danack he has been constantly about 2 years behind the curve
 
4:35 PM
guys any free php cloud ide platform
 
@LeviMorrison dat font on the poll. But if you are touching that CSS - any chance you can make the comment be a lot darker as well? I found it a little bit of a challenge to read the comments. Maybe something like #05730A
 
@Danack Changing the colors is hard to get right because everyone has different contrasts and qualities :/
 
@StackB00m c9.io
 
I'd prefer to redo them completely.
 
i couldnt register at c9 mate @Saitama
tried this morning but no success
 
4:39 PM
sou ka
 
what ?
english please
 
I see
 
@LeviMorrison … inside code blocks?
 
As opposed to user-contributed comments elsewhere on php.net.
or comments outside of code.
 
5:05 PM
Having an office with a closed door means nothing when your office is two doors away from the NOC room, and a BEEP BEEP BEEP occurs every five seconds. -_-
 
!!urban NOC
 
[ NOC ] No One Cares.
 
oh, the server room
 
yeah, NOC, comm room, server room
 
@Tiffany Maybe somebody should fix the UPS then
 
5:06 PM
I guess a battery backup is dead and a replacement part is being waited on
my only choice right now is a closed door and blasting Pelican
 
Didn't you already attempt something like this last year or so?
 
I did attempt something more site-wide.
 
Oh right
 
For now I'd be happy with it confined to wiki.
 
5:15 PM
Well fwiw you got me on board. I like dark themes :)
 
Also, why does practically every theme make comments difficult to read? I don't get it. When comments exist you probably SHOULD read them. They should get emphasis.
 
+1 for dark themes
 
+1
 
2 mins ago, by Levi Morrison
user image
 
@LeviMorrison I think vim by default does blue on black for comments :P
That's like terribad
let me see if I still have it
 
Wes
5:16 PM
lime on black #trustmeimadesigner
 
Hi , I have created an password system for authentication that changes every time user want to login , I really want to hear about your reviews and discussion about it
http://advpassword.com
 
I really want to make a bad joke about how hard for user experience having to guess your password each time is
 
I mean like... WAT
 
5:18 PM
use cat
!!xkcd vim
 
@PeeHaa Yeah ouch.
 
@FélixGagnon-Grenier I agree with the bad UX but it's not that bad you should try it , you might just calculate simple 1+1
 
> Design your own Security
jump off that boat. it is doomed. also I have no clue what I'm saying
 
There are a dwindling number of tasks that humans can do better than robots.
 
5:20 PM
The intro makes me think about a perpetuum mobile, but I will read on nonetheless
typo btw you attempt to
ok question @SasanFarrokh. How are you going to store the formula?
Also I left you a present @SasanFarrokh advpassword.com
 
lol
<3 @PeeHaa
 
;-)
 
> If you pull firebird then I am definitely dropping PHP7 and sticking with a working PHP5 infrastructure!
Quick, pull firebird, Lester is about to stick with PHP 5!
 
@PeeHaa uhm, it does blue by default… it's just your command line which has a black bg…
 
@bwoebi putty
Damn terminal macos hipster :p
 
5:33 PM
blue on white is pretty readable
@PeeHaa Why? My terminal is green on black
 
meh. comments should have something like color: inherit. who reads them anyway?
 
testing my error handling for my form, everything works, then I find one part is not working as intended. head->desk();
 
@PeeHaa But I can configure the blue to be displayed as lighter blue or so
 
@bwoebi oh that's kinda retro :P
 
yesterday, by bwoebi
@NikiC I think of him! I offer him an unsupported version of PHP working with his code! He shall use 5.1 forever!
 
5:34 PM
this is a problem future Tiffany will have to worry about.
 
@kelunik heheheheh
 
@bwoebi the built-in green terminal is quite cool
 
@FélixGagnon-Grenier the "Grass" theme?
 
@bwoebi I don't have it at hand, but probably. I was pleasantly surprised to see it again this week when dealing with my old laptop.
feels all matrix-ish
 
@FélixGagnon-Grenier I think green on black is more matrix-ish :-P
 
5:36 PM
yeah, that's what I meant.
I'll agree "the built-in green terminal" is nowhere near clear ;)
 
@FélixGagnon-Grenier well, grass theme is green background
@LeviMorrison There's nothing worse than highlighting on a black background…
 
@SasanFarrokh no answer on my storage question? :)
 
That's the reason why I have my terminal in all-green and without highlighting in editors…
 
@bwoebi Uhm, why?
 
@kelunik eye cancer.
 
5:45 PM
lol that's a clear statement
 
@PeeHaa I'll hazard they're busy wondering wht they ever chose that third party solution for comments
 
@bwoebi Just don't use a green font but white instead or grey.
 
@kelunik white on black isn't very comfortable either. That's what I have in single-user mode and it annoys me…
 
@FélixGagnon-Grenier It's not 3rd party though
 
@bwoebi And why?
 
5:48 PM
@PeeHaa tbh I have trouble understanding what it is.
 
Noight guys, am feeling sick today dunno why ....
o/
 
later
 
@kelunik Can't tell you why it's tiring my eyes and not as easy to read. … It just is that way.
 
@tereško should I watch dark matter?
 
5:50 PM
@bwoebi If it's tiring your eyes, maybe you should just start making your font larger.
 
@kelunik I was talking about signle user mode where the font is not that small
 
Hello guys! How are you!
 
@bwoebi Colors on black are way nicer than on white though.
 

« first day (2130 days earlier)      last day (2833 days later) »