« first day (2138 days earlier)      last day (2813 days later) » 

6:07 PM
@Machavity One of the peculiarities with using PHP on Windows (especially with packages like WAMP and XAMPP) is that the extension_dir and config_dir are typically altered by those packages in ways that's not obvious to a novice. So the normal paths to trouble shooting don't always work out there. They may actually have placed the extension file in the path they believe it should be loaded from but their PHP might not actually be looking there in some cases.
 
@Sherif I upvoted. Is a good answer. Not sure the OP is done with you tho
 
Based on his last comment I suspect he's having the same trouble most people get with t his altered ext path dilemma. This is why people should just stop using PHP on Windows and install a damn VM :/
 
Incidentally, reviews are always imprecise. Don't go around assuming the worst in close voters. That's why there's reopen. Or you can ping me. Or hit any of the numerous gold PHP people in here
@Sherif Agreed 100%
 
@Machavity I didn't assume the worst. That's why I pinged you and mentioned it here. I figured if you're lurking around you'll see it.
 
Well, either way process worked. Reminds me why I don't host on Win machines ;)
 
6:17 PM
Can i create a class method without instantiating the class? Like: Query::make (...)?
 
@ChrysUgwu Static methods can do that
 
Without it being declared already?
More like the __call method
 
Might need some more context. A couple of ways to go with that
 
@ChrysUgwu maybe write out in pseudo-code what you want to do? Because the words don't make that much sense.
 
I want create a dynamic class method
 
6:26 PM
you mean like ruby monkey-patching? Then no, PHP doesn't support that.
 
@ChrysUgwu There's __callstatic magic
Is that what you're looking for?
 
You might be able to do something with anonymous classes......but why? What problem are you trying to solve here?
 
> __callStatic() is triggered when invoking inaccessible methods in a static context.
 
Anonymous
When describing your role in a project, what would be the best way to describe "I did everything."?
 
@JayIsTooCommon I make the coffee?
I order the Pizza?
 
6:31 PM
@JayIsTooCommon Everything as in "I made the decisions" or "I set the server up, wrote the code, etc"
 
@JayIsTooCommon sole developer.
 
Anonymous
That's what I've got, sole Developer - just wasn't sure :)
 
Anonymous
@Machavity Code + decisions
 
Yeah, sole dev would be a good fit
 
Anonymous
tyvm :)
 
6:32 PM
Projects don't have roles, typically. Projects have a definitive beginning and end. As such they typically have goals, objectives, and accomplishments. You have a role to play in a company. You have a role to play on a team. You usually don't have a specific role to play in a project unless you are talking about a massive project.
It's pointless to try and describe your role in a project as "I wore all the hats", because that's just obvious if you're the only involved in the project.
 
@JayIsTooCommon Grand Poobah
 
If this is for a resume or something it's better to describe actual quantifiable things you did. Like "I implemented X and achieved Y"
 
Anonymous
Well to give it context, I'm listing projects on my CV with a sub-heading of 'Role' to describe what my role in the project was - You wouldn't recommend doing this?
 
Anonymous
Right ok
 
@JayIsTooCommon No, I would infact, strongly recommend against it.
There's a reason why.
 
6:34 PM
"person who forgot to say no."
 
99% of your CV isn't even read. It's skimmed. Recruiters usually have to go through thousands of CVs a week. They don't have time to read them all. What they do is usually just skim them for key words.
You want those key words to be meaningful and stand out as quantifiable accomplishments. Not just arbitrary roles.
Rule #1 of writing a CV: if it's longer than 1 page it's too much.
 
Anonymous
Ok - to give even more context. A recruiter wants me to detail my experience with a specific framework on my CV. That's why I went with projects, what would you recommend?
 
@JayIsTooCommon careercup.com/resume
Gayle McDowell is one of the smartest people I know when it comes to technical interview and CV advice.
That is a good place to start for recommendations.
 
Setting a time limit on thinking/editing it. The point of a CV is just to rouse enough interest for an interview......you'll either do that easily, or not.
 
Anonymous
Thank you both... time to re-write ..
 
6:39 PM
Notice number 6:
>
Accomplishment Oriented: Your bullets should focus on your accomplishments - that is, the impact you had - rather than your responsibilities. What did you build, create, design, optimize, lead, etc?
For example, I improved the Cache service performance in framework X by 15%.
That's a quantifiable accomplishment. It states exactly what you did, and by how much.
 
Anonymous
Yep, I realise now my CV is too long and shitty. Any opinion on providing repo links?
 
Just include your github. That's what I usually do.
If they ask for specific repositories/projects then you can send those out of band.
 
Anonymous
OK understood. Thanks dude, appreciate it.
 
Things I usually list for contact are email/phone, github, and linkedin.
Although, now, it seems to be popular to also list your StackOverflow on your CV apparently?
 
Anonymous
Eh.. I couldn't give my SO with the shit i've come out with in this room :P
 
6:47 PM
Not sure when people started doing that, but I've seen quite a few CVs recently that do that.
@JayIsTooCommon You should see the shit other people come out with. Your shit may not stink nearly as bad as you think.
 
@JayIsTooCommon "Hung out with the people who write the PHP software itself". Yeah, when you put it like that, I wouldn't list it either
 
I had a guy walk into an interview with a single Java repository in his Github, that contained a single class, that he couldn't explain to me what a single line of code in that class did.
Talk about showmanship.
Your shit don't stink so bad until you've seen how badly some other people's shit stinks.
 
Also, if you're going to add a selfie of yourself to your C.V., don't take it in a bathroom.
And if you do take it in a bathroom, flush the toilet first.
 
@JayIsTooCommon put @PeeHaa's mom down as a reference
 
Anonymous
6:51 PM
I guess that's a way to put it @Machavity
 
/yes, this happened.
 
Anonymous
@PaulCrovella She would big me up too much, would come across exaggerated :)
 
@Danack but … he just wanted to show off that a small odor won't annoy him.
 
Yeah, "selfie fails" is not a Google search I wanna do
 
@Machavity heh, yeah, but this guy couldn't even write fizzbuzz in Java. I mean... come on. You can't write a single line of Java code in a technical interview and you listed Java as one of your core skills, I have serious doubts about your ability to do so on the job.
 
Ekn
6:57 PM
I saw a 3 page one where the last page consisted of icons/vectors representing her hobbies, quite colourful.
 
This is clearly someone just copied some random Java class form some random textbook and put it on their github to show me they write Java.
 
True story: we put an ad in the local paper for a low end coding job. Just had to be familiar with programming in general. Had a woman apply with 0 programming. When I asked her why she had applied she just shrugged and said "I just needed to apply somewhere"
 
Anonymous
Tbh - it breaks the 1 page rule but this still does it for me :P rleonardi.com/interactive-resume
 
@Machavity Did she get the job?
 
@Sherif Hell no :P
 
6:59 PM
I mean, you set the bar low enough :/
 
Anonymous
@Machavity We advertised for Web Systems Administrator and had an 'Administrator (secretary)' apply :P
 
ad: "Just know programming" ... applicant: "I know that guy!"
 
We did hire a guy who had a college degree and a decent background in C++. PHP drove him nuts intitally
 
@Machavity I get that from the Java guys too. They never want to do PHP.
 
Pretty sure a lot of PHP guys feel that way about Java too
 
7:01 PM
Because they're not used to it?
 
They're like ... what? I have to write PHP. I'm outta here!
 
Basically everything sucks.
 
@bwoebi No, they have worked with PHP. They just don't like it. PHP is too ... how shall I put this nicely? much of a piece of shit useless language for them.
 
Anonymous
I was supposed to be a PHP dev at my current place and have been working on a Ruby project for the past 2 months. Slit wrists worthy.
 
@Sherif Well, when I have to do traditional framework work I also like sprints…
 
7:04 PM
@bwoebi As in agile/scrum sprints?
 
@Sherif no… as in sprinting away
 
Ahh. Gotchya.
Depends on the level of involvement required for me. If you ask me to work on Java or C/C++ I'm OK with it as long as you're not asking me to start something from scratch. I don't want to be the one maintaining that code for a long time if I'm not particularly fond of the language.
Especially given the breadth of scope (tall enough order and all).
The Ruby guys I just outright refuse to work with. They tend to have the worst security issues out of any other group.
 
7:18 PM
I wish I knew how to plan things. Architecture wise. Is it ever done well?
 
@Fabor Get the book Just Enough Software Architecture by George Fairbanks.
 
@Fabor you can do general architecture early, but doing specific architecture is batshit insane
 
@Fabor Also youtube.com/watch?v=x30DcBfCJRI this is a pretty good watch if you're trying to get into software architecture
 
Cheers @Sherif. I'd pick up the book but I need it on Kindle. I'll watch the video though.
 
Architecture is definitely hard stuff, but it can be learned, just like anything else. The problem is we spend the vast majority of our early years writing code in learning architecture through trial-by-error.
 
7:22 PM
@bwoebi Aye. Sadly it's hard to find a work environment that'll teach you such things too. At least in my experience.
 
@Fabor I'm pretty sure it has a kindle version available on Amazon.
 
@Sherif Hunting for it atm.
 
Most people won't teach you architecture, because they either never learned it themselves or they are relying heavily on higher level abstractions to sustain and build their own architecture.
 
Not on amazon it seems, but his own site may have it.
 
Really? I'm surprised that amazon doesn't have it.
 
7:24 PM
Oh he'll email me it if I buy it from google play. georgefairbanks.com/e-book
 
Evening.
 
Oh, he changed it.
 
Cool, looking forward to reading it and slapping myself.
 
heh
Don't beat yourself up too much. Like, I said, architecture is hard stuff and most people learn it over the years just by making a bunch of mistakes. Unless you actually went to school and took software architecture classes, it's rare you'll be familiar with any of those software design details.
 
hmmm.... soooo tempted to downvote 6 @Sherif's posts to annoy the heck out of their 5k rep :D
 
7:30 PM
There are enough good high level abstractions out there that make decent architectural decisions for us that we rarely have to think too hard about architecture.
Just take every single PHP framework ever created as a prime example.
@FélixGagnon-Grenier If I gave a crap about my SO rep you'd probably see me with 100K by now.
 
my Stackoverflow avatar was suddenly changed, does anyone know whats up with that?
 
@MarcelBurkhard Your gravatar went bust?
 
it was an autogenerated one, replaced by another autogenerated one
 
7:34 PM
random gravatar is random?
 
Did you merge from a different SSO account?
Just a wild guess, since I actually have no clue.
 
no I didn't do anything to be honest
member for 4 years, 10 months, it was always the same pic
 
Wow. Looks green in chat but yellow on So
 
well nvm I'm just gonna upload it anyway, was just curious
yeah exactly
 
@Machavity Really? It looks yellow for me in both places.
 
7:35 PM
/all hail
 
37
Q: Why did my avatar change?

barronMy network-wide gravatar identicon used to be a pleasant blue, now it's bright green. I didn't change my email. Did Stack Exchange change its email hashing algorithm or something?

 
Machavity probably has it cached
thx @PaulCrovella
 
still the green one in the sidebar for me
 
Ekn
reverse, on my end
 
Yellow on both for me
 
7:37 PM
haha weird
for me its yellow in the sidebar and next to the textbox but green in chat history
 
Let's just all agree that gravatar sucks, technology is hard, and shit breaks all the time and move on.
 
Yeah, yellow on both ends here as well. Probably still cached the old one on some servers.
@MarcelBurkhard Now would be a good time to pick a personalised avatar! ;-)
Then you no longer have to worry about Gravatar failures.
 
well I handled it a bit backwards and used the randomly generated one on github etc.
it just looked nice, I'm not really the person personalizing things
 
it looked festive. like xmas.
 
7:39 PM
:D
 
Are you one of those paranoid individuals that thinks of their pictures ever leak out on the Internet all their privacy will be lost forever and tinfoil hats ensue?
No judgement. Just curious.
 
no I just don't care enough (well it seems I do) to change it
the new yellow one is so ugly I actually have to change it
 
7:52 PM
is that dress yellow or green?
Actually, I refrained from asking before but @bwoebi is you avatar change your doing?
 
@FélixGagnon-Grenier What do you mean?
s/you avatar/your avatar/ ?
 
yeah. you got yellow all of a sudden yesterday
 
huh?
ah
 
hehe sorry. your avatar* got yellow all of a sudden :p
 
7:55 PM
maybe you got la jaunisse?
 
30
A: Why did my avatar change?

OriolIt seems a gravatar problem, not related to Stack Overflow. Your big avatar (https://www.gravatar.com/avatar/efef01b733b5e8af2d8670efe6990e90?s=328&d=identicon&r=PG) is bright green: Your small avatar (https://www.gravatar.com/avatar/efef01b733b5e8af2d8670efe6990e90?s=32&d=identicon&r=PG) is ...

@FélixGagnon-Grenier non :-P
 
Hmm @bwoebi is still having his good ol' green cross-ish avatar here.
 
here too. Caching.
 
yep, better save it if you want to keep it ;-)
 
@Oldskool I have…
 
8:01 PM
If you upload it as your new avatar now it should overwrite the gravatar one.
And thus appear "normal" again for everybody.
But yeah, why am I telling you the obivous... :P
 
They told me I become anything I wanted.
So I became a fire elemental:
 
someone saying me that cat's are negative sources of energy..
 
Any regex guru ? I know it's not the right place... but I will pay to find it... damn... quick
 
@Oldskool well, that wasn't obvious to me, lol
@Oldskool done
 
Need to find all _ and . that are between {{ and }}

I come to this :
(?<=\{\{)(.*)(?=\}\})

It find all character between {{ and }} but I can't get it to find only _ or .

I tried

(?<=\{\{)(\.)(?=\}\})
(?<=\{\{)(_)(?=\}\})
(?<=\{\{)([\.])(?=\}\})
(?<=\{\{)([_])(?=\}\})

none work -.-
 
8:23 PM
what's for dinner tonight everyone?
 
@JonathanLafleur middle group: ([_\.]*)
 
@pmmaga I would love that work, but it's not :(
 
I've been missing @rdlowrey today…
 
If people just stopped using regular expressions to deal with things like parsing HTML and reinventing PHP templating badly, we'd have at least 50% fewer regex questions.
I suck at regex, but I also suck at these other things, so therefore logically I must solve my problem by using regex!
Baffling
 
regex is not the magic solution to everything, but ppl seem to wanna make it that
 
8:29 PM
@Sherif someone made a 32k line XML file with {{ variable }}
and now I need to remove all {{ }} and replace all . and _ with - for compatibity I will not do that manually...
 
@rabbitguy yeah… but regex involves unicorns…
[being killed, obviously.]
 
"I am going to court tomorrow on charges of child molestation. What regex do I need to use in order to get the judge to let me off?"
 
@JonathanLafleur Well, whatever you're doing it clearly isn't inline with what you asked about. Has XY written all over it so far.
 
@rabbitguy s/judge's verdict:.+//s
 
8:30 PM
regex is "neat", but makes code almost unreadable
@bwoebi lol
 
This look familiar to any of the amphp people? I get this inside my Vagrant box quite a lot: pastebin.com/x7ZufBhX
 
you know what regex reminds me of? brainf*ck
it can look like it sometimes
 
@Oldskool your error handler is faulty
 
@Sherif I asked to help me capture a part of a string, I will make my replace on my own. Don't need ppl to do everything for me, just asking if there's someone willing to help.
 
@rabbitguy o.0
How does regex look anything like brainfuck?
 
8:32 PM
just a string of chars that don't mean what they look like
 
@rabbitguy It remembers me more LISP than brainfuck
 
@bwoebi Hmm, looks more like a DNS resolution failure? Not sure what the error handler has to do with that?
 
Did @igorw stop contributing to PHP? I haven't seen much of him in... probably a year or so.
 
soo many times in java questions on SO someone is looking for a regex solution, and then I come in and say, "use this StringBuilder instead" and ppl are all, "whoa! That code is readable!"
 
@JonathanLafleur You clearly don't have a very good handle on XY problems.
 
8:32 PM
@Oldskool Because it's silenced with an @ and your error handler doesn't respect that case
@Oldskool add an if (!error_reporting()) return; at the start of your error handler function
 
@Sherif okay, so the good way is to let php open that xml file, scan line by line, explode on curly bracket, str_replace then save again... I found that solution a little bit less interesting then to use sublime, regex search n replace and hit save. sorry for wasting your time.
 
@bwoebi Should really be if (!($level & error_reporting())) return;
 
@Trowski uh, why? … you anyway have E_ALL :-P
 
@JonathanLafleur The way to solve a problem is to A) first understand the problem well then B) examine all possible solutions to identify the one that best fits the parameters of your well understood problem.
Most people fail at A.
 
@Oldskool yeah I have no clue about anything but I tried artax lately. I got a lot of those. apparently was related to what @bwoebi says about the error reporting thingy
 
Jay
8:36 PM
hey guys. I am trying to get the a result that states its true if todays date is not past todays date. pastebin.com/Vz5PPvCQ can anyone help?
 
@Sherif and you absolutely never fail at A i'm sure.
 
@bwoebi So the error handler only handles errors that should be handled.
 
@Trowski hmh k
will recommend that in future then
 
@Jay that will always be true bcz today's date is never past today's date
 
@JonathanLafleur Everyone does sometimes. Just some do it astonishingly often…
 
Jay
8:38 PM
i should swap it?
 
@JonathanLafleur I never said I don't fail at any thing. However, that's besides the point here.
 
@Jay should you swap what?
 
The lesson in context is most people will jump to picking a solution in order to avoid understanding the problem, in hopes that it will be a good shortcut. That almost never pans out in practice.
 
I'm just telling that 80% of the time when someone ask a question here he get bullied about not knowing the way of god that you seem to manipulate perfectly. That's it.
 
Jay
@rabbitguy what would you do?
 
8:40 PM
@Oldskool or, more exactly, these errors happen probably (read: as far as I can understand) due to the asynchronous nature of all this. maybe something like it's normal and expected that at this point in time the error happens, even if there actually is no problem
 
@JonathanLafleur I assure you no one is bullying you. If anything they're trying to help you.
 
read what you said again, because it makes no sense... "I am trying to get hte result that state it's true if today's date is not past today's date" When would today's date be past today's date?
I don't think that you meant what you said there
 
@JonathanLafleur Find me a single instance of any utterance involved in your discussion where anyone ever states "you should have known solution X"? I posit that not only will you be unable to find any such thing having been said, but you will also find that was said was actually quite to the contrary. Not only am I saying I don't know what the solution is, but that the solution is the least important part of a problem.
6 mins ago, by Sherif
@JonathanLafleur The way to solve a problem is to A) first understand the problem well then B) examine all possible solutions to identify the one that best fits the parameters of your well understood problem.
The part that trips most people up is A. Because understanding a problem is harder than finding a solution for it. There are likely many solutions to one problem. It's unlikely, however, that many of those solutions will work well for you.
 
I'm trying to understand the conversion between color models. I'm having difficulty understanding the mod 6 part in hue calculation from RGB. See this image: wikimedia.org/api/rest_v1/media/math/render/svg/…
And this calculation is from the dutch wiki wikimedia.org/api/rest_v1/media/math/render/svg/…
 
@JonathanLafleur You want to find _ and . to replace them?
 
8:45 PM
ok
 
How should I write this => hue = (g - b) / c . Where does mod 6 come into play?
 
"FarCry: Blood Dragon" complete
I wonder, what should I play next
 
@akinuri Precedence. ((g - b) / c) % 6
 
@Sherif the thing is that I asked for a precise question, because I already did A. Doing such a search in replace directly in PHP cause it to crash for a lack of memory on the server. So I was doing it myself on sublime text editor with s&r fonction, it work very good for many quick fix like this. So my question is not about if i've done my research well, is about does someone can help me.
@Trowski yes
 
@JonathanLafleur there is an ignore button - it is awesome.
 
8:46 PM
@JonathanLafleur /\{\{.*?([_\.]).*?\}\}/ would probably work in preg_replace()
You needed .*? on each side of the matching group to un-greedly match characters in-between the {{ and }}.
 
@JonathanLafleur I get that. That is precisely why I made my statement :) The fact that you missed the point makes it that much more valuable.
 
@Trowski \{\{.*?([_\.]).*?\}\} return me the whole string, I need it to return only the . or _ is that possible ?
 
you ever get a song stuck in your head at work and there is no music around to help change the song up in your head? Like they won't let me listen to music here in the office, so I have had the sample used in "Mo Money, Mo Problems" stuck in head for the last 3 hours
 
@JonathanLafleur It should only be matching the center group... are you looking at the whole array of matches?
 
My intention is not to help you continue down your path of using the solution you are currently struggling to get working. It's to suggest that maybe you need to abandon that path altogether and re-evaluate the problem rather than the solution. big difference
 
8:49 PM
The first element is always the entire matched string.
 
Jay
@rabbitguy yea didnt mean what I said
 
"they won't let me listen to music here in the office"
 
Jay
@rabbitguy You know what I am meaning tho?
 
@Trowski Notice he's saying it returns the whole string. i.e. he's using preg_match and not preg_replace. hence XY ;)
 
@Jay I'm not trying to be rude.... no, I don't wanna assume from your code on what the expected output is. Can you ask it again so I don't go down the wrong path?
@Danack idk... my boss got upset a few months ago that everything I did on my computer wasn't 100% to due w/developing and so he got rid of anything not work related. I can't even snack at my desk
@Jay just reword it, please, so that I make sure I am giving you the right answer
 
Jay
8:52 PM
@rabbitguy I have a date and if that date is within 14 days of today return true
 
@Jay okay, and that's what your code looks like you were trying to do....
just a sec
 
Jay
can be today too
@rabbitguy cheers mate]
 
does the code not work?
 
@Trowski yes the whole match
 
user895378
@bwoebi sorry, was out today. sitting down to code :)
 
user895378
8:56 PM
Hey @Ocramius happy birthday buddy!
 
Jay
no
 
@jay look here for a better way to modify your date/time: php.net/manual/en/datetime.modify.php
therefore, if you go over a month or whatever, the date updates correctly
@jay also, it is poor practice to reuse that variable ($start_date) and change it from a string to a date object. Just create a new variable instead.
 

« first day (2138 days earlier)      last day (2813 days later) »