Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Volte
Oct 4, 2004

woosh woosh
I'm all for a nice belittling tirade. It's the actual writing that makes me want to punch that guy in the dick.

Adbot
ADBOT LOVES YOU

b0lt
Apr 29, 2005
lol zeromq

b0lt fucked around with this message at 04:22 on Jun 1, 2013

shrughes
Oct 11, 2008

(call/cc call/cc)
What is wrong with you people, attacking the tone of his bug report? Go post on HN or something.

nielsm
Jun 1, 2009




Yeah, hopefully you won't need long property values while debugging.

FateFree
Nov 14, 2003

Volmarias posted:

:golfclap:

Your tree was planted in the very soul of the 1 minute I spent downloading and running this artistic masterpiece.

I'd like to thank the academy. I actually had a whole series planned out but I quit my job instead haha.

MrMoo
Sep 14, 2000

nielsm posted:

Yeah, hopefully you won't need long property values while debugging.

zmq_assert is a bespoke implementation that doesn't disappear in release mode.

2GB limit though, no idea. According to the spec it is supposed to be 2^63-1 not 2^31-1.

MrMoo fucked around with this message at 22:17 on May 31, 2013

b0lt
Apr 29, 2005

MrMoo posted:

zmq_assert is a bespoke implementation that doesn't disappear in release mode.

2GB limit though, no idea. According to the spec it is supposed to be 2^63-1 not 2^31-1.

2^31-1 == 28 :ssh:

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
edit: nevermind that's the xor operator

MrMoo
Sep 14, 2000

aaah, it doesn't stop.

https://github.com/zeromq/libzmq/pull/568

MrMoo fucked around with this message at 23:53 on May 31, 2013

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/ConnectionStatus.java#L212-215

zergstain
Dec 15, 2005

FateFree posted:

I was cleaning out a development folder and I found a file called MP.java. I had no recollection until I opened it and it all came rushing back to me. I suppose this falls under the category of code that makes you laugh.

When I was a younger buck working at Morgan Stanley, I thought I would die from the boredom of writing loan reporting applications. My boss sat directly behind me so I couldn't slack off and read the internet. To pass the time I would try to code things that would keep me entertained. So I created this little work of art.

If you have a Java IDE, run it as a java application and watch the console - but the console needs to be sized correctly. Shrink it down until you can only see one square frame. Enjoy.

http://imadp.com/static/MP.java

Okay. That was cool.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

is that a loving joke

SwimNurd
Oct 28, 2007

mememememe

hieronymus posted:

is that a loving joke

MongoDB is the joke.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

hieronymus posted:

is that a loving joke

It was something about not spamming the logs everytime that exception was thrown, so they only do it sometimes :hurr:

hobbesmaster
Jan 28, 2008

shrughes posted:

What is wrong with you people, attacking the tone of his bug report? Go post on HN or something.

on behalf of every developer ever: All we want are the facts, ma'am.

Slanderer
May 6, 2007

hieronymus posted:

is that a loving joke

"heh, look at this hack i just implemented, guys. it's so tight"

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Slanderer posted:

"heh, look at this hack i just implemented, guys. it's so tight"

i don't want to imagine the kind of mind that even could think of doing it this way the idea is so bad.

Zombywuf
Mar 29, 2008

shrughes posted:

What is wrong with you people, attacking the tone of his bug report? Go post on HN or something.

I blame tumblr.

Look Around You
Jan 19, 2009


Ahahahaha holy gently caress there is no way this actually is in production.

(and yet it is :sigh:)

Toekutr
Dec 9, 2008

hieronymus posted:

i don't want to imagine the kind of mind that even could think of doing it this way the idea is so bad.

Come on. Don't pretend you haven't done something like that before when you're coding at 4am and you just need to get it out the door dammit.


:smithicide:

Toekutr fucked around with this message at 07:03 on Jun 2, 2013

Opinion Haver
Apr 9, 2007

Zombywuf posted:

I blame tumblr.

I mean, I guess the tone of your bug report doesn't matter if you don't care about it actually being fixed and just want sweet sweet internet points. Where did this weird trend of blaming Tumblr for everything bad come from?

b0lt
Apr 29, 2005

Hughlander posted:

Probably so that you don't spam the log files thousands of times a second with the same error, now it'll only spam HUNDREDS of times a second!

The best part about this is that it spams 90% of the time instead of 10% of the time as originally intended, because someone refactored the code without stopping and going "wtf is going on here".

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

yaoi prophet posted:

I mean, I guess the tone of your bug report doesn't matter if you don't care about it actually being fixed and just want sweet sweet internet points. Where did this weird trend of blaming Tumblr for everything bad come from?

Overly-sensitive social justice warriors who constantly try to one-up each other about how totally inclusive and equality-minded they are while simultaneously attacking everyone else they think beneath them, or the ones who see signs of *insert issue here* even in everyday mundane actions. For some reason this stuff has really manifested itself in certain corners of Tumblr.

You non-PoC cis-privileged scumbag.

Vanadium
Jan 8, 2005

Ender.uNF posted:

Overly-sensitive social justice warriors who constantly try to one-up each other about how totally inclusive and equality-minded they are while simultaneously attacking everyone else they think beneath them, or the ones who see signs of *insert issue here* even in everyday mundane actions. For some reason this stuff has really manifested itself in certain corners of Tumblr.

You non-PoC cis-privileged scumbag.

Someone explain this post to me.

Doctor w-rw-rw-
Jun 24, 2008

Vanadium posted:

Someone explain this post to me.

non-PoC => non-Person-of-Color => average white person who has what is termed "white privilege"
cis-privileged => cis is the opposite of trans (in the sense of transsexual), so it refers to someone with what is considered average or normal gender/sexuality/orientation
privilege => having the benefit of being more accepted or better placed in society, i.e. "normal" white heterosexual male vs. flamboyant black-asian transsexual person. Much of society cuts the former a lot more slack in lots of things

tumblr apparently have people who don't just take the above seriously, but plunge into a sort of insanity in pointing out how privileged people are in some way. (note that this doesn't reflect my opinion as I choose not to have one about tumblr)

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
http://www.somethingawful.com/d/news/tumblr-privilege-check.php

Vanadium
Jan 8, 2005

Oh so it's some sort of reverse-racism thing?

Opinion Haver
Apr 9, 2007

Are we seriously going to have an 'is privilege real' discussion in the thread where we make fun of people who are awful programmers? People have been absurdly sensitive on the Internet since it loving began and picking out one particular website and saying 'yes, this, this is the cause' is short-sighted.

Tumblr as a site is pretty badly-coded though! Like when one of their engineers was editing the production version of the dashboard page and inserted an i before the <? php, with predictable results.

evensevenone
May 12, 2001
Glass is a solid.
That seems more like a failure in their deployment process than anything else.

Then again I have never fathomed why any production web service would display internal errors to the user.

evensevenone fucked around with this message at 22:30 on Jun 2, 2013

Tamba
Apr 5, 2010

^^^^e: exactly

yaoi prophet posted:

Tumblr as a site is pretty badly-coded though! Like when one of their engineers was editing the production version of the dashboard page and inserted an i before the <? php, with predictable results.

that site posted:

The only solution I see to this is pre-commit syntax checking for committed PHP files.

Um...no, the only solution is not changing stuff directly on the production system without testing it first?

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
oh PHP :allears:

http://blog.kevburnsjr.com/how-to-prevent-a-leak-like-tumblrs posted:

[UDPATE] Turns out PHP returns 200 when it encounters a fatal error. Inconceivable.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Tamba posted:

Um...no, the only solution is not changing stuff directly on the production system without testing it first?

None of the suggestions in that article are reliable ways to detect that error. Syntax checkers would miss it. Without a valid processing instruction, they would just assume that the code is supposed to be plain text. In a typical PHP application (including Tumblr's, apparently), the raw code would have been streamed to the browser before an error even occurred. Integration testing might have been the only way to catch it.

Lysidas posted:

oh PHP :allears:

http://blog.kevburnsjr.com/how-to-prevent-a-leak-like-tumblrs posted:

[UDPATE] Turns out PHP returns 200 when it encounters a fatal error. Inconceivable.

The solution he suggests to this problem wouldn't work, either. He registers a shutdown function to change the response code to 500, but by the time it would run, it's too late: the headers have already been sent. You could make it work with output buffering, but Tumblr doesn't seem to be using it.

DaTroof fucked around with this message at 22:57 on Jun 2, 2013

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

If what you're trying to solve is specifically leaking the password, wouldn't including that from an external PHP-only config file that you can never accidentally publicly leak be the way forward?

nielsm
Jun 1, 2009



DaTroof posted:

None of the suggestions in that article are reliable ways to detect that error. Syntax checkers would miss it. Without a valid processing instruction, they would just assume that the code is supposed to be plain text. In a typical PHP application (including Tumblr's, apparently), the raw code would have been streamed to the browser before an error even occurred. Integration testing might have been the only way to catch it.

You could make a requirement that all PHP source files must begin with <?php, that would catch that single type of error. Any serious application (haha php serious haha... right working on such a thing myself) wouldn't have a PHP file that starts out by outputting text anyway.

Jonnty posted:

If what you're trying to solve is specifically leaking the password, wouldn't including that from an external PHP-only config file that you can never accidentally publicly leak be the way forward?

Not really, due to the way PHP includes work.
But you could put the database credentials etc. in a real config file which isn't supposed to be read by a Turing-complete interpreter.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

nielsm posted:

You could make a requirement that all PHP source files must begin with <?php, that would catch that single type of error. Any serious application (haha php serious haha... right working on such a thing myself) wouldn't have a PHP file that starts out by outputting text anyway.

I agree totally, but I also wouldn't be surprised if a shitload of scripts with inline HTML make that assertion scream bloody murder.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Jonnty posted:

If what you're trying to solve is specifically leaking the password, wouldn't including that from an external PHP-only config file that you can never accidentally publicly leak be the way forward?

The normal way would be to include it from a file that a) is outside of webroot, b) has the .php extension. That way, two things have to go wrong for the password to become visible to users: not only does what happened in the Tumblr case have to happen (to the file containing the password), but also the server has to be misconfigured so that things outside of what-is-supposed-to-be-webroot are getting served.

As an aside, Firefox's spelling dictionary has "misconfiguration" but not "misconfigured". :huh:

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Jonnty posted:

If what you're trying to solve is specifically leaking the password, wouldn't including that from an external PHP-only config file that you can never accidentally publicly leak be the way forward?

That's exactly what they did. You can see where they test where /config.php is. But because PHP includes also output raw text content, the /config.php file gave output instead.

Dren
Jan 5, 2001

Pillbug
What about having staging and like, one behavioral test with selenium webdriver?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Dren posted:

What about having staging and like, one behavioral test with selenium webdriver?

This. Why the crap would you ever deploy directly to prod, let alone edit prod directly?

Adbot
ADBOT LOVES YOU

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
Lets be serious, the answer is because it's quicker every time, unless you gently caress it up.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply