« first day (983 days earlier)      last day (3981 days later) » 

6:00 PM
PEAR is messed up in my xampp instalation (Windows 7, F:/xampp)
 
@Sudh pear is messed up period
 
How to bring order in chaos?
 
@Sudh stop using it
 
Question: How to use phpExcel without installing it from PEAR?
@Pee
@PeeHaa
 
clone it from github? :)
 
6:04 PM
yeah sounds good... tried the link on their home page downloaded everything but the php files
 
:P
 
And no stable versions listed on Github.... How do you guyz do excel manipulation (Java guy doing a php project to learn it)
 
@Sudh Sure there are stable releases: github.com/PHPOffice/PHPExcel/tags
 
Ahh yeah got it..Thanks... SO is PEAR an old thing now?
 
yes and crap. Especially crap
 
6:13 PM
Ahh and I was struggling to make it work from last Monday :(...
Thanks for the pointers :)
 
np
 
@Sudh The only thing I would consider installing from PEAR is PHPUnit.
 
@cspray Even that was a pain the last time I tried it
 
@PeeHaa Yea. They've added composer support recently so I don't think even that is necessary
But that's still the only project I would even consider.
 
@sudh The Java Apache POI libraries are excellent. Just call the jar file from PHP (only does reading) github.com/Danack/ExcelConverter
 
6:17 PM
Unfortunately I have to work with PEAR on a professional level. I can attest to the level of crappiness.
 
disclaimer that code hasn't been used in a production environment - feel free to send bug reports.
 
@cspray: yeah.. I see even xampp has it's own issues
btw, how do you guyz set up php dev environment ?
use xampp or install everything and then link all the things with each other?
 
@Sudh Not many people in here are using 1 click WAMP stack installers I think
As a matter of fact I have a LNPP stack :P
 
6:31 PM
what is N?
 
nginx
 
I am using Vagrant these days.if you are working on multiple projects,I recommend it ..there are many pre built boxes for php out there
 
I avoid *AMP style one-click installers
I prefer just compiling it myself. It isn't that hard and I'm a control freak
 
compiling php is way too much for me .. apt-get does the job :P
 
user895378
@cspray +1
 
6:33 PM
I can experience the need to avoid.. my first thought was too use eclipse pdt and stuff.. but I thought first do the basic stuff
 
We are about to deploy the close and flag changes across the network, hang tight!
 
user895378
If my power goes out I'll know to blame stackoverflow's changes.
 
Shut it down!
 
Damn. Better find myself some TL questions fast
 
user895378
@ircmaxell I really appreciate your "BC is for Suckers" post. Thank you for articulating that in an easily digestible format to which I can link as necessary.
 
6:38 PM
@Gordon still without tl? => bah
 
user895378
That said, I just avoided a nice generator use case in order to retain 5.4 compatibility :)
 
@rdlowrey Huh, since when do you support versions that are this old?
 
user895378
hehe I have a one-week buffer period after release before the previous version is officially deprecated in my mind.
 
user895378
So 5.4 support has a couple more days before it gets the axe.
 
user895378
I mean, I'm not writing code targeted to the kind of user who can't or doesn't know how to upgrade to the latest version of PHP ...
 
6:41 PM
Guyz.. any pointers to Why changing the include path in php.ini does not result in updating the include_path I am getting in the error?
Fatal error: require_once(): Failed opening required '../Classes/PHPExcel.php' (include_path='.;F:\xampp\php\PEAR') in F:\xampp\htdocs\01simple.php on line 37
 
@sudh Either you're not restarting your web server to load the changes or you're changing the wrong file.
php_info() shows which php.ini file is being used.
 
user895378
I would never use the include path for anything. Ever. That's your first mistake.
 
user895378
include_path is for shared hosting.
 
@rdlowrey: then?..use setincludepath()?
will use this eventually
 
6:44 PM
and yeah as rdlowrey said just download the Pear libraries to a lib directory within your project and include with relative path names, not absolute.
Then you can put your project anywhere without having to much around with include paths.
 
@rdlowrey +1
 
user895378
@Sudh No, I'm advocating using class autoloaders and if you're using third-party libs that can't do that you use a bootstrap file and define a couple of project-wide constants e.g. define('LIBDIR', dirname(__DIR__)) and manually require any dependencies you need (or their autoloaders) up front.
 
user895378
include_path is too magical and causes too much confusion and/or problems.
 
@rdlowrey: Oops... this is my first wk with php so a lot of that bounced except last line include_path is evil
 
user895378
You should know exactly what your project's dependencies are and be responsible for making sure they (or their autoloaders) are present.
 
6:47 PM
;)
 
user895378
@Sudh It's okay, everyone was a noob at some point :)
 
except for rdlowrey, he was never a noob
 
@rdlowrey uhhhhm I'm still a noob
 
haha I guessed that much :)
about rdlowrey
 
I'm getting really tired of "senior" PHP dev candidates not being able to name things they don't like about PHP.
 
user895378
6:48 PM
I was never a noob ... a tanned noob? Yes. But a regular noob? No. Never.
 
@Charles lies
 
@PeeHaa: your website, dying to see it
 
@DaveChen Which one? My main?
 
yes
 
6:49 PM
@PeeHaa Lies or inexperience.
 
@PeeHaa depends on the area
i would consider myself a complete noob in SQL
 
@AshwinMukhija lol what about goto and break...
 
I think I could see whether I still have the db schema somewhere. Other wise I need to just run it and see what columns its expect where :P @DaveChen
 
@Charles that's an awesome interview question
 
@DaveChen There's just that one function, and no other way to dig deeper. It's like giving an awesome looking limb of an action figure, without ever finding out more about it.
 
6:52 PM
just edited :P
 
user895378
@Charles I'm with @tereško, that's a great interview question. If you can't tick off several of PHP's warts straight away you're not a senior PHP dev.
 
break isn't the issue, break 2 is the problem
 
break 15.
 
@tereško It's also an awesome red flag.
 
And, goto is the bane of programming languages.
 
6:53 PM
It's a followup to "It looks like you've used languages X, Y and Z in addition to PHP. If you were building a new web application today, which of these languages would you use and why?"
I've found that anyone that chooses PHP as their language of choice invariably fails our code test later on.
 
jquery is the only answer ofc
 
probably HTML5 with phonegap native tools :D
 
well .. i would choose php , because my java is rusty and i have no real serverside experience with javascript .. and i still cannot code myself out of a bag with erlang
 
user895378
I steadfastly defend goto's inclusion in PHP. If you need to parse non-trivial grammars in a performant manner (granted, this is not a frequent use-case in PHP) it's absolutely essential.
 
serverside experience with javascript node.js?
 
6:55 PM
@DaveChen that's actually only one example
 
there's so many out there
 
@tereško When candidates don't have non-PHP server-side experience, I usually change the question to "what other languages do you want to learn?"
 
user895378
@Charles I think that's a reflection on the average PHP dev ... not any inherent inability of the language itself to create a performant green-field application.
 
And Python
 
@rdlowrey Very agreed.
 
6:56 PM
javascript
 
Ruby On Rails does half the work for you with its CLI
 
2 messages moved to RubyLover
5
 
user895378
@PeeHaa lol
 
muahhahahahaaha
 
What!
 
6:57 PM
:D
 
@AshwinMukhija rofl
 
'elp, 'elp, we're being repressed! Come see the violence inherent in the system!
 
That was cute.
:D
 
:)
 
or asp.net, or coldfusion
 
6:58 PM
@LeviMorrison I've added that first but I think it was false in that case.
 
Actually, I'd love to learn JSP
 
@PeeHaa Checkmate.
 
Because I have had some experience in native Java
 
Hello All, I had a question for apache webserver redirect.
How can i set cache based on response code
Eg:
For http 200 - "max-age=3600, public, must-revalidate"
HTTP 302 - "private, must-revalidate"
 
7:00 PM
ow noes. that must trigger @rdlowrey
nothing???
He's lying dead in his room
 
@AshwinMukhija I doubt that. Java is an okay langauage. Java and JSP is not fun.
 
The only time I will EVER try LUA is to develop WoW addons.
 
user895378
@PeeHaa rofl
 
I found it with Love2D and some other games that incorporate it ... :D
 
yay 4 edits
 
7:01 PM
@VishalVerma You're looking for the Cache-Control header. Google shall reveal all. As for how to make it work without a server-side language thinking about the response code...
 
user895378
@VishalVerma I don't know anything about how to do something like that with apache
 
@Charles: Of course i've come here after google. I understand Cache-Control. But question has other words surrounding it
 
magic.conf or httpd.conf idk
 
@VishalVerma How did you get on with that link that described how to do it?
 
7:02 PM
@LeviMorrison ended up with strtotime('today') and strtotime('tomorrow - 1 minute') which sorts of sucks but it works...
 
Presumably not well - how about making it a question?
 
@Charles , here is something i would ask: what have been the task for which you have used anonymous functions (or any other of 5.3+ features) in php?"
 
Hi Danack, glad to see you still here. That link was helpfule for specific redirects, I needed for overall 302 redirect change.
 
how about making it a question and posting most/all of your apache config?
 
closest thing i found was
"Header always set Cache-Control max-age=0"
where always corresponds to HTTP 200 according to few people
yes, that should be next step.. haven't posted any question on stackoverflow yet.. so was bit skeptical :)
 
CAM
7:04 PM
@PeeHaa What up w/ your opcode Cache Gui? the dirs are jacke dor is that me ?
 
@tereško I quiz people on their favorite new features in 5.3, 5.4 and 5.5. Nobody has ever mentioned anonymous functions or closures. Ever. Most can't even answer the question.
 
lol
 
@rdlowrey awesome! Glad to hear that!
 
@Charles Really?
Wow, that's...surprising
 
@cspray Really.
 
7:05 PM
@CAM Are you running it in a subdir instead of a subdomain?
 
The only person that ever answered the question sanely took another job before we could make her an offer.
Seattle is not a good place to hire competent PHP devs.
 
user895378
@VishalVerma For my part, I don't like the general paradigm of HTTP elements (like headers) being handled in a different place (the server) from your actual application (PHP). It should all happen in your PHP IMO ... leave the server software out of it.
 
@Charles i'll be available in sseptember =P
 
I guess it can be solved with an implementation of A* but I would like to avoid it if it is possible to increase the performances so that I can execute it in hours (not days).
 
user895378
7:06 PM
If for no other reason than some dev down the road has no clue what's going on in the application unless they know to pore over the httpd.conf in addition to the actual source code.
 
@Charles Maybe I need to move to the West Coast :P
 
WTF
2
Q: increase performances of CPU-intensive PHP scripts

EugenioI have a PHP script which takes hours (maybe days) to execute. It is quite simple but very CPU-intensive, most of the execution time is spent into (I can tell after having profiled the script): $array = explode(',', $a[$i]); where $a[$i] is a very long string which represents a vector of 30k el...

 
@rdlowrey That's interesting opinion. I feel that all caching and other stuffs should be left out of PHP for performance improvement, and for non-replication of code
 
@tereško zomg if we have to wait until september to hire someone I'm gonna freaking die
 
7:07 PM
@Charles if only
 
@cspray We're about to get desperate enough to begin looking for telecommuters...
 
user895378
@VishalVerma If you can show me concrete performance bottlenecks doing it in PHP I'll change my opinion. However, I have yet to see them.
 
@ircmaxell No man, I wouldn't want to subject you to this codebase.
I like you being sane.
 
@Charles It can't be worse than the one I'm working in now...
 
I am not sane, so no problem there
 
7:09 PM
also .. LAMP might be an issue .. everywhere i work, i leave behind a trail of freebsd servers
 
Yeah, I mean, it's not TOO bad... it's just that the most business-critical bits are all procedural and/or poorly designed. A 4k LOC class file and a 3k LOC procedural collection of nested ifs.
 
@Charles I'm not available to switch jobs, but I'm curious about the general ballpark for pay for this job?
 
CAM
@PeeHaa yea
i was lazy and did not vhost it
 
@LeviMorrison DOE, but we're looking to hire two devs and have a cap. We can afford a sr/jr pair or a set of mid-levels.
 
that sounds way too much like my current job
 
7:10 PM
@Charles What would be a Sr pay and a Jr pay?
 
user895378
The only way I'd ever take on a project with an existing codebase (i.e. wasn't greenfield) is if someone backed a dumptruck full of $$$ to my house.
 
@rdlowrey come to NYC
 
@CAM Yeah. Stop being lazy ;) Meh I will fix it soon
 
@LeviMorrison Mid-levels are 60-75k, total budget is going to roughly be twice that for two positions.
 
@rdlowrey Ah, I wish I was in your position
 
CAM
7:11 PM
HA
Want me to do it and sub a pull ?
 
Erm - if one of my questions had been closed and deleted, would I get notified or still be able to access it?
 
@CAM go for it :)
 
@Danack No and not unless you have the URL :/
 
@NikiC TL will be absorbed into one of the OT reasons. You will still be able to close debbuging and fix my code questions. Also, afaik, you will be able to supply custom OT reasons.
 
or a mod :)
 
CAM
7:11 PM
Prolly later tonight
 
kk
 
CAM
just plan on setting a constant
 
if it's deleted from a mod, you won't see the question :(
 
CAM
or a var
 
@Charles wrong
 
7:12 PM
@Gordon TEACH ME!
 
and me!
 
And me!
 
and me!
 
@Danack there was a change a few weeks ago that will make you see your questions.
 
well I imagine (never had one of my questions deleted), you would see a notification from your inbox... now seeing the question again? probably not
 
7:13 PM
@Charles , btw, another question that might be interesting to get some answers on: "What is the significance oof var keyword in PHP?"
 
15
A: What is the 'Recently Deleted Questions' page in the user profile?

Shog9It's an experiment. See, this is one of the all-time most popular feature-requests here on meta. But past experience suggests that implementing it as-requested would result in unbearable amounts of wailing, gnashing of teeth, meta complaints, Twitter rants, cats sleeping with dogs, CHAOS... So...

 
Yeah - there's nothing there for me.
@Gordon Well one of my questions has disappeared - i don't particularly care (as it had been downvoted and was about Smarty which I stopped using two weeks ago) - but it is odd.
 
lulz just got downvoted on the opcache question :P
 
hahahaha
 
@gordon Was a question about Smarty + plugins in May I believe. I don't care about bringing the question back, but it would appear to have dissapeared without notice which may be a bug.
 
@tereško Ooh, I like that one. One of my favorites is to ask them to define CSRF, XSS and SQL Injection and then ask them how to mitigate it. Most can't explain CSRF. We've had two people try to BS their way through them...
 
@gordon nope "No deleted recent questions"
 
ah in may. probably not recent enough
 
user895378
For those of you who doubt my psychic abilities ... (regarding the outcome of the NHL playoffs):
 
@Charles Looks like an interesting job.
 
user895378
7:16 PM
Apr 29 at 17:50, by rdlowrey
@ircmaxell meh, Chicago's going to smoke everyone anyway
 
it shows for me in your profile but I am a mod
 
user895378
Note the date of that prediction: Apr 29
 
"deleted by Community♦ Jun 22 at 12:11"
 
@Charles I don't try to BS when I don't know what something is. Everyone I've interviewed with that I talked to later appreciated it.
 
deleted recent questions = recent questions that have been deleted rather than recently deleted questions.
 
7:17 PM
@rdlowrey I really thought after Game 3 of the Finals that Boston would wind up winning it all in 6...but when they lost Game 4 at home I knew it was over.
 
@Danack I'll ask around why it's not showing then
 
@LeviMorrison It can be! The devs end up working closely with every department, and most of the people that work here are great. Once you get over the codebase being horrible, as all codebases are, it's pretty good.
 
laters
 
cheers
 
user895378
@cspray I couldn't believe how they gagged that one up last night in the last 90 seconds.
 
7:18 PM
@rdlowrey Yea
There towards the end of the series the defense just didn't appear to be the same
 
@Gordon I expect that it's because it looks like it's the standard "Community nukes low-views unanswered downvoted questions more than X days old" thing
 
Erm - so the on-hold change got rolled back? Or am i seeing things again?
 
7:49 PM
student.sps-prosek.cz/~eisead11it/web/Rozvrh/2013-06-25
RewriteRule ^b/(\d{4}-\d{2}-\d{2}) index.php?date=$1 what's wrong here? Can't figure it out
 
IIRC you need [\d]{4} instead of just \d{4}
 
user652649
evening
 
@grobolom Sorry, but didn't do anything. (testing in here: htaccess.madewithlove.be)
 
8:10 PM
Ahahaha... so I asked one of the candidates to resubmit the code test after noticing that he accidentally misread a section. I also hinted to him that the thing he submits should be an example of his best code, as he submitted something that mixed business and display logic. So he rewrote it and added a completely unnecessary class to the thing to wrap the horrible mixing of business and display logic. This person considers himself a "senior" developer.
 
Good evening
 
@MadaraUchiha No it isn't!
 
(more like night)
 
i guess i will go and poke at my framework for an hour .. it seems to help to retain my sanity
 
8:15 PM
@Charles Yeah? How's your evening?
And I'll tell you about mine
 
Oh my gods every single one of these files has a closing ?>
 
care to share the code ?
 
^^ That is how today has gone. Yesterday I made what should have been a six-hour drive in twelve instead.
@tereško pastebin.com/GM1PuDZT -- expires in 24h.
 
@Charles Do you have a sample of the kind of code you ask in interviews?
 
@cheesemacfly Of the kind of code, no, but lemme give the actual task given...
 
TVK
8:18 PM
@Charles Well that's just nasty.
 
@cheesemacfly pastebin.com/wPPyTqDK -- expires in 24h. Link corrected with formatting.
 
@Charles How long do you give them?
 
@cheesemacfly One week.
And for the record, the code the user provided fails the third task because it doesn't do as much work in the query as possible. Only one candidate ever got this one right during this hiring round, and that's the one that took the other job first.
 
@Charles i have an issue with this one:
 
We've also found that any candidate that takes the "add CRUD" hint from the optional bits at the end also never adds any validation. It's fun exploiting their demo site and then calling them into another in-person to explain what went wrong...
 
8:23 PM
> It should be possible to switch between the three views of data using only Ajax requests. Accomplish this using either jQuery 1.x or Prototype 1.6.x.
 
@tereško What's wrong with it? Keep in mind that this test was originally built in 2006 when ajax was a new and mysterious thing. Prototype is in there because that's what we use.
 
@Charles If somebody has a decent github profile are they still expected to do that?
 
Hey guys, trying to do a SQL union query, where my second table has StateProvinceName, but first one doesn't. How do I combine them? Tried this for the first table
SELECT Name, Country, StateProvinceName as '', k.rank
 
> It should be possible to switch between the three views of data using only XHR calls. You can use choose to use javascript libraries (jquery, mootools, prototype) to perform said calls
... i would have worded it kinda like this
 
nvm
 
8:26 PM
@PeeHaa If there's enough code there, and they're proud enough of it, then they can skip the test. We've had only one candidate with published code before. :/
 
had it switched
 
point's being: 1. avoidance of jquery should be rewarded, 2. mootools is much better then prototype
 
@Charles :|
 
TVK
@tereško Just out of curiosity, why should jQuery be avoided?
 
@Charles Thanks for sharing this
 
8:28 PM
@tereško I'm actually pondering forcing them to use Prototype.
@PeeHaa Seriously. Seattle isn't good for PHP devs. Sigh.
 
@Charles that would be devious .. i like it
 
@Charles Damn didn´t realize it was that crappy over there :(
 
Why not just ask them to write it in native JS
 
@TVK huge performance hit, perpetuates bad practices, major architectural issues .. you should always favor well written native javascript
 
Instead of using Mootools/Prototype/jQuery.
 
8:29 PM
@PeeHaa Our operating theory is that all of the good devs are employed.
 
@Charles .. there is another option: only permit use of libraries that can be found in microjs.com list
 
TVK
Native impacts development time and readability though, but I wasn't aware of such issues with jQuery. Time to do some research I suppose.
Are these problems in both 1.x as well as 2.x?
 
@AshwinMukhija I dunno, that strikes me as excessively messy.
 
Well, that's the point.
 
anyone know how to stop Apache from sending emails for a certain subject line or anything? I accidently did a mail() function inside a function that runs around 40k times lol
 
8:32 PM
@TVK yes .. but with the 2.x you also loose the main reason for using jquery: cross-compatibility with IE
 
@Daniel Mother of God!
 
lol yeah, it doesn't seem to be slowing anything down, they keep trickling into my email though. setup a filter to delete them automatically, still pretty annoying though. any ideas?
 
@TVK .. and native JS has very little impact on development time in serious project. Since most of what you use are DOM selects and event listeners. If you use some 3rd party jquery plugins, then you are actually creating technical debt, which will start causing problems later.
 
@Daniel Restart the server?
 
@tereško Microajax sounds fantastic.
 
8:34 PM
yep that would probably work best I'm guessing
 
TVK
Sorry for the slow response, this EoP solution really isn't too stable.
Still, while native might be more efficient code-wise, I've found jQuery to speed development up a lot in terms of handling repetitive tasks and cross-compatibility.
And the animations can add a smooth feel with minimal effort.
 
actually , jquery has the worst animations of all the major JS libraries
 
TVK
In terms of performance?
 
8:41 PM
@TVK In terms of anything, really.
 
TVK
That's a bit broad to do anything with.
 
@TVK Performance, quality, smoothness, speed.
Try it on a slightly not-normal case, and you'll see what I mean.
 
TVK
Aren't three of those the same, though?
 
@TVK No
Performance refers to how much memory your browser consumes.
Quality refers to how well the code is written, (as well as the general "niceness" of the animation? I guess?)
Speed refers to the FPS, and smoothness refers to the fact that it doesn't lag or jump in the middle
I see them as different things, you might see them as one.
 
TVK
Fair enough, yeah.
 
8:47 PM
@NikiC: around?
 
@MadaraUchiha i would also add "reusability"
 
@tereško Agreed
 
you cannot separate the animation from the DOM node without hacking
 
wb
 
wb hakre
 
TVK
8:49 PM
So Mootools would be the generally preferred alternative?
(Over Prototype, that is.)
 
for animations : yes .. but that's like being the smartest kid in the remedial class
 
TVK
I mean in general as a replacement for tasks you'd do in jQuery.
I understand your preference for as much native JS as possible, but personally I don't find that to be a nice way of scripting.
 
which mostly means that you need to learn javascript
 
TVK
Which mostly means I need to either perform a lot more steps for repetitive tasks or re-invent the wheel with my own short versions for it.
 
but yes, I would prefer Mootools over jQuery, if I had to use a library
 
8:54 PM
@TVK So you basically prefer using a library, for the sake of using a library?
 
TVK
Alright, thanks.
 
@TVK you mean you never reuse the javascript that you wrote ?
 
@ircmaxell yes
 
TVK
No, for the sake of shortening development time and keeping the code focused on the actual goal.
@tereško Of course I do, but if a decent solution is already available I can re-use that code as well.
 
@tereško I've actually sadly not reached the level where I can write reusable JavaScript, but I'm getting there
(My focus was on PHP 90% of that time)
 
8:58 PM
@MadaraUchiha not all of it, but the event delegation structures, href parsing (basically -routing), XHR wrapper, JSON-to-DOM templating ... things like that
 
@tereško How do you do routing in JavaScript?
Isn't that usually the server's job?
 

« first day (983 days earlier)      last day (3981 days later) »