« first day (543 days earlier)      last day (4408 days later) » 

user895378
8:00 PM
Or at least programming.
 
kodz?
 
user895378
codes ... well, code, but it was for pointless effect :)
 
teh kodz :P
 
That coding horror guy might actually have a point with that fizzbuzz rant of his. I discounted it because I could solve that in like 2 minutes in my head. But if someone can't figure ho to work out that you need to add a number between 0 and 3 to a number, then maybe that fizzbuzz thing isn't such a bad idea after all
 
user895378
yeah I'm not 1337 enough to be fluent because I use PHP: should've been teh kodz
 
8:01 PM
My favorite problems to solve actually aren't programming related. My favorite ones are all usability problems.
 
I went to math high school, every friday new exam... go to math school they've said, it will be fun, they've said
 
@rdlowrey Are you referring to the question or the answers? :p
 
user895378
@LeviMorrison OH, PEOPLE HAVE POSTED ANSWERS TO SUBSIDIZE THAT QUESTION? omg.
 
@webarto not in the least
 
People will answer anything if they think there's rep in it for them :(
 
user895378
8:03 PM
@GordonM Well, I can't lie ... I used to just to get my rep up from zero :)
 
@ircmaxell and now I'm studying discrete math like you, I haven't learned anything in high school :P
 
lol
 
ok that does it. I'm sick and tired of those stupid sql and php tutorials. Either you guys point me to a correct (or even decent) one or I'm going to write one this weekend
 
@RepWhoringPeeHaa I have one in the works (sort-of).
 
@ircmaxell but who's laughing now, right ;) zce.me I was planning of building blog site for ZCE's, something like MS MVP's have... do you think I wasted $12?
 
8:07 PM
@LeviMorrison Great. What does sort-of mean btw?
 
@RepWhoringPeeHaa Well, I have it thought out, a tiny bit written, but I have a few large projects on tight timelines. I won't be finishing it soon, basically.
 
user895378
Whenever you guys do write those mysql tutorials be sure to post links in chat so I can start posting them in comments when telling people their code is asking for SQL injection and that mysql_* shouldn't be used
 
@LeviMorrison can I 'borrow' it? :)
@rdlowrey that's the idea :)
 
user895378
What am I good for if not hyping the blog posts of knowledgeable people? :)
 
The main idea behind mine is to focus almost entirely on how you should do it, rather than a lengthy post on how to not do it.
 
8:09 PM
@rdlowrey net.tutsplus.com/tutorials/php/… I wrote something, it's pretty bad, but point is, no mysql_* :)
 
@rdlowrey I wouldn't expect anything less from you :)
 
@webarto how much did they pay you for that article?
 
from my experience, I "hacked" a lot more ASP.NET sites than PHP using SQLi, guess they think that is "handled" by default :)
 
if you don't mind me asking
 
@Omar, no, it's how you make a deal, prices are 150$ and up...
 
8:11 PM
@webarto hmmm that's not my experience
@webarto That's 1000% better than any tut I've seen so far
 
thanks ;)
net.tutsplus.com/tutorials/php/… only this one is unique :) I get so much "php sucks" results on Google that I can't write article ^^
 
@RepWhoringPeeHaa I'm sure there's some great ones on Smashing magazine... oh, sorry. I just couldn't finish that sentence with a straight face
 
user895378
yesterday, by Kamil Tomšík
whats instagram? :-)
 
yeah I saw :) I was trying to break the buzz that is something radical, it REALLY s***, but it's on mobile phone...
so they get $1 000 000 000 and I get / 1 000 000 for generating 100k views, so I sold myself for nothing :P
 
Seriously, it's cute when Smashing tries to do a PHP article, because it always ends the same way. This one generated so much hate that they had to add a disclaimer to it. coding.smashingmagazine.com/2011/12/22/…
 
user895378
8:18 PM
> Please notice that this article doesn’t provide production code to use in your live websites. Make sure to read the full article and study more on PHP security before using the code listed in this article.
 
user895378
lol
 
user895378
I wish people would stop pretending that n00bs don't copy/paste code directly into production environments.
 
@GordonM only 1 disclaimer? I haven't scrolled yet and I already see three of them :)
 
@rdlowrey Our readers have informed us that the following code is utter shit. However we're unable/unwilling to fix it, so you are advised to find some other examples that aren't utter shit <== Fixed it for you.
 
user895378
I'm going with "unable"
 
8:20 PM
imo, developers should always provide secure, robust and well-thought-out code in examples
not shit they know will be insecure
 
would something like mozilla developer network work for PHP tutorials. I mean wiki style editing and improving of tutorials?
 
@iyrag Smashing is aimed at designers though.
 
**For anyone commenting on the security in this article.

Have you ever seen a seventh grader calculate speed by using integrals to get to the area under the curve? No, they use distance/time. The 7th graders are completely wrong, just like when they use 10m/s as acceleration when an object is dropped.

You can not teach programming by going over everything in one article. You omit, you tell small lies and when the person is ready he/she can move on to more complex things.**

Author
 
Now I'm thinking: I could as well take over a SO post about mysql and add it there :P
 
Not that I've got anything against designers. They know shitloads about things like typography and colour theory and all kinds of things about how to make a site look awesome that I'll never get my head round. But that's the thing. They have their area of expertise and I have mine. So I should write awesome backend code, and they should make it look awesome with their awesome frontend code
 
8:22 PM
Ah, I wasn't aware of Smashing magazine before this
 
When designers try to code you get that Smashing article. When coders try to do frond end development, you end up with zend_form. :P
 
I was writing backend code for a project and they valued the front-end developer over my work much more. I tried to explain that the site would be useless without a good backend anyway, but they wouldn't listen
 
Delete all the .php files and see how long before tehy notice. They might appreciate the back end stuff somewhat more then. :) That or you'll get fired.
 
^ the same way "wordpress framework developers" get more money than "real" developers, no offense to anyone :)
 
Haha
 
8:25 PM
lol
 
OK let's crowd-source this tutorial. Let's start with getting a nice list of bad tutorials. (No need to add w3school I got it without checking). Anyone?
 
ah too many of them :D
 
I hit some list somwhere with the three most used. Don't know where I put it
 
github :D
 
user895378
Here's an idea. How about mentioning that the relevant php manual entry, PHP: SQL Injection doesn't even mention prepared statements. Only the comments.
 
user895378
8:28 PM
It's kind of embarrassing.
 
Yup that is sad. Now go do something about it!
Will use it though :)
 
aboot* it
 
sounds cuter ;P
 
8:30 PM
But that's enough bitching about other people's code. Time for diagramming up an RMR implementation for mine :)
 
user895378
yeah, I've kind of checked out yesterday and today. vacation starts tomorrow :)
 
bastard ;)
 
What PHP frameworks do you use, if any? And if you don't, do you prefer to write your own?
 
@rdlowrey I'm sure I can use your dependency injection class independent of the Http submodule, right?
@iyrag Artax, but it is in pre-alpha stages. . .
 
@RepWhoringPeeHaa A lot of those comments made me very sad.
 
user895378
8:32 PM
@LeviMorrison Yeah, as long as you specify your own autoloader there's no need for the bootstrap or anything.
 
@CharlesSprayberry You can say that again
 
Ok, I will write something about vulnerabilities and how to prevent them, so ...
1.) SQLi
2.) XSS
3.) CSFR
continue :)
 
user895378
@iyrag If you've never done it before, try writing your own. It will probably be terrible, but you'll learn a ton.
 
That's a good idea. I've recently started with Yii after working with CodeIgniter and CakePHP
 
8:34 PM
@rdlowrey I want to use it for my job. I am sick of spending half of my time setting up dependencies, lol.
 
acunetix.com/general/images/websitesecurity/… a lot of methods from this pie aren't really hacking ones, like DoS...
 
user895378
@LeviMorrison Yeah, it should be trivial to port it to 5.3 if needed
 
user895378
I have to double check but I think the short array syntax is the only incompatibility ...
 
@RepWhoringPeeHaa I know, thanks, was trying to get peoples opinion :P
 
user895378
@LeviMorrison And I spent a bit of time lately making sure everything in the Core package is extra-special-documented, so using it for your own purposes should be relatively straight-forward.
 
8:41 PM
Okay, another one of my awesomes diagrams coming up.
 
heh, what do you use for creating diagrams?
 
user895378
lol stick figures and a pencil
 
haha
 
A bit of scrap paper and a biro
More user friendly than a UML tool
 
Anybody hear ventured in to Ruby on Rails?
*here
 
8:43 PM
@GordonM But some UML tools can do code generation for you :)
@iyrag Yes, why?
 
Do you find it a pain to work with, or would you recommend it over something like PHP?
 
@iyrag Ruby on Rails is an entire platform. PHP is just a language. They aren't comparable.
Symfony 2 and Zend Framework could be compared to Ruby on Rails.
 
Right.
 
But even they aren't as much as a platform as Ruby on Rails.
 
I have a lot of experience in PHP, but close to none in Rails, where would you recommend I start with RoR?
 
8:50 PM
Okay, if anyone's interested I've got the RMR diagram up for people to comment on. Gonna add a wiki page with a walkthrough of what's meant to happen. cloud.github.com/downloads/gordiansolutions/reefknot/rmr1.png
 
what does object after database represents :)?
 
user895378
The "Resolver" ... remind me to call myself that if I ever become President.
 
it's funny, because there are only few lines of code, and he is lazy to paste them...
 
@rdlowrey LOL
Hopefully that's a reasonable approximation of RMR. Still working on it of course. Would be silly to start coding it with an incorrect design.
 
8:57 PM
Why do I see a link with "Delete this Page" on it? Didn't dare to click it
 
Ok, that doesn't sound good...
 
@GordonM why? that is in spirit of PHP ^^
 
@webarto Which is why PHP is held in such esteem :)
@RepWhoringPeeHaa OK, public editing SHOULD be turned off now. Can you double check for me please?
 
@GordonM Cannot edit any more, but I still see the delete link at the bottom
 
Weird. There must be something in the settings I'm missing.
 
user895378
9:05 PM
That may be the nature of public wiki entries on github ... not sure. Could you guys scroll to the bottom of and lemme know if you see the same Delete link here: github.com/rdlowrey/Artax/wiki/Event-Management
 
Yeah, I see it
 
@rdlowrey yup. Wow so much text I can delete. Soooo tempting! DAMN YOU VERSIONING! ;)
 
The only options for wikis I can find are Wikis enabled/disabled, and restrict to collaborators only.
I'm going to create a dummy page, can you guys try to delete it?
 
user895378
Yeah ... I think that's just how the public repo wikis are ... the version control protects you from nefarious activities
 
9:07 PM
OK, can you please attempt to delete github.com/gordiansolutions/reefknot/wiki/Delete-me and let me know what happens?
 
user895378
If you use github pages I don't think you have the same issue. Though I haven't used them so I can't say for sure
 
@GordonM "You do not have permission to update this wiki."
 
user895378
oh sweet
 
That's just stupid. Why are you adding a link when I cannot click on it
Well... I can click it...
 
Okay, that's a relief. :) Weird that they'd show the link though.
Thanks for testing it out.
 
user895378
9:09 PM
But Wrestling ISN'T fake! Delete you!
 
user895378
Which reminds me: I need to update wiki entries ... that's the bad thing about them ... you change how stuff works and you've prematurely wiki'd ... leading to half-baked bad information floating around.
 
lol
I was nearly going to put "There's nothing wrong with mysql_* and addslashes()", but I'm not ready to die
 
user895378
@GordonM I would've taken a screen shot for sure.
 
user895378
With all the address info and your github nick and everything, just to post in chat from time to time.
 
Now you see why I didn't do that :)
 
9:12 PM
It's because it is built in RoR :P
lol at addslashes()
 
Bt all joking aside, is this a reasonable implementation of RMR? Or am I still way off the mark?
 
hg > svn > git
 
WOT
 
user895378
@GordonM Looks legit to me. I think RMR specifically expects class method names to match up with the available HTTP method verbs for a given resource (which isn't shown in your diagram).
 
Anyone else feel that way about VCSs?
 
user895378
9:18 PM
I have a bit of familiarity with subversion, but I am pretty happy with git, so no. I just use git for everything.
 
user895378
I can't say whether or not I'm missing out by doing that.
 
I sadly still hadn't gone through the process of versioning my projects...
 
3 words: screw you netbeans
 
I just can't get my head around GIT or SVN :(
@ircmaxell Amen to that!
 
I use git primarily to work between my laptop/desktop
 
9:19 PM
@rdlowrey Well it is a rather rough diagram. :) I'm thinking the framework will provide an interface that RMR-participating classes are expected to implement, or an RMR object that participating objects are required to composite into themselves to provide the approporiate methods. Basically get(Request $request), post (Request $request), etc
 
I like hg because its just so easy
 
it's pretty easy @Truth if you could spend 10 mins reading a tutorial and you'd be up and running.
 
@Omar For that I would either use a network shared folder, or upload it to a FTP server
 
svn was a breeze to set up
 
@Omar I have read tutorials (even watched screencasts!)
 
9:20 PM
git took ages to set up and woek with
 
@Truth what's the problem then?
I've been able to compile/install git on web servers I do development on too to keep them in sync
 
Either I'm too dense (I hope not!) or the tutorials weren't good enough.
 
emacs should be the only editor in existance
 
all I do is push from my laptop/desktop to bitbucket then run a command that tells the server to pull and I'm done in terms of keeping things in sync.
 
9:20 PM
screw your IDEs
 
I was a pretty late starter when it came to using versioning. But after I got used to it I couldn't imagine doing a major project without it. Diff FTW
 
@Omar anything that involves using the CLI gives me a headache T_T
 
@Truth I can show you real quick if you want how easy it is and you can do a lot with just a few commands.
 
pfff as long as it has syntax highlighting and doesn't auto complete I'm happy
 
There's plenty of SVN/GIT/Whatever GUI apps out there
 
9:21 PM
I'm not used to Unix type systems and using the CLI natively
 
You don't need to be :)
 
But sure, let's have a new chat room so we don't clutter up this channel
 
okay :)
 
autocomplete sucks imo
 
@rdlowrey seems to think my understanding of RMR is ok and nobody else has jumped out to point out some kind of idiotic flaw in it, so I think I'm going with that as the basis of my design. Will need to flesh it out a bit first though.
 
9:23 PM
where it guesses your mysql_ function as being mysql_escape_string every time
and closes quotes for you
 
Serves you right for using mysql_* :)
 
Lol
I don't anymore, frameworks all the way for me
I have a feeling frameworks are reaaaaaaly bad for my PHP 'skills'
 
@iyrag mysql_* really??? This proves the point that it doesn't matter how good the IDE is it's the person that uses it that matters :)
 
I'm missing something here - sorry - what's wrong with mysql_*?
 
@rdlowrey Like I said, when it works. It's not working now
 
user895378
9:28 PM
@iyrag You're about 90 minutes late to the party :)
 
user895378
@ircmaxell couldn't help myself :)
 
Ah :p
 
user895378
 
user895378
And that link is nearly two years old.
 
@ircmaxell would you hate me for writing a tutorial saying that people should use pdo? ;)
 
9:31 PM
Wow...
 
just got a job offer from "serious" company with @hotmail.com email, #fml
 
user895378
At least it wasn't an aol.com addr
 
user557846
laundery millions from nigeria is not considered "esrious" job :-)
 
9:36 PM
oh I got spammed with like 100 emails like that in one week
filter was "1 000 000" :)
 
@webarto We get hit by SP casino a lot lately. And ofc the great thing that they call: Max Gentlemen :-)
kewl name though
 
user895378
Max Gentlemen ... nice
 
haha @rdlowrey you should change your name to that when you become president, it will suit your "resolver" role :)
 
user895378
:-D
 
Your favorite quote: x' OR 1 = 1;--
 
9:42 PM
Would it be sane to host the sql and php tutorial on git pages. I don't know exactly what it is, but it looks like I could use it. Any idea?
Is that what @nikic uses for his blog?
 
Max Gentleman IS... THE RESOLVER!
 
user895378
@RepWhoringPeeHaa I think so
 
It sounds like a 70s spy/cop show where everyone drives a cool car, knows karate and has a handlebar moustache
 
user895378
lol for sure
 
@RepWhoringPeeHaa I am so screenshotting that.
 
9:45 PM
:=P
 
user895378
haha
 
user895378
On that note, I gotta walk the dog. I'll catch you guys later.
 
later @rdlowrey
@webarto Say what one more fucking time! I dare you. I double dare you! :-)
 
haha ;D
 
9:48 PM
@RepWhoringPeeHaa I'm using Jekyll. That's what github provides for the pages :)
 
Later
 
@NikiC Is it easy to pick up?
 
@RepWhoringPeeHaa It's quite simple ;)
 
Just what I needed :)
 
Only problem for me was setting it up on Windows, I couldn't get everything to work locally (especially syntax highlighting)
 
9:50 PM
@RepWhoringPeeHaa The SO version would probably be Say "How do I save a form to mysql with PHP" one more time!
2
 
So I recommend debugging in production :P
 
@RepWhoringPeeHaa I wouldn't hate you for that...
 
@GordonM :-)
 
@NikiC: 35k views after 25..5 hours
 
@NikiC That sounds.... awkward
 
9:51 PM
@RepWhoringPeeHaa It usually works well :D
 
@ircmaxell lucky me ;)
@NikiC can you save and stuff before actually publishing pages?
 
@ircmaxell That's definitely a good bit more than my popular posts had in their whole lifetime ;)
 
same here, it's double my #2 and #3 posts combined...
 
@RepWhoringPeeHaa what you mean? the page is published when you push
 
@NikiC ah k I see
 
9:53 PM
Oh, and let me say this: PDO is awesome.
 
Really, there was some time when I considered @ircmaxell being right about mysqli, but now I can say for sure that PDO is just so much better
The API is an order of magnitude easier to use.
And that's all that matter. To me at least.
 
Well, the PS api is superior...
 
As long as you remember to turn on proper prepared statements with mysql, PDO is fine.
 
but the rest of mysqli's api is better IMHO
 
9:55 PM
The concentration of IE users in a chatroom increases as you go to low-level programming chatrooms
 
alright, later all
 
I expect there's advantages to a DB driver that's fully tuned to the underlying database server, but there's definitely something to be said for having a standardised API for all supported database servers.
@ircmaxell later.
 
cya @ircmaxell
 
bye
 
@ircmaxell It's the whole commonly used API.
 
10:03 PM
Off to bed. Later all
 
later
Anyone ever heard of the PHP Solutions magazine?
 
not me
 
Nopez. Should I?
 
No idea ^^ I just got an email from them asking whether I want to write something for them. That's why I'm asking
 
10:16 PM
@NikiC What are they paying? ;)
 
No idea ^^ The mail wasn't particularly detailed ^^
 
10:39 PM
looks pretty weak
they'd translate it to french or what?
 
later all
 
10:59 PM
later
 
So if I create an image with imagecreatetruecolor like $resized=imagecreatetruecolor($size,$size), then $resized is a resource
but if I do a $image = file_get_contents('image.png');, then $image is a string
How can I get $resized to be a string like file_get_contents?
Or convert it after the fact, since I do some image related php stuff before I want the string
 
@NikiC I had bought a copy or two some time ago, but not recently.
@RepWhoringPeeHaa cu
 
I'm trying to base64 encode an image but I base64_encode expects a string
14
Q: Base64 Encoding Image

UnkwnTechI am building an open search add-on for Firefox/IE and the image needs to be Base64 Encoded so how can I base 64 encode the favicon I have? I am only familiar with PHP

But I want to do it on an image I'm creating on the fly in php, not an existing image
 
@stevether and how do you do it on the fly? With the GD library?
 
@hakre Yes, that's what I'm using.
 
11:10 PM
you want PNG image?
 
Correct
Wrap it in an imagepng?
 
yes, imagepng, save it to "memory", see memory streams: php.net/manual/en/wrappers.php.php
that might work. Otherwise use output buffering.
ob_start();
imagepng($resized);
$image = ob_get_clean();
 
@hakre Thanks! This worked
 
11:45 PM
night
 

« first day (543 days earlier)      last day (4408 days later) »