« first day (1417 days earlier)      last day (3524 days later) » 

4:01 PM
hm
no, actually now that I know what it is it sounds really logical
that I listen to it
but before I knew DI I was quite stressed and couldn't understand how it works
which is quite uncommon for me
maybe I didn't have concentration
 
???
 
Ronni Something like this pastie.org/private/okbhec1c4h9xbekyq7jhq, right?
 
@ircmaxell isn't substituting dependencies that adhere to an interface basically the behavioural pattern?
 
@Madara happy Bar Birthday!
 
4:04 PM
http://thecodinglove.com/post/96459403617
The coding love
SharePoint's reaction to approximately everything
nlecointre
1409673697
 
@ziGi behavioral pattern?
 
sorry, Strategy Pattern
 
11
A: Advantages of using strategy pattern in php.

GordonThe intent of the Strategy pattern is to: Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. [GoF:349] To understand what this means, you have to (emphasis mine) Consider what sh...

 
4:06 PM
isn't that what you are shoing here
 
well, there is some similarity, but strategy is an enclosing pattern, where the individual strategies are solely used by the impelemtning class.
dependencies on the other hand are useful outside of the context
 
ok I see the slight difference
pardon me, I am quite young in this area
 
Also the second part of stackoverflow.com/questions/1957732/… shows Strategy as well
 
@RonniSkansing Something like this pastie.org/private/okbhec1c4h9xbekyq7jhq, right?
 
the code examples at sourcemaking usually suck
 
4:09 PM
I like this one
cause it shows a quite simple realworld problem
 
Guys, when it comes to choosing MySQLi or PDO, what would you use?
 
PDO
 
@HassanAlthaf that depends on what you need
34
A: mysql vs mysqli in php

GordonThere is a manual page dedicated to help choosing between mysql, mysqli and PDO at http://php.net/manual/en/mysqlinfo.api.choosing.php and http://www.php.net/manual/en/mysqlinfo.library.choosing.php The PHP team recommends mysqli or PDO_MySQL for new development: It is recommended to use ...

 
@Gordon Idk.
 
@HassanAlthaf then go with PDO
 
4:13 PM
I know MySQLi
OOP-style.
Oh, well, looks like the time has come to move on. :)
 
@HassanAlthaf imo, the only reason to use mysqli is when you need non-blocking, asynchronous queries, server side prepared statements or want to use the plugin api.
 
What do you mean? @Gordon
 
just what I said
 
I didn't understand what you said.. lol
 
mysqli supports features pdo doesnt support. if you dont need those features, use pdo because pdo's api is less akward to use
 
4:17 PM
Well, I'll stay with MySQLi and learn C# I guess.
 
plus pdo is a dbal while mysqli is mysql specific
 
Ikr. PDO offers 12 db drivers, with 18 different types of connections. :/
Well, MySQL is the most widely used Database, and almost everyone prefers MySQL.
Unless, they are a huge site like Facebook.
 
facebook uses mysql
for a lot of things
 
Wow, even Facebook uses MySQL.
I wish PHP was like Hack. :/
 
Anyone ever use tox?
 
4:20 PM
I love Hack's style of coding.
Skype all the Way mate.
#microsoftProduct
l0l
wow.
 
@Gordon Someone (read: me) should really write a wrapper for MySQLi that improves the interface...
 
@ircmaxell native or userland?
 
@Gordon userland... At least at first
 
I'd help with userland
 
If I have to choose between PhalconPHP and Flask what are your comments
 
4:32 PM
@ziGi doesnt matter. one of your feet will be shot
 
haha
nice, what would you recommend then?
 
@ziGi none, why are you using any of it?
 
@Gordon you don't write C ?
 
@Gordon you don't like flask?
 
phalcon speed + good decoupling
flask - easy + a lot of extensions
 
@ziGi does the speed mean anything for what you are going? what kind of extensions?
 
I am going for big data eventually
when I collect it all
 
@FlorianMargaine i've never used it tbh. i just wanted to be snarky :D
 
what does that mean? "big data"?
 
@ziGi and how do you then know that php will not suffice, or that hack/phalcon/c whatever will?
 
4:35 PM
though i wouldnt recommend phalcon if you dont have people being able to write C as you wont be able to workaround bugs easily. also the speed benefits are hugely exaggerated.
 
because I don't want to spend time writing everything myself, I want re-usability and speed
@Gordon I see
how can you back up this statement?
 
it's an obvious truth
the moment something goes wrong, if you don't know how to debug a PECL extension, and C code, you are fubared
 
@ziGi did you read maxell's post?
 
which one?
@JoeWatkins you are quite right
 
> By using a PECL based framework, you're making the fastest part of an application faster, and not doing a thing about the slower parts... This is nothing short of a premature optimization...
4 mins ago, by ircmaxell
@ziGi http://blog.ircmaxell.com/2012/08/thoughts-on-pecl-frameworks.html
 
4:38 PM
@ircmaxell I believe it translates into English roughly as "sales bullshit"
I think the term was originally coined by Buzz Wordington
 
@DaveRandom either that, or "I don't really understand scales of data, but it seems big to me, so I'll call it big"
 
@ziGi theory of constraints. it doesnt help that you can create 1 million objects in 100ms with phalcon if your sql queries take one second. it will still be slow.
 
it's like "cloud"
 
true story ... when I joined my current job, 6 months ago, I took the bespoke framework that their whole application runs on and converted it to a C extension ... they have me on the team and we do not use it ... I done it to flex muscles and get to know the system ... it is not necessary to deploy it ...
 
Maybe it means you turn caps-lock on then rip the key of your keyboard
@FlorianMargaine I like to store my rain in the cloud
 
4:40 PM
what is the best php framework
 
I like the cloud-to-butt extension though
 
most orginised
 
@FaizRasool your mom
 
hahahaha
 
lol, brutal
 
4:40 PM
is skype working now? I see ok for my ICMP, HTTP, but skype is failing (and some services too). So - trying to figure out - is it my gateway fail or what
 
yes well.
 
dude, not funny tho ... be nice ...
 
....
 
@FaizRasool php
 
@FaizRasool question is far too subjective to provide a useful answer
 
4:40 PM
@JoeWatkins what did your benchmarks show?
 
sorry, seeing this question asked every 2 days is getting boring
 
Also it's the wrong question
 
shouldn't there be a gist for this question?
 
@AlmaDo works for me
 
4:41 PM
but im asking this first time
 
it seems lke we get it every few days
 
tell me that
 
@Gordon thanks. So will get a kick to my ISP
 
im doing php for year now
i want to migrate to framework now
 
Why nothing you ever do might make the slightest difference is about Theory of Constraints in an agile context but it's easy to apply it to everything.
 
4:42 PM
@FaizRasool which ones have you considered trying ?
 
@ircmaxell set side by side, I could show that the C is faster, when we are benchmarking things about the framework, but you can guess that the application on top is the bottleneck not the framework gluing it together ...
 
@JoeWatkins sure, so single-digit percentages?
 
sigh .. they've broken some eu-routes..
 
@FaizRasool why?
that, by the way, is the right question
 
i tried CakePHP, Yii
 
4:43 PM
Vanilla PHP: best framework (c)
 
@Gordon true but I plan to use non ACID db for non-related bulk data like articles, ratings, comments, etc.
 
im working like one person team
 
and no, (c) isn't copyright sign
 
@FaizRasool why?
 
on both front end and backend
 
4:44 PM
why doesn't everybody answer that sf2 is the least worse, anyway?
 
What is the margin of Bias towards PHP in this room?
 
now i feel like i need more orginsed so i can easly manage
 
not even that, when we tested the applications themselves, any gain I saw at the console was swallowed in it's entirety because of less than optimal, or just complex, queries and other such operations (accessing web services and other apis for example) ... it is completely pointless to deploy it therefore, even though benchmarking the php and c framework shows c to be way faster it was never the bottleneck ...
 
@JoeWatkins :-D
 
4:44 PM
which at least do me input validation like functions
 
no detectable difference in the real world ... I don't think I could have achieved one ...
 
@ziGi will still be the bottleneck
 
Well unfortunately, where I work currently, Zend 1.12 is being used and many things for some reason are don on the Backend level instead of DB level and it is quite slow
What does Google use for Google+
 
did you even profile?
 
4:46 PM
@dave
 
@FaizRasool So look at ways to organise your code in a way you are comfortable with. By using an existing framework, you are organising your code in a way that the framework author thinks you should organise your code. If that works for you, then fine. But don't pick something because "someone else told you to", or because "everyone else did"
 
@daveRandom i need it becasue now i feel im getting tired to make input validations for every input
 
I read that G+ uses java servlets for the backend and JS fro the UI side
closure framework
 
and for security purpose im tired...
 
@FaizRasool wake up
 
SQL,XSS,CSRF,AUTH taken....
 
you need to audit the code you use in production most of the time
 
@RonniSkansing yse true
*yes
 
@FaizRasool You have to do that anyway - every input needs to be validated differently. You can create your own components to reduce the amount of boilerplate, or use someone else's component, but forcing your code into a particular framework for one of its features is using a sledge hammer to knock in a nail
 
@ziGi are you really operating at a comparable scale to G+ ? it seems to me this information is interesting but not at all useful for making decisions ...
 
4:49 PM
@Gordon why do you think didn't they use Angular?
 
And frameworks give you almost nothing in terms of security, that's not something you can have without understanding the problem domain, which a framework cannot do for you
 
ok
in term of orginised
 
@JoeWatkins not really but I really like to know how big comanies do it, how small and medium do it
it gives me a more clear picture
 
What can be done about mixed content warning regarding HTTPS and HTTP when you have no control over what users post, i.e. a link or an image using HTTP? Of course I could replace HTTP with HTTPS, but then when links are clicked it would cause issues if the end server doesn't have an SSL certificate. I thought about doing some sort of thing where the it would be like mydomain.com/?redirect=http://theirdomain.com but this would not work in the case of embeds, which are the main issue.
 
@ziGi If you try to understand how large sites work when you are not working on a large site a) it will be almost useless to you and b) it will melt your brain
 
4:51 PM
@ziGi maybe it was too new at the time
 
@DaveRandom I like brainmelting
 
okay, but being realistic, there are only a handful of languages [or architectures] suitable for deploying at massive scale, you will always get similar kinds of answers ...
 
Your funeral
 
@JoeWatkins ok so the question then is, how do you proceed if you see you are getting bigger?
 
@ziGi that depends on context
 
4:52 PM
@ziGi functional decomposition and scaling out horizontally
 
in every case you talked about
not every company does the same
nor have the same needs, major or not
 
@Gordon so can you recommend some good readings on scalability
 
@Brandon You could proxy the requests via your server, or pull down local copies of the content and serve them from your servers. You have to normalise at the server side in some way though.
 
great, apparently infoq is quite a good source for useful info :D
 
4:54 PM
@ziGi Generally by employing someone who knows what they are doing. Since you are getting bigger, you should have some spare cash to throw at the problem.
 
@DaveRandom yes, I guessed that :D
Well, gents, I am quite grateful for your dedicated answering, it is most useful I'd say
:D
and Thank you once more!
 
@ziGi don't get me wrong, I'm not trying to discourage you from understanding how things work, it's a very good quality. But you do need to focus on the problems you actually have rather than the problems that you might have one day. If you focus on the problems you don't have, it's a pretty good way to ensure you'll never have them because you'll never reach that point....
 
@ziGi but let's be honest: scalability problems is something most of us wish they had, but really don't.
quoted from my mind. forgot who said that originally
 
@DaveRandom I do understand that, I am not spending that much time, I just wanted to hear the opinion of some people that have more experience than me
@Gordon haha :)
 
@DaveRandom That isn't a viable option in certain cases, so I guess I will just come out with the main objective, preventing session hijacking without SSL/TLS. I have been told that setting the cookie with the users IP (hashed) would not be a real solution, so is there another option?
 
4:59 PM
Ok, so would you recommend Go as a good start
because I am really wondering what to use
for my project
I can do Vanilla PHP but then again it would take at least x2 - x3 times more
 
Pin list was getting silly
 
hidy ho
 
@Brandon Why would proxy not be a viable option?
 
Damnit lost all my pings. Stupid chat is stupid
 
Main site notifications
 
5:03 PM
To all people who have pinged me the answer it yes to everything unless you didn't ask a question in which case plop
 
@DaveRandom that is a lot of bandwidth
 
"so I guess I will just come out with the main objective, preventing session hijacking without SSL/TLS"
gees another one
 
@PeeHaa well... I wonder if that's possible...
I don't think so... Not in the general sense
 
@PeeHaa I am dealing with Schools here, they are mostly using the same IP and user agent
 
@Brandon Stop trying to come up with your own broken non solution please
 
5:05 PM
@Brandon True - but you're going to have to make a sacrifice somewhere if you want all these things
You can't have everything for nothing
 
@DaveRandom I feel like the only solution I have is just no SSL
and just hope they don't have a sniffer on the network
 
Or pay for bandwidth
 
@DaveRandom do I have hackathon tickets included in the thing?
sorry bout thta :P
 
@PeeHaa Yeh I was going to ping you before and ask if you wanted to do that shiz or not
Also I like the idea of a hackatron
 
@DaveRandom Do you have some sort of example or docs on the proxying
 
5:07 PM
that sounds like it might be fun ...
 
@Brandon Check out the nginx docs on proxying - nginx will be much better at it than Apache - for something like this you'll want to try and skip PHP and get the webserver to handle it.
 
"...just in case you’ve lost it..." I'm fairly certain @farkie put that in specially for me :P
 
@Brandon if you can't secure the transport layer (SSL), then you can't secure the app. (in general at least)
 
I'm literally about to walk out the door so I don't have time to find links atm
 
@ircmaxell I know that, I was just hoping there might be something
If firefox didn't scream bloody murder at mixed content then I wouldn't be having this issue
 
5:09 PM
Stupid questions: what is being hacked on said hackathon?
 
it screams bloody murder for a reason ;-)
 
@PeeHaa so basically the question for me is really more about whether it will be possible to maintain sobriety enough to get anything useful out of the hackathon, and I suspect the answer is no
@PeeHaa I think that's pretty fluid
 
@ircmaxell An image can make it trigger, which is pretty irritating
 
@DaveRandom sobriety noun the state of being lame
 
I suspect @PeeHaa had to lookup the word sobriety ... which is hilarious ...
 
5:12 PM
:-) guilty
 
LOL
 
yeah
 
@Brandon just quickly, the way I would imagine this would work for you is by sending a URI like https://yourdomain.com/ext?uri=http://foo.com/image.jpeg in the src of an image in your HTML or whatever, and then you would set up the webserver to proxy the request to the value of the ?uri= for requests to /ext, and stick a fairly aggressive cache in front of it. If you google around you'll find examples of configuring servers to do this, I'm sure
 
@PeeHaa hahaha
 
/me is really going now
 
5:13 PM
:)
 
@DaveRandom yeah thats what I thought would be good to
 
later dave chris
 
I think I am just going to do that, will make some people annoyed, but to bad
lol
 
@PeeHaa let me know where you land on the hackathon, I'm easy either way but I know which option I think will be more practical
 
lata random one
 
5:14 PM
@DaveRandom I like my boys easy :D
 
@Gordon Yeah, but not on stupid and slow code...
 
That killed the chat :P
 
@ircmaxell ah, nice to know
 
@bwoebi yeah, it's an effect that's impossible to replicate in photoshop, since it relates to polarization angle (which isn't stored on camera)
 
5:19 PM
Gratz @SecondRikudo!
 
@ircmaxell are you able to make glass invisible with your polarization filter?
thinking brewster angle
 
@Gordon Hmm... interviewtasksrithmia.com :)
 
@NikiC sometimes yes. Really it depends on the light source and the angles involved
 
> API error (status 500): SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
 
Now, one thing I am going to play with is polarizing light from my flash, so I can light reflective surfaces differently from non-reflective surfaces... :-)
 
5:26 PM
any of you have an oracle account? I'd like to dl mysql.com/why-mysql/white-papers/… but cannot be bothered to register
 
@ircmaxell Definitely interesting… just show me more fascinating photos :-)
 
Sure
@bwoebi there is this and this (NSFW, mildly)...
 
ah, nvm, found it through google: oracle.com/us/products/mysql/…
 
People who blamed ZF CLA, did blame Recki-CT CLA ?
aaand the bitching starts ...
 
yup
 
5:32 PM
you saw what sensio done with xhprof ?
 
@JoeWatkins no...?
 
they copied it and changed it's name and open sourced it under the new name ...
 
really?
 
yep
 
5:34 PM
attribution?
 
@JoeWatkins that reminds me of the fact that people don't know that the word gullible is not in the Dictionary
 
one line in copyright header "This is a fork of xhprof" or something of the sort ...
 
@JoeWatkins that's legal then... :-D
 
it is, but they done it over the cla ... and it's not a fork of anything if it's not upstream ... you cannot take fixes merged into xhprof and merge them into whatever they called it because they called it a different name ...
they didn't fork anything, they copied it then fractured the community of users ...
I just hope the same doesn't happen, legal or not, it's a waste of every ones time ...
 
ThW
3v4l.org/iWvBG Why is this an E_STRICT error, it is still callable the same way?
 
5:38 PM
sure
 
@ThW I agree, this should be legal...
 
I also agree...
 
ThW
It works for saveHTML ... 3v4l.org/Qpt4h
%-|
 
@ThW because PHP doesn't use covariance for parameters yet
 
@ThW more by luck than judgement…
 
5:42 PM
actually still says copyright facebook in headers .. github.com/FriendsOfPHP/uprofiler not questioning whether it is legal but whether it is productive to copy a project and rename it and in the process confuse people because you don't want to sign a cla ...
 
@JoeWatkins honestly, I can't stand the CLA
it's why it took so long to get Recki out...
 
@ircmaxell DI container reminds me a lot of abstract factory with singleton, what is the difference?
 
@ziGi huh? "abstract factory with singleton"???
 
I give up
 
5:44 PM
I know this, but we live in the real world ... it is unavoidable ... dealing with it seems to be a better way of moving forward than deciding to rebrand or whatever you want to call it ...
 
@ircmaxell well that's how I call it, it's a mix that I use that I though myself but apparently it exists and it is called a DI Container :D
 
@JoeWatkins I understand what you mean...
 
there is one problem though
 
Damnit too large meme is too large
 
@ziGi no, a DI container is not an "abstract factor with singleton"
 
5:46 PM
if anything in those instantiated dependencies changes while using from one class then when you use it from a second class it might give different results due to the changes from the first class that uses that dependency, thus the class shouldn't alter the dependencies
 
what?
 
Ok, I will give you a more concrete example, apparently I cannot express myself properly.
Imagine the following scenario:
 
thumbleweed
 
You have one dependency that contains some kind of data (let's say it's some kind of a Model). You have a DI Container that instantiates it when you need it the first time or gives it back if already instantiated. Let's say class A calls this dependency, but for some reason changes the data in it via a mutator method of the dependency. A class B then calls the same dependency which is already instantiated and stored in the container and get's the modified data from A instead of the initial data
 
Which is a good thing right?
 
5:50 PM
In certain scenarios that is not bad
but in some scenarios, that shouldn't happen
 
So the question here is, how reliable is it to make dependencies in DIC mutatable when used by multiple classes
 
I can't think of any situation where you want to look at old state like that
 
Well I can
I had a similar problem a few months ago
because I have been using DIC without knowing it is a pattern
which is a bit hilarious because I came up with something that is already widely spread
 
somebody does not understand what DI containers do
 
5:53 PM
at least he understands hints ;)
 
@salathe Refactoring!
 
@DanLugg that's not how refactoring looks like
=P
 
@tereško it is in my house!
 
@ircmaxell I wanted fascinating photos…
 
I'm out for a beer. ciao
 
5:54 PM
:-P
 
@ircmaxell The only thing which is fascinating, is that you think they'd be fascinating…
 
Hm, now that I think about it I most probably look like a little disoriented child to you guys that have much more experience
 
@bwoebi artistic
 
@tereško Pff. I have a French maid outfit hanging beside my desk for just the occasion.
 
to understand DI containers, you first have to understand DI... I recommend the first few slides of this here presentation... speakerdeck.com/tobiasgies/8
 
5:56 PM
lata @PeeHaa
@bwoebi also, boobies ...
 
@ircmaxell Well, I just can shake the head that humans do such things…
 
@JoeWatkins Boobies can make this less fascinating.
 
@JoeWatkins yeah and? just a part of the female body…
 
one of the best parts tho ...
I don't get art ... I like boobies tho ...
 
Partially obscured boobies are more fascinating.
 
5:58 PM
ah sideboob ...
 
.. IRL
 
@JoeWatkins the best part usually is the human and its character, not the body itself.
 
Correct me if I am wrong but the difference between a Multiton and a DIC is that the Multiton is static and holds multiple instances of classes that might adhere to an Interface and once instantiated it returns them, while a DIC is just an object of a class that holds multiple instances of classes that might adhere to and Interface. and again once instantiated it returns them. So in summary one thing is static which is not quite good and the other allows you to have multiple DIC instances.
 
I'm not objectifying them, there is nothing wrong with observing the beauty in something ...
 

« first day (1417 days earlier)      last day (3524 days later) »