Why is printing “B” dramatically slower than printing “#”?
stackoverflow.com
stackoverflow.com
To have it reopened, all the OP needs to do is give the community all the information they need to reproduce the issue. Should we ask any less?
It's also worth noting that the question was not closed by moderators (denoted by diamonds next to their name), but by members of the community with high reputation (> 3000). These users have community moderation powers by virtue of their reputation, but are not moderators per se.
If you have over 3000 reputation, you could vote to reopen.
Full disclosure: I am an elected moderator for Stack Overflow: http:stackoverflow.com/users/16587/george-stocker
B) Someone is gifting free interesting content to the site; even if it's imperfect does the reaction have to be so harsh? This is, personally, exactly why I never post on stack overflow. You're acting like you're doing them a favor by letting them post there, when they're doing you a favor by giving you interesting content in the first place.
A user can gift all the free interesting content they want. But if it's not scoped or on topic, then it's not scoped for the site or on topic and would be closed and/or deleted. Just because Rodney Dangerfield turns up to your bedroom and starts making jokes doesn't mean it's the time or place.
The reason it was marked as such was so that other people didn't waste time on an unreproducible problem until it was fixed to be reproducible.
At worst, it sits there and wastes many people's time, thus getting in the way of actually reproducible questions getting seen and answered.
Note, that this is not regarding this one question, but thousands - certainly there are a large number of items selected for moderator action.
This sort of community moderation exists in an attempt to proactively ensure a high signal to noise ratio (SNR), by discouraging noise. While it's an entirely valid stance to say they're overreacting and that the ratio is fine, that there's no slippery slope, etc., here's another viewpoint:
I don't read from the raw Stack Overflow firehose of posts. It doesn't even have a 1% SNR to me. Higher SNR sources (searches, specific links from my communities) will occasionally take me there, but as a primary source of information I don't even think of consulting it. I took a stab at participating in one of the far more niche subtopics - gamedev, relevant to me both professionally and unprofessionally - and still found it didn't have a high enough SNR to hold my interest beyond gathering a few hundred internet points. I found myself ignoring the majority of these sorts of questions, and quickly progressed to the natural conclusion of ignoring the site entirely.
And that's fine: Not everything is for everyone. But there are presumably those who still participate in the site directly who would prefer to remain doing so, yet find the SNR low enough to be pushing their own tolerances.
If I have a problem that I can't reproduce but is related to programming, and there's a chance that someone else has also had a similar problem and found the solution, SO does not offer a way for me to connect with that person.
On the other hand, if an unreproducible problem is posted and allowed, and multiple answers are given, there's a good chance one of those will point the OP in the right direction, and in turn, someone else that faces that same issue. There should be nothing wrong with this type of interaction. If someone feels it's a waste of their time, by all means, move on.
I know this has been argued ad nauseam, both here and on meta, and is likely something that will never change, but that's not the point of my post here. I just think it's worth defending the stance that the SO community is too quick to close programming related topics that may not be completely black and white.
By the way, programmers.stackexchange.com also suffers from this same fate, and I don't think this question would have received a much different response there, even though it's supposed to allow more open-ended questions.
What do you do with a quarter K? It was basically a very slow beamwidth analyzer for LEDs using a photodiode and a R/C servo. So the 3 dB down aka half power beamwidth of this integrated LED and diffusion lens system measures as X degrees. Kind of important if you're making LED based signs. I believe I was only using about 4 bytes of memory. No need for interrupts as it had a rather advanced hardware timer system that made excellent PWM for driving servos. The world is full of interesting problems that require lots of computation but very little stored state.
Yes, that's the "I'm pretty sure it's this without even attempting to replicate the result" possibility (and also probably the most likely).
"People say to me, 'Rodney, what's it like being a zombie?' and I say, 'It would be better if I didn't have to send half of every brain I find to my ex-wife!' No respect for the dead. No respect."
"People say you gotta hit zombies in the head. I definitely agree. All I know is that when I was alive, and someone kicked me, it didn't take me all night to find where my nuts landed. I get no respect."
Disagree. OP failed to exclude some possibilities by doing multiple randomized trials and so on (or at least stating whether he had done so), but he supplied the source code and a description of the behavior that was perfectly adequate to understand the issue. Nothing personal, but your post above is the epitome of deflecting a question instead of engaging with it.
I think adoption of a tool that just lets one share their dev environment would discourage this sort of due diligence, and encourage the useless "here's a dump of my code please fix it"-type questions.
While I know you were coming from a good place -- I'm all about automating a testable problem (i.e. TDD, write failing tests first), and I think in the right hands, this would be a nice tool -- I could only see SO using this to further enforce strict requirements in what they consider a "valid" question.
"You must set up a lab environment that fully replicates the issue in question."
Maybe they wouldn't let it go that far (I would hope), but I think it would head in that direction.
Most likely his problem is due to his terminal (my guess: cmd.exe/powershell in Windows) and not his program code at all.
FWIW here's my non-reproduction of his problem, on Linux amd64, Sun Java 1.6.0, running in urxvt:
real 0m3.568s
user 0m0.616s
sys 0m1.152s
real 0m3.393s
user 0m0.648s
sys 0m1.060s
In other words, I could not reproduce the issue with the information he provided.Well in real life, those are the tough ones and where help is more appreciated.
The only bugs that I remember are the ones that were random or that nobody else could reproduce and yet were there.
Why close other's question because of your own incompetence? Why the fuck prevent a question from been answered because only five retards can't get it?
Isn't the solemn purpose of the site is to wait until someone who is capable of reproducing it and solve it?
It's a pet peeve of mine. At least 10% of the time I google for a answer to a programming question it takes me to a StackOverflow question... which has been marked off-topic.
Give your interlocutors the benefit of the doubt, it makes for a much more productive conversation.
If a future person were to run into that problem I think that is the most appropriate location for the answer to reside.
It was mostly Assembly, Turbo C, Microsoft C or DJGPP in the later games
Making the sound card work -> sucked (especially with interrupts >= 10)
Multithreading -> Non existent / roll your own
Graphics -> VGA or Vesa. Vesa was nice except for one small detail (next point)
Real mode -> Awful! The bane of developers! Going from "16-bit" to 32-bit protected mode is like going from the worse stick-shift car to an automatic modern car.
The reason this also influences VESA is that VGA fits into a segment 320*200 = 64k anything bigger doesn't.
Also nobody magically switches my parentheses around out from under me.
And, yes, autocorrect can be a PITA, especially when it's not actually getting things correct, but that's a different, albeit related, issue. We should really refer to quote marks, or apostrophe (which are often rendered as curly, and are the characters that autocorrect switches to), and the prime symbol (which is the unadulterated character that you get with the non-meta-pressed key on your keyboard), rather than using the term 'smart quotes'.
~~~~ wavy lines starting flashback ~~~~
ASCII 1967, in conjunction with its European counterpart ECMA-6, permitted the visual appearance of some characters, including the apostrophe, to be modified so that they could be used as accents when overstruck¹:
' " , ^ ` ~
ˊ ¨ ¸ ˆ ˋ ˉ (using the modern Unicode spacing modifiers)
Later versions of ECMA-6 suggested that the accent interpretation be used only when the character was actually overstruck: In the 7-bit character set, some printing symbol may be
designed to permit their use for the composition of ac-
cented letters when necessary for general interchange of
information. A sequence of three characters, comprising
a letter, BACKSPACE and one of these symbols, is needed
for this composition; the symbol is then regarded as a dia-
critical sign. It should be noted that these symbols take
on their diacritical significance only when they precede or
follow the character BACKSPACE; for example, the symbol
corresponding to the code combination 2/7 normally has the
significance of APOSTROPHE, but becomes the diacritical
sign ACUTE ACCENT when preceded or followed by the character
BACKSPACE.²
Although this was fine for the printing teletypes in use when ASCII was first designed, early video terminals were too dumb to handle overstrikes, so it never caught on.¹Revised American Standard Code for Information Interchange, from http://www.wps.com/J/codes/Revised-ASCII/index.html
²ECMA-6: 7-Bit coded Character Set, 4th Edition, August 1973, from http://www.ecma-international.org/publications/files/ECMA-ST...
~~~~ wavy lines ending flashback ~~~~
2307 ⌇ WAVY LINE http://www.unicode.org/charts/PDF/U2300.pdf
What you most likely intended to present as an alternative is the... 301C 〜 WAVE DASH http://www.unicode.org/charts/PDF/U3000.pdf
unicode smiley ➩ ☺Smart quote are a bit of a pain, but they do look nice. Really I prefer em dash, en dash, ellipses; I regret that OS doesn't have a keyboard entry for bullet. (Then, Linux doesn't either, other than entering in the code point directly with Ctrl+Shift+U or whatever it is.)
You can also edit your keyboard layout to make certain characters possible or easier to type, using Ukelele (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=...) for OS X.
I created a custom layout using Ukelele that makes typing smart quotes easier. With it, opening ‘ and closing ’ single smart quotes are <option>+[ and <option>+] instead of <option>+{ and <option>+<shift>+{, and double smart quotes “ ” are similarly more intuitive to type. I use it all the time. You can try it out yourself by downloading it from http://a.pomf.se/bipwcr.zip and moving the two files into “~/Library/Keyboard Layouts/”.
"9001 Wrong Things Programmers Assume About Internationalization"
This behavior should at a minimum be locale-aware. I would be surprised if Firefox did that by default in my pt-BR profile.
Is that loose of a search not actually desirable in "find in page" instances?
In other words, are there many words where 'e' matching 'é' would actually generate a false positive? This is the only case I could see that would be problematic.
And even then "find in page" is usually used as quick navigation to the minimum matching search (high recall) and not about excluding all possible mismatches (high precision).
It's even worse than that. 'e' is the most used letter in french, but 'é' and 'è' are quite used too. 'ê' and 'ë' being rarer, but still existing.
So, I am exaggerating it a bit, but you can compare it to having to search for words with the consonants, because every vowel is considered the same by your search algorithm.
Yes, I'm pushing it, but you see the problem it can easily become in huge pages.
Most pages nowadays are small enough that it won't be a bother, but their still are some cases (newspaper posts, blog analysis, etc...) where accent sensitiveness will be an issue.
Isn't it common knowledge though? Cat some 1GB file to your terminal and notice it takes more than the <100ms it takes to cat it to /dev/null.
Everyone with >5 years of printf() debugging experience.
Nowadays I don't know if the difference is noticeable enough to be common knowledge though.
Here's another way to increase your CPU load with apparently doing nothing:
$ cat /dev/zero
"See, this is exactly what's wrong with SO."
"Really? Because it seems like a perfect example of why SO works perfectly."
Of course, I find I am increasingly disposed to read the comments that way...
If it wasn't a line length issue, it probably would have been
1) Proportional kern'd antialiased fonts some glyphs hardware accelerated some not.
2) Maybe for speed it only caches certain font glyphs but its an anti-accelerant strategy this time. After all, what normal person generates outputs like this?
3) UTF-8 to ASCII and or localization code gone wild or similar misoptimization.
4) You'd like to think a simple string printer and the fancy formatted string printer (aka printf and friends) are separate optimized routines but the simple printer might actually be a degenerate form of the formatted printer and the formatted printer has a severe hangup about certain characters. Maybe # is processed quickly but b gets processed extremely slowly because its regex'ing in a very inefficient way to find the \ as in \b.
5) remember LTRS/FIGS from baudot 5 bit teletype coding? Someone trying something "funny" with 3-d accelerated text rendering treating certain letters as 3-d sprites and some not and its getting all messed up and unoptimized this time. Someones LRU cache of 3-d glyph/sprites isn't as LRU as you'd like to think, perhaps.
By acting quickly before 5 other power user close the question, of course.
Well, I shouldn't be surprised... There are people who try to code with a proportional font too, so I guess anything is possible, though it may not make sense to me.
Terminal is a very large word these days. In the SO post, he was using the output console of NetBeans.
2) Outputting to STDOUT can have some serious overhead depending on where you're actually rendering the text-- textview inside your IDE? Crazy, off-the-wall terminals? Let's dump this to a file and see how long it takes