« first day (1276 days earlier)      last day (3663 days later) » 

7:02 PM
@ircmaxell mix between Tetris and Катю́ша song :D
 
:-)
 
@ircmaxell sorry. But that's truly offensive.
 
@AlmaDo I'm sorry then... :-(
 
@AlmaDo Why? :D
 
Can't tell if he really meant that or not :|
 
7:06 PM
well, it's correct. It's wild country. But yet in the same time it's evil sarcasm :\ Or may be it's just my mood. We are ok to laugh on ourselves (it's, btw, one of the things because of which we still an live here - a sense of humor on our own account). But to say "russians" - is offensive. I never drink vodka or break any road rule e t.c.
and my collegaues are good guys too. They are normal people, they have nothing to do with "break rules" or other crap
 
My sister in law and brother got so drunk, she somehow took a gun from policeman and they didn't want to bring it back :D
 
and.. no, I was about the video. Not to @ircmaxell's account. As I know him (a little) he's a very tolerant & cosmopolitan man
 
Well I am amazed that you're insulted to be honest.
 
@AlmaDo I'm just kidding, I don't really find it offensive
 
@TOOTSKI I never drunk alcohole. Not even a single time in the whole life
 
7:09 PM
But whatever you already edited XD
 
@SecondRikudo well, I'm not sure:p I heard it's not good to leave it as it is if I doubt
 
@Lusitanian Yeah thought so. Filled in the survey
also monring all
 
@AlmaDo Sure, but I don't find it insulting, it's funny and make you wanna go through that feeling (some, not all).
 
@TOOTSKI well. It's just my IMO. I don't like to count all people as doing some nasty things just because someone does :\ (and in that video there are moments that I really hate in people)
 
santa kicking someone in the face is not offensive, that's funny ... it's only meant to be funny ...
 
7:14 PM
blah.. nevermind.
 
@AlmaDo It just means that Russians are happy, funny people. It doesn't imply that they're fools or something. Americans are more popular in being laughed at :)
Drink some Vodka, cheer up :D
 
@TOOTSKI it's not so funny when a big truck is moving to your car and you can not avoid it. It's unlikely that it's funny that "being not drunk is illegal".. meh.
but those moments on video are real (so they captured that). Combined with text "look! all russians are like that!" I found that offensive. Again - IMO
There are 1-2 funny (i.e. not evil funny) moments there' but mostly it's "drunk-ju". It's not true..
ok. I'll be silent now
 
Of course it's not true but that's just [lack of words]. If I were a Russian I wouldn't be insulted, IMO. That's it, everyone has their right for opinion, except some people :P
 
one sec, it's an empirical fact that russian men drink too much, not from anecdotal evidence but it's actually world news ... bbc.co.uk/news/health-25961063
 
@AlmaDo me neither… feels good to be not the only one… (of those who are allowed to)
 
7:19 PM
Beer is not alcohol.
 
25% -> 7% to me, the claim that russian men drink too much vodka is supported by the evidence ... whatever about it, anytime I see someone british portrayed as an inbred royalist toff I don't get offended, I laugh ... because it's funny ...
 
@bwoebi I'm allowed, but I'll never do (it's not about religion, just principle)
@TOOTSKI for me, it is
 
Same here, I don't drink either. ;)
I also don't get offended when people say indians write shitty code :P
 
@AlmaDo yes, me too…
 
7:21 PM
@TOOTSKI and you know what? There are tons of such videos.. like this .. why.. really sad for me. And all with label "it's Russians! It's Russian style".. screw it..
 
That's your right, and I would respect it fully.
I hate pushy people too.
 
see, funny ...
 
Hilarious.
 
@AmalMurali Exactly :D
 
7:24 PM
Stack Overflow never ceases to amaze me
 
Or, or... @SecondRikudo doesn't get offended when I call him IDF :P
 
@TOOTSKI You should know that I'm no longer part of the IDF.
 
I also pinged you to wish happy holidays in Hebrew even, and you haven't said anything.
 
@TOOTSKI You did? I didn't get the ping
Lemme check transcript
 
I don't know, did I?
 
7:26 PM
@TOOTSKI Indeed you have. תודה רבה, וחג פסח שמח :)
 
/me blinks
 
Ehm... same to you! :D
Serbian Jew Double Bluff :D
(I'm currently in Serbia)
 
@TOOTSKI Nice answer!
 
OK, back to work everyone, especially you @ircmaxell.
 
what have I been doing this whole time?
 
7:29 PM
@TOOTSKI Work? lol no
 
@ircmaxell Posting insulting videos ^^
 
apparently.
 
I did no such thing
I don't know what you're talking about
 
Lies.
 
Good mood after watching GoT :D
 
7:31 PM
/me hasn't seen it yet
 
Winter is Coming
 
Me too. Should I, @Fabien?
 
Definitely
 
@Fabien Read the books?
 
I finished watching Sherlock and there's more days left for exams. So...
 
7:32 PM
Nah. When the final book is released I will.
 
Do you actually need to read the book to understand it?
 
No. But book reading has better longevity.
 
@TOOTSKI, we do not need to check equality of this pieces of code(they are not). I just said that first peace of code is faster than second whatever they do. — sectus 17 hours ago
 
If it was a finished series I would. I don't fancy waiting a decade for a cliffhanger.
 
Dafuq?
 
7:34 PM
@TOOTSKI I've read the books, just not sure precisely what just happened.
 
Why would someone benchmark code that doesn't do the same thing?
 
@ircmaxell Who's your favorite character?
S/he dies!
 
@SecondRikudo mine isn't dead yet... Well... depends on... I... yeah...
 
@ircmaxell It was the kings wedding.
 
@Fabien Ah nice!
 
7:35 PM
I have no idea what you're talking about :) Will "borrow" from the internet.
 
No spoilers please!
 
@AmalMurali Close your eyes. :P
 
@AmalMurali Don't worry. It's not a spoiler. I wouldn't want to ruin the series for anyone.
 
@TOOTSKI: How about no? :-P
 
@Fabien I liked that scene
 
7:36 PM
@Fabien You thought Go was hard? Have you tried playing QWOP?
 
Anyone else please?
1
Q: Object class variable loses its value and turns into Null

DemCodeLinesI have a class called "User" which essentially is a database that retrieves from a mysql db and contains info about the user, like name, age etc. However, I am having a problem regarding one of the public variables inside the class. The following is my code: login.php (runs after user submits fo...

 
@ircmaxell It's better than kitten videos on youtube.
 
:-)
 
@SecondRikudo Yeah lol. Cosplay
 
@Fabien :D
 
7:38 PM
sigh man
 
@DemCodeLines PEBKAC
 
@TOOTSKI what?
 
user895378
 
user895378
 
:-)
 
7:40 PM
lol
Also, (2) gif is Fifth Element. One of the best films ever.
Multipass
 
@DemCodeLines Google "PEBKAC"
 
I did, in other words, a user error
 
@Fabien Multipass? Multipass.
> return 1;
@DemCodeLines why not true?
 
@TOOTSKI I have no clue what you mean...
 
Likewise.
 
7:43 PM
Would you recommend a book to someone who is trying to get good at PHP OOP? If so, which one?
 
@TOOTSKI I posted the question above.
 
I like the idea tho @rdlowrey ...
 
If you read it, you'll understand right away the problem
 
user895378
Yeah, me too.
 
if seb says they are integration tests then they likely are, if anyone at all has a clear idea of what a unit test is, gotta be him ... ofc doesn't matter at all, they are the only ones we have ...
 
7:44 PM
We need acceptance tests too.
 
@AmalMurali PHP object-orientated Solutions - David Powers comes @tereško approved.
 
darn it
whatever man
 
@Fabien: Looks like it was published in 2008?
 
Which is recent considering how old OOP is.
 
yup
@Fabien really? wow
 
7:46 PM
I guess ill have to use session after all
 
@Fabien I thought it'd contain outdated stuff then?
 
I don't think there is a very good PHP specific book.
You wouldn't need it to be PHP specific anyways.
 
@AmalMurali Think more along the line of concepts than language specificities.
 
When practical book comes out, it's already old.
 
/me is thinking about writing a functional OOP book
 
7:49 PM
I'd buy it.
 
Even if it sucks.
 
Signed of course -_-
 
Well considering who is writing these days, you definitely should @ircmaxell.
 
well, I don't want to write it unless I can get enough original content to justify it
 
That might be a long wait. I'd certainly buy it though. Do you have any recommendations, @ircmaxell? Something PHP-specific and that doesn't contain outdated stuff?
 
7:52 PM
TBH I'd settle for a book that is about going from Web Developer -> Programmer. These kind of lessons. 'Thinking outside of the web development box'.
 
nothing php specific
 
SOLID etc.
 
I've been searching for long but I couldn't find any good PHP books
 
@AmalMurali and you likely won't...
 
7:52 PM
I lent code complete 2 to one of my upper management. Pretty sure it's collecting dust somewhere in his place. Will have to ask for it back.
 
@ircmaxell s/loose/lose :)
 
I want to move from Noob -> Actual developer
 
I still haven't touched PoEAA. TBH it's hardback and I don't want to get my greasy mitts on it :P
 
@AmalMurali then forget about anything to do with the language
 
I fucking hate this project
 
7:55 PM
It's your fault
 
@tereško You still working on it? How many hours a day are you clocking for this?
 
no idea
 
I also agree with @TOOTSKI. At your level you need to be doing something more worthy.
 
@ircmaxell: Wait what. Didn't your blog use Wordpress before?
 
@AmalMurali never
 
7:56 PM
Hmm, okay. Maybe I'm just confusing yours with some other blog.
 
and by "forget about anything to do with the language" I mean focus on language-agnostic books and concepts
 
i have pushed out 5000 php lines in past 2.5 weeks + some JS and templating
 
Code monkey
 
@tereško Are you coding to a standard you approve of or pressured coding?
 
@Fabien all the code is here
it is not hight-quality .. but I would not call it "below average"
 
7:59 PM
Have you fixed the API error?
I mean, they, whoever.
 
Sneaking Fracture in there I see.
 
nope
I had to choose different lib for that
@Fabien I could not use the inhouse CMS, which meant that I had to improvise
 
I'm sure it was a tough decision to make :)
 
well ... the decision was simple, but the project was sold as "standard site"
 
FACT: PHP OOP SUCKS AND IS USELESS.
 
8:01 PM
 
heh
 
Nice try Rasmus
 
who are you talking to ?
 
This room.
 
Which reminds me...
 
8:02 PM
oh ... the "legitimate opinions"
 
such pearls :D
 
@DemCodeLines don't blame php, blame the developer
 
If I can't access one object from anywhere else without having to re-instantiate it, then its useless to even bother with oop.
 
OOP has nothing to do with PHP. thus, there's no such thing as "PHP OOP"
 
8:03 PM
In @Fabien's words: "PHP doesn't suck. It just simply allows people to suck"
 
@AlmaDo The concept's implementation in PHP
 
@DemCodeLines so you support global scope?
 
I remember saying something along those lines. Not sure it was that exact quote. :P
 
@DemCodeLines doesn't make sense ... no such thing as re-instantiate ...
 
I don't care about that stuff. It just ticks me off that I can't access the object that I just created and wrote a lengthy script to put stuff into and that I have to call that script again and again to populate the object as I go from page to page.
 
8:05 PM
@Fabien if it looks like a troll, talks like a troll and smells like a troll .. it probably is a duck. Stop feeding the ducks!!
 
Mar 30 at 15:22, by Fabien
PHP doesn't suck IMO. It simply allows people to suck.
 
@tereško lol
@AmalMurali huh. So I did :P
 
How in the freaking world is the question too broad.
 
@Fabien ahahahaha
 
8:07 PM
Jul 4 '11 at 14:19, by salathe
PHP sucks.
 
@DemCodeLines It can be discouraging but perseverance is key. If it was easy, everyone would do it.
 
@DemCodeLines time to read a book or two before insulting php :)
 
wow, was it really that long ago?!
 
@salathe You seem old, right?
 
@salathe Still sucks :D
 
8:09 PM
If I go around populating the same object with same user data again and again, the code will become unmanageable
 
UPDATE: GOD confirms:
Oct 25 '13 at 21:23, by GOD
PHP SUCKS. prove me wrong !!!
 
Why can't Webgrind just work?
 
lol
 
It keeps crashing on file read with PHP Warning: fread(): Length parameter must be greater than 0 in /home/somekittens/Dropbox/ReferralFeed/angular/html/webgrind/library/Reader.php on line 241
is this a known issue or am I better off porting the entire codebase to a language with a sane profiler?
 
@SomeKittensUx2666 because it exposes all your files to the public \o\
 
@Ocramius Ah, yes, because I'm so dumb that I don't know how to echo 'webgrind/*' >> .gitignore
 
> @$array[$i]?:$else
Awesome @bwoebi
 
@TOOTSKI MY EYES
 
I prefer @$array[$i]||$array[$i]=$v :D
 
8:14 PM
@SomeKittensUx2666 when you profile with xdebug, you are profiling xdebug ... just saying ... at any rate why would you want to use a thing like webgrind, theres a decent cache grind ui for every os isn't there and xdebug can generate standard format output can't it ?
 
XDebug generates the cachegrind files fine - Webgrind can't find them
 
just get a desktop app i think ...
 
@TOOTSKI yuck
 
very bash that is @TOOTSKI
 
8:16 PM
Well, let's try KCachegrind.
 
I just use that for trolling.
 
also @ inserts ops, don't do that ...
ah goooood ...
 
you always see [ -d /path ] || mkdir /path in bash ... it looks out of place anywhere else ...
 
@TOOTSKI I prefer $array += [$i => $v];
 
8:19 PM
$class=!is_string($class)?:new ${!${''}=$class};
 
@TOOTSKI new $class works fine... no?
 
Yeah, fail.
 
as I said, I hate this project
 
:D
 
8:27 PM
@JoeWatkins replied to that thread :-D
 
mornings
 
moin
 
Erm, how to test CLI script?
 
test ?
 
test it?
the best way to test a CLI script is to test it...
2
 
8:37 PM
phpunit, if needed anyways...
CLI script reads file A, modifies it, saves it as B
$this->assertEquals(1, 1);
Ok, tests pass.
 
if you wrote a bunch of statements in the global namespace and you're referring to that as a php script, then you knew when you wrote that it wasn't testable, the sensible thing to do is write testable code to begin with ...
class My extends Console {
    public function readFileA() {}
    public funcion readFileB() {}
}
and so on ...
 
Yeah, what I have is a clusterf*... so it's not testable in that manner... but I would still want to see if I input file A, would the contents of B be as expected.
Not too late to rewrite I guess.
 
user895378
> Its tough to beat the Symfony OptionsResolver component for a named parameters like implementation.
 
user895378
Shoot me in the face.
 
@rdlowrey amen
@rdlowrey which is why I replied what I did. But aparently nobody agrees with me
 
user895378
8:54 PM
That's because /r/php is a framework circle jerk.
 
It's also a good place to remind me I am not that terrible a developer.
 
<?php
class Console {
	public function __construct($argv) {
		$this->config = array_merge(
			$this->config, $this->configure($argv));
	}

	protected function configure($argv) {
		$config["exec"] = array_shift($argv);

		while (($key = array_shift($argv))) {
			switch ($key{0}) {
				case "-": switch($key{1}) {
					case "-": if (($dlim = strpos($key, "="))) {
						$config[substr($key, 2, $dlim-2)]=substr($key, $dlim+1);
					} else $config[substr($key, 2)] = array_shift($argv); break;

					default:
@TOOTSKI you finish ...
 
I hate parsing console options
 
I like using Cilex for that reason
 
9:00 PM
@JoeWatkins thank ... you ... very ... much ... I really hope you had that code already :)
 
hmm
is the php wiki actually down?
 
I always use same logic more or less .... will accept the standard --param=less -flag --param no-equals ... which should be enough for the input to any program ...
no i didn't, but it's on the end of my fingertips ..
 
:O
You're too kind.
 
Wow, seriously, you wrote all that just in this time? You're super fast!
 
@Ocramius something to do with ssl keys
 
9:01 PM
that's what she... etc
 
@AmalMurali he improved his rate to 108 LoC/min... decent, but can be better :PPP
 
What's LoC/min? Lines of code?
 
*lines of *code
 
Ah yeah
 
@AmalMurali Lines Of Code
 
9:07 PM
uhmm
 
simple case... regex: ~(--?|/)([a-z+])[ =](\w+)~ on implode(' ', argv)
 
http://news.php.net/php.internals/73690 ... what is the difference between an unit test and an integration test?
 
nobody is going to answer that ...
cept maybe @ircmaxell .... I'm not touching it ..
 
@JoeWatkins I agree there's a difference, but I'm not going to answer it, as it'll turn into a shit-throwing fest
 
9:14 PM
@ircmaxell I just want an answer here (being curious), not on the ml…
 
174
Q: What's the difference between unit, functional, acceptance, and integration tests?

AndrewWhat is the difference between unit, functional, acceptance, and integration testing (and any other types of tests that I failed to mention)?

 
genuinely I don't know, I could look it up, but I would be reading someone else's definition, I don't have one of my own ...
 
@bwoebi unit tests are small, and extremely light. They test a logical unit of code (class, function, etc) in isolation from everything else. Integration tests test the communication between those units (as if the units are tested themselves directly, they shouldn't "need" integration testing)
unit tests are VERY low level and rely on the direct internal API of a unit implementation. Integration tests are higher, and can test many subsystems
 
so integration tests appear to be a kind of unit test ?
if the only difference is the level at which they are meant to operate then they are essentially the same thing, right ?
 
@HamZa E_WALL_OF_TEXT: @ircmaxell provides a better answer.
 
9:18 PM
@JoeWatkins in theory, yes.
 
fair enough
 
I just was looking fort a short and concise answer :-)
 
But the big difference is that good Unit tests test all permutations of the unit under test. A good integration test only tests the critical paths.
that's because there's a ton more possible paths through an integration than there are in a unit
 
so phpts are unit tests, they are low level and rely on internal api stuff, they do not test the integration of subsystems but the subsystems themselves, which would be your definition of unit test, right ?
 
@JoeWatkins no, they are unit tests. Because testing filter_var requires hitting SAPI, executor, etc...
 
9:19 PM
Actually if we'd unit test php completely, we'd have a repository of tests 100 times bigger than php-src itself…
 
break one tiny component in zend, and all tests fail. That's not the sign of a good unit test...
 
unit tests or integration tests ? correcting my reasoning, or the word ?
 
From the stand-point of the engine, it's definitely an integration test
 
so seb is saying that they are integration tests because they are the high level stuff, we lack unit tests, I mean there is no code that tests the vm directly, or the executor directly ?
 
@JoeWatkins exactly
think of it this way
 
9:22 PM
I actually get it ...
 
let's say you're testing a radio for a car
a unit test is testing the resistence of every resistor on the board.
a failing unit test tells you exactly what is wrong, and where it is wrong
 
an integration test is testing the sound based on some settings?
 
an integration test would be powering up the radio and seeing if you can hear music playing
@bwoebi yeah, at the highest level. It could be lower than that, but the point is multiple components are touched. And as such, a failure requires some debugging to figure out what's wrong and where it is wrong...
 
is anyone using togetherJS?
 
there's a more suitable room for your question @Alan #Javascript
 
9:25 PM
Or have a simple php script for doing audio chat?
 
ok so now I have a clear definition of what they are ... I see no solution, I do not see that it would be useful to write a testing framework for the kind of stuff we would write unit tests for, don't we test that by proxy when we invoke our integration tests, is there another sensible way to even do it ?
 
Thank you CS, I will ask there instead, but is there a PHP audio chat script?
 
@ircmaxell I now begin to understand why I dislike phpunit so much and like phpt at the same time… Never understood myself until now. "it's the same" I thought…
 
I like phpunit, I never say that, about anything ...
 
I am hosting a collaborative code editor and want to be able to chat with my cousin who is helping me when I get stuck.
 
9:26 PM
@JoeWatkins for PHP, a TRUE unit test framework would be written in C...
PHPT is pretty good for extension testing. I wouldn't migrate those tests to C. But the engine really needs to be tested in C directly...
 
@JoeWatkins no, really, I want to test the app, not if minor things fail. Unit testing is just too much work to maintain it feels.
 
yes, but I'm trying to think of what that would look like, if it's beneficial, I'll do it tomorrow, but I dont' see what it would look like, show me the unit test for say stack overflows that we cannot invoke with integration tests and we do not already know about at this point ?
 
I get insane when I see all these fucking unit tests…
 
@bwoebi absolutely not. Good unit tests reap WAY more benefits than the maintenance they give
 
this is a fine approach when you are on your own @bwoebi ... it does not work in big code bases it just doesn't, there is a vast range of expertise and so understanding, people make mistakes and they aren't easy to spot or aren't spotted ...
 
9:28 PM
@JoeWatkins well, that's the easy part. You can't invoke it with an integration test, because it may be complex to get the engine to the point of instability. But with a C level test, you could fake that right off the bat
 
@JoeWatkins well… I'm happy with the way it's actually in php-src. It gives me a quick overview of what it wrong.
 
@bwoebi try fixing a bug in PDO then
I fixed one bug, and it caused over 200 test failures
 
I've never heard of unit tested c, nor have I ever worked on a team of c programmers - I am the c programmer ... I feel the benefit of unit testing when working on big codebases in php so I reason that if it's possible I'd feel the benefit here ...
 
@JoeWatkins neither have I, but I know C-Unit and several other frameworks exist
 
@ircmaxell or mysql(i/nd/). Not sure what there happend, I find that code also relatively confusing…
 
9:31 PM
@bwoebi the point being that the tests are not good tests, because they wind up testing way too much. If you break something, one obvious test should break and point out what broke
that's one thing I learned from trying to get PHPPHP running via PHPT, it was an absolute nightmare
 
/note do not look on urban dictionary for c-unit ... :o very nsfw
that's, horrible ...
 
lol
 
@JoeWatkins You basically just told everybody to go look it up :)
 
@ircmaxell eh. If I'd accidentally remove a semicolon accidentally at some specific place in language parser, it might still compile but nearly every single phpt test would break… there are some things which are just fundamental and break everything else if they go wrong…
 
@PeeHaa Yup
 
9:35 PM
@bwoebi No. All integration tests would fail. But only the unit test for that specific corner of the parser would fail...
and the precursor for running integration tests would be running unit tests successfully
/me is out of here though. Later
 
I have immediate and irrevocable hatred of c-unit (I found the actual project), show me something better ?
 
@ircmaxell I doubt that we could unit test a parser effectively… some branches just depend on other branches in the parser.
 
@bwoebi you would have that discussion.
@JoeWatkins I dunno, take a look around. Laterz
 
@bwoebi like everything else the parser does actually have an api, I'm pretty sure we could invoke the yy_* api functions and test the parser that way ...
 
@JoeWatkins that was not what I meant… but not important …
 
9:41 PM
well what did you mean ?? I do like the idea of this, so I might pursue it ... so if I miss understand something ??
 
I don't like the idea… please :x
 
> public SplFileObject SplFileInfo::openFile ([ string $open_mode = r [, bool $use_include_path = false [, resource $context = NULL ]]] )
Is r a constant here?
Not defined in global.
 
@TOOTSKI 'r'
same as fopen 'constants'
 
I know that, but it should be a string.
 
@TOOTSKI You know. It's not expected to be defined, so PHP assumes a string.
 
9:49 PM
@bwoebi Don't give lame exuses for bad documentation
 
in python r means RAW
 
@bwoebi Yes, but it throws a notice.
 
@TOOTSKI put an @ before in the docs.
 
@bwoebi Funny :)
 
I edited it - needs someone to pull. I really ought to get a proper login for editing docs.
 
9:57 PM
the saddest part is: I am constantly having a feeling that the project, on which I am working, is worthless
/me headdesks a bit
 
Then stop working on it?!
 

« first day (1276 days earlier)      last day (3663 days later) »