« first day (697 days earlier)      last day (4258 days later) » 

12:02 AM
Oops, missed some.
-2 mins.
 
-6
A: Best way to connect to mysql with php securely

Theodore R. SmithIn your apache vhost for each site you do something like this <VirtualHost *:80> ServerName www.phpexperts.pro SetEnv SQL_HOST localhost SetEnv SQL_USER phptutor SetEnv SQL_PASS someRandom-234qasdfasPass SetEnv SQL_DB rosettablog </Virtualhost> Then you run ...

> locked by Kev♦ 1 hour ago
> This post has been locked while disputes about its content are being resolved. For more info visit meta.
 
All of the recent comments have been removed from that post...
 
Why would you remove comments, that explained the downvotes ?
 
dbf
12:18 AM
I can see them?
Hilarious ;)
 
@dbf The ones from this month?
Can you see those?
 
techcrunch.com/2012/09/11/… ... big fuking surprise .. using unfinished standard for a site with half-a-billion users was a bad idea, who would have thought ..
 
12:51 AM
how do you filter stackoverflow.com/review-beta/close to display only questions or answers with PHP tag?
 
no idea
 
I see plenty of questions or answers about languages I know nothing about
 
just dont waste all 's in first few hours
the reviews are best used few hours before the vote-limit resets
 
is it only 40 a day?
 
12:53 AM
ok
not enough :-/
 
50 is the max amount that you get when you reach 10k rep
 
@tereško why "the reviews are best used few hours before the vote-limit resets"?
 
because if you waste the votes as soon as you get them , you become useless for in this chat room
 
ok, it is better to first close new questions (that need to be closed) instead of randomly closing (very) old ones
 
yes
 
dbf
1:55 AM
0
Q: What we mean when we say that a class is loaded?

user1664430That is : What is actually loaded. The logic or the class file or some metadata related to the file.

 
apparently Zend Framework 2.0.0 has been officially released.
and so far I don't like it lol.
 
and so @PeeHaa finally hit 20K :)
@mmmshuddup: no kidding
 
there is a lot of stuff about zf2 that really bothers me
structure, style etc
 
there is little stuff from zf2 that I like
namely: nothing
 
LOL
now I'm angry and no longer an advocate for ZF
 
2:08 AM
look back at ZF1 and ask yourself if you really want to advocate that, too ;-)
 
I honestly thought they would fix the clusterf*** of a mess they call "code" for ZF2 before its official release and make it better but no. it still strongly resembles the demo version I was playing with about 10 months ago
lol I still love ZF1 :P
 
everytime I work with ZF1 I have to find inimaginable ways to override it because it just doesn't cut it
 
why's that? cuz of performance?
 
@mmmshuddup: performance, testability, you name it
especially testability tbh, it's that bad
 
yeah I tried a number of times to use unit testing but it was too painfully tedious to do that in ZF
I haven't the patience for that
I'd rather test the crappy old school ghetto way lol
 
2:12 AM
ZF1 is good on some points however
 
yeah
 
that is the Google APIs mainly
 
I rarely used those
 
because they're the sorta de-facto API for them in PHP
 
yeah
 
2:13 AM
but it's not loosely-coupled, as advertised, not a second
if you want Controller, you still have to take half of the framework with you
 
it's coupled
lol
yeah
there was another framework I've been hearing more about lately but I can't remember what it's called
starts with a K
 
kohana?
 
yeah that's theone
it actually looked ok from what I saw a while back
 
well it's based on CodeIgniter which isn't that bad
 
so I've heard. I've never even looked at CodeIgniter beyond the snippets I see on questions on this site from time to time
 
2:21 AM
Who said
> CodeIgniter advice: don't use CodeIgniter.
?
 
@ShaquinTrifonoff: you tell me?
 
lol
 
2
Q: If you advocate PDO, answer with PDO

ChrisHope this is on-topic, seems meta-ish. I would like to address the issue of mysql_* functions; for the sane many of you who don't bone up on your PHP doctrine, a little back story. The notorious mysql_* family of functions are related to database access and are set to be deprecated in the near f...

 
Hammers, hammers for everyone!
 
hmm
interesting.
 
2:33 AM
meh, most questions about mysql_* aren't about mysql_* but MySQL queries anyway
they probably should be closed as "too localized" according to the FAQ, too
 
But do you think that even answering a question about mysql_* with same code should be considered harmful?
After all, doing so simply enables the OP and future visitors to continue to doitwrong
Especially considering the right way is up against 3 million Google results to the contrary, are you helping when you add yet another result that yet again shows the wrong approach?
That's what I'm getting at, or hope to
 
@Chris: what I think is harmful is that mysql_* was not "discouraged" until somewhat recently on php.net
 
Heh, it sure doesn't help
 
hell, the first time I heard mysql_* was discouraged was on SO, and the docs would only state it in some hard to find FAQ
you can't tell someone to RTFM and then have the manual not tell them about it
 
Right now, when you type "php mysql error" into google, your results are: w3schools (shows incorrect method), a couple of blogs (about.com is big in these results, all showing the incorrect method), and a few stack overflow questions... showing the wrong method.
The other two we can't influence at all, one we can
 
2:42 AM
@Chris: in the end, I personally don't think downvoting is worth it tbh
on 95% php/mysql questions where the OP uses mysql_*, there is bound to be a PDO recommendation
 
True, but the towel is given too.
 
if the community thinks it's good because PDO is recommended, they'll upvote it
 
Here ya go dude... hope u like stitches trollololo
heh
 
we all know newbies only read the first answer anyway ;-)
just make the PDO one the most upvoted
 
Downvotes would accelerate that
 
2:44 AM
@netcoder Just found it. link
 
@Chris: if I wasted all my rep downvoting mysql_* related answers, I'd probably be in the negative right now :P
 
@ShaquinTrifonoff Starred
heh
That's some good advice
 
@ShaquinTrifonoff: ah well, it's somewhat random heh
PHP advice: don't use PHP.
works too you know
 
@netcoder What do you suggest instead? :-P
 
@ShaquinTrifonoff: nothing, there isn't any perfect language, as there isn't any perfect framework
C advice: don't use C. Java advice: don't use Java.
they all work
they all have their flaws heh
 
@ShaquinTrifonoff: ... so?
 
@netcoder Not much, it just seems to be the most-mentioned PHP framework, that's all.
 
@ShaquinTrifonoff: CI is good at one thing, and I'm not advocating it, far from it
 
Personally, I am with ircmaxell, that frameworks are seldom as useful as they should be, and frequently do not address the problems for which they were designed, OR, they simply swap one set of problems for another -- ones you are less likely to solve because instead of debugging PHP, now you're debugging PHP and tens of thousands of lines of code that you didn't write.
 
@ShaquinTrifonoff: you want something done fast, CI is the best of framework there is
 
2:50 AM
@netcoder I just use plain PHP for all my projects.
 
you just download the thing, create a 2 controllers and 4 views and you have a website
it's hard to manage, but it's fast
 
@ShaquinTrifonoff "I just use plain PHP for all my projects." <-- this
 
@Chris that's frameworks in general yeah
 
I've used CI before but unless your looking to have something thats mutli functional i dont see the need for it? I mean if the website is just going to be a homepage / blog or a forum there are other better choices, even coding your own would be better IMO.
 
not looking to get into a flame wars here btw
CI is as bad as any other framework that was created since the 1960s, that's it: it's a framework
but if it was 100% crap, nobody would use it
 
2:53 AM
Yet at the same time i think it did some pretty cool things, like method chaining db queries.
 
I've written hugely complex systems with a home-brew type of framework. It is a big system, so there's problems. Sometimes I run into fundamental, structural problems that have me smacking my forehead in retroactive embarrassment a few days later. But my level of familiarity with the framework is complete -- I made it. I wrote every line, so not only do I know where things happen, but why they happen how they do
 
@ShaquinTrifonoff so you're telling me that if you have client A that asks for an app, and client B that asks for a similar app, then you just code it from scratch every time?
 
No framework could compete with that, and I can still call myself a PHP developer instead of having to say "I'm a drupal developer" because I've pigeon-holed myself out of writing actual plain php
Disclosure: I also dislike jQuery
 
@netcoder No...
 
@Chris why the hate?
 
2:57 AM
imho, people don't seem to understand what a framework is, tbh
 
@Chris Seems we both dislike frameworks. I don't use jQuery either.
 
Hate? I don't hate jQuery. I dislike it
 
Dislike then.
 
I love frameworks, frameworks are great
I'm just not going to write that class or two again if I already have it right there
 
90% of the time, you could have accomplished the same functionality with plain JS in way, way fewer lines. People add jQuery to a project by rote just to have a short way of calling document.getElementById -- ridiculous
 
2:58 AM
but as they say, moderation in all things
 
When you need transitions or animated effects, sure
 
I have this in my (plain JS) code to save some typing:
function $(id) {
	return document.getElementById(id);
}
 
saying someone dislikes "mainstream frameworks" is one thing, disliking frameworks in general is some other thing
 
Then I can use $('test').innerHTML = 'blah blah';.
 
@Chris but does it really matter?
 
2:59 AM
Then there's the part of me that sees jQuery as harmful to the industry. Look on this site -- you will find questions asking things like "How do I get the current time in jQuery?" -- the asker is not even aware that jQuery IS javascript. That's detrimental to their skills as a programmer
@Nick Does it? No. I'll still get paid.
And so will they
But it does hold the industry back, yes
 
it definitely doesn't hold the industry back
 
I get your point on the issues @chris but in that case it shouldn't be jQuery you dislike just the people it creates.
 
The more semi-skilled people employing bad practice in the industry, the worse off we are
 
@Chris Well that's just stupidity on the askers part
 
@chris how would we be worse off?
 
3:01 AM
Or you could look at it in a different way, the more poor practice out there, the more job security for those who can fix it
 
@Chris yeah but I could argue that jQuery isn't really bad practice.. there's practice in every language
 
1
Q: SELECT INNNER JOIN from friends and owner's posts

DariusI have 3 tables: user_info , friend_match, posts user_info : account_id | username friend_match : friendship_id | friend1 (account_id of 1st) | friend2 (account_id of 2nd) Friend match contains 2 1 and 1 2, 1 3 and 3 1. posts : post_id | poster_id | post_message | date_posted How would I get...

 
@Chris: the more semi-skilled people employing bad practice in the industry, the more I get called, and the more I get paid
 
That's another way to look at it, yes
 
3:02 AM
In the progress of the world things natrually progress to a point where things get easier until someone "dumb" ( for lack of a better word ) takes over.
That will then free up someone to do something more constructive.
 
@ShaquinTrifonoff yeah but really how much faster is it.. Maybe for something getting lots of traffic
 
I am a teacher-type, so I tend to look at more ignorance as bad, whereas that is a business outlook, the more ignorance, the more potential customers. I get it
 
Hello.
 
@Chris: Javascript is something entirely different however, from my POV
as a C programmer, JS is like C
 
But again, don't mistake me -- I use mootools or jQuery on projects where I want to animate fades and make sliders and accordions and the like
 
3:03 AM
Hi @Hamster.
 
except there is absolutely no standard for it
 
I love javascript
 
@Darius if you want pagination on your query aren't you going to need a total count in there somewhere?
 
My favorite language by far (I come from a C background too)
 
and that's the problem with JS, nobody ever bothered writing a proper standard
in C, if it's undefined, it's undefined use at your own risk
in JS, no such thing
 
3:04 AM
JS != Javascript?
 
JS has undefined
 
they're all different, and that's why jQuery was created in the first place
 
JS, for the purposes of this discussion, == javascript
 
@Chris: I mean, UB
 
@Chris lolol JS == JS
 
3:05 AM
:P I'm used to JS referring to microsoft's something or other...
 
@Hamster JavaScript is commonly abbreviated to JS.
 
jQuery was created so that one doesn't have to use 10 if statements for each browser it wants to support
 
@Hamster Microsoft's JScript...
 
@MattPsyK I end up getting the count with a separate query to fetch total number. However, i think the method I have there is inefficient, I sort of hoped/expected there is a one query inner join without UNION . The reason I get count in a separate query is to get ALL the results, while I only display lets say 10 for the results in first query.
 
The quality of jQuery modules is also an issue to me
 
3:06 AM
thats what I thought. sorry to derail :P
 
That's a LOT of bad code floating around out there
 
@Chris: yes, a lot of bad code, I agree
 
Again, that isn't jQuery as the problem per se, but the devs
 
look at most PHP frameworks or apps, lots of bad code there too
hell, look at the PHP source, lots there too
 
We're almost full circle to my post about answers using mysql_ functions in PHP though.... when you enable bad practice, you are bad practice
If you catch my meaning
 
3:07 AM
@Chris: yeah, I do, and I did get your meaning from the start
 
jQuery empowers under-experienced developers to skip all the "boring stuff", like knowing the language, and jump right in to generating a mountain of terrible code to share with the world
did you know there's jQuery.now()? It returns new Date()
5
 
@Chris It's better. new Date() requires you to call new. That's bad, right?
 
And confusing
 
@LeviMorrison You do have a point there :)
 
new is the new black. Lady Gaga will be wearing an object constructor at the next VMA
3
 
3:10 AM
@Chris That's silly. Making you code more (just by 2 chars, but still)...
 
Naaa, $.now()
 
Oh, of course.
 
Well, officially jQuery.now() is the same as (new Date).getTime().
 
function n() {
    return new Date();
}
alert(n()); // Even less than jQuery
 
@LeviMorrison I'm confused. are you kidding?
	now: function() {
		return ( new Date() ).getTime();
	}
 
3:14 AM
@Nile Old news, I already posted that.
 
@LeviMorrison Oh, didn't see. I suppose you were kidding then?
 
did three person really star this?
2
I kinda lost a little faith right then
 
faith wasn't lost, just ill placed.
Now you just look weird.
Anyway, interfaces... are they just like prototyping for PHP?
 
@MattPsyK: prototyping? it has a different meaning in different contexts you see
 
Declaring classes and members before being defined?
I guess my question should be, what is interfacing?
 
3:20 AM
@MattPsyK not exactly, no
 
http://php.net/manual/en/language.oop5.interfaces.php
I've had a read, but all i can get out of it is header files for PHP.
 
prototyping applies to procedural programming as well, e.g.: C
 
Question: A class that extends another class cannot override public members with private or protected ones. That basically forces me to use private constructors all the way up if I want to generate it only with factory methods, right?
 
interfacing applies to OOP
 
am i missing something or is that crappy PHP design
 
3:21 AM
@Hamster Factory methods are bad practice.
 
So what would the difference be between extending a class and implementing an interface?
 
@MattPsyK: it's a pure virtual abstract class, if you like
 
@MattPsyK You can implement many interfaces but can extend only 1 clss.
 
@LeviMorrison yes, but that's PHP specific too
 
@LeviMorrison How so? Maybe I don't want instances of a given class to be from any old source, such as if they represent database rows with sensitive data or some such...
 
3:23 AM
@MattPsyK: if your class is a pure virtual abstract class, that is, there is no declared members, then there is no difference with an "interface"
 
@netcoder I wasn't aware I was supposed to be teaching it in agnostic terms.
This is a PHP room after.
By the way, C++ is terrible. C is much better.
 
@LeviMorrison true
@LeviMorrison not so true
 
@netcoder Lie.
 
facts? :-P
 
@netcoder None.
 
3:26 AM
on another note the whole thing with abstract traits is really is going to make a mess in a near future
well, generally traits will most likely make a mess in a near future
 
Do you know why traits got into the language?
 
I'm guessing it's for the lack of multiple inheritance
 
> There are only two things wrong with C++: The initial concept and the implementation. -- Bertrand Meyer
 
From my understanding, they were introduced by pressure from the framework lobby within PHP
Drupal, CI, Joomla, et al
 
> C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
 
3:30 AM
As was PSR-0 (gist.github.com/1234504)
 
also .. on a different note :
 
from my experience, C++ is a language that most PHP developers I know would like to understand :P
 
> The memory allocation strategy of Java can be described in 3 words. Nom nom nom. -- Chainsaw
 
gist: blackCoffee, the newest javascript framework, 2012-09-12 03:26:29Z
/*
    blackCoffee is the ultra-light, ultra-fast alternative to jQuery. Our slogan is:
       --> Write the same amount, do an equal amount as you otherwise may have done

    It isn't very catchy -- now taking suggestions for a better slogan!
*/
var blackCoffee = function (selector) {
    if (typeof selector != 'string')
        return null;
    if (selector.match('#')){
        return document.getElementById(
            selector.replace('#', '')
        );
    }
    return document.getElementsByClassName(
        selector.replace('.', '')
    );
};
var $ = blackCoffee;

// Try it here: http://jsfiddle.net/bM8c6/
3
 
@Chris: seems pretty lean eh? :P
 
3:33 AM
@netcoder btw , I actually know C++ .. I cannot say that I understand it , but I know how to make stuff in it
 
I've written a small amount of C++. I found the MS environment extremely frustrating to get set up correctly for my target system
It left me longing for my good old plainjane text editor
 
@Chris Who made it?
 
Who made....?
 
@Chris blackCoffee.
 
My bet's on chris.
 
3:35 AM
Yeap
 
@Chris Thought so.
How about this for a slogan: Code less, run faster?
 
@tereško: nobody really understands C++ anyway :P
How about this for a slogan: Just code man.
 
@netcoder MSDN doesn't make things any easier. I feel like I was able to find multiple documents for the same APIs with slightly different method signatures. It was a crap shoot to figure out which one I was allowed to use, and why. Sometimes, I would need to accomplish something that MethodA() did perfectly.... in a different version, which wasn't available for my target build.
 
@Chris I can't really speak for MS though, I've always developed with gcc and/or qt, which means the ISO standard and the qt docs which are pretty good. from what I've seen, it's for the best, too
the ISO standard is something though, which was the point of my initial comment: nobody really understands it ;-)
 
4:04 AM
@netcoder Do you know how traits work in PHP? Pretty much copy/paste. Almost literal.
 
Sam
hi @ShyamK
 
hey Sam
 
Sam
how r u doing, buddy?
 
crash anything yet?
 
Sam
lol.....unfortunately no
 
4:18 AM
I'm doing alright...
 
Sam
that's great
 
what have been your latest conquests?
 
Sam
hmm....nothing really......juggling Java and Python with PHP
 
dumped C# ?
 
Sam
while I'm on Java, I might as well invest time on Android too
lol....nope
I can't
 
4:20 AM
wish u cud... dont ya?
 
Sam
but since it's similar to Java, I don't need to worry about it much
hell yeah
whoever wrote the curriculum bringing Java and C# together has no sense
 
since when has any curriculum made any sense?
any who has tried to make sense of it?
 
Sam
lol.....they make sometimes.....this isn't one of those times
 
After every period, its like "I wonder who comes on next... Is it the Crazy Lady from Mars show or Dr. Frankenstein show"
 
Sam
lol....
one's got little choice in the matter
 
4:27 AM
ya... well sometimes they switch periods... Surprise!!!
 
@Sam Java ewww
 
Sam
The MegaXploit Nick :-P
lol....what's stinking about Java?
 
@Sam The only thing good about Java are their exploits :P
 
Godaddy is ur work, @Nick?
 
@Chris slogan: Has anyone really been far even as decided to use even go want to do look more like
 
Sam
4:28 AM
lol....and Android
 
@ShyamK nvm
 
GoDaddy servers were down... Anonymous' leader claims he did it...
 
was being reported all day that it wasn't
 
@Nick you'll also notice that their technical explanation for it makes almost no sense
 
Sam
I'm pro-Android, anti-iOS; so, if I'm gonna develop native apps on mobile.....I'm gonna have to know Java
 
4:29 AM
they can say that... its all a conspiracy... lies... don't believe the lies
 
@Lusitanian probably to keep their customers as ease
 
@Sam phonegap....
 
@Sam lol you can be pro-Android, don't have to be anti-iOS
 
@LeviMorrison it's generally not about how they work, but how people use them
multiple inheritance is a great tool, yet nobody seems to know how to use it properly
 
Sam
lol....I'm anti-iOS because of the fanboys
I actually like the phone itself
 
4:31 AM
@Sam Until they allow development in the native code... then its good bye Java...
 
Sam
@Lusitanian isn't phonegap simply a web app that has more integration?
 
sorta-ish
 
Sam
lol....I know HTML and CSS; I think I can develop a web app without needing Phonegap.....I need something that interacts with the telephony itself
 
that's what phonegap does
 
Sam
so, Phonegap allows access to bluetooth, contacts, text messages, etc?
 
4:34 AM
not exactly sure about telephony
accelerometer, camera
don't recall what else -- let me look at their api
 
Sam
I'm checking them out too
 
Adobe?
 
yeah SMS access
 
... no thanks
 
it's open source and partly an apache project
 
Sam
4:35 AM
but I'm still a developer........I need to act like that and learn Android
Adobe bought the company....dang
now, it's not gonna be free anymore
 
yes it is.......
the build service, no but who cares
it's apache licensed and will always be, though
 
Sam
looks nice
hey @Nick, I heard you hacked godaddy just for fun
 
@Sam lol you heard wrong... sshhhh they're after me
 
Sam
lol.....better run, boy
 
Run Forrest Run
 
4:45 AM
^-- image from a news item
 
Sam
@Lusitanian these plugins basically use Android syntax; you have to copy some code into the manifest.xml files, as well as tweak some .java files
that's not even HTML/CSS/JS
 
@ShaquinTrifonoff lol
 
Sam
Nick's their daddy
 
haha
 
@Sam lmao haha
 
Sam
4:51 AM
godaddy knows better than to mess with you now.
does anyone here use sqlite?
@Nick how do you italicize on here?
 
* * or _ _
 
Sam
italicize
 
:D
 
Sam
nice and sweet
anytime I go into the Python room, it's always empty.....the last message is usually about 10 hrs ago
 
ya... I have checked it out too...
 
Sam
4:57 AM
I wonder when they usually convene
 
Python's need their break after a huge meal (I guess)
 
Sam
lmao.......true
although the name has nothing to do with a reptile
 

« first day (697 days earlier)      last day (4258 days later) »