« first day (720 days earlier)      last day (4222 days later) » 

2:00 AM
with XDebug
by looking at complete project and searching for bottlenecks to fix
 
@ShaquinTrifonoff Yes, pure php is maybe faster (depending on how well it's written), but it's definitely not faster to develop in. When you're developing websites for a living, usually on fixed pricing like i do, time is money
 
but , what would i know about any of this ...
 
@tereško You haven't demonstrated that you know a damn thing, so you should probably sit down and shut up
 
=]
please , go and research OOP. Learn what SOLID is, what LoD and SoC means and then go and read CodeIgniter's source ... you might learn something you did not expect
 
I know OOP well enough to use it
I'll tell you one thing - years and years ago, I used to be a .net developer...
 
2:04 AM
who cares , just because you used some other language , it does not mean that you understand OOP
 
and after that, i started coding straight php for a long time. it sucked. php as a language sucks, it does.
so i started using cakephp
and i can tell you that using CI is a hell of a lot better than .net and cake php, and a shitload better than straight php
 
so please, spare me the lecture
i'll use whatever helps me get shit done the fastest, with good loading times for my clients
 
@tereško what is soc stand for? I know lod = law of demeter, solid = single resp~~ but i couldn't figure out what is soc?
 
unlike you, i have a job. you seem like you don't have a job, so i'm going to assume your "job" is trolling. in my job, i have to be efficient or i don't make money
 
2:09 AM
@draconis Separation of Concerns .. the core principle behind MVC design pattern
 
ah ok
thx.
 
you do MVC however you want to do MVC in CI
the CI core doesn't use MVC
 
hello guys! I need help regarding JavaScript can any one help me/
 
the MVC is left up to you for your own application
sure
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
@avirk That room --^
 
2:10 AM
nah i'll help
 
@ShaquinTrifonoff no one is there :(
 
all good, i know JS well enough to (maybe lol) help
 
@avirk Okay, that happens. What's your problem?
 
Sep 27 at 19:37, by tereško
@AndyPerlitch there also isn't a room for posting nude pictures of people over 80 ... that does not mean that PHP chat room would be the appropriate place for it
 
@ChrisClower I want to run this script to prevent backspace key but don't know how?
 
2:11 AM
if you know JS like you know PHP , then better don't
@avirk and what have you tried ?
 
@tereško Googled it but didn't get the right one for me :(
 
window.onkeypress = function(e) {
    if(e.keyCode == 8) {
        e.preventDefault();
        return false;
    }
}
Simple example --^
 
i think he wants to know how to include JS in a webpage
 
@tereško yup!
 
that's usually covered when you start learning it
right after the mandatory "history" chapter
 
2:15 AM
function preventKey(e) {
var e = window.event || e;

if (e.keyCode === 8) {
e.preventDefault();
}
}
 
@tereško I am asking how to add it to an online web page?
If I want to prevent the backspace key to interact on SE sites then how can I/
 
google : "userscripts" + the name of your brower
 
@tereško better idea :)
 
lol
<script type="text/javascript" src="./path/to/file.js"></script> either put it in the <head> tag or put it before </body> (yeah don't use XHTML here lol)
 
so you really believe that SE developer visited to ask, how to include JS in the page ?
"SE" stands for StackExchange
 
2:23 AM
well it's really not that much of a stretch lol.. look at stack exchange lol
it's not exactly amazing :/
 
@avirk , also , if you apply such a script , you will have to check if the target of the event is not <input> or <textarea> .. for kinda obvious reasons
 
not really. he just said he wanted to prevent backspaces
he wasn't specific about from what
 
8 mins ago, by avirk
If I want to prevent the backspace key to interact on SE sites then how can I/
 
exactly
he wants to prevent backspaces on a site
 
@tereško Hmmm that is a good point. It should work in that area :)
 
2:25 AM
there is nothing saying he wants to prevent backspace from taking the user back in the browser history
 
user50049
The fact that .... nobody ... came close to suggesting that he just ... you know ... not push the backspace key saddens me.
 
@ChrisClower Sorry I was not clear. I want to prevent it to redirect me on previous URL
 
user50049
You don't need javascript to fix that, you need a pair of pliers.
 
Yeah, pull off the backspace key :P
 
2:27 AM
@TimPost ... developers ... people who spend 4 hours to make an application which would automatize something , that could be done "by hand" in 15 minutes of monotone mashing of two keys
 
ok then, just check if it's not being pressed on <input> or <textarea>, hopefully if you are actually a dev on SE I don't have to spell out how to do that
otherwise, i don't think you should be a dev, with all due respect :)
 
user50049
The last time I checked, which was a long time ago, most text or textarea inputs had a corresponding obvious class or data attribute to go with them.
 
@ChrisClower lol, I'm not a developer there. I just trying to figure out this annoying problem which user's mostly face out in Chrome or other browser's :)
 
user50049
@avirk Where specifically are you finding it annoying? or just everywhere?
 
Is it when you accidentally haven't selected an input, start typing, then press backspace?
 
2:30 AM
that's it , i am voting for "pliers" solution
 
@TimPost Sometime if I lost the focus form the input field and press the backspace then it redirect me to previous page.
@ShaquinTrifonoff yeah that is :)
 
SE sites autosave drafts (sometimes)
 
@tereško that was an example not particular for this one :)
 
document.onkeyup = function(e) {
if(element.tagName !== 'input' && element.tagName !== 'textarea') {
var e = window.event || e;

if (e.keyCode === 8) {
e.preventDefault();
}
}
}
that should do it
 
@ChrisClower hmmmm better one :)
 
2:35 AM
i haven't tested it, but
it should work as long as you don't put it inside an onload event or something
otherwise, it'll only run onload and not again
 
@ChrisClower I'll test it :)
 
@ChrisClower return false; after e.preventDefault(); will cancel the event for older versions of IE.
 
ok add that :)
 
user50049
@avirk I've got the general 'SE Modifications' userscript going in chrome, I will try a tiny hack in it later to prevent that and gist it if it works
 
if you are concerned about IE6 support
 
2:37 AM
@ChrisClower Well, it's only one line.
 
yeah might as well
 
@TimPost I'll happy to see that :)
 
user50049
But it would be much cooler with a commander keen animation when it's prevented .. or maybe a raptor p0wning your screen
 
It's pwning, get it right ;)
but yeah commander keen
you should totally do that
 
Or how about the screen shaking like when you type an incorrect password in Ubuntu?
 
2:38 AM
i can show you how to do it using css3 sprites ;)
 
user50049
I can steal that from the down vote script that makes him dance across the screen and moon you
 
well sprites + css3 animation ;)
and why has tereško still failed to ever provide anything useful?
he's such an expert after all
oh right, the whole emo kid thing
forgot
 
what is he crying about now ?
 
aww he left :(
oh he's back
woot
i have to admit i missed that sad depressed long haired teenager goth dude avatar for a second there
 
why don't we keep the arguments to PHP related things?
 
2:43 AM
You're right, Paul. There's too much PHP discussion here to discuss
 
Thanks for your help guys it really helps me :)
 
Now, what was the last PHP question again? Oh yeah, there aren't any...
 
... is this really how 31 year old guy should act ?
 
What was the last question in general? Oh, we solved it...
How am I acting, tereško
?
Did I fail to be helpful to someone?
Was I being rude to Mr. Paul? I'm sorry
What is you question, Mr. Paul?
 
it would be more fitting to a stereotypical "blond chick" which feels insulted
 
2:46 AM
I see, I'll try not to be a blond chick in the future, mr. tereško
My bad
 
(imagines all those lines delivers in a shill and pissed voice)
 
Was someone forcing you to read something, mr. tereško?
 
Passive–aggressive behavior is an umbrella term describing certain types of behavior in interpersonal interactions. It is characterised by an obstructionist or hostile manner that indicates aggression, or, in more general terms, expressing aggression in non-assertive, subtle (i.e. passive or indirect) ways. It can be seen in some cases as a personality trait or disorder marked by a pervasive pattern of negative attitudes and passive, usually disavowed, resistance in interpersonal or occupational situations. Passive aggressive behavior should not be confused with passive resistance (also ...
 
Won't happen again, Mr. Paul. salutes, we must remain vigilant and lay quiet until the questions are spoken
 
hola
 
2:49 AM
Yes, that is the way. Sometimes you have to wait for a good discussion in here.
 
well, things have degraded since i was here earlier
 
hola Lusitanian
 
hello
 
i just read the chat log for the past hour or so
sadly
@tereško provides useful information every time he's asked a question
 
yes, considerably so. apparently the trolls have gained popularity with the wannabe mods and I have gained a lot of disdain
 
2:51 AM
I wish those things would stay in the JavaScript room.
 
provided the question isn't stupid and the person asking the question can actually understand the response
who do you consider to be a troll, may i ask? @ChrisClower
 
me , i guess , because i pointed out that he had been droning on about templates for two hours and told that CI sucks
 
tereško provides useful answers? he hasn't provided a single answer lmao
 
he's among the smartest programmers to frequent this room and uh
 
@ChrisClower I saw you baiting tereško pretty hard. So, thats why I called you up on it.
 
2:52 AM
@ChrisClower
131
A: How should a model be structured in MVC?

tereško Disclaimer: the following is description of how I understand MVC-like patterns in context of PHP based web applications. All the external links, that are used in the content, are there to explain terms and concepts and not to imply my own credibility on subject. Updated version The first th...

32
A: ACL implementation

tereškoFirst part/answer (ACL implementation) In my humble opinion, the best way to approach this would be to use decorator pattern, Basically, this means that you take your object, and place it inside another object, which will act like a protective shell. This would NOT require you to extend the orig...

6
A: how to structure MVC models and ORM models

tereškoThe first thing you should understand is that the Model in MVC is not a class/object. It is a layer, made from a multitude of objects. I'm too lazy to do the same song'n'dance again , so just read this comment (skip to the "side notes" section). The root of your confusion lies in the fact that ...

etc...
 
I was baiting him? Everything I said was a response to something he said lol
ORM sucks btw
 
of course it does --- prepackaged libraries for it do anyway, especially anything implementing activerecord
 
ohh php room. how you amuse me.
 
It's a flawed philosophy IMO
 
@rlemon The PHP room --- where the trolls are trolls and so are the non-trolls.
 
2:54 AM
It assumes that every database table needs an object to handle it, and that's a newbie approach to databases and OOP
 
Actually, that's not true.
 
it is true. that's the fundamental design of ORM
 
@rlemon , you tried to impress it on us as a bad thing ... and still you come here because you are bored alone in JS room =P
 
Incorrect.
You create your object model and you should totally ignore your persistence layer.
It does not assume that "every database table needs an object to handle it" because it doesn't assume anything about your object model
You create your object model and it creates your database structure.
 
user50049
Oh Friday, you never fail to amuse me.
 
2:56 AM
@Lusitanian , stop trying , he only read the titles
 
@tereško no i come here because it is Favorited and the only active room on a thursday at eleven at night.
 
now this is good discussion. finally. and how is it not object relational database mapping?
 
"how does is it not object relational database mapping?" what?
 
sorry
 
@tereško I'm cautiously optimistic -- probably a bad thing.
 
2:57 AM
fixed
 
I still don't know what you mean though
I'll try this once more
 
and i like CI and activerecord... but only because I am lazy and php is not my dayjob. so sue me. I don't answer php question suggesting it at least :P I know better.
 
The concept of having an ORM library, let's say Doctrine (since it's the most popular one) is that you can create a domain model
 
you create an object for each databse table to process it's data. what don't you understand?
 
@rlemon /me files lawsuit
@ChrisClower Again, that's completely wrong
 
2:58 AM
:P
 
You have it backwards.
You aren't meant to design your domain around your database
You're meant to design your domain model, and then the ORM (or preferably your own datamapper since if you know what you're working with it tends to be far more efficient to write a 200 line persistence layer than using a monolithic library)
and then have a database created around it or create a database around it
 
your domain? I don't think i understand the terminology here
are you talking about namespaces?
 
@Lusitanian , you are being trolled
 
@ChrisClower no.
 

« first day (720 days earlier)      last day (4222 days later) »