News for hackers. Stuff that matters.
Re:Stack Overflow Outage Postmortem by Someone1234 on Wednesday July 20, 2016 @04:22PM (#12132182)
Well in this case a post contained 20K whitespaces, so I wouldn't jump to the conclusion that it was a mistake rather than intentional.
Re:Stack Overflow Outage Postmortem by zymhan on Wednesday July 20, 2016 @04:27PM (#12132230)
Yeah, I'm trying to figure out how you even get 20,000 spaces into a Stack Exchange post, and how it would render in your browser.
Re:Stack Overflow Outage Postmortem by randominion on Wednesday July 20, 2016 @11:55PM (#12134520)
I can tell you how.

A shitty Belkin KVM in certain configurations can allow this to happen.

There's a bug which keeps generating chr(32) characters when you activate the keyboard shortcut (scroll lock twice), and try to switch to another machine.

It will keep pumping out those spaces on whatever fields was selected at the time, so if you take your time before you switch back, you are going to be in for a lot of fun.

Haven't read the link yet, but wanted to share this sooner than later.

Re:Stack Overflow Outage Postmortem by datenwolf on Thursday July 21, 2016 @04:48AM (#12135580)
On a related note: Is there any easy way to tell Vim when in insert mode not to accept extra spaces at the end of a line, except a single one?

I've got of course checks in place that warn about trailing spaces and my Git hooks outright refuse a commit with trailing spaces. But it would be nice to catch that at the insert level.

You know, it may be cat who's typing.

Re:Stack Overflow Outage Postmortem by duijf on Thursday July 21, 2016 @05:26AM (#12135721)
Not exactly at insert mode, but this may be helpful:

    autocmd BufWritePre * :%s/\s\+$//e
Before you save a file, it removes all trailing whitespace (ironically using the same regex as in the article -- hasn't given me trouble yet though)
Re:Stack Overflow Outage Postmortem by vitd on Thursday July 21, 2016 @12:43PM (#12138082)
Nice find! Another one I heard about was that Microsoft's Windows keyboards, when used on a Mac, will sometimes insert a Control-P into the middle of your typing if you press the Windows key. Most apps just ignore it, but apparently not all!
Re:Stack Overflow Outage Postmortem by krabpaaltje on Wednesday July 20, 2016 @05:44PM (#12132772)
Bottle of tequila on the spacebar
Re:Stack Overflow Outage Postmortem by kingisaac on Wednesday July 20, 2016 @06:04PM (#12132885)
A bottle of Tres Commas?
Re:Stack Overflow Outage Postmortem by jldugger on Wednesday July 20, 2016 @07:00PM (#12133177)
Eh, just type a single space.

Then copy the entire post and paste it a couple dozen times.

Re:Stack Overflow Outage Postmortem by htfy96 on Wednesday July 20, 2016 @11:05PM (#12134334)
Only 35 keystrokes are required to get 20K+ spaces.[1]

[1] https://stackoverflow.com/questions/4606984/maximum-number-o...

Re:Stack Overflow Outage Postmortem by gregd on Wednesday July 20, 2016 @07:20PM (#12133318)
I'm thinking perhaps you didn't get the Silicon Valley reference?
Re:Stack Overflow Outage Postmortem by jldugger on Wednesday July 20, 2016 @11:02PM (#12134323)
Never got around to pirating it. My bad.
Re:Stack Overflow Outage Postmortem by scoot on Wednesday July 20, 2016 @08:18PM (#12133618)
Welcome to Reddit News.
Re:Stack Overflow Outage Postmortem by jrockway on Wednesday July 20, 2016 @08:25PM (#12133652)
I don't read anything programming-related on Reddit anymore, but are they also now too cool to watch TV?
Re:Stack Overflow Outage Postmortem by OJFord on Wednesday July 20, 2016 @06:25PM (#12133006)
It was in a multiline code block, so it just had a tonne of horizontal scroll.

See the edit: http://stackoverflow.com/revisions/38484433/2

Re:Stack Overflow Outage Postmortem by hinkley on Wednesday July 20, 2016 @09:07PM (#12133816)
If he had used tabs instead of spaces this wouldn't have been a problem.
Re:Stack Overflow Outage Postmortem by scrollaway on Wednesday July 20, 2016 @11:40PM (#12134471)
Or at the very least, trim whitespace on save :)
Re:Stack Overflow Outage Postmortem by skeletonjelly on Wednesday July 20, 2016 @07:41PM (#12133443)
Still hasn't killed as many characters as GRRM
Re:Stack Overflow Outage Postmortem by skeletonjelly on Wednesday July 20, 2016 @07:40PM (#12133436)
Good find! Where did you see this? Or was it in the comments via Nick Craver?
Re:Stack Overflow Outage Postmortem by OJFord on Thursday July 21, 2016 @02:57AM (#12135222)
The article said:

    > The malformed post contained roughly 20,000 consecutive
    > characters of whitespace on a comment line that started
    > with -- play happy sound for player to enjoy. For us,
    > the sound was not happy.
So I just searched:

    https://www.google.co.uk/search?q="play+happy+sound+for+player+to+enjoy"+site%3Astackoverflow.com
Re:Stack Overflow Outage Postmortem by GnarlyWhale on Thursday July 21, 2016 @12:40PM (#12138056)
"deleted 20507 characters in body"

Hahaha

Re:Stack Overflow Outage Postmortem by xirdstl on Wednesday July 20, 2016 @05:59PM (#12132846)
Cat laying its head on the spacebar.

Mine does that on the Control key all the time.

Re:Stack Overflow Outage Postmortem by nxzero on Wednesday July 20, 2016 @06:35PM (#12133063)
Re:Stack Overflow Outage Postmortem by jandrese on Wednesday July 20, 2016 @04:33PM (#12132277)
Browsers typically collapse whitespace, so it probably would render as a single space.
Re:Stack Overflow Outage Postmortem by dingaling on Wednesday July 20, 2016 @05:25PM (#12132647)
I frequently complete eBay feedback 'comments' fields[0] with a variety of Unicode spaces and Firefox at least doesn't seem to collapse them.

[0] eBay insists on something being entered and when it was a routine transaction with a vendor I seldom have anything useful to say.

Re:Stack Overflow Outage Postmortem by olympus on Wednesday July 20, 2016 @05:48PM (#12132798)
Not sure if you're a frequent eBayer, but the common behavior in that community is just "A+++++++++" with some arbitrary number of "+" indicating that everything went fine.
Re:Stack Overflow Outage Postmortem by MyNameIsFred on Wednesday July 20, 2016 @08:25PM (#12133649)
He's no doubt observed that and is using whitespace to rail against the ridiculousness of that convention.
Re:Stack Overflow Outage Postmortem by KyleBrandt on Wednesday July 20, 2016 @04:45PM (#12132364)
was in code tags, so had a very long horizontal scroll bar :P
Re:Stack Overflow Outage Postmortem by _ao789 on Thursday July 21, 2016 @03:52AM (#12135401)
Not in a pre....
Re:Stack Overflow Outage Postmortem by danek on Wednesday July 20, 2016 @10:58PM (#12134308)
I wouldn't jump to any conclusion ;)

But I do know that tools often make it easy for people do incredibly stupid things by accident. Like the 'sudo remove file' command followed by '-rf' in the wrong place. I rimraf a lot; it's very useful. It's a miracle I haven't wiped out any computers doing so...

Re:Stack Overflow Outage Postmortem by surething on Wednesday July 20, 2016 @04:53PM (#12132426)
I think it'd be possible to inject this kind of thing into your code if you're just starting out with vim, aren't cognisant of all commands you invoke, and then copy/paste all code straight into a browser.
Re:Stack Overflow Outage Postmortem by hafreni on Wednesday July 20, 2016 @05:20PM (#12132608)
Yeah, I agree, when starting out with VIM, my spacing and tab usage was inconsistent at best.