« first day (1128 days earlier)      last day (3814 days later) » 

9:02 PM
When using is_bool in php I seam to be getting either 1 or nothing instead of true or false. wtf?
 
user1823693
hello people
 
@Dan Right, I re-read like 5x, you want to proxy the form submission through your own "sanitation engine" before posting it to the final endpoint
@NoahHuppert example code? is_bool should return bool
 
@Leigh Yes, like this. form submit -> validate on the same page and send user back to form if they screw up -> if all is well, send to the server where the action points.
 
user1823693
im suffering a weird problem
 
user1823693
does someone have little time?
 
9:04 PM
@Leigh $b = true; echo is_bool($b); it says 1
 
...
 
@oPi Just ask, if someone has, they will answer...
 
Good old var_dump : )
 
@NoahHuppert echo is converting the boolean type to a string value, (string)true === '1'
 
9:05 PM
echo var_dump(is_bool($b)); --> bool(true)
ohhh
 
user1823693
ok. I have this code https://eval.in/69193 and it gives me this error: Fatal error: Maximum execution time of 30 seconds exceeded.

when i change the line $rangoValido = false; for a debug output the script gives no error
 
@Dan well, if that final destination is remote to you, your only choice is to submit the form from the server side, which is nasty :(
 
user1823693
any idea?
 
And the endpoint may have restrictions that end up causing you trouble (like many submissions from your IP address)
 
Jay
Can someone link me to a good session class?
 
9:08 PM
@Leigh FFS, I was afraid I'd get issues like this. I wanted to do something more than just JS on the front-end. I believe you need server-side validation to use a captcha, which is what they want. The form is so bad, it just sends no matter what is typed in, even nothing at all.
 
@oPi what is $dias? (the value)
@Dan I totally understand, and your instinct is right, don't rely on client-side validation. But if you take a users submission to your server, you can't then give it back to them and say "automagically connect to this URL and submit some data for me", I'm sure you can see why a browser wouldn't allow that :)
 
In JS, it's good to use === in pretty much every situation. Are there any gotcha points for using triple equals in PHP?
 
user1823693
@Leigh its a number. In tests its getting the value 2
 
@Leigh Ok, I've got you. So basically, it's JS only in this situation. I don't know if form bots can dodge that or not. I could do some math based captcha on the form but it's all utterly pointless if JS is turned off anyway. It's more for assistance rather than security..
 
you could present the data back to the user as a read-only form, with a "hey we validated this, it looks good, if you're sure you want to continue hit the submit button" kinda message (and accept they are able to tamper with that data), and have that action point to the final endpoint...
 
9:12 PM
@Leigh Yeah, not a bad compromise but I think they'll reject it. You can't polish a turd : \
 
@SomeKittens If your code is strict you can and imho should do the same in php
 
You can polish a turd, but at the end of the day, it's just a polished turd
I polish turds most weekdays, yay legacy code...
 
@PeeHaa Define 'strict'. The codebase I'm operating on is nothing of the sort I'm thinking of
 
If you can enforce types you should
 
@Leigh On this job I've been making gradients with images still, instead of CSS. Not done that for a while. It's just a sector which is behind the times, although ironically they sell software..
 
user1823693
9:15 PM
@Leigh im working with php 5.3.8 but I think thats not important in that code
 
@Dan Some sectors don't need to advance to keep customers. Like people who sell mainframe related software
 
@Leigh Ah, I'm all for things moving along at a good speed. HTML5 and CSS3 are cool.
 
@oPi well $dias = 2 isn't going to make it loop forever, do you know which part is causing the timeout? Throw some debug echos in there
 
Anyway, let's not do the language thing, they guys in the JS room went nuts when I said something about PHP was more logical.
 
user1823693
the piece that gives the timeout is this one: if($fila["plazas"]==0) $rangoValido=false;
If i change it for php_to_console the script runs ok.
 
9:18 PM
@Dan Let's get over there and punch them in the face!
 
@oPi Don't use localized names for variables.
 
/me punches room 17 in the face. Especially @rlemon
 
@Dan Yeah, you tell 'em your opinions! No need to define the question or provide evidence!
 
@PeeHaa No! I've heard geeks are pretty tough actually. I'm just a CSS and Photoshop guy, what do I know.
 
user1823693
sorry @MadaraUchiha, legacy. Wait, i translate them all
 
9:20 PM
(function punchBack() { rlemon.punches(PeeHaa); setTimeout(punchBack, 4); }());
 
@Dan We're not tough, we just wrap ourselves with <strong> .. all about presentation
 
@rlemon What is that gibberish you wrote there? :P
 
Going to the JS room and insulting JS is like walking into a NRA meeting with an Obama shirt.
 
@oPi With today's IDE's, refactoring all variable on the entire project should not take more than 10 minutes
 
@SomeKittens I'm British, so I don't get it : )
 
9:21 PM
Ohh i'm sorry. Next time i'll litter it with $ and some bullshit chaining ;)
 
hehehehhehehe
You mean like jquery right? ;-)
 
I shouldn't have said anything about languages.
 
ohh yea.. :P that is what I meant.
 
@Dan It's like claiming tea 'just isn't that great' compared to coffee
 
:P
 
9:21 PM
@SomeKittens Oh, nooooow I get it.
 
@SomeKittens That's true though
 
@SomeKittens What kind of tea?
 
Doesn't matter @Leigh
 
What kind of coffee?
 
Also doesn't matter
coffee > tea
Just like jquery > javascript
 
9:22 PM
actually tea is more popular than coffee
 
teascript > coffeescript
 
but I personally like coffee more
 
@rlemon Source on that one?
 
@PeeHaa Controversial.
 
I mean, darjeeling vs kopi luwak... you'd really prefer coffee that comes out of a small animals arsehole?
 
9:23 PM
@igorw God I don't want to know what that looks like :P
 
Just saying, but beer is superior.
 
worlds most popular drinks. Water -> Tea -> Coffee
 
user1823693
@MadaraUchiha spanish development, spanish names
 
user1823693
anyway, changing name doesnt repair anything
 
Coffee's the #2 traded commodity.
 
9:24 PM
source: google it, everyone and their mother will tell you this.
 
@Leigh Yes?
:P
 
my mother never mentioned it
 
we were too poor for tea or coffe.
coffee*
 
I think her favourite drinks are wine > guinness > tea > coffee > water though
 
Guinness, oh yes.
 
9:25 PM
it makes you <strong>!
 
my favorite drinks. beer > coffee > water > hot coco. (disclaimer: Canadian)
 
Have you had the 7%+ stuff in the bottles?
 
the stuff brewed in nigeria?
 
hahaha
I think it's still from Dublin.
 
@rlemon Now apologize!
 
9:26 PM
But yeah, they brew abroad too. Weird I think.
 
Hello
 
My favorite drink is smoothie.
 
I apologize for PeeHaa's indiscretions.... I'm sorry room....
 
Guinness is excellent. We had an Irish friend returning to Ireland (visa expired). Bar ran out of Guinness.
 
user1823693
anyway, here is the code with english names eval.in/69194
 
9:27 PM
@SomeKittens The Irish are know to drink serious amount.
 
user1823693
I like Guinness...its a long time i cant taste it :/
 
@oPi Your English is pretty bad
 
user1823693
@PeeHaa i do my best :/
 
@PeeHaa at least he isn't typn lik dis k. cud b wors k. tnks.
 
user1823693
9:28 PM
anyway, its a long time i dont have to use it
 
I am actually drinking a stout
 
@tereško your english is terrible too, it's called a stoat
 
lulz
 
@Dan 'serious amount' === 'more per capita than anyone else'
 
9:29 PM
@SomeKittens equal and the same type? : )
 
@oPi No, Spanish development, English names.
Hebrew development, English name
 
No point arguing about english though.
Who is from England..?
 
Heck, Martian development, English names.
 
@tereško looks like I can see some light through the bottle, looks like it has the "stout" on the outside, but not on the inside
 
it's really good on the inside
 
9:30 PM
@Dan In this case I'm aiming for the English compiler, but that's been known to have many issues.
 
I hope the beer is as black as your soul, and it's just a reflection/bad-photoshop on the image
 
user1823693
@MadaraUchiha national development, national names. I got the code with a naming convention. Im not going to break it because you dont like it. Anyway, the name of a variable doesnt repair an error
 
@Dan I'm glad you said England, and not Great Britain, or the United Kingdom... screw the scotts, screw the welsh, and screw the bloody irish!
 
@Leigh well .. you cannot see a naked lightbulb through it
 
also guys if you were not watching the news for the past hour. The US is being slammed with tornadoes right now. link
 
9:32 PM
the picture most likely is of a n empty bottle
 
Actually, the irish are alright, but those other guys are a bit odd
 
@oPi When asking for help, it makes sense to have variables and function names in a language everyone understands :)
True, you shouldn't break convension for it.
 
@Leigh The welsh? I hate more of the accents from the UK. Better in the south but posh Londoners get right on my tits.
I hate most*
I'm pissed without beer this evening.
 
well maybe you should endeavour to have smaller tits...
 
I'm A cup as it is.
 
9:34 PM
You're a cup? I'm a little teapot.... hmm... stout
 
ha
Nice, I see what you did there.
 
dribbles
 
user1823693
@MadaraUchiha i pasted this one eval.in/69194 with some names changed. Anyway im also telling that the fail is in $validRange= false; and i cant even guess why its important to you for know the meaning of that variable
 
@rlemon Clearly, that's God's revenge for Obamacare.
 
9:36 PM
Check it out if you haven't seen this site. You must all relate to something. I cried with laughter first time I was on here: devpractic.es
 
@rlemon I cannot click the link without fiddling with the dom :( The flag / star / reply options overlap it on hover
 
@PeeHaa get a larger screen :P
 
@rlemon I would rather complain to @balpha
:P
 
We'd fix it with the bot, but then she'd just get shut down again.
 
@PeeHaa I don't have flags enabled, I removed them. The next thing I want to do is to automatically invalidate flags because that system is broken
 
9:41 PM
Hey guys
Is there a dead simple JavaScript debugging tutorial that one could point people to?
Like, when people ask on SO along the lines of, "here is my code and it doesn't work"
 
@BenjaminGruenbaum Yes it is very broken :(
 
Oh sorry this is the wrong room
I thought I had clicked on JS :)
Sorry
 
@Pekka웃 We don't like your kind in here!
:P
 
@Pekka웃 I answered that in the JS room
 
Them's fighting words!
 
9:42 PM
DEATH TO FILTHY JAVASCRIPTERS
 
:D
 
@BenjaminGruenbaum cool thx
 
@SomeKittens Birthday invitation REVOKED!!!!
 
NOOOOOOO
 
ohh yea... and there is a bouncy castle!
evil laugh
 
9:44 PM
I'm sure he meant server-side Javascripters.
Right, SomeKittens?
Trying to save your birthday invitation here
 
Oh, of course. Server side JS is the absolute dregs of programming society.
 
I like to write js for embedded systems
 
There seems no fixing this.
 
I'm a bit concerned that feature-flags got 18 downloads despite being pre-alpha.
 
right, I'd better crack on with my JS. See y'all later.
 
9:50 PM
speaking of languages: julialang.org
go!
 
> with syntax that is familiar to users of other technical computing environments
What does that mean?
 
banana?
 
@PeeHaa Probably C-Style
 
Is there such thing as an and/or operator? Like if(1==1 and/or 2==2) would work and so would if(1==1 and/or 2==1)?
 
10:03 PM
> Surely it's not as efficient coding in vim than say sublime text? I vim quite a bit usually to edit conf files but straight out code in it seems a little daunting to me.
blasphemy!
@NoahHuppert That doesn't really make much sense :P
Use case?
 
lets say you are doing a mysql query and you want a variable to be set to 'No data' if the query returns 0 results or if the querry is invalid
 
Geees. People are really falling for the laravel trap for some reason.
Who the hell does their marketing?
@NoahHuppert uhhu
 
@rlemon "For my work i use Aptana Studio becouse our development is done trough SSH." Er................wat?
 
$output = 'no data';
if ( query_is_valid() && querty_result_count() > 0 )
{
    $output = 'something else';
}
@NoahHuppert , here ya go
 
Thanks
 
10:11 PM
@Danack noobs ... noobs everywhere
 
Speaking of n00bs, where's a good place to start learning MVC?
 
@PeeHaa I see you too have been reading reddit lately
@SomeKittens my personal suggestion is this list
 
@tereško It's just crazy. It is spreading like a cancer for some reason. How do they do it?
 
@PeeHaa have you considered that to advertise a framework, you could get a dozen of people posting about it on reddit
it's possible that half of the comments that you read are part of their marketing campaign
 
Heck, find some college kids, give them the pitch, and pay them minimum wage to recommended it everywhere.
 
10:19 PM
@tereško Well yeah. But I actually have met people who use it
Why the fuck does everybody keep jumping on the next train pile of shit
I just don't get it. What is wrong with people
 
I don't know why they do it, but I know why you cannot understand their reasoning - same cause that makes it extremely hard for you to teach complete newbies
 
Actually, better question: Is MVC the best way to go? I've got a large PHP codebase that's been built with no regard for architecture, SQL in the HTML, etc, etc. I've some experience with MVC, just not building a system from scratch.
 
there are tiers in understanding and humans can only interact with tiers that are right beside their own
@SomeKittens you will be better off by refactoring it to a proper object-oriented style
 
@SomeKittens Clean, maintainable and testable code is far more important than insert whatever design technique here
 
MVC is very hard to enforce on an existing cotebase
 
10:26 PM
Fair enough
 
and build
 
What's the best practices with regard to routing? I'm used to express...
 
what's "express" ?
 
Node.JS framework
 
that is one of common approaches
the other is to use regular expressions to extract data from query
basically it is "extract and execute" vs "match"
 
@tereško That's all in Apache?
 
none of it is "in apache"
damn ,,, this keyboard has no media controls
 
So when the user visits mysite.com/test123/foobar.php, what does foobar.php look like?
 
unless you use mod_php, then it's "in" apache
 
user895378
10:47 PM
@Leigh Hmm ... I can't reproduce it either and all my tests pass if I remove the garbage intermediary entirely. I'll chalk that one up to not having looked at the relevant code in a couple of months.
 
@SomeKittens this might help
 
@rdlowrey Probably refactored something else and made it go away.
 
user895378
Yeah, most likely.
 
I feel like someone who just discovered jQuery and JS are two different things.
 
user895378
@SomeKittens Fair warning: if you're very experienced with node PHP's reliance on third-party web servers won't make very much sense at all.
 
10:49 PM
Discovering that one the hard way.
 
@rdlowrey How so? nginx reverse proxy to node, nginx fastcgi proxy to php-fpm... seems similar to me :)
 
@SomeKittens here is a hint: if you want to write good and optimal code, jquery is the "hard way"
 
Nice code tidying session ready for Monday work.
 
@tereško you're joking.
 
@Fabien for 2 days I've been trying to work on stuff for tomorrow, I have absolutely zero to show for it :(
 
user895378
10:51 PM
@Leigh That's nothing more than a routing layer with a node backend -- node retains full access to the HTTP protocol. php-fpm is still a crippled PHP web SAPI.
 
@Leigh Procrastination? :)
 
@bwoebi nope, I actually am not
 
@Fabien perfectionism, and 10 rewrites later, no code
@rdlowrey Cippled how? It fairs well enough in my experience
 
@rdlowrey you should start learning C
it would be a natural progress for your pet-phew
 
@Leigh heh. Yeah I can't say I am satisfied with it. My thought process is usually along the lines of "Let's make this awesome, re-usable, clean, easy for others to work with". Then a few hours in "Ah screw it, it's never really going to be used for anything other than this".
 
user895378
10:54 PM
@Leigh Crippled because this is not an application, it's a hack:
 
@tereško from a performance view, you're right; but from a readability view? most likely not. (as long as you don't try to add 2 and 3 with jQuery)
 
user895378
<html>
<?php echo "I have no idea what I'm doing"; ?>
</html>
 
@rdlowrey right. body tag is missing.
 
@bwoebi it's not mandatory in HTML5
what he IS missing is doctype
 
nods
 
10:55 PM
@tereško I just wanted to note that ;-P (he doesn't indicate that he writes html5…)
 
@rdlowrey <!DOCTYPE html PUBLIC "-//W3C//<?php echo 'guys, seriously, wtf...';
 
user895378
lol details shmetails. If I want IE to butcher my output for lack of a doctype then you can't stop me!
 
@Leigh <?xml not, this is not php, stop showing errors ?>
 
That feeling when stuff works in IE and doesn't in FF...
 
I think I'm going to start doing <script language="php" runat="server"> just to screw with people
 
10:58 PM
@Leigh This sadly works…
 
Nov 14 at 21:13, by PeeHaa
echo "<script language=english> test(); </script>";
 
I know :)
 
people even read less docs than people
 
@PeeHaa true.
 
user895378
Anyone else getting 503 from github trying to push right now?
 
11:02 PM
@rdlowrey Pushed 5 minutes ago without problems
 
How about I pull when you push, might be able to force it
 
lol
 
hoping that @rdlowrey wants to push to Aerys :-D
 
Why does everyone have access to this secret repository except for me
 
@PeeHaa if you look at the OPs profile, you will notice that he is of the "php people"
 
user895378
11:05 PM
@Leigh it's a mess right now anyway. give me some time.
 
user895378
@bwoebi sorry, it's something else. But I have been working on aerys today ... it just takes some time to get back into the swing of things.
 
@MadaraUchiha Blah I missed your earlier messages for a game sorry. :(
 
@rdlowrey Let me know when it's ready for micro-optimisations, they're my speciality
 
@rdlowrey do I now have to give a very disappointed answer? :-P
 
user895378
@Leigh Yeah I'm trying to push your merged alert tweaks but github hates me. Thanks again for that.
 
user895378
11:07 PM
@bwoebi No -- just letting you know that I am working on it again after a 6-7 week hiatus.
 
@rdlowrey yes, yes, no problem, just joking a bit :-)
 
has the code rotted or become confusing ?
 
user895378
@tereško No. My problem is that I stopped with a bunch of major changes uncommitted and incomplete. So now I have to figure out what was going on in order to finish them.
 
user895378
Word of advice: Don't ever take a break from a project with uncommitted changes.
 
in a way that's even worse
 
user895378
11:09 PM
Always get to a good stopping place.
 
No cliffhangers
 
I suspect that having milestones can be useful for that ... though I have no real experience with 'em
 
I actually gave task driven development a go a few months back, nothing gets done unless there is an issue for it in the issue tracker. It kind of worked, after I got away from spending half my time making issues and assigning them to milestones
 
heh
it sounds like something that project manager might be hyped about ... briefly
 
"GUYS! We can just institute a new process to make up for our many foundational inadequacies!"
 
11:18 PM
something like that, yeah
 

« first day (1128 days earlier)      last day (3814 days later) »