« first day (872 days earlier)      last day (4301 days later) » 

19:00
Or event better drop the test database after your tests and create the database prior
user895378
It's difficult to explain the glee I feel when switching between two chrome tabs and see the websocket message sent successfully from the other tab's console.
user895378
I <3 the Intarnets!
@rdlowrey That's nice to hear :D
@rdlowrey Now implement WebRTC!
@rdlowrey Which websocket server are you using?
user895378
19:02
@JanL The one I wrote.
@rdlowrey In PHP? That's nice :)
user895378
@JanL You're tellin' me! :)
@PeeHaa I do that, but different tests write data to the same table, and if you run them in same time, you get "record already exists", etc. Thanks.
user895378
@PeeHaa WebRTC is all client-side js, right?
@rdlowrey I wish
It needs a server for the first connection
WS / XHR / whatever
After that it is all clients talking to clients
19:05
good morning people
what's up?
morning @kaᵠ
user895378
@PeeHaa blah ... chrome and firefox can go screw themselves. If there's not an accepted IETF RFC standard I'm not interested.
@PeeHaa what's the election status? have a top handy?
@rdlowrey And the shitty thing is that the lovely people over at chrome and mozilla give the people to implement whatever transaction method they want. YOU CAN EVEN USE SIP!!! ...
:(
@kaᵠ pretty much the same all day.
19:08
@rdlowrey It's shame there isn't any standard, but it's really exciting
@Gordon you got up to #3?
neh still 5th
@PeeHaa Anyways: I found something called 'dependency injection' I think this might be it
That's what I told you 30 minutes ago :P
@kaᵠ no :/
19:09
36 mins ago, by PeeHaa
@JanL In that case just pass the same instance
user895378
I really only care about textual data at this point. I won't be writing apps that need realtime video or audio between parties anytime soon ... webrtc ... pffffft.
text only... bitch please
:D
@rdlowrey Then Websockets are spot on ;)
i'll need to push my video lib soon, but it's such a mess now....
user895378
@PeeHaa The financial analysis industry isn't clamoring to see my pretty face ... they want me for my sexy ... numbers :)
19:11
@rdlowrey true :)
And so I finally started writing tests, and they immediately start failing because filemtime's granularity is seconds and more than one test is run per second...
@PeeHaa I didn't understand the concept entirely. Now I think I got it :)
user895378
lol:
user895378
> Historically, RTC has been corporate and complex
user895378
And WebRTC fixes that?
19:12
No it does not.
Well maybe the corporate part is kinda fixed
@rdlowrey At least it has native support in browsers
user895378
IE?
Basically they just said: we know we will never agree on a standard implementation so fuck it
Which was a terrible choice imho
IE is pushing its own, right?
user895378
19:14
I can't spend my time adopting standards that aren't standards. Not enough hours in the day to support everyone.
@rdlowrey Well not yet, but I believe that they will when specification is finished
I guess that confirm it
@rdlowrey will they ever learn?
@Gordon you're so optimistic
user895378
Apparently not. Makes you wonder what those knuckleheads in the M$ war room are doing.
19:15
Arguably, there's no consensus yet. So, they want to "disrupt" it
user895378
Everybody loves their own homegrown codecs. Which is stupid.
I think my small script got lost in the chat logs
yesterday, by Alexander
var $main = $("table > tbody").first();
var sorted = $main.children("tr").map(function(){
    var $this = $(this);
    return {
        "$tr": $this,
        "votes": +$this.find(".vote-count-post").text()
    };
}).get().sort(function(a, b){
    return b.votes - a.votes;
}).forEach(function(candidate){
    candidate.$tr.appendTo($main);
});
There you are :)
Ooh, @Gordon is fifth. I can't believe it.
user895378
111k rep. Come on people.
@rdlowrey there are more inportant things in this world than rep. Like spelling...
user895378
19:22
More imprtnt than R3P? No way.
Spelling... Is that the ability to cast spells?
repzthxbai
@ircmaxell youre rong, speling isnt relevant :)
@rdlowrey which for now is good to pass the primary
19:22
> Please help you, I am using lessphp.
lovely
@PeeHaa so true
user895378
I will help me, thank you.
Sorry for my English, please do not put me negative points it took 24 hours, everything is fixed. — webyseo 23 mins ago
user895378
Did the "mihai incident" really have that much of an effect on @Gordon's electability?
I know I downvoted him for it
user895378
19:24
Well as someone who has a certain someone on his tiny avatar list, I can sympathize.
@rdlowrey did i miss something?
@rdlowrey what effect? PHP people have never gotten respect in elections
user895378
Feb 26 at 18:42, by Gordon

The Mihai Incident

7 hours ago, 1 hour 13 minutes total – 347 messages, 22 users, 2 stars

Bookmarked 6 hours ago by Gordon

I am officially tiny avatar free. Not sure if I'm getting more relaxed or the idiots just stay away @rdlowrey
You all have issues!
user895378
19:26
Dunno ... doesn't look like I have any implementations of the Ignorable interface in my user list at the moment.
@Ocramius Staph! All those open tickets :(
@rdlowrey I have some downvotes but I dont know and doubt they are related to it
user895378
> If an endpoint receives a Ping frame and has not yet sent Pong frame(s) in response to previous Ping frame(s), the endpoint MAY elect to send a Pong frame for only the most recently processed Ping frame.
user895378
19:37
^ F U RFC6455
user895378
Wouldn't be a problem at all ... EXCEPT XCPT ...
user895378
> A Pong frame sent in response to a Ping frame must have identical "Application data" as found in the message body of the Ping frame being replied to.
user895378
Oh sure, I'll just keep a never-ending list of EVERY ping frame I've sent just in case the PONG matches.
this guy makes no sense...what's worse...he makes no sense in making no sense.

In summary, I just want to change the variable in base.less. As I can do? Thanks
@rdlowrey :D
user895378
19:40
ABBRV FTW.
@rdlowrey Persecutory delusions, nothing else
@rdlowrey XCTLY
user895378
4SURE
That was a good laugh
sebastianbergmann: PSR-0 is one of the worst ideas ever conceived in the PHP community and I'll be damned to support it, even if only for Composer-based installs.
19:44
Which is the next "X incident" in the list?
user895378
lol ... while I mostly agree with him, PHPUnit certainly doesn't make all the right decisions either. I mean ... PEAR? Really?
@rdlowrey historical reasons. and its not the only way to use it nowadays
> The Mihai Incident
Oh good Lord not again
user895378
@Gordon Yes, but until recently it was. Also the historical reasons argument doesn't hold water for me ... I suppose hospitals could continue leeching patients just for historical reasons too?
@Pekka웃 dont worry. there was no second incident after the second. everyone is fine. no kittens got hurt.
19:49
@Gordon good to hear :)
@rdlowrey well, what should they have done instead? invent their own delivery mechanism?
user895378
@Gordon No ... I guess I'm biased because I've never coded in a world where PEAR was relevant.
One ingredient for being happy on Stack Overflow is having a mild form of Alzheimer's. I have it and it's great. I simply forget altercations I have with people, even the really bad ones. The next day, I'll greet them nicely not because I'm so noble and forgiving, but simply because I forgot who it was again that I had the quarrel with
2
@rdlowrey but it always was. of course you could avoid it but PEAR always has been an integral part of the ecosystem
user895378
Not my ecosystem :)
19:52
grrr. why is spotify substituting songs from an album with live versions? especially, when I have the album as mp3. why does it pick the wrong ones?
user895378
I strongly dislike spotify. Okay I'm done complaining.
speaking of topic switchings and spotify
@rdlowrey i love spotify. but i dislike their recent updates. pointless crap added
@Gordon Because quite a lot of very good alternatives are not (or no longer) available in Germany.
Is there anything left but Spotify?
user895378
The spotify app crashes my phone on the regular. Even when a playlist is made entirely from my own files it still limits how many songs I can "skip" (wtf is that about?) and the desktop application might as well be a virus and it uses so. much. memory.
19:57
@TillHelgeHelwig google is rumored to start their own streaming service soon.
user895378
And a desktop app? Really? We have the internet now. I don't want to install your inefficient RAM-gobbler of an application, Spotify.
That will work well. GEMA will surely manage to basically shut that one down just as effectively.
@rdlowrey it currently eats 200k. which is 500k less than firefox eats ;)
reminds me of this tommorris.org/posts/8070
2
user895378
^ Couldn't agree more
20:01
Especially with the way people talk about websockets in this room.
user895378
Native apps are nothing but a cheesy money-grab accomplished by obfuscating something that makes way more sense (www content) with an extra middle-man layer.
user895378
* unless you need to talk to my phone's camera and/or microphone :)
@NickFury well, a friend of mine recently implemented video chat in the browser. which is cool. but bleeding edge is bleeding edge. unless it's stable on all browsers people wont ditch their fat clients.
@NickFury Nice read. So true.
@Gordon Yeah true, I guess only time will tell
20:11
I still cant use namespaces without a class, right?
really? I was using a namespace in my bootstrap?
@NickFury I mean use foo\bar; where bar is not a class but a namespace where classes reside in. I'm so sick of having to alias each and every class I want to use.
user895378
I'm either a pirate or I've been writing too much PHP: print_arr($testVar);
@Gordon ahh ic
@rdlowrey Or maybe you're a PHPirate. ;)
user895378
20:15
hehehehe
@TillHelgeHelwig now I need to listen to a pirate song
@TillHelgeHelwig What about grooveshark.com
Not available here anymore.
What do you think about magic getters / setters using __get and __set calling the appropriate methods if the attribute is not public?
oh interesting, spotify isn't available where I'm from.
20:27
Grooveshark used to be available.
They shut down because the fees required by the company representing most of the artists were too high to run a streaming service.
Same goes for YouTube...we can't watch any videos that contain any licensed music.
@NickFury yesterday i went to order chicken online and they had that crappy app relying on a not even iphone compatible website where the freaking form was always moving away. arrrgghhh
@Happyninja blame the developers not the platform :P
where'd you order chicken from haha?
@user539484 lots of magic and boilerplate for very little beneft
user895378
@user539484 @Gordon is smart, you should listen to him. If magic is the best answer it most likely means you haven't hit upon the right design yet.
@user539484 I got rid of all that. At the beginning, it's nice because you don't write a lot of code, but then it really starts to feel like hell to debug all that stuff :\
20:33
The benefit is a better readibility and if many properties are public maybe a little performance plus. I think the implementation is not the problem but what if you want to set a reference or a multidimensional array, so I have to use traditional getter / setters despite mixing up the interface
So I think I will do the traditional way again
@user539484 less readability because you now have a mishmash of property and method calling which is against the Uniform Access Principle.
except from the named cases you could have a uniform access
@user539484 but there is no other cases :)
when I wrote 'named cases' I thought of references and multidimensional array, except from this cases it could work
20:37
@user539484 multidimensional arrays are List<Type> :P
you cannot have uniform access with the attribute notation. at some point you will need to call a method.
ok, inside the class you have redirect, that is clear
How does most PHP frameworks do?
@user539484 no __get at all :)
I have implemented it only in a single location and it's a hack
@user539484 ZF1 used a lot of magic but they removed a lot of it in ZF2 because they understood magic only leads to WTF and WTF is the only sane code metric
im heading over to the Town Hall. See you there or laters.
thanks
20:44
@DaveRandom, may this be helpful to implement in the plugin? chat.stackoverflow.com/transcript/message/8084369#8084369
@Alexander ...implement in what way?
Evening @all
@DaveRandom Warning message something along the lines: "This question will be automatically deleted"
@DaveRandom g'evening
21:05
How do I test if my system actually uses a cached result when it should?
The output is exactly the same when it uses a cached result as when it uses a non-cached result (and builds the cache for subsequent request)
@Alexander Maybe. I'm thinking it would be more useful on the question page though, to prevent the request coming into chat in the first place. Could maybe do with some kind of "watch list" to accompany it (to make sure it actually does get deleted) I'll have a think about how to best implement it.
@Jasper Define "my system"
@Jasper you test it by making it not exactly the same
@ircmaxell That won't work when writing automated tests, will it?
21:09
why not?
@NickFury yeah, i know but still, i was obligated to use an useless without registration app.
Hi
@ircmaxell Because I don't mind changing my system to give a different output when using a cached result in my local copy, but I do mind changing the files I put in my repository (and distribute, etc) and that's what I would run automated tests on
@DaveRandom in the question page was what i meant though
Maybe I misunderstood what you meant, though
@DaveRandom The templating engine I have made and am now writing tests for
user895378
21:12
If the templating engine handles caching, why can't you unit test it at that layer of granularity?
user895378
Testing the entire system in-concert is the purview of integration tests, not unit tests (either of which could test the desired result).
@DaveRandom, I second the watch list backed up in the server ofc
@rdlowrey Well, I decided not to do unit testing. After considering the whole situation, I decided that what I want to test is whether it works the way it should when using the public API, while I don't want to test if the class design stayed the same (which is what I'd be doing when I do unit testing)
user895378
@Jasper Only if you're unit testing incorrectly.
user895378
Unit testing shouldn't bother with the protected/private. You should develop a stable public interface and test that.
user895378
21:18
The result of a call to something like Templater::generate() should certainly be testable given an environment in which caching would occur.
Just wanted 3 hours because stupid Doctrine cache needs to be "refreshed" manually...
@rdlowrey The class design does need to have public functions, since it consists of more than a single class
For example, the classes that represent the (partial) Abstract Syntax Tree
user895378
@Jasper A class should almost certainly not have public properties. Public methods is what I'm describing.
@rdlowrey my bad, that's what I meant
user895378
And the public methods are what you test in your unit tests.
user895378
21:20
Given object state X, and args Y the result of method Z is ________.
user895378
^ That's what you test.
user895378
And you do that for all of your public methods in all of your classes individually. That's why they're called "unit" tests.
@rdlowrey So, if I did unit testing, I would test if my Abstract Syntax Tree representation remained the same
which is exactly what I do not want to test
user895378
I hate to say it (and I'm not trying to sound rude here), but if unit testing creates a problem for your code, your code is the problem.
@Jasper No, have it respond differently. Such as adding an X-Cached-Content: false header
Hello every one
user895378
It's not an overnight process ... over time you just need to make an effort to write code in a way that results in testable assumptions.
@rdlowrey So basically what you're saying is that it's wrong to write a data structure, use it in function x and only want to test whether function x does what it should, and not test whether the data structure remains the same?
user895378
@Jasper That's not what I'm saying at all.
user895378
I see two options in that scenario:
21:29
can anyone help me quickly with a problem, i am writing a REST api for a uni assignment, and i have a problem when i go to return some data in JSON i set the header using header('Content-type: application/json'); i then do echo json_encode($mydata); then i my jquery file i do jQuery.parseJSON(msg) and i get this error: SyntaxError: JSON.parse: unexpected character but if i remove the header its fine...
user895378
(1) The datastructure is modified by reference or returned by function X -- in this case the function's operations should be very easy to test by asserting something about the modified/returned datastructure.
user895378
Actually, that's the only scenario I see. There is no number (2).
Well, it's nothing like my scenario :P
user895378
Well how I understood the scenario you described here:
user895378
3 mins ago, by Jasper
@rdlowrey So basically what you're saying is that it's wrong to write a data structure, use it in function x and only want to test whether function x does what it should, and not test whether the data structure remains the same?
21:32
nvm fixed it... json needed to be JSON
@Vade I'm willing to bet that if you inspect the output you will find a PHP error message that says "Cannot modify header information, headers already sent in...", and following on from that I'll bet the reason you get that error is because you have leading whitespace before the opening <?php tag in the file
user895378
Testing is about having testable assumptions. If you write code for which there are no testable assumptions, it's not a flaw in the unit-testing paradigm, it's a lack of testability in the code you wrote.
@Vade It isn't case sensitive, and even if it were it would want lower-case
@rdlowrey Nope. That all holds, but the datastructure is made in function X and discarded before it ends
@Jasper: unit test, and then smoke test production, and you don't need to worry about it...
user895378
21:33
@Jasper Then you have no business testing anything about what happens to the datastructure inside the confines of that method.
@DaveRandom well its strange, i simply changed the header to be header('application/JSON') and the error has gone.. thats all i changed aswewll
@rdlowrey Agreed, but since it consists of classes, it has public methods, it should be tested when unit testing
@Vade May possibly be cached output then? Regardless, if it doesn't still work when you change it back to lower case I would be very surprised. Quite apart from anything else, because you are manually calling jQuery.parseJSON() it's not looking at the header when you do that.
Basically, the problem I'm having is with functions that would be internal if php had such a thing
user895378
Well I can't really say anything else without looking at your code (which I'm not inclined to do at the moment) except for ... it can be unit-tested.
21:35
Oh, wait.
Let me try something
user895378
But like @ircmaxell said, try to write your code as testably as you can, unit test as much as you can without spending way too much time chasing 100% and then cover the rest with integration tests and smoke tests.
Identify and separate out the non-testable parts of your code
Nope, can't reproduce, what browser/version of jQuery are you using?
that's why my "Untestable Code" sections of my SOLID presentation featured the Space Shuttle and the LEM
@DaveRandom time for a surprised face buddy, because when i changed it back to lowercase, again it breaks.
@DaveRandom i am using jQuery 1.9.1 and testing using firefox with firebug to check the headers etc
21:39
The problem isn't so much that I can't test the code, but that I don't want to (with an exception for the actual question about the caching I came here for). I know, that sounds even worse, but bear with me.
user895378
lol:
user895378
> The problem isn't so much that I can't test the code, but that I don't want to
user895378
It's okay, I know I've been there ^
Say I have a data structure that I use in a number of functions in my library. Now, if I test that data structure, I can't replace it with another data structure without breaking tests
OH: "The problem isn't so much that I can't test the code, but that I don't want to" #facepalm
21:40
All the while, no functionality has changed, so no tests should fail
@Vade Can you inspect the actual output of the script please? That makes absolutely zero sense. Also, I'm wondering if when you send the header jQ is automatically parsing it as JSON, then you pass it in to .parseJSON() again, already parsed and it blows up. But I can't reproduce that behaviour on Chrome so I'm not sure.
that's why I don't want to test the data structure
(note: the data structure is never exposed to the user of the library)
So, my portland flights. I'm on a 757 from Portland to San Francisco, but only a 737 from San Francisco to New York... a 550 mile flight on a large plane, and a 2500 mile flight on a smaller one... #weird
@DaveRandom this is what is strange, the encoded json is this : {"number1":{"code":"does something","version":"v1"},"number2":{"code":"some other code","version":"v1"}} (it doesnt mean much atm i am simply trying to get a base to which to work from) the jquery i have on in my html is simply: $.ajax({
type: "get",
url: "http://localhost/apitesting/scripts/",
}).done(function( msg ) {
alert(jQuery.parseJSON(msg));



}).fail(function(){
alert("failed");
});
sorry bad formatting
Do you understand why I do not want to test the data structure?
21:43
i am going to test it in chrome
@ircmaxell that's your interpretation of "bear with me"?
@Jasper: look up polymorphism. If you abstract the data structure, you can still test it while keeping other tests alive. And you can replace it. It's a pretty basic foundation level tactic. Check out Dependency Inversion...
@Vade Yeh, jQ will automatically parse the JSON response as JSON when you send the header in that scenario because you didn't specify the datatype you are expecting, so when you jQuery.parseJSON() you are effectively double decoding it. If you console.log(msg) in the first line of the done handler you'll see what I mean
Yay to magic!
Still not sure why I can't reproduce that in Chrome though
21:47
@DaveRandom it does it in both, however it makes sense that i dont need to parse, i thought this when i was debugging earlier before i parsed it. i guess i will remove that then :) thanks for the help buddy
I know if I do JSON.parse({}) I get SyntaxError: Unexpected token o because the object is cast to a string, which is what I would expect
@ircmaxell But in polymorphism, I can only replace it by a data structure that has the same interface. The whole idea is that I want to be able to replace it by a data structure with a different interface. Let me try and explain it with an example.
ummm...
@DaveRandom this is going to sound strange but if you console.log the msg with the header with json in small, then it returns as [object,object] but with the json in caps it returns as the json string {"number1":{"code":"does something","version":"v1"},"number2":{"code":"some other code","version":"v1"}}
@DaveRandom i guess ill leave it like that with the json in caps seeing as it works
Say I have an algorithm that has to do something for which it needs a number of values. I use an array for this and rely heavily on random access. Now, later I may decide that I want to change to using a linked list instead (and for the sake of argument, the linked list does not provide random access). I can do this unobtrusively and I don't want test to fail because of this.
However, since I have written the array and linked list classes myself and they have public functions, I should test them when unit testing
and when unit testing them, tests will fail when I swap one out for the other
21:51
@Jasper if the tests fail, the algorithms must by very definition fail. Unless you're testing privates, which is usually seen as bad
And the interface defines the behavior. So actually your case should use a common interface for array and DLL, even if they aren't the same. The surface that your class depends upon should be the same...
@Vade Yeh, that's what I would expect. Because when it's in caps it's invalid, so your done handler just gets passed the string. But when you use the correct header, jQuery automagically parses the string and passes the decoded object into you function instead of the string, and when you log it it gets cast back to a string so you see [object Object] which is what gets passed into JSON.parse() by jQuery and you get the syntax error.
@Vade You should have it lower case and not call jQuery.parseJSON(), just work with the object directly, that's the correct way to do it.
but don't i need to parse then if it is in the [object,object] format?
@ircmaxell say that instead of moving to a DLL I move to a Red-Black Tree. How can they possibly have the same interface?
they don't do the same thing internally
but your class must interface with it the same
@Vade No, [object Object] is just what it looks like when an object cast to a string string, either because Firebug sucks (which it does) or because you are calling alert() and not console.log()
21:54
otherwise, you're rewriting the class to change the data structure it uses
which is NOT allowed (via Open/Closed principle)
Based on you sample data above, if you do:
$.ajax({
  type: "get",
  url: "http://localhost/apitesting/scripts/"
}).done(function(msg) {
  alert(msg.number1.code);
}).fail(function(){
  alert("failed");
});
You should see "does something" alerted
@DaveRandom got it ta, is it possible to iterate the object returned? say if it was to be used to fill a table?
You probably want an array of objects in that case. You can iterate objects with for-in but it's not generally a good idea, it sounds to me like you want an array of objects, each one representing a row, then you can just use a standard counting for loop
$.get("http://localhost/apitesting/scripts").then(function(msg) { alert(msg.number1.code); }, function() { alert("failed"); });
@ircmaxell Perhaps that's where my problem lies then. But if you're following open/closed to such an extent, you shouldn't ever make any changes to a class other than fixing bugs...
22:00
yeah thats what i was aiming for, an array of objects. i think i buggered it up when i created it in my php, i will look there again. thanks for the help.
@Jasper correct
subclass (or re-implement against the interface) to change implementation details
leave the original
@ircmaxell that function, does it work with .put and delete and update? cus it looks tidier
No, there's a $.get and a $.post... But you could build your own wrappers
and $.ajax returns a deferred object, so .then syntax can be used there as well...
$.ajax({
  type: "get",
  url: "http://localhost/apitesting/scripts/"
}).then(function(msg) { alert(msg.number1.code); }, function(){ alert("failed"); });
right cool got to get on with it, its due in monday..
thanks for the help guys
22:05
@ircmaxell To be honest, I've never found such a strict interpretation of Open/Closed to be practical in the real world. Do you actually stick to that interpretation of Open/Closed yourself?
user895378
@Jasper As I was about to say before Time-Warner Cable decided I would be fine not having internet for ~15 minutes ...
user895378
I rarely write tests before I have an idea of what the public API will look like. That's often something you should address with more planning on the front-end before you start writing code.
@rdlowrey Well, i do have some big changes to the public API ahead of me, but for those I take rewriting the tests as part of the deal. The problem is that I do not consider the data structure that is never exposed to the public part of the public API. However, it does have public methods because my own classes need to interact with it
@Jasper yes, I do
and yes, it is practical
22:15
@ircmaxell Wouldn't this be breaking such a strict interpretation of Open/Closed: github.com/ircmaxell/PHPPHP/commit/…
@Jasper No, those APIs aren't designed for public consumption. So the modifications are mostly for internal behavior
And Open/Closed doesn't apply to prototypes, proofs-of-concept and incomplete applications under active development
@ircmaxell Well, I'm also working on an incomplete application myself, and since testing does very much apply to incomplete applications, I suppose the whole Open/Closed principle shouldn't have been brought into this discussion from the start
22:24
do whatever you want. I was trying to show you that there are other ways that let you test your freaking code. And show you principles that let you do the very thing you're struggling with. Yet you choose to sit and argue with me. And try to discredit my remarks. And actively try to shoot down every suggestion that I make.
So go on, do whatever you want. Suffer. And run untested and untestable code. I don't give a shit.
@ircmaxell I'm sorry I really didn't mean to offend you. I'm not trying to shoot down the suggestions you are making, or even to argue with you. I'm trying to understand where I'm wrong in my line of thought that leads to me not wanting to test a data structure.
I wasn't trying to discredit your statement, it was just that I considered something as not realistic, because I haven't ever seen anyone truly do it like that. As such, I grabbed the first commit I saw on your github history that met the precondition (not a bug fix) to see it in action, posting the link because it was possible I am misunderstanding Open/Closed and you might actually be following it
can someone answer a question about LOCK_EX for me please??
Asking if you can ask a question is doubly redundant
Well if i use LOCK_EX does it mean that anyone trying to write at the same time wont at all be able to write using the same script or will they just be delayed until you have finished writing?
22:40
@DaveRandom asking whether you can ask a question about another subject isn't redundant, though. (It's still unnecessary in here, though)
user365265
lol
@Connor It means that anyone else who tries acquire an exclusive lock on the file will be unable to, and that's about all you can say for 100% certain. By default any other PHP processes that attempt to acquire an exclusive lock on the file will block until the existing lock is released, but this behaviour can be controlled with the LOCK_NB flag.
@Jasper true
@DaveRandom Ok cool, thanks Dave
When I come to this room with a very concrete question about testing question and people answer it with "you're doing your testing all wrong", and when I explain then why I'm doing it like that, the answer is that I'm wrong (either in code or in my reasons for not doing the testing differently) then I try to find out where I'm wrong. I can get a little snappy when it feels like I am unable to communicate my situation properly, but that's all that happened.
user365265
22:46
@DaveRandom do you know a more advanced framework than symfony ??
@Connor No, it's an advisory lock only
meaning only code that tries to lock it will be blocked...
@ircmaxell right, ok thanks
For those whom I haven't scared away from talking to me: how does internal visibility work with unit testing? (So: in a language that has internal visibility in which access is restricted to the same package/namespace, would one test functions with internal visibility?)
@Jasper imo you should always work with a black box... Never seen internal visibility in tests myself, but I have no experience with such languages either
@cept0 No, I don't really do much work with frameworks
22:53
@DaveRandom man... how do you get so much rep lol
@cept0 interesting alternatives additions for you may be flow3, zf2 or doing crazy stuff with github.com/lisachenko/go-aop-php :D
Mostly by being unbelievably awesome. Oh, and humility is also important.
2
:-P
@DaveRandom I'm almost at 1k lol
@DaveRandom how modestly awesome of you
rofl
22:57
@Killrawr Well, it's not a race ;-) but I freely admit I did a lot of rep-whoring in my earlier days on the site. I periodically get an upvote for a terrible answer, usually to a terrible question, these days I spend more time editing my crap old answers than creating new ones.
@DaveRandom lol nice :P the answer I'm most proud of is.. an answer explaining and mocking an example of concurrency when passing values on Java between >1 thread stackoverflow.com/questions/11596708/…
surprisingly I only have 3 upvotes on it >_<
Hey guys, what's the consensus concerning links to experts-exchange? As in this answer (yes, I know it is a one):
0
A: How to print a QRLabel, QRMemo justified?

RBAHere is the answer : http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_10192587.html I believe that making an acount is free.

is there a alternative to trim that removes all whitespace?

« first day (872 days earlier)      last day (4301 days later) »