Transcriptions can be useful for a wide range of people!
Blind or visually impaired people who rely on screen readers to browse the internet - that technology can't read the text in an image, so we transcribe it to machine-encoded text so it can read it.
People with bad internet connections who can't load the image for that reason
People who use third-party clients, mobile apps and/or text-based browsers that have trouble loading the image at high quality or at all
People who have trouble reading small, blurry, or oddly formatted text
There are many more reasons, these are just the main ones that come to mind right now. =)
Unfortunately not. We actually have a bot that draws on ocr.space's API, which is one of the best in the world. It's not bad at simple text posts like screenshots of Tumblr, Twitter, etc., but even then it still needs to be checked by a human because it can still make mistakes, still needs to be formatted properly, and sometimes transcribes things we don't normally include (timestamps, no. of likes, etc.) due to its lack of context.
For code, it's sadly even worse. Its attempt at this post is here, and is fairly typical of what it does with code. It tends to get worse and worse, also, as the images get larger.
Yes. There's a blind community over at r/blind, who are one of our partners.
As for the third-party clients and mobile apps; a large portion of Reddit's traffic is on mobile, where third-party apps are quite common.
For people who have trouble reading blurry/oddly formatted text, that could be due to dyslexia, eyesight problems, just a small screen - people with those, like people with slow internet connections, are all over the internet, including on Reddit.
I'm also a transcriber (though I only ever did 5 posts and that was some months ago) and I can say for sure that I did it because I had nothing to do. Can't say that for most of the transcribers, though.
We also have a bot that tries to do it for us. It draws on ocr.space's API, which is one of the best in the world, but unfortunately... This is its attempt at this post.
private void ziv8_CheckedChanged(object sender, EventArgs e)
{
CheckBox ch = (CheckBox)sender;
int index = int.Parse(ch.Text);
// ensure index is within bounds
if (index < 1 || index > 8) return;
vznika[index] = ch.Checked;
}
That's what it's doing effectively. It's an inverted if statement to reduce nesting. Instead of
void foo(int i) {
if (1 <= i && i <= 8) {
// ...
}
}
you can instead return when the if isn't satisfied
!(1 <= i && i <= 8) -> !(1 <= i) || !(i <= 8) -> 1 > i || i > 8 -> i < 1 || i > 8
void foo(int i) {
if (i < 1 || i > 8) return;
// ...
}
When dealing with longer functions with a condition checked early this can greatly decrease nesting, though it is a matter of style as some don't like multiple returns.
Yeah I get that it makes the code shorter but it’s not more efficient and makes it a little less clear. Nothing wrong with but I find it more helpful to err on the side of readability than reducing nesting
Can’t we set a value equal to the max boundary and iterate through a list of values? Stopping before we hit the max? In college, if we have more than 2-3 if’s in a block , something is wrong with our logic .
8
u/SanianCreations Aug 08 '21
Ah, prime example of r/YandereTechnique
61
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Aug 08 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
144
u/JeanJPNM Aug 08 '21
Optimised solition here:
31
u/Sawkii Aug 08 '21
I love excellent if-statement demonstrations. This one is delicious. Did the person get payed for written lines?
1
u/NynaevetialMeara Aug 08 '21
I think the compiler will catch this.
Still hurts thou
1
u/_default_username Aug 08 '21
Why don't you declare sender as type CheckBox instead of casting an object to type CheckBox?
1
u/mikemorten1979 Aug 08 '21
Can’t we set a value equal to the max boundary and iterate through a list of values? Stopping before we hit the max? In college, if we have more than 2-3 if’s in a block , something is wrong with our logic .
Or what about a case statement ?
1
u/sixtyfifth_snow Aug 09 '21
Definitely gross
1
u/rjlin_thk usinged Aug 09 '21
at least the pattern looks great
1
u/stahkh Aug 09 '21
New line only if you're forced to.
1
u/TheTrueStanly Aug 09 '21
r/badcode is a place to dump your shitty code so other will fix it. 100 times more effektive than stackoverflow
1
u/Lataero Aug 09 '21 edited Aug 09 '21
1
u/BrilliantReads1 Aug 09 '21
I proceed to faint
1
u/[deleted] Aug 14 '21
Noooo! Make it stop! My eyes are burning! Seriously though, it can be condensed into a single line:
vznika[(int) ch.Text] = ch.Checked;.0
u/Cybear_Tron Aug 09 '21
Switch?
0
u/Voxelgon_Gigabyte Aug 09 '21
when for loops are a bit too confusing
-28
u/FlamboyantApproval16 Aug 08 '21
When you don't know what loops are. LOL
0
u/[deleted] Aug 08 '21
[deleted] — view deleted comment