« first day (917 days earlier)      last day (4255 days later) » 

20:00
meh, i give up, you should do what igor said. i guess what "wiring it up" would be is to just go in and set the values you want in the property definitions. so instead of private $driver; you'd have private $driver = "APC";. and you'd leave off the type hinting in your constructor.
or no, set it to NULL by default.
aand i am home at last
let's celebrate
@tereško Start phrasing that resignation letter
Then tie it to a brick and smash it through the boss's window.
i have one on may laptop already
20:06
@tereško You're going to smash your laptop through the boss's window? :o
=P
ehh .. have not cleaned in ages
it full of the tards who do not grasp the difference between asp.net framework and a design pattern ... again
@JanL don't think you're here anymore, but for posterity's sake: setConfig(CacheInterface $cacheInterface = NULL);
Useful for those of us who are on Meta Stack Overflow ^
It's an extension that shows the user's SO rep on his MSO profile card.
obviously , not enough jquery
@tereško It actually doesn't use that much jQuery
Only for the AJAX part, which I admit, I prefer using jQuery for.
20:10
@MadaraUchiha +1 for AJAX with jQuery; don't worry that haters be hatin'.
Nah, actually he does use it for other stuff too :P
@dyelawn obviously, i am hating on jquery because it is too hard for me to use it and cannot appreciate how awesome it is .. and not because i have some legitimate reasons
8
@tereško What possible legitimate reason does one have to hate jQuery?
Where's @webarto when you need him?
@tereško dude, i didn't say that. specifically, and only referencing what he said about AJAX. you're supposed to be happy right now. don't get all grumpy curmudgeon
@tereško please take that star as a token of my really-don't-want-to-argue-with-teresko and just ignore me.
4
20:16
last thing i ate was something made of chocolate, plums and walnut (4 pieces of it) with a can of pepsi .. that was ~14 hours ago , before i went to work
@MadaraUchiha oh .. i dunno, the small thing: architecture, documentation and community
nothing too important
don't forget a major release which highlighted "we just dropped support for browsers that a ton of people still use" as its biggest feature.
@dyelawn actually it's "we dropped the support for the browsers, which where the reason why sane people even considered using jquery"
@tereško lol @ jQuery 2.0 supporting IE9+
jquery 2.0 bugs me a little bit by not supporting IE8. IE8 is the terminal version for XP, and many businesses are on XP, are stuck with it and are not going to upgrade, and a lot of sites are about to stop working for those businesses
well ... you should reconsider WHY you use jquery
you might find that all you do with is performing bad DOM manipulations and making your HTML filled with ID attributes
20:29
i cannot be arsed arguing, so im not going to bother, i am instead going to go play crysis
/me is waiting for pizza
@tereško I usually develop no-JS-first, then add JavaScript and if needed, jQuery.
I don't fill my HTML with pointless IDs, I only use them when sensible
(major parts of page, form controls with labels, etc)
@MadaraUchiha: i didnt think that was any sort of "special" way.. i thought that was just "the way"
@bizzehdee People often don't adopt this workflow, and end up with applications that fail with basic operations without JavaScript.
lol .. i have been seeing too much "real world" code lately
20:32
Jquery has nothing to do with "bad DOM manipulation". its all up to the user. Jquery simply uses document.querySelectorAll (which is available in most modern browsers)
@MadaraUchiha: you mean stupid people work in stupid ways?
or Sizzle CSS Selector engine (if document.querySelectorAll isn't available)
jquery lowers the entry barrier and provides bad practices as examples in documentation
do you know something better that jquery? (in 2013)
it's basically the best tool that the "real webmasters" have
20:33
*than
native JS , with minimalistic animation library if you need one
do you know all of cross-browser issues?
most of the crossbrowser issues that i have actually encountered have been part of jquery too
Dojo, prototype,mootools they all suck
there are no cross browser issues with getElementById
20:35
for example, having a <input type="action" name="action" /> in IE7 , and reading it's value to submit to the form in which it is contained .. afaik, this is one of "still opened" bugs in jquery
mootools and prototype both do suck major balls
Prototype sucks because it extends the DOM (basically)
Prototype sucks because its shit
why do you reply on HTML5 (input type="action") !?
HTML5 isnt recommended or stable yet by w3c, any reliance on it is ill advised
20:38
yep exactly
@metal_fan sorry .. typo : type="text"
The hell is <input type="action">?
@Eugene im not sure I understand. just set the form action to the server you want to send the file to.
although i do have a little script that lets me set class="type-tel" or "type-email" or a few other html5 input types, and the script looks for those and changes the type if it detects a html5 compliant browser
@bizzehdee It's a candidate recommendation, looks like it's considered as nearly stable...
20:41
@Ocramius nice
@tereško while jquery sucks, It solves about 30-50 cross-browser issues. Nobody seems to care how exactly jqeury works. People just download its compressed version and just use it.
another example is WordPress. WP is shit. But its so popular and very easy to use.
@bwoebi: you running a beta version of your OS now? i doubt it. why would you a beta specification for your web apps
@metal_fan The cross-browser issues aren't the most important. The most important is that it shortcuts everything. For example $.load("url"); instead of creating first a large xmlhttprequest etc.
you can create your own shortcut for xmlhttprequest
@bizzehdee Because HTML5 is built in a way where almost all of its features are BC with legacy browsers.
20:45
@dyelawn configuration is about constructing the object graph. manual configuration means manually wiring up things, instantiating everything yourself. the configuration thing is basically a factory based on some configuration format. a DIC can be a generic version of such a factory, configured via some data format (arrays, yaml, "data objects", whatever).
And the features who don't get a polyfill.
@MadaraUchiha s/is built in a way where almost all of its features are BC with legacy browsers./stinks
@bizzehdee No, I'm not using a beta version because there is not enough interesting in the next version of OS X. But it run the trunk-version of PHP for example as there are interesting new features often enough.
@Gordon How does it stink, exactly?
@bizzehdee Yes, but then I have to write it first... and as we all know, developers are lazy :P
20:45
Don't forget HTML's original purpose, and that's describing human information for computers
HTML5 does a better job on that than HTML4 or HTML1.
im a developer, im not lazy, i like to write as much as i can from scratch. only reason i use jquery is because i dont currently have the time to write my own light weight version of the tools i use from the library
Don't be confused by adding the new JavaScript features, they are not part of the HTML5 specification.
@bizzehdee I use jQuery almost 100% for Ajax
And that's because I don't have time for the BS xbrowser around AJAX.
@MadaraUchiha in becoming a markup language for pixelpushers. in trying to reinvent perfectly good wheels from xml in a way that people who cannot bothered to read specs dont need to understand, in being html with bling when everyone know that bling is a blender. in adding presentational markup back. in not being xml based, …
the only worthwhile things imo are video and audio
the lazyness of html does bug me. i dont get why we switched to xml based html, and then because loads of old people bitched about it, we switched back to sgml
@bwoebi The cross-browser issues is kinda core problem writing js code. Do you know how buggy XHR can be? For example, In IE7+ it cannot require local files, In Firefox it throws an exception (8+) when host isn't available, In IE9 it lead to memory leaks ("everything should be casted to null" - solves this)
20:49
@igorw "wiring up" is where i get lost. would that be like private $database = new MongoDb(//args); instead of configure(ConfigInterface $configurer);
@bizzehdee exactly
@bwoebi Everything in JS acts as a reference. That's minor only issue.
@metal_fan Yeah, I mean it shortcuts the whole workarounds AND the functionality.
@bizzehdee i'm doing all library-free js on a project right now, and i miss parts of it. i like what they call a lot of stuff.
@dyelawn yes, injecting all the dependencies.
20:51
anyway. gonna watch Lemmy on Arte now. see you tomorrow
so just defining all of a class's properties is considered a method of dependency injection?
@bizzehdee I build also most from scratch, because we're too lazy to read first big documentations of libraries. But jQuery is a library with very few things to learn. So this is the most lazy way.
hmmn. didnt realise querySelectorAll works in IE back to IE8.
@dyelawn if you mean static properties, then that's a no-go. if you mean instance variables, then yes, that is basically setter injection. but I would avoid it. I would avoid setter injection in general, and public properties are often a bad idea.
@metal_fan it's too bad they hid the 2.0 feature of custom builds under 12 items for "Hey! We're not supporting IE<8". I think that lets people get the pieces they need without lazily using the junk that they don't need just because it's there.
20:55
@bwoebi Actually, most of jquery shortcuts look like, var foo = Jquery.foo = function(){}. That's because John Resig doesn't like namespaces. Just look at Yahoo - Yahoo.Utils.Ajax... doesn't it suck? The jquery shortcuts give ability to write things like $.ajaxSetup({...}). That was his point.
@metal_fan I don't like namespaces too. Yes. It sucks to write everytime a long prefix. I really prefer writing $.ajax(); instead of a laaarge Yahoo.Utils.Ajax. Namespaces suck in PHP too... It's one thing I hate the most of PHP 5.3.
@igorw ok, so what injects dependencies when the $config variable is null? simple array?
@dyelawn They did that for a reason. The statistic (W3) says only ~2% people in the world use IE < 8.
@dyelawn not sure what you mean by the $config variable exactly.
@bwoebi actually, if you don't know what PSR-0 is, then namespaces would suck.
21:00
@metal_fan link? more importantly for me personally, i work on a couple products for companies that are not getting away from ie8 any time soon.
@metal_fan I know what this is. But it sucks also with the perfect autoloader etc. It simply sucks because I have to write such a long string for accessing a constant, function or class...
@igorw ok, so configure(ConfigInterface $config = NULL) {} allows the manual "wiring up" by just leaving it null. But, in such a case, where do the dependencies come from? Constructor args? default property values?
@metal_fan I prefer also including myself every file instead doing it by magic. Then I see from my main php file what's being used and what's not yet used.
@bwoebi yeah, i liked it much better when i had a ton of require_once()s all over the place, and no real method for determining where to start looking at source to find issues.
@metal_fan sorry, i meant IE=<8
21:06
@dyelawn surely you name the files by the name of the contained class, but no magic please...
@dyelawn might be interesting: thenextweb.com/apps/2013/01/01/…
@dyelawn and not "all over the place", the requires are all at the beginning of your application.
@bwoebi i also enjoy Classes_Named_Like_This_That_Are_Impossible_To_Remember_Exception_Parent_Except‌​ion_Child_Class
@dyelawn my point is that if you do it manually, you skip the config component entirely. and just do new Foo(new Bar(new Baz()))
@bwoebi SPL autoloader gives ability to track the things you include. For example, if you include file "/foo/bar/Class.php" how would you know its name in order to instantiate?
21:09
@igorw ooooooh. so it's in the constructor args, and those are declared in context.
@dyelawn as I said, "configuration is about constructing the object graph"
@dyelawn I name my classes by one or two nouns, camelCase.
i name my classes with random mashes of the keyboard. ie. my template class is called nknkfykfuu6ubir6i8hb568bi56br6
@metal_fan the name is the same as the class name, so there's no problem.
@bizzehdee wonderful. And now make attention to type it right without copying and pasting.
joke...
21:13
@bwoebi really? The PSR-0 exactly states the same thing. Then you follow PSR-0 and don't even use an autoloader :)
when you could
@igorw yes, but you must have realized by now that I am slow and need you to say the same thing in response to four questions before it processes. Do people actually make graphs of object graphs?
@metal_fan Ok, then I seem to use PSR-0 without namespace prefixing. lol.
@bizzehdee I know. I replied, joking too.
@bwoebi exactly..
@dyelawn yeah, you can use graphviz for that. the sf2 DIC allows you to dump to graphviz and make a fancy png out of that.
and here's a screencast from JMSDebuggingBundle: screencast.com/users/Johanness/folders/Jing/media/…
@igorw nice, thanks for that. Potentially stupid question: do you know of any situations where an application has contained more than one object graph for specific contexts?
21:17
in the sf2 DIC that is called scopes, and it's a mess.
Or would that imply that the application should be applications
do you have a more specific example?
not in code, no, but i was thinking about trying to break up a particular application that seems sprawled into contexts.
Is it normal that you use some coding patterns without knowing it... and then see that it works perfectly, is easy to read and understand (by someone other you show the code), but isn't looking like what the best practice is?
that was wrong. the application is coded; contextual object graphs are not.
21:21
@dyelawn that is too blurry for me. :)
hello guys i have a question.. what will happen if 100 000 people requested a page in the same second? Will the server shut down?
@bwoebi what do you mean exactly by best practice?
@igorw That what is recommended to do?
@Alex depends on your webserver, its configuration, your hardware, etc.
but it's definitely non-trivial to handle such a high load.
if you have that type of load, you are probably facebook, amazon, or google
21:25
@bizzehdee or getting DDoSed.
@igorw "Best practice" implies a good solution to existing problems. Nothing less. Nothing more.
@bwoebi well, patterns and best practices are quite related. but there are many common patterns that are in fact bad for your code. anti-patterns. just because someone else can easily understand a specific piece of code does not mean he or she can understand it in the context of the whole code base, and it also does not make that code maintainable / easy to change.
@Alex Don't even dream that you could reach that much users per second in peak times...
@igorw EDIT: nvm, will read and test.
so I would say that yes, it's normal to use patterns without knowing it, and it's also quite common that some of those patterns are anti-patterns.
21:29
@bwoebi I am not dreaming, my app is scheduled to do something at 8AM in the morning, but first of all, it will have to check the conditions on server
@igorw No. I mean the whole code structure without reading the whole code from top to bottom. Not only a piece of code.
@bwoebi so my question is what will happen if 100 000 people request at the same time?
@Alex: the server will experience very high load and some requests may fail
depending on the type of request, and the size of the request and response
@bizzehdee the size of the request is very small
so is the planet earth in comparison to jupiter. "very small" doesnt describe anything
21:32
@bwoebi i'd say that if you're thoughtful about your code structure and do your homework, you're likely to come to similar conclusions as other thoughtful people who do their homework, resulting in shared ideas on design patterns but different implementations of the ideas
@bizzehdee for hundred thousand simultaneous requests a single server will simply give up. As a normal webserver should take at least one to five milliseconds per request. So you'd only complete in 20 minutes...
he didnt say web server. he said server, and didnt specify the type of request
I meant a dedicated server
@bwoebi so basically your question is: "is it possible to do good architecture without knowing jack about architecture?" I don't know, but I've seen lots of messes that people have come up with.
my own dedicated server
21:35
@bizzehdee maybe, but TCP requests are taking loads of CPU cycles. I'd be wondering if a normal server can handle more than 10000 requests per second
@bwoebi it's not TCP , it's HTTPRequest
simple httprequest, requesting a json {"success":0}
@Alex the HTTP protocol is layered on top of TCP...
so it is TCP then. HTTP runs over TCP
@igorw ah okay ! so what do you think guys ? it can't handle more than 10 000 requests per second?
@bwoebi: depends on the server, im getting a new server soon, 4x 16 core cpus with 128gb ram 2 connections to a gigabit network each terminating at a dedicated 100mbit line. i would hope that could handle a certain amount of high load
21:38
@Alex I can give you a definite answer to your question: No, you can't handle that load.
at 5ms per request, a single worker couldnt handle more than 200 requests per second
if you have 10 workers, thats 2000 requests per second
Reason: Reading your comments I concluded that you clearly have no idea of what you are talking about and thus don't have a chance to handle that load ;)
I always think about code structure, but I don't know if it is a good structure... I see that other people understand my code.
I think the most important is always a simple API for the single modules of my code.
@NikiC what do you mean?
tbh, i dont see you ever reaching that load
so i wouldnt worry about it
21:40
@NikiC not knowing that http is based on tcp doesn't mean i dont have an idea of what im talkin about
@bizzehdee my app is scheduled to do something at 8AM in the morning
@Alex it sort of does
lol 8 AM in the morning.. that's funny
my brain hurts from trying to understand you now, im going to do something more productive.
brb, need to shit
@bizzehdee haha okay...!
@Alex And how many users does that app have? And why would that thing that is scheduled for 8 in the morning result in 100k clients simultaneously sending a request?
21:41
sorry guys for this stupid question :p
@bwoebi "good" always depends on your needs. but in most cases the main need is for it to be easy to change. and unless you have lots of experience, it's hard to design something that is easy to change.
Okay, if you have such a massive server, it may be enough. But I don't think that you can handle a lot more.

But why are you needing such a server? Or do you having also some silly problem like Alex?
@Alex: also, this isnt a php question, you may want to try serverfault.com
@bwoebi i don't know that you want people to need to understand your code, you want them to know what to expect.
@PeeHaa埽: You there? You have some Oauth thingy, right? I need to interact with Github API and w/o Oauth I only get 60 reqs per hour which is very low.
21:43
alright guys !
thanks a lot <3
@NikiC Niki.. 31K ? :O
Respect bro
thx !!! - build failing :/ :)
What I know is that dependency injection is often making it easier to separate and manage code. And that API's of classes should be reduced to as less as possible methods.
This alone, as I've experienced, has made it very much easier to maintain my code. But surely as I expect there will be ways to make it even better than me.
@hakre hmmmz I thought that was only 5.3 :|
21:47
@PeeHaa埽 I'm using 5.3. Trying out AppFog "cloud" hosting. Already got print_r online again and now I want to write a little PHP eval from gists.
So you can just link to a PHP script on gist.github and execute it code-pad style ^^
It should work. The things that are failing are token storage
@hakre ooooeh kewl
@bwoebi that's a great start and will get you half the way there, but it's not architecture.
@PeeHaa埽 it should work on the fly. I dunno if that gets exploited all day then LOL
maybe I isolate the app. Anyway it's one of these cloud things, so you can just restore it.
21:49
@igorw "it's not architecture" Right. But what you call architecture then?
Architecture (Latin ', from the Greek – arkhitekton, from "chief" and "builder, carpenter, mason") is both the process and product of planning, designing, and construction. Architectural works, in the material form of buildings, are often perceived as cultural symbols and as works of art. Historical civilizations are often identified with their surviving architectural achievements. "Architecture" can mean: *A general term to describe buildings and other physical structures. *The art and science of designing and erecting buildings and other physical structures. *The style and ...
@hakre Hahaha. I want to know how architecture looks like (no, I don't want to look at already existing architectures in frameworks, they're to big to analyse.)
@bwoebi I don't think I'm qualified to answer that question to be honest.
@bwoebi An architecture that is too big to analyze is a bad one.
@igorw Why not try it at least? ... The art of architecture is to complex to be perfectly explained by one human.
@hakre I mean too big to analyse by someone who is not talented in recognizing architectures.
21:56
@hakre Im' here to help you
I feel stupid when trying to help you, 73.4K !
and me.. 215 :) (A)
@igorw so i just read this: github.com/symfony/symfony/pull/7007 and your post on stateless services. i don't know if synchronized services are a mess, but my brain certainly is now.
@bwoebi I would say that architecture is the art of separating pieces of application logic, view logic, storage logic in a way that makes them independent from each other and easy to change in isolation. those pieces communicate through protocols, and you need to find the right place to define a protocol, and define it well.
that's my attempt at describing architecture, I'm sure other people will tell you something completely different.
22:22
@bwoebi , take a look at that pyramid. Architecture describes what is/was made. Practices and principles describe - how. Dependency Injection is a practice.
Yeah. This is something I hate sometimes. (I avoid as much as possible writing output in my application logic.) But I don't never really know how it's the best to pass the variables to templates (No, I don't mean smarty like etc., but code with small PHP language constructs and full with <?=$var?>)
Shall I create an array and then extract it? Shall I directly access the array instead of extracting etc. I never know how I will be okay with...

Storage logic should be in my opinion some magic setter and getter which stores the data in some object that's being passed around through the whole c
@tereško I begin to fear that I'll discover everywhere in my code loads of practices without knowing about when I'll search for them :O
read PoEAA
@bwoebi about template: you should build on top of this article
@tereško Errr... I've never liked books or monstrous PDF's for programming... If I end I'll already have forgotten the last two thirds.
that one is important to read, if you ever want to seriously focus on architecture and application design
@tereško That's exactly what I said: no smarty, raw PHP. But the question was what's the best way to pass the data.
22:30
@hakre thankya
@Lusitanian np np. one day I will release that tool.
@hakre :D
$ pbuild
pbuild 0.0.6 is now working on ...\PhpstormProjects\PHPoAuthLib

 INDENT: WARN: Not a file extension with indents (dist): /phpunit.xml.dist
 DEBUG: "    var_dump($token);\n" --- #032: /examples/microsoft.php L040
 @todo: if the app will post tweets, authorize must be used instead.
 --- #096: /src/OAuth/OAuth1/Service/Twitter.php L036
Processed 33 directories and 69 files (0 skipped) in 0.594 secs.
@tereško Please, no... Why must it be in Java or C#, languages perfectly designed for reaching an ultimative degree of abstraction...
(I mean the code examples)
@Gordon Nope. It can't be done so. It needs to be submited on the server where form is rendered and later it needs to be sent through curl to other server where it will be stored.
22:33
@bwoebi who cares?
@bwoebi who cares in which language are the code examples ?!
I mean... do you want it written in COBOL?
@Ocramius logo, LOGO!
@hakre TURTLE
I wanna see it run on theeee screeeeeeen , hui!
22:34
oh, wait, that is LOGO
well .. actually code examples in ruby (from popular languages) might be confusing , because you cannot always distinguish between variables and methods
Logo is a multi-paradigm computer programming language used in education. It is an adaptation and dialect of the Lisp language; some have called it Lisp without the parentheses. It was originally conceived and written as a functional programming language, and drove a mechanical turtle as an output device. It also has significant facilities for handling lists, files, I/O, and recursion. Today it is remembered mainly for its turtle graphics, though for tertiary level teaching it has been superseded by Scheme, and scripting languages. Logo was created in 1967 for educational use, more so ...
wow, didn't know that I learned lisp in school ^^^
the turtle is a lispian.
@hakre I actually learned programming with turtle when I was a kid =D
and even younger we abused neighbors turtles.
but that was really young. we just wanted to play.
wait, what?
22:36
In school we have Delphi... I hate BEGIN ... END syntax and := as assignment operator.
neighbors daughter was so nice to watch after us. we could barely walk on our own feets. they had turtles.
you know, 2 years olds playing with turtles. trying to put things in the mouth and stuff.
@hakre my neighbour had turtles too when I was 3~4. Used to be my babysitter until it came out he was addicted to heroin :P
@tereško The language itself is not the problem, but the abstraction. I hate it to read very advanced code with tons of triple abstracted methods and classes...
maybe that explains a lot of things...
@Ocramius those are the details parents do not like that much.
22:39
@bwoebi that book is all about different types of abstraction and when it makes sense to use them...
You can always use w3schools.in/php-tutorial/intro anyway
me. runs. away. - moment mal.
@Ocramius I imagined it... but why, why do we need so much abstraction?
hello again guys...
22:41
@bwoebi because you don't want to code crap that you need to rewrite each time. You build code that you re-use, or you're just a code-monkey that can be put into a factory to write code. At that level, you're no different from a machine that just is very good at using a keyboard.
and very bad at solving problems :)
@Ocramius What do you want to say with this tutorial?
@bwoebi:
@Ocramius I don't see that we don't need abstraction, I'm using it too, but not so much please...?
@bwoebi who said you MUST use abstraction? :) That book is just a big catalogue of possible approaches. To pick or not to pick, that is your question.
@Ocramius Sarkasmus? öh jo... — I don't understand what you want to say...? That I have to return to the beginning?
22:46
no, and that's no beginning either :P
@Ocramius But without ... does there exist a way to have maintainable code?
@bwoebi that's usually really hard.
@Ocramius "Wie? Was?! Wo?!" I'd say in german now. You're confusing me a bit :-)
@bwoebi forget it. Just read the frikkin book, that's what I was saying all this time.
@Ocramius Yes, yes... Am I really ready to read this...? Maybe I should really read it......
22:50
yes you should
@bwoebi if you know some OOP, you should
I cannot know as much OOP... I discovered late static binding (`static` keyword) only a few weeks ago... There's surely too much I don't know. But I think exactly this is why I should...

How much here haven't read this book? :o
@hakre did you see my last inheritance mess trick? :D github.com/Ocramius/ProxyManager/blob/master/docs/…
@Ocramius I've seen the stats, but where is the tricky trick?

« first day (917 days earlier)      last day (4255 days later) »