@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info


Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33



Comments:

<Frixon> Yes sure. PHP was designed for web applications.
<Psycho-MaN> hello...i have this problem: i have a registration form that p***es the elements into a mysql table...i want for one element to check that it exists as an entry to another table before the user can make a successful registration..How can i do it?
<Ox41464b> anyone from indonesia ?
<kuja> Frixon: Isn't it abotu time people start implementing different design patterns? Why do they have to use 20 year old patterns?
<eml> isset ( $_SESSION['usr_id'] ) ? header ( "Location: ?loc=profile" ) : echo "<p cl***=\"exp\">Register</p>"; correct syntax?
<Frixon> kuja: Well...the known design patterns work. :)
<kuja> eml: No
<chadder> I all, I'm using php 4.3.10 under Linux and get no "Undefined index" errors; I've ported the application to Windows and run the same PHP version, but now I get those errors - is there a way to suppress them?
<Frixon> eml: Do you know what the ternary operator does?
<kuja> eml: You're misunderstanding ternary.
<eml> ok :/
<kuja> eml: If you need something like that, you must use an if/else
<eml> ok.
<Ox41464b> chadder, php.net/error_reporting
<kuja> eml: Ternary is for stuff like: echo $foo ? $bar : $baz, or $foo = $bar ? $baz : $qux;
<Frixon> eml: It's no replacement for if/else/elseif control structures
<chadder> Ox41464b: I don't want to recode the application
<Ox41464b> chadder, have you open and read ?
<chadder> I just want to suppress the error...
<Frixon> *pressing backspace*
<kuja> chadder: Fix it.
<Ox41464b> your answer is on the E_NOTICE
<kuja> chadder: If you're incapable, read the link Ox41464b gave you.
<kestas> kuja, $foo = $bar ? $baz : $qux; isn't very useful :P
<chadder> kuja: the application is hugh
<kestas> oh wait.. yes it is
<Frixon> chadder: Suppressing errors is...erm...not a good idea.
<chadder> kuja: okay, I will
<Ox41464b> error is not tobe hide, but tobe fix
<kuja> We can't all be his mother.
<kuja> Let him destroy his own application.
<Ox41464b> er... my english correct for that?
<Ox41464b> i guess nope:(
<Frixon> errors are not to be hidden
<kuja> The PHP users are good at that, anyways.
<kestas> errors are to be logged and hidden from the user
<kestas> the details of the error at least
<kuja> Hm, I need to write PHP code... it's been a long time. But I need to use it to show my hourly screenshots :S
<chadder> someone wants to test the system under Windows
<chadder> the application is not being destroyed
<chadder> it's being run under Linux with PHP 4.3.10
<chadder> if we update to PHP 5 or 4.4, we'll change the code
<kuja> chadder: With errors spewing, it's definitely not doing the right thing.
<kuja> And if it's internally reporting this, then it's definitely stupid code.
<kuja> And I think stupid code destroys itself.
<chadder> it's not stupid coding
<kuja> But it's okay, 90% users write stupid code.
<kuja> s/users/PHP users/
<kuja> Gah, finally. That was a long split.
<Getty> kuja: 95%
<Getty> kuja: minimum
<Getty> kuja: even in here its about 80%
<kuja> Getty: Hm, maybe. I know a lot of good PHP coders, but that's only because they come from various other programming backgrounds.
<kuja> With at least 20-30 years of programming experience.
<Getty> kuja: even that coders does strange things, cause they not take advantage of the dirty methods php offers ;)
<Getty> kuja: overloading get/set is very uncommon ;)
<kuja> It's true... PHP serves you a dish with "Bad Habits" splattered all across it.
<Getty> bad habits are always relative
<Getty> my structure loves it :)
<Frixon> Hm...20 years of programming experience. I really can't have that with me being 21 years old. :)
<kuja> Getty: Well, PHP makes it available wide in the open.
<Getty> Frixon: WHAT? you didnt started coding with 1? go out!
<Frixon> So, I'm doomed to write bad code. \o/
<kuja> Frixon: =)
<Getty> what i hate most are the SQL query builder
<kuja> There's some very smart people in here.
<Getty> no wrong, most i hate the people without template engine
<kuja> But sad to say, during my 2 years watching over people who come and go in this channel, I'm not impressed.
<Getty> 2nd place is then the SQL builder
<Frixon> Getty: Without?
<Getty> kuja: LOL no wonder, its php
<Getty> Frixon: without
<kuja> Why do you need a template engine?
<Getty> Frixon: PHP has nothing todo with HTML
<Frixon> Getty: PHP is a template engine. :)
<Getty> nope
<Getty> it was
<Getty> when it was founded
<kuja> Getty: Did you ever wonder *why* PHP is embeddable into HTML?
<Getty> now its language for coding
<kuja> Getty: No it isn't.
<Getty> kuja: remembering?
<kuja> PHP is not meant for anything outside of web applications.
<Getty> then you are just doing php as ****ty as the 95%
<Frixon> Erm...
<Getty> but its working very good outside of web applications
<kuja> You are not very clever there.
<Getty> we are doing everything inside our system with php
<Getty> ah yes?
<Getty> you think we should recode everything twice
<Getty> just to NOT use PHP on CLI?
<Mosselmaniac> hi guys, i know i should ask this in #sql, but it's always dead there. i have two tables in my database, i want to compare two fileds. the only difference between the two is that 1 field has the samen value as the other one, except for the fact that it has "000" behind it's value. for example. 1 field has the value 2, in the other table it has the value of 2000. i want to select these records. but select * from a,b where a.c = b.c + '000' is not working
<Getty> that would be totally stupid
<kuja> Getty: Yes, into a more appropriate language.
<Getty> now we share functions
<Getty> kuja: and what is the sense?
<Getty> kuja: recode stuff that is already there?
<kuja> Getty: You've already made your first mistake into falling under the so-called 95% bad users.
<Getty> kuja: come on, you cant be that stupid
<kuja> php-bot: tell Mosselmaniac about g8
<Frixon> Getty: Who the hell wants cmd applications to be written in PHP?
<kuja> Getty: Do you know anything about PHP internals?
<niraj> me!
<Frixon> Getty: Languages like Perl, Ruby, Python are perfectly suited for those tasks.
<kuja> Precisely.
<kuja> They are the reason they exist.
<Getty> kuja: not really much, but i see the results i got
<niraj> actually php on CLI isn't bad..
<Mosselmaniac> well thanks kuja. can't you help me?
<niraj> i don't see what the whining is all about
<Getty> Frixon: and still....... what is the sense to RECODE something that is already there???
<kuja> niraj: Yeah, until some ****head tries to write daemons in it.
<Getty> kuja: works fine
<Getty> kuja: our daemons are running through perfect
<kuja> Getty: You fail it.
<Mosselmaniac> string
<kuja> You fail the sanity test.
<Getty> if you say so ;)
<niraj> what's wrong with daemons in php?
<Getty> you fail the reality test
<niraj> if written properly, and they can handle the load, i don't see what's wrong
<Getty> come on get real
<kuja> niraj: Unmanagable garbage collection is a big reason.
<Getty> lol
<Getty> oh yes, big big problem
<Getty> i cant stand it
<kuja> niraj: Languages like Perl, Python or Ruby will automatically destroy unreferenced objects.
<Getty> i must recode now 10.000 lines of code
<kuja> niraj: Sooner or later, your resources will constatly build.
<Psycho-MaN> if ( $blah!='' && $bloh!='') is this syntax correct?
<Getty> just to get rid of the unmanageable gargabe collection
<Getty> which is actually killed with a restart once a month
<Frixon> Psycho-MaN: When it parses, yes.
<Getty> kuja: do you recode the 10.000 lines of code?
<niraj> so php does actually accumulate garbage?
<Getty> kuja: just for that reason?
<kuja> Getty: Glad to hear that you actually restart it. People run servers and daemons for even years without restarts.
<Frixon> Psycho-MaN: But you should consider inserting some spaces.
<Getty> kuja: no we dont
<Getty> kuja: we WOULD DO if that problems come out
<kuja> Getty: No, I don't start with the wrong tool in the first place that I'm put in a position to rewrite code. That's *your* stupid mistake.
<Getty> kuja: but our code is clean that we unset everything fine
<Getty> kuja: STOP!
<Getty> kuja: the code _IS THERE_
<Getty> kuja: cause its a WEB application
<Getty> kuja: that has objects
<kuja> php-bot: tell Getty about enter
<Getty> kuja: and that objects are used in the daemon too


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#perl
kronicdreamer
adaptec 2010s ubuntu not found
#ubuntu
#fluxbox
#math
computerNERDie
phaaze dll
sources-list dapper G3
#gimp



Home  |  disclaimer  |  contact  |  submit quotes