« first day (673 days earlier)      last day (4275 days later) » 

12:06 AM
$me = new Me();
$me->houseMD('S03E10');
$me->sleep();
 
no method chaining
 
@Lusitanian $me->hibernate(@Lusitanian);
 
user895378
1:09 AM
Want to see the worst sort of micro optimization? Check out the OP's reasoning for wanting json_encode to spit out 1s and 0s instead of true/false. So sad:
 
user895378
If you're seriously trying to save 3 bytes by using 1/0 instead of true/false there's a 99.9999% you're prematurely optimizing. And if you aren't, you're engaging in dubious micro-optimization. There are so many more important things like database and filesystem access that have so much more impact on performance. You should listen to @paulsm4. — rdlowrey 2 mins ago
 
1:32 AM
):
I'm really struggling to figure out why you think that the GZIP compression offered by your post-1992 web server won't handle the extra few bytes added by "true" instead of 1. You're misrepresenting the type of the value by representing the bool as an int. — Lusitanian 40 secs ago
 
2:01 AM
mod_rewrite in .htaccess is causing file (images, css, js, php) not to load? stackoverflow.com/questions/12022286/… Anyone got a hint?
 
Fatal error: Maximum function nesting level of '100' reached, aborting!
 
 
1 hour later…
3:18 AM
@W3Geek I've posted some comments.
 
3:35 AM
Knowing SOAP, though, will look much better on your resume/CV if you're vying for a Fortune 500 IT job.
 
user895378
SOAP blows. It's only still around because big companies paid a metric ass-ton of $$$ for programmers to write SOAP services for them. It's legacy, and it's bloated and suboptimal. You're wasting your time fiddling with SOAP services in the long term unless you have a reeeeally good reason.
4
 
@rdlowrey ouchh ! how about REST?
 
user895378
@JosuaMarcelChrisano That's what you should be learning -- though I'd say you're better served to learn the ins and outs of the HTTP protocol itself. From there, REST is trivial. It's always best to favor protocol over a stylistic implementation of that protocol (REST, in this case).
 
@rdlowrey lolol soap
it's useful for washing your hands, fwiw
though i prefer to wash my hands of it ;)
 
user895378
Every time someone rolls into chat and asks a SOAP question I look at them like someone who's just started smoking cigarettes. Like seriously? I thought everyone already knew that was a terrible thing to do?
 
3:46 AM
I saw an 18 to 19 year old girl smoking a cigarette today
 
user895378
Instant gauge of intelligence -- which puts dumb hot girls who smoke right in my wheelhouse :)
 
i forgot your profile text (:
 
user895378
And always remember, mom was right ... "If she smokes, she pokes"
 
@Lusitanian lol
 
user895378
I'm a terrible influence. They shouldn't let me talk to kids.
 
3:47 AM
@rdlowrey it's okay, i've heard worse
and have heard that before and am hoping your mom never told you that
 
user895378
lol, no. I wish. Would've been good to know back in the day.
 
could've made your social life as a teenager more interesting
 
@rdlowrey How about Magento in your country? Is it the well-known MVC as a good framework there?
 
Magento is hardly a framework
It's geared towards a highly specific purpose
I don't know if it has a good code structure or not though
 
user895378
@Lusitanian Fantasy football update: if @cspray still wants to play, that should get us to 7. I'm going to troll the javascript room this week to try for more. If all else fails, my best friend from college works at microsoft (he's playing) and we might end up turning it into a MS vs. SO fantasy football league.
 
3:50 AM
@ShaquinTrifonoff I tried what you commented about but sadly it didn't work? =( I added a answer but the results muddy up my markup.
 
@rdlowrey That'd be awesome
 
user895378
It's way more fun if we can get to at least 10 and preferably 12 players.
 
12 is the magic number
 
@ShaquinTrifonoff It works if I put <base href="/path/" /> in every file.
 
user895378
Agreed. With 10 it's all luck because there's enough talent to go around.
 
3:51 AM
omg
git commit message for magento2 "Update as of 4/13/2012"
how descriptive
nvm that was just the summary
 
user895378
@JosuaMarcelChrisano Never used it -- can't say.
 
@rdlowrey their definition of views are templates, apparently -_-
also this <?php if (!Mage::registry('current_category')) return ?>
 
user895378
wow, that looks like a plague of awesomeness right there.
 
Let's see, we have a static registry class and a view layer comprised entirely of templates
 
@Lusitanian wow
 
3:55 AM
@rdlowrey one controller in the checkout module (all it does is handle the cart display stuff) has 500 lines
and we have lots of Mage::getModel('blah'); littered throughout. i've seen enough
That and if I want a Mage, I'll use dungeons and dragons
 
user895378
Yeah, -1 for stupid name shortening.
 
I get laziness but just use autocomplete
i seriously need to hire a designer who doesn't suck, but i don't know if they exist in my budget
anyone ever used elasticsearch?
 
user895378
nope.
 
pretty intruiged by it, there's way too many technologies i'd love to play with
 
user895378
I know -- so much to learn, so little time in the day. I spend way more time at the computer than I should and I constantly lament the enormous volume of things I'll never be able to get around to.
 
4:04 AM
$universe->getClock()->pauseFor( new \DateInterval('P30D') );
sorry, Mage::getUniverse()....
 
user895378
@Lusitanian The problem with designers is that if they aren't CSS/DOM wizards they probably aren't worth the $$$. If all you're doing is photoshop, you aren't helping me. And the ones who are really good aren't (and shouldn't be) cheap.
 
I know, I need the CSS skills. I could pass a W3Schools CSS certification, but that's it.
I'd love to call up the people at zurb but they'd probably want something like 15k lol
which is reasonable because they are legitimately amazing at what they do
and they have a better ui framework than bootstrap (:
 
sometimes 'cheap knowledge' is a knowledge that one does not work for.
2
 
4:19 AM
@rdlowrey Hi.
 
@rdlowrey Funny
@rdlowrey And we could leverage better exceptions and other things.
 
4:34 AM
Ha ha.
 
Ah, just caught a snag in my implementation. spl_object_hash does not work on an array callable. [$object, 'method'] raises a warning.
I think I can work around it, though.
 
5:27 AM
morning
 
Morning, @tereško.
 
hey hey
 
6:11 AM
morning
member for 2 years, yay
 
6:37 AM
lest just disagree about what music is
anyway , seems like noone answered that damned question
 
hey guys im back :)
guys my lecturer from uni posted a discussion about "13 failed software" on university forum. Don't you guys think it's inappropriate to put up this stuff on university forum?
I think they should teach students how to respect technologies instead of talk shit about it
 
8:00 AM
@TemporaryNickName i think if it's objectively crap, it should be called as much. but about the only thing that is objectively crap is...well...crap.
oh, and cakePHP.
and pretty much any c book by herbert schildt.
 
@cHao well, for instance Internet Explorer 6 sucks hell, and I guess you can talk shit about it privately but I don't think they should teach you to talk crap about it especially in uni
 
ie6 sucks now. at the time it came out, it was the best browser out there, period
there's a reason it stayed around for 10+ years.
but imo they should teach you to look at software and see its faults
 
@cHao , what are you talking to the small avatar people again ?
 
lol
 
@tereško cmon man i'm not a small avatar person
im ur friend & a dude in this chatroom
 
8:06 AM
little people need love too :)
 
no, they don't , that's how they end up with small avatars to begin with
 
@cHao It reminds me a episode of South Park about minorities
 
hmm ... seems like people have been trying to apply DCI to PHP again : whitewashing.de/2012/08/16/… .. not sure if it is because they do not understand DCI or because they like hack'ish code
 
@tereško that's very interesting
i think university should talk more about those kind of stuffs instead of stuffs like "13 failed software of all time"
 
Hi Teresko, I have given my array of database configuration above. I want to connect database. If Multiple database connection string given then it have connect with multiple database else the first default database it should connect as Like MVC framework Codeigniter/cake php You can see. If You have any solution provide it. Since I am trying to select data with db object $this->db->select(); so script taking the second connection and trying to execute the query.My table in which i am executing query it is in 1st db not exists in 2nd db.So Its shows Error. Provide some solution for multiple db — Sanjay Dey 1 min ago
 
what the .. ?!
 
is this the small avatar people you were talking about?
 
i think i will have to hunt down some indian guy again , to get this translated in english
 
@tereško are you talking about the long ass lines of texts that you've just posted?
Hi Teresko, I have given an array of database configurations above that I want to connect to databases with.
 
@tereško I agree with the video you've posted.
and funking LOL to dat comment...
 
8:20 AM
If multiple database connections are given then it has to connect with multiple databases, otherwise it has to connect with the first default database and it should do the connection using MVC framework Codeigniter/cake php.
 
... ...
 
Please provide me with any solutions if you have any.
 
that is not how things work around here...
 
Sorry..
I suck
BTW i love you guys all
I love you all as I love php
i want to make my carrier out of being a backend mate
 
@webarto , why are you talking to the small avatar people ?
 
8:27 AM
cmon dude, don't be too harsh to me. come on
i mean, come on
 
@tereško haven't realized that this is our backend mate :) Left click > Ignore
 
noo!
plz!
I beg you plz don't!
 
He just asked a question by including the solution haha!
Guys, I'm not the master of object orientation but I'm not a complete illiterate about it because I've been doing it through Java and other languages for ages. Would OO in PHP significantly different from I've experienced so far?
And studies stuffs like Deisng Patterns and others
 
8:43 AM
@tereško I like the video you have posted called Long Distance "something", i think it's quite sensational and stuff
Has everyone seriously added me in your ignoring list?
crap :(
 
9:00 AM
btw , people , could someone review the "Beginning PHP 5.3" book ? (I am looking at you , @ircmaxell and @salathe). It seems like promising candidate for the "php for beginners" book. But is would like a second opinion on whether the faults in it are not too harmful for newbies.
we have been short on good materials to give for complete beginners
 
9:12 AM
omg, i;m so nervous right now for no reasons
 
@SanjayDey , lemme guess , you have question about your db connection thing
 
@SanjayDey just speak it up bro. Don't be shy
just let us know ur issue
 
9:30 AM
@SanjayDey I didn't completely understand what's your issue but have a look at DAO modelling, DAO can help u to model ur queries and database connection so flexibly
and probably make MVC to store some database configurations I guess
Each DAO will represent a connection to a database
 
@TemporaryNickName , shut up. You have no idea what you are talking about
 
well, DAO is just a modelling stuff, u can do it in any language
@tereško dude, I'm trying to talk about object orientation, i know im crap at PHP but as long as it is objected oriented language, I'm thinking that my idea could help this guy out little bit
And I don't see why you must use multiple databases unless you have some humongous size of data that you can't store and scale properly inside a RDBMS.
 
9:55 AM
back
 
relax
 
@GeoPhoenix I am relaxed
 
relax more
 
really? MS word 2007 with Australian English mode doesn't recognize a word "artifact"
 
10:11 AM
Hi
I'm trying to write a SOAP insert function which is not working
function DoQuery($sql)
{
$mysqli = connectToDB();

//try {
$result = $mysqli->query($sql);
$mysqli->commit();
//}
//catch(mysqli_sql_exception $e)
//{
$error = $mysqli->error;
$error_sql = "INSERT INTO logs (Query, Bericht) VALUES('$sql', '$error')";
$mysqli->query($error_sql);
$mysqli->commit();
//}

return $result;
}
Even my insert into logs to catch the errors is not working
it inputs 0, empty in my db
any ideas?
First I'd like to fix this insert error
because I have no feedback
Apache error logs show nothing
 
INSERT INTO logs (Query, Bericht) VALUES('$sql', '$error')
i'm not sure which DB u r using but
don't u have to end it up by saying ;
"INSERT INTO logs (Query, Bericht) VALUES('$sql', '$error');";
I think that is why u don't receive any responses, because query hasn't ended yet
 
mysqli needs ; after the query?
 
@AmazingDreams , did you try var_dump( $mysqli->error ); after the commit ?
also , why are you using commits for single queries ?
 
Yeah I tried multiple things, first without then with commit because I saw it somewhere
I'll try var_dumping this, it's hard because I have this huge object which I'll have to write down completely
 
well .. what do see ?
welcome back to the 8th circle of hell , @PeeHaa
 
10:25 AM
hiya @tereško! Is it that bad?
 
DoQuery("SELECT bla FROM lessen"); //bla does not exist
outputs
var_dump($error);
$error = $mysqli->error;
var_dump($error);
string(0) ""
string(22) "SELECT bla FROM lessen" string(0) ""
with var_dump $sql
now it also inputs the $sql correctly in my db
 
try{
.. something
}catch(exception $a){
var_dump exception
attempt insert into database
var_dump attempt errors
}
 
@PeeHaa .. you were asking
 
I see
 
@GeoPhoenix , mysqli does not throw exceptions
 
10:30 AM
But it's weird because I also SELECT through this function with succes
 
@AmazingDreams , what you are writing there is actually wrong on multiple levels
 
What's wrong then?
 
first of all , you should establish the connection to database once, then reuse the MySQLi instance for every time you interact with DB
then there is the minor thing of "your code is open to SQL injection" , because you are concatenating the query instead of using prepared statements
 
I know this is simply production
@tereško fixed this
 
i kinda doubt that
 
10:34 AM
What?
dafuq
dunno what I did but it started outputting the mysqli->error
 
when i see highly procedural code, i doubt that person, who writes it, is adhering to Law of Demeter
@AmazingDreams if programming was medical science , you would still be at "lets cure it by dancing around fire and shouting to banish the evil spirit" level of it
7
 
I know
I'm merely an amateur
 
Anybody has eBookReader device here?)) Almost decided to buy 6" device. Is 6" enough to read technical literature?
 
11:36 AM
morning
 
morning Nikita!
 
morning @PeeHaa :)
 
12:09 PM
hey
can you guys help me with PDO error handling? pastebin.com/325h8Ej9
this always inserts the record , I want it to check if login already exists
i mean email
 
@MichałKról PDO::fetch()
 
@hookman wrong
@MichałKról , first of all , you should use write $sth->bindParam( ':email', $email, PDO::PARAM_STR );
 
Why? If he wants to check if there is any record... Do i miss smthing?
?
 
@tereško if I dont put "PDO::PARAM_STR" its SQLi vurnable?
 
also , you query is wrong : $sth = $this->trydb->prepare("SELECT :email FROM userdb` WHERE email = :email")` .. what's with the column name ?
 
12:19 PM
Good Morning
 
@tereško Oh... didn't notice that))))
@ircmaxell hi
 
@MichałKról , and that code does not insert ANYTHING
 
I think I have my Europe trip figured out. Home -> Manchester -> Munich -> Paris -> Barcelona -> Milan -> Manchester -> Home. Spending at least 3 days in each...
 
if you want to prevent duplicate entries in database , then you have to make the columns as UNIQUE in the table definition
 
12:22 PM
@MichałKról , and no , the 3rd value in bindParam() is optional, but your current form is wrong
and why the hell have you extended PDO ?
 
what do you mean "extended" ?
about "inserting" a record, I meant that $this->db($email, $pass) goes to function that inserts a record
 
@ircmaxell why no Berlin? If you want to get to Eiffel tower you'll probably wait around 2 hours to get to the top :P Barcelona is nice...
 
I just want this query to check if the record exists and then insert it by reffering to other function
 
@webarto Oktoberfest
 
12:26 PM
@MichałKról class MyDB extends PDO... he means inheritance
 
@ircmaxell all roads lead to Munich then :)
@hookman Kindle? I think it is best device for reading
 
@webarto 6"? or higher?
 
@webarto my Model class extends PDO, but I dont know how my code from pastebin link extends it :/
 
@hookman I have this one and size is good, but you must have properly formatted book... PDF sometimes turn out bad... you can always rotate screen and have bigger width...
 
some days it is not even worth to answer on SO
 
12:31 PM
@webarto What about images and pieces of code?
 
@tereško majority of days :P
 
@hookman yeah but I asked about this inheritance "problem" just out of curiosity
 
@MichałKról > $this->trydb = new Database();
 
yeah, $this->db was predefined in the Model class but not trydb()
 
@MichałKról Database class extends PDO, why?
 
12:36 PM
tutorial said I should have that
is this wrong?
 
@MichałKról Did you try to figure out why do you need that?
 
not yet
 
@MichałKról , here is a hint: learn OOP before you start trying to implement MVC
 
@MichałKról Doing things without understanding is a bad idea
 
12:39 PM
i thought to use PDO statements I had to do this
 
what you have shown and written in chat makes me want to leave programming and start carrier in cattle-farming
please , go and learn some basics of OOP so that you at least understand what is going on
stop making shit up and reading tutorials written by 12-year-olds
 
I never saw anything about PDO in OOP basics tutorials
 
Hrm, that phpunconf thing sounds really awesome
 
and did you see anything about extending shit in PDO tutorial ?
or did you just write in google "learn PDO" and clicked first link ?
 
@MichałKról I don't care
 
12:45 PM
nah, "how to insert values using PDO"
or some shit like that
but i'll read about PDO later
 
riiiight .... you will "read it later" but now you will just "continue writing my awesome app"
@MichałKról it's like saying : "i will start building the house now and buy bricks and mortar later, when i have free time"
 
@tereško bricks are crucial, I dont think "extends PDO" is
 
.. I .. I have nothing say here. It's good that you know what you need to learn. Strange how you cannot learn, what you think you need, when so studying to be a surgeon.
 
12:54 PM
parent::__construct(DB_TYPE.':host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASS);
i dont see how it is wrong
 
.. which is why i said that you need to learn OOP
 
@tereško how long ago did you start working with PHP?
 
~6 years ago
 
just curious
@tereško I started ~3 years ago. Did you have such feeling that about a third of this time you just wasted?
 
1:05 PM
@hookman no
more like "most of the time was wasted"
 
@tereško )))
 
i actually begun seriously learning php 2 years ago , up till then i just use "make shit up" and "pretend its c++/java" methodology
 
@tereško Is it a job or hobby?
 
job , for at least 5 years now
 
@tereško good for you
 
1:27 PM
hello
everyone
does any please tell What should I store after a “Login using Facebook” ?
 
@Mayankswami the token
 
thankyou @PeeHaa
 
np
@ircmaxell or @NikiC @hakre I've seen a nice list with tests of php's filter_var() for emailadresses. ANybody has that link?
 
@Mayankswami , the stars are not for marking "correct answers"
 
1:42 PM
@rdlowrey Definitely still in for fantasy football. Did you get my email? If not just ping me in here and I'll provide whatever info it is you need.
 
user1125394
hello anyone could give me the regex to capture leading numbers of a string, ex: "54521121John123@gmail.com" should give ""54521121
 
user1125394
please
 
@cyril $number = (int)$email;
 
user1125394
or preg_split("/[0-9]+/")
 
user1125394
thx yours is simpler
 
1:55 PM
@PeeHaa nope
 
:( I'm writing a canonical answer for emailvalidation in PHP: stackoverflow.com/a/12026863/508666 so it would be a nice addition
 

« first day (673 days earlier)      last day (4275 days later) »