« first day (1055 days earlier)      last day (3898 days later) » 

3:01 PM
:-D
 
Any idea on file signing without getting them in the memory ?
 
Murder! Sex! Intrigue! Coming up next on PHP: The Internals.
9
 
@Bracketworks I would have written it more like this:
> Not everything can be found in the 5 most popular frameworks. For example - best practices.
 
@tereško I wouldn't have participated in that cluster-fuck to begin with.
However, I do appreciate the valiant folks (ahem, @ircmaxell) who have braced the cascade of drama. Alas, all good things must come to an end.
 
:-D
 
3:14 PM
@ircmaxell "Actually, the issue that broke the camels back was in a thread I never even replied to" Which one was it, if I may ask?
 
ahhh, now I get it
yes, that one was pretty bad
I shouldn't have dismissed that as the usual internals stupidity
@ircmaxell You might want to point that out. I think it would clarify a bit
 
perhaps...
but to be honest, what would it help?
 
Not specifically PHP related, but here goes anyway. I'm trying to fix a "regression" in one of our apps. The right way to do it would take a couple of days. The bandaid solution is about 10 minutes of work. The app is going to be replaced in the coming months. Should I bandaid and move on, or fix it right, even though it's going to be replaced?
 
@gms8994 difficult question to answer
 
3:23 PM
fix it right
 
"replaced" is prob not going to happen
 
@ircmaxell what do you mean?
 
BUT, you need to make a call. What are the risks of the baind-aid?
 
lol, NetBeans gets confused. Sometimes, it appears that when generating a docblock for a function in which a closure is assigned to something, the docblock will include the closure's parameters in the listing.
 
if it doesnt affect production much you should jsut fix it right
 
3:24 PM
@gms8994 I mean it's difficult, because you need to understand a lot more than you can communicate easily to make a valid determination. There are times the "right way" is appropriate. And there are times the "baindaid" is appropriate. Which time this is, strongly depends on a lot more than you can explain easily
 
the risks are honestly pretty small. bandaiding involves adding a new column (because the existing code works based on SHOW COLUMNS) and then updating the data afterwards. the right solution is to rip out the SHOW COLUMNS stuff and use the proper columns
 
it well help you in the future to fix it right
or else youre just bulding more problems for the future
 
@gms8994 I think a key factor may be whether any of the existing codebase (specifically anything related to where the band-aid goes) is eligible for re-use in the replacement.
 
@gms8994 how large is the team maintaining this?
@gms8994 give this post a read, I think it may help try to put things in perspective: blog.ircmaxell.com/2012/03/power-of-technical-debt.html
 
@ircmaxell Ah yeah I knew it was coming :D
 
3:27 PM
The last thing you want is a sweaty, dirty band-aid rearing it's ugly head in an all but new system.
 
@ircmaxell the team maintaining the current codebase is ~2. but it floats.
 
what does the other developer think?
 
@Bracketworks none of the existing codebase will be reused
everything is being replaced
@ircmaxell they don't have enough knowledge on the situation to give a good opinion
they got it about 3 weeks ago. I got it last week
 
@gms8994 Then given no further information, I'd just slap a big, pink band-aid on it.
 
@ircmaxell also, what did you mean by "replaced is prob not going to happen"?
 
3:31 PM
@gms8994 almost all of the "we're going to rewrite this" times I've seen people talk about, 95% of them never actually ship
 
ah. understood. luckily, this one is 95% going to, as it's actually combining and replacing 3 other apps
 
it may, but typically they don't.
 
we've got a ton of legacy code around here. it's painful to support
 
And if you're that confident, perhaps the bandaid is acceptable
 
ok. I just needed some reassurances that I wasn't doing something crazy by considering the bandaid
 
3:32 PM
@DaveRandom Depends on how cold the water is.
2
 
RTOFL
 
@ircmaxell I am acutely aware of this problem at this moment in time. The project in question was theoretically released 3 years ago, and I estimate it is currently 75% complete, and no more than a 10% improvement on what is being replaced.
 
ok. thanks folks
 
@DaveRandom yup. I like Paul Jones's comments, where he basically says "nuke it from orbit" never works. Instead, you need to evolve a codebase... You need to make it better part by part, and evolve the new system from the legacy one.
 
@ircmaxell Given the manpower, do you think forking efforts into support and development is worthwhile, or do you end up with too much a rift in the project goals?
 
3:35 PM
Hello
 
@NikiC And to be fair, people like Pierre won't get it without a blog posts worth of explanation of the lunacy in that reply. And I'm not going to write that post
 
Generally speaking of course.'
 
usort is based on which of the sort algorithm ???
 
Sort of a "Nuke it from orbit, while we rebuild it on the moon at the same time" approach.
 
@Baba Pretty much every sort in PHP is Quicksort
 
3:37 PM
@Bracketworks very much depends project to project. I think it's worth discussing. But typically, I try to split apart the existing app into sub-systems, and then replace those small subsystems one-by-one. They should be less than 1 month effort each, otherwise it won't really happen
 
@DaveRandom Oh ok ...
@DaveRandom Thanks
 
@Baba Yup, zend_qsort
 
@DaveRandom Cool
 
@ircmaxell Makes sense; it is subjective of course, but was just wondering.
 
@Baba impl if you're interested
 
3:39 PM
@DaveRandom How did you know i need that ... nice one ...
 
:-)
 
Is it safe to accept parameters by reference in callbacks for functions like array_filter? Such as array_filter($a, function (&$v) { $v++; return $v > 5; });
By safe I mean, is this something fragile as implementations go?
 
@Bracketworks imo it's a violation of command/query separation, I wouldn't do it.
 
@Bracketworks It's certainly non-obvious behaviour IMO, not sure about the stability though
 
3:46 PM
@Bracketworks definitely
 
@igorw Fair enough; use case is pretty trivial; just wanted to avoid an array_map/array_walk before.
 
@Bracketworks what's wrong with adding a map? much cleaner imo.
 
@rdlowrey thanks for the feeback, I'll have a think ...
 
@igorw Yea, from a C/Q perspective, it is. I don't know, sometimes I think stupid things are smart. I think they call that "clever" ;-)
 
@ircmaxell You aren't? You looove writing blog posts :)
 
3:51 PM
@NikiC No...
 
@rdlowrey is only ever wait for something clearer ?? dunno how to do that in markdown, anyone, some underline in a bolt italic phrase ?
 
Fucking non-object arrays. It's 2013, why can't I do $array = $array->map( ... )->unique()->filter( ... );!?
 
@Bracketworks clever is complex.
 
@igorw Only when you come back to it next week and lolwut? your own code ;-)
 
@Bracketworks $array = (new Set($array))->map($fn)->unique()->filter($fn)->toArray()
 
3:54 PM
@ircmaxell That's from @NikiC's lib, no?
 
@ircmaxell drop the unique, it's a set
 
user895378
@JoeWatkins Yeah: something like ... # Only ever wait _for_ something
 
user895378
Don't think you can underline in md
 
@igorw yeah, no, it's not. It's mis-named
 
heh just looking at 'react' and look who wrote a whois client with it :)
 
3:55 PM
@ircmaxell Ah ok; was thinking about a different lib. Thanks :-)
 
The description: A Badly Named Library
 
/me facepalms
 
Morning everyone
 
Anonymous
Time to get my hands on abstract classes. \./
 
Aw, it's 5.5 :-(
 
Anonymous
3:56 PM
@Greg afternoon
 
@Simon_eQ skip them, look at interfaces instead
 
@rdlowrey "Only ever wait FOR something" same right ?
 
@Simon_eQ Ever considered writing a learning blog?
 
I'm fixing up a really messy bit of code, and having trouble understanding how to properly manipulate timezones. MySQL is running in UTC timezone, and so is PHP... where and what should I do in PHP to output the DateTime object in the user's current timezone (stored in another variable)?
 
Anonymous
@igorw that was my next objective. I guess interfaces are way more important. Will check it now.
 
user895378
3:58 PM
@JoeWatkins yeah. perfect.
 
@rdlowrey ok changed, ta ...
 
Anonymous
@Fabien
 
Anonymous
Aug 19 at 13:38, by Simon _eQ
I'm writing a book on PHP. I'm currently, at the chapter where it says " This page is intentionally left blank "
 
@Simon_eQ heh.
 
Anonymous
<satire>
 
@Simon_eQ interfaces are everything. most important part of OOP imo.
 
What's meant by 'non-blocking I/O'?
Oh Asynchronous
 
@Fabien no
when you request a normal read of a socket, the operation will block until it can satisfy your request for input or output
 
@igorw here is the hardest part about interfaces - naming them
 
4:06 PM
@JoeWatkins Ah, ok thanks.
 
^-- @ircmaxell Let's see what data points we can get from that :)
 
Anonymous
@igorw I guess that must be why I can't understand some OOP classes, I see in Github. I have a good grip over namespaces/traits. I will dig into namespaces tonight.
 
Anonymous
I hope there are idiot-friendly tutorials :p
 
@Simon_eQ I found learning to use Composer helped me with that.
 
@JoeWatkins afaik non-blocking I/O and async I/O are the same thing.
 
4:07 PM
- am bad at C
- cannot stand drama
- the code seems a mess
@NikiC ^ those are mine
 
@tereško Please post in the thread :)
 
@tereško hardest part about anything, really. :)
 
I hope "cannot stand drama" comes up a lot :)
 
@igorw the kicker is that usually people do not understand even what's so hard about naming interfaces. They jsut do class Foo implements IFoo and think that it's perfectly acceptable
 
@Simon_eQ Very simply: imagine a toaster. There are hundreds of thousands of different types of toaster, but the all have the same fundamental interface: they have a toast() method, that accepts an argument of bread, and returns toast. You don't really care how it does it, as long as you can put bread in and get toast out. Your kitchen accepts any object that implements the Toaster interface, and your class looks like BrevilleVTT502 implements Toaster.
 
4:11 PM
@tereško yep :-/
 
@igorw it is not mutually exclusive, a non-blocking socket does not need to be handled in an asynchronous way ... so I think better to make a distinction ...
I had more of an explanation but my internet connection is wank ...
@NikiC there is no point, because you are already doing everything :D
 
@JoeWatkins I guess you could say the socket itself is non-blocking in that it does not block the process. and async refers to the API which could still be "blocking", even if the underlying I/O is not. is that distinction make sense?
 
@tereško new avatar for you
user image
2
 
@igorw yes, exactly ...
 
@MadaraUchiha meh
it's gif & it's not me & it lacks any originality
 
4:17 PM
@tereško plus it is a fat depressed cat, with obvious anger issues ... I can't think of anything sadder ....
 
@Simon_eQ To further improve on DaveRandom's explaination... the toast method should take a instance of a class the implements the Toastable interface. Bread, Bagel and PopTart would implement this interface.
 
@JoeWatkins I'd say async I/O == non-blocking I/O, but that does not mean the API is async.
 
I think if it gets up to 5 stars @tereško should use it
 
@Orangepill let's introduce the expression problem. pretty much everything is blendable. how do you deal with that?
 
So... what's a good example when to use blocking/non-blocking in php? I'm probably not phrasing that question right.
 
Anonymous
4:19 PM
@DaveRandom probably saved me a couple of hours there. thanks. So, the toaster interface here, equates to a class that does a specific task, accepting an argument only designed for that class .. hmm
 
Anonymous
btw, that is one of the weirdest analogies I've head along with beer OOP one
 
@Simon_eQ an interface is a contract
 
well it's a tricky thing to define in simple terms .... some non blocking sockets are used for async i/o, some are not, some are just non-blocking streams, that as you say are manipulated using blocking api's ... so to say if anything is non-blocking it must be async i/o can't be right, and to say they aren't related isn't right either ...
 
@igorw That would mean that there would be no explicit Blendable Interface, correct.
 
there is no yes or no I guess, no was a bit abrupt, I would have been more explicit, but I'm at the end of my withered rope with this stupid internet connection ....
 
4:22 PM
heh. Bad connections sits high on my list of hated things.
 
@Simon_eQ Yeh but the real point is this: instead of asking for a BrevilleVTT502, your code can just ask for a Toaster. And that code would also quite happily accept a ElgentoE048. But the great thing about that is that the ElgentoE048 also implements the Oven interface, so you can pass your ElgentoE048 instance to code that expects a Toaster and to code that expects an Oven, and both will accept it
 
The non-blocking/blocking examples I have read so far don't really list off negatives/reasons. I guess it's a needs based thing. If you need a non-blocking IO server, you'll kind of know it.
 
@Fabien I can kind of understand something like a fibreoptic network failing, so my cable broadband is offline, has been for about 2 weeks now ... but why is it, I can get a radio from the 1950's go up the highest mountain you like and pick up classical fucking music but I cannot sit two miles from a built up town centre and get a good enough signal to stay online for more than a few minutes at a time ...
 
@JoeWatkins heh. Who's the ISP anyway?
 
@Simon_eQ To put it into more practical terms for coding, think about logging. You can have a FileLogger that logs to a file, and a ConsoleLogger that logs to the console, and a NetworkLogger that emits syslog network traffic, and as long they all implement the Logger interface, any bit of code that does logging and asks for a Logger will happily use any of them - your code doesn't care where the log messages are stored, only that they are stored.
 
4:25 PM
@Fabien Virgin Media
 
@Fabien if you need to handle lots of concurrent traffic. it's more common for servers than for clients. the one-thread-per-request model does not scale very well.
 
@JoeWatkins two weeks? :-S
Are they doing something about it? The longest outage I've ever had on Virgin was about 20 mins...
 
@igorw Ah gotcha. Makes sense. It also felt a lot like job queues.
 
@DaveRandom oh yeah, they've been out .... it's done this once before and our home phone has never worked ... pretty new houses here, pretty obvious there is a serious problem somewhere but they keep sending guys out till one of them bodges it, and then for whatever reason, maybe a new install locally, it just goes down and we start again ...
 
@Fabien the asynchronous style is very similar to message passing with queues, but the reason for doing it is quite different.
 
4:29 PM
@igorw yeah. I guess my ears pricked a little when I read about React relating to never ending processes. I've created a few never ending processes over the last couple of months.
 
@JoeWatkins That's bullshit. Do you have voltage on the coax feed and/or the telephone pair? (I worked support for NTL for a brief period, obviously a while ago since it was still NTL)
 
I keep telling myself to just use adsl, but the speed is so rubbish, profiling remote java apps can easily flood an adsl connection, and if I profile overnight I don't get to do anything else that night....
@DaveRandom I know nothing much about it, the telephone never had a signal, when we first moved in they came out several times and just left it as "well it's free anyway, we'll keep you updated" ..
 
I bet "loggers" are more often the topic of contract-driven design, than logging.
 
we gave up long ago on the phone line ... and the broadband, well maybe they know internally what is happening, but we know nothing, we don't get told any single thing about what is going on or when someone is coming out ...
they did last time stick a bunch of credit on our account so we didn't have to pay for it while it was down which is more than any other company I ever used ...
 
"...so, it should accept a Logger as --" "Huh? We're not talking about interfaces."
 
4:33 PM
@JoeWatkins Yeh xDSL is bullshit in this country, how far are you from the exchange? Annex M can make a big difference if you're not far away since A 2+ gives you fuck all upload.
 
The Government has never been that interested in investing in broadband in the UK.
 
It doesn't really matter, every commercial ISP in the UK traffic shapes really heavily anyway, it is a f*cking joke
 
We should all move to South Korea
 
is the phone exchange what virgin go to, or is it somewhere else ??
the big green virgin box I can spit on from my front door ... I don't ... but I could ...
 
@JoeWatkins That's for DSL. Virgin will have fibre to a street cab within a quarter mile of you house, and possibly a lot less
 
4:35 PM
then it's outside my house ...
 
@NikiC ++
 
It's the upload speed I am wanting more of now.
 
@JoeWatkins If you don't have voltage on the coax core it's probably a power supply problem to the street cab. If you do have voltage it's probably a crappy fibre join underground (most common causes of localised outages by a long, long way). Not that any of this helps you, you can't do anything about it.
 
Hello, guys.
 
Actually if engineers have turned up and failed to fix it it's probably a fibre joint, ridiculous as this is for a cable company, most of the install engineers don't have fibre training, they just screw bits of coax together
 
4:38 PM
I got a doubt.
` class ABC {
// some stuff
}

$obj = new ABC();

$obj = new ABC;`
 
if they could just tell me what the problem is for certain though I could know wether this is going to be a re-occuring thing and get just another provider ... this is only the second time, but the first was quite severe and it's already been two weeks ... it's a serious inconvenience, but when you say I work from home they say get business broadband then ...
 
What's business broadband? Or more specifically why does such a thing exist?
 
well that's just it, it's exactly the same, more money obviously, same speeds/service, think you might get another email address or something .... the only difference is their liability insurance, but you pay through the damn teeth for it all year round, I might aswell just get another backup provider ...
 
Anonymous
@DaveRandom that last example seems to have nailed it.
 
Although you do get the occasional weird one. There was an ongoing issue (2 yrs+) where a bunch of BT DSL customers were dropping out at around the same time every night. After a lot of investigative work it turned out that there was an old guy at the end of the street who's TV was broken in such a way that it interfered with the upper DSL band when you turned it on, and the main feed for the street ran pas his window
 
4:40 PM
Sadface at some of the piece of shit answers on this site that get accepted...
0
A: What is wrong with this php regex

Sweetie BelleUse preg_replace instead, and a better validation string This should work better for you: $regex = "/^\S*(?=\S*[a-z])(?=\S*[A-Z])(?=\S*[\d])(?=\S*[\W])(?=\S{8,})\S*$/"; $valid = (bool) preg_match($regex,$password); Explanation of the components of this regex: / Delimiter ^ ...

I wish I could type faster.
 
You have to sympathise with the engineers on shit like that, you'd check a lot of things before that occurred to anyone
 
I have less sympathy for virgin engineers, it is a cable network ...
 
@Fabien Mostly contention. In the UK, almost all commercial ISPs contend home users at 50:1 and business at 20:1
 
@JoeWatkins since I am neither fat nor depressed, I fail to see the connection here. And the "anger issues" might also be disputed.
 
kind of like wiring a plug ...
 
4:41 PM
Also business users tend to get better burstability
 
not piggy backing on the back of something elses network using voodoo ...
but wiring a damn plug ...
@tereško yeah I was just saying, they would be my primary reasons for not wanting that avatar ...
 
@DaveRandom Fair enough. Still probably not worth it. I wonder what "businessman" bought it.
 
@DaveRandom IIRC there is no 100meg business package, limited to 30meg, it's as expensive as 100meg user broadband ... there is literally no reason to have it unless you intend to sue them at some point, which obviously I do not, and I'm not in the business of burning money ...
 
@JoeWatkins Yeh I know, cable is actually a way more complex last mile than copper, because you have to feed power + fibre + copper + coax into one place and wire it all up right. Twisted pair is just jumpers. But I'm not defending them, it sounds like the work of shoddy contractors (that's more of a problem with Sky but Virgin contract some stuff as well). It's worth raising an escalation because that will generally bypass the contractors
@JoeWatkins As soon as I can get FTTC I'm leaving Virgin anyway, I don't need the TV service, I just want decent broadband, but I live ~8mi from my allocated BT exchange, and there's a whole bunch of ally pairs between me an it, and the previous DSL we have came in at about 3/0.4, which is just not acceptable
Anywho, I need to head out, I'll catch y'all later/tomorrow
 
I wonder if Google Fibre would ever make its way to the UK
 
4:47 PM
laters @all
 
@DaveRandom hehe
 
@DaveRandom lol
 
@DaveRandom this makes sense? pastebin.com/cjit3X9L
 
@iroegbu how exactly iMammal describes the interface ?
 
that depends on the reason for wanting to kill the dog ?? is the dog sick ??
 
4:50 PM
@tereško I might want to do iFish in future
 
Anonymous
lol. I just got scammed by a dating site :/
 
@Simon_eQ Which site?
 
@iroegbu how "imammal" or "ifish" describe the methods that are included in that contract ?
 
@JoeWatkins I should have public function die($reason)?
 
4:52 PM
@Simon_eQ in that case the site works as designed
 
Anonymous
@Fabien not the one you worked for, I'm sure.
 
Anonymous
@tereško lol
 
@Simon_eQ lol. How do you know -_-
 
@iroegbu lol no no, ignore me ...
 
@tereško oh... wait a minute... an interface has to describe the contracts inherited from other interfaces?
 
4:53 PM
My old company had ~25,000 signups per day
So you're not alone :)
 
@iroegbu interfaces are contracts between class instances and a name of interface should describe that contract
 
FTR about 3% were female.
 
Anonymous
Here is what happened, a couple of pretty girls started 'winking, liking and messaging me' and when I signed up, as soon as I paid, I went through all their profiles, and it said, they were all suspended.
 
Anonymous
I hate this world. too much deception :)
 
@Simon_eQ that's automated interaction.
@Simon_eQ Seriously, what site? :P
 
Anonymous
4:55 PM
@Fabien yeah, I guess. but they had more than 5 pictures, all similar pictures of the same person.
 
Anonymous
If a girl only had 1 or 2 pics, I would've had doubts.
 
if only there were some kind of book of pictures of faces in an organized manor, then we could explain this deception!
 
@tereško ok... I was thinking of something like an animal tree... interface iMammal should describe how mammals should be structured same with fish
 
The way you currently do it only describes the name of a class, which implements that interface and also uses hungarian notation to identify it as interface. You do not use that notation anywhere else
 
Anonymous
I'm sure as hell getting my money back. Even if I have to travel all the way and put in thier servers my spaghetti codes in it.
 
4:57 PM
class Mammal implements Living
 
iMammal => iphone with fuzzy case ;]
 
@Simon_eQ Here's some of the darker sides of dating sites.
1) Automatic interaction. This is a scripted events, viewing, winking messaging etc. You can sign up twice and see the exact same time frames of interaction coming in.
2) Virtual profiles. Fake (purchased) photos of women which are used and automatically assigned locations close to your signup location
3) Automatic responses. If you sign up as a female and you get sent a message, if you don't respond within 3 days, we send a message for you.
 
Anonymous
@Fabien but here is the catch, the girls had more than 5 pictures on average, and not one of these hot looking pictures of supermodels, just ordinary-looking girl on random places. <-- this is tricky
 
@Simon_eQ the content is easily bought.
 
Anonymous
damn, I searched for one of them, and she's like in 5 different sites.
 
Anonymous
4:59 PM
I give up.
 
@tereško in this way how do I insert features that are common across all living things? I put that in Living?
 
Anonymous
My marriage plans are extended until 2020 (about the same time, as HTML5 debut)
 
@Simon_eQ Did you pay?
 
Anonymous
@Fabien yeah, sadly.
 
@Simon_eQ Credit Card?
 
Anonymous
5:00 PM
@Fabien nope. paypal
 
Charge it back
 
Anonymous
@Fabien this never happened to me, how do I do it.
 
Anonymous
there is something like complaining .. or issue thing
 
Unsure, look around paypal and revoke the payment.
 
Anonymous
will have to read more into it
 
5:01 PM
If they dispute claim the site as fraudulent, which it is,
But tbh those sites suffer HUGELY from these kind of claims and it affects their rating with the bank
If you call up you can try and request a full refund. 9/10 they will give it to you if you say you'll revoke the payment otherwise.
We had ~1000 sales a day and ~800 refunds
 
user895378
I'm an idiot and I just rebased away an hour's worth of work and did $ git push -f before realizing it.
 
@iroegbu you choose a name that describes all those features
 
Anonymous
@Fabien call up who?
 
@Simon_eQ There will be a contact us on the site.
 
Anonymous
I thought you meant paypal
 
5:05 PM
@Simon_eQ Probs easier if we chat on teambox. Or gTalk or something.
 
Anonymous
@Fabien I will just see what happens. Is there a time limit as to how quick I should take action?
 
Anonymous
what If I check out the site, for the next 3 days and decided to withdraw?
 
Anonymous
Does it have any effect?
 
Soon is better. Always. First ring up the dating site and ask for a full refund, if they say no, say you'll revoke the payment through paypal. if they still say no, revoke the payment on paypal. You may have to open up a 'dispute'. But again sooner is better.
I'm not overly familiar with paypal but I do know it's supposed to be a good intermediary for this sort of thing.
 
Anonymous
@Fabien there is live chat, but they are "live" only on sat/sun for few hours.
 
5:09 PM
phone support is easier if they have it.
 
@tereško Thanks, I'll read up on it this night
 
Anonymous
@Fabien yeah. I'm just trying to find if a real person even exists.
 
5:36 PM
if a shared webhost server of hostgator (for example) host 100 sites, will all the 100 sites have the same IP address?
 
Anonymous
@NokImchen I doubt that, but it depends if you are talking about all your sites, and other users from the shared environment.
 
Anonymous
Anyway, I would ask them if I were you
 
oh, yes, i'll ask their support :)
and yes, i was talking about all the sites (both mine and others)
 
Anonymous
5:53 PM
I used shared hosting, and I've never asked this question, but I'm not sure.
 
Anonymous
And I'm confused as you are now.
 
Anonymous
make sure to let me know if you can
 
@Simon_eQ i went to hostgator chat, they are having a technical problem !! So, i just closed it.!! lol laziness struck me, cos the webmaster stackexchange gave me the answer
 
Anonymous
5:56 PM
@NokImchen Not sure. The OP answers seem to fluctuating. I guess, you have to ask your hosting provider
 
@Simon_eQ heheh ya, 3 edits so far! I'll ask around 5 webhsot later (hostgator.com, hostgator.in, justhost, iPage, fatcows),
 
What's a good no-op block? do { } while(false);?
Something that'll run once; as if the enclosing block weren't there.
 
Anonymous
yeah. @NokImchen reseller club are always online.
 
nevermind...
 
Anonymous
they have the best online server I've ever seen.
 
6:04 PM
@igorw That won't run though; never mind, stupid question was stupid
 
@Bracketworks what's the reason for this anyway?
 
I've fallen victim to the XY problem many times this week.
 
what's that?
 
For (brace your face and palm) code folding.
267
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

 
@Simon_eQ "reseller club"? i'm sorry, i didnt understant....
 
6:05 PM
NetBeans has a native format for arbitrary code folds; so, there be the solution.
 
@Bracketworks extract a function/method
 
Anonymous
 
Anonymous
@NokImchen
 
@igorw ?
 
@Bracketworks move that piece of code to a new function
 
6:06 PM
@igorw Oh, it's not that; I'm just testing something and I'm writing all the classes into a single file.
I'll refactor them all out once I've tested it.
 
Hey all
 
@igorw I dunno how familiar you are with VS, but I was just looking for something analogous to #region
 
Anonymous
@SweetieBelle sup
 
@Bracketworks visual studio? not at all
 
@Bracketworks that's like looking up recursion on google.
 
6:15 PM
@Orangepill What?
 
how fishy is this, I used $_SESSION['logged_in'] = false; now when I use if($_SESSION['logged_in'] !=== true) {redirect} but how can this redirect when logged_in index is not set? it is not even throwing me undefined index err
 
@Bracketworks the XY Problem post on meta. Search google for "recursion" and you'll see what I mean
 
Hahaha
 
@Bracketworks nevermind..
 
That's funny. Google's full of funny shit.
 
6:18 PM
also, logged_in = false is just on login page, I cant figure out why the hell am not geting undefined index
 
@Mr.Alien lol... == for equal, === for identical, and ==== for "believe me, I checked..."
 
so do you mean it checks for isset as well?
 
@Mr.Alien what's your error_reporting?
 
@Mr.Alien ... it was a joke
 
shit this is bad, now if I did echo $_SESSION['blow']; exit; and after this is redirection which I've stopped with an exit... now I get undefined blow index
@igorw ^^^
@Bracketworks so what do you think? I was serious? haha, I know what am using there
 
6:22 PM
@Mr.Alien $a ==== $b translates to isset($a, $b) && $a === $b; Figures that'll probably get implemented before variadics or function autoloading.
 
this is just amazing, I am setting $_SESSION['logged_in'] = false only on login.php so if I request dashboard.php which I've made dashboard/ with hta, so what I type is localhost/cms/dashboard/ <-- and at very top session_start, following after the base url func and than am having if($_SESSION['logged_in'] !== true) {redirect} and I get no undefined index, how is that possi?
P.S I deleted session_id cookie, and I req dashboard directly without landing on login.php first which sets logged_in to false
@Bracketworks ohhh so now we will be having ==== soon :p
 
This is a fun search: (the loneliest number + number of horns on a unicorn) / the answer to life the universe and everything
 
@Orangepill 0.26190476190476190476190476190476?
@Mr.Alien $a ========== $b; // just to be fucking sure
 
ahaha more funny, print_r returns this Array ( [logged_in] => )
@Bracketworks fucking sure
Now I don't know how the hell that sets
 
@Bracketworks 0.04761904761
 
6:31 PM
@Bracketworks I guess !== sets the session with blank value
 
@Orangepill Hahaha, oh jeez.
My train of thought: loneliest number? that's 1. unicorn? that's 1 as well. ok, so 11 divided by ...
 
ok I don't know what but my php is failing to throw that error but I am using if !set than set logged in to false
 
@Bracketworks If you ever find an equivalent to #region with netbeans/PHP I'm interested :)
 
@cheesemacfly <editor-fold>
Put it in a line-comment, close it accordingly after.
You can give it a few attributes too; desc will show when it's folded
# <editor-fold desc="foo/bar">
function foo() { }
function bar() { }
# </editor-fold>
 
Does exactly what it looks like it should
 
@Bracketworks I swear I have googled it before and never saw this
thanks for the tip, definitely useful :)
 
@cheesemacfly No prob! :)
I love it when 700 lines of code fits on the screen without scrollbars.
 
yep!
 
6:59 PM
@Bracketworks cracked that shit, what's the difference between !== true and === false
 
@Mr.Alien What you're comparing to?
 
@Bracketworks lolwut
 
@tereško You read correctly :-P
778 at the moment
 
7:01 PM
@tereško Problem?
 
@Bracketworks you know how that failed? if($_SESSION['logged_in'] === false) <--- worked, didn't redirected and threw me undefined index error, if($_SESSION['logged_in'] !== true) <-- didn't threw me undefined index error instead redirected me
 
@Mr.Alien are you in an ob_start block?
 
This is why session abstraction is almost always normally a good thing, IMO.
 
@Mr.Alien I was just wondering why the notice wasn't displayed...
 
7:08 PM
haha and I was wondering why print_r didn't show true or false :D so I was wrong with the conditions there !== should be ===
 
@Mr.Alien Attempting to access an undefined index will raise a notice but also returns null, which !== true.
 
yea it will raise right? it didn't for me, pheew will put up a demo here tomorrow, wil get on d bed now, its late and am not well either ;) gn everybody
 
@sweetieBelle but shouldn't the notice have prevented the header call from working.
@Mr.Alien goodnight
unless output buffering was enabled.
 
@Orangepill Should if E_NOTICE errors are enabled
 
@Mr.Alien Better to use var_dump than print_r most of the time, null will actually show up ;-)
 
7:21 PM
@Bracketworks I've run into situations where print_r seems to go into an infinite loop too... watched for 10 minutes a print_r'd exception flying across the screen yesterday before I killed it and the same error gave me a 20 line var_dump.
 
@Orangepill Hmm, weird. It handles recursion...
Even print_r($arg, true) isn't all that useful when you can ob_start(); var_dump($arg); ob_get_clean();
 
@Bracketworks It usually does... I've only encountered it 2 times before... one of those times being yesterday.
 
part of me wants to reply to Pierre "Yes, but the rotten apples spoil the bunch". But he just doesn't get it
 
Hi guys!
 
7:39 PM
@ircmaxell I would say "yolo" but that analogy isn't right. It's more like "the squeaky wheel gets the grease".
 
No, it's the squeaky wheel gets the grease, but eventually falls off due to the added friction
 
"A chain is only as strong as its weakest link."
 
7:57 PM
unless its constructive to the RFC why not just ignore him?
surely the battles of wit and "best design" are tiring?
 

« first day (1055 days earlier)      last day (3898 days later) »