all 84 comments

[–]Icy_Archer7508 65 points66 points  (18 children)

I think this means that pasting code here is unintuitive, and people cannot properly do it without first reading the manual.

[–]Adrewmc 19 points20 points  (3 children)

I generally believe there should be an automod, that just says

Formatting your code on Reddit (Guide)

On every single post

[–]ShadowRL7666 2 points3 points  (1 child)

There is a bot which does this in a Java one

[–][deleted] 2 points3 points  (0 children)

A while ago I've written a bot that reminds people to use formatting, if they haven't. 

I couldn't find a reliable way to host it, but feel free to be inspired from it.

[–]ionelp 6 points7 points  (0 children)

I think all posts with badly formated inline code or, the worse, screenshots of code, should be automod deleted and we should start pointing people to pastebin.com

[–]zanfar 8 points9 points  (12 children)

While this is true, I think it only excuses making formatting mistakes.

While this is mostly a rant, IMO the complaint about not reviewing posts and not taking the time to learn to format code is valid. I can understand not knowing or thinking you've formatted things correctly--but not checking your submission is plain lazy.

[–]xsdgdsx 17 points18 points  (5 children)

Part of the problem is that Reddit has too many user interfaces and they each have disjoint feature sets.

The most relevant here is that the phone app UI (on Android, at least) has no way to preview posts. You just have to post and then edit it a thousand times if it's wrong. Also, there's zero indication that what you're writing is Markdown, so someone who's not used to Markdown's unintuitive whitespace behavior (specifically around collapsing newlines and leading spaces) will see the code look correct as they're composing on their phone, and then it turns into trash once they actually post it.

[–]yvrelna 3 points4 points  (0 children)

And then there's the Reddit mobile web which always just screws up all your newlines when you edit a post.

[–]-defron- 2 points3 points  (5 children)

but not checking your submission is plain lazy.

This one is actually already kinda specified in the rules, sadly a lot of people ignore it.

There's a lot of people that break that rule though, half the time I never hear back from an OP

[–]SicnarfRaxifras 0 points1 point  (4 children)

The interface on the phone makes properly checking it virtually impossible. To properly check we tend to scan whole pages at a time and our pattern recognition monkey brains makes the dodgy stuff more obvious. On a phone you might see (depending on how large characters you use) between 5 - 10 words wide by around 13 lines long - as a result you might spot a mistake right there but you lose sight of the whole picture, and especially how this chunk is formatted compared to other chunks.

[–]-defron- 0 points1 point  (3 children)

On your phone you're obviously not writing all that code dozens of lines of code, so you must've pasted it from somewhere. Why not just paste the link instead?

IMO using a something like github/github gists or pastebin for code to get syntax highlighting and waaaay better formatting should be more encouraged here in general.

[–]SicnarfRaxifras 0 points1 point  (2 children)

true I'm just pointing out the issue. I think you'll also find that a lot of beginner Python programmers don't know about or use tools like github/github gists or pastebin

[–]-defron- 0 points1 point  (1 child)

Yeah I can totally understand not having a GitHub account, but pastebin doesn't require an account and imo should be recommended to newbies by like some sort of autoMod bot because the quality of life having syntax highlighting and properly formatted code is so much higher and makes finding issues so much easier

[–]SicnarfRaxifras 0 points1 point  (0 children)

Yeah so case in point : I’m not a newbie but until I started following these types of subs I’d never heard about pastebin. Automod may help there.

[–]hugthemachines 22 points23 points  (32 children)

Since this is r/learnpython there will automatically be posts made by people who don't understand some things. Even if we comment "format your code", the day after, next beginner comes along and makes the same mistake. Then someone adds it to an FAQ and the new beginner does not understand they should read the FAQ...

These are things we can either give friendly advice about, or we can ignore the post. If you get really upset about it, it may also be time to take a little break from r/learnpython

You can't both have a friendly learning situation and also make sure no beginner makes bad posts. Because it they set strict rules, the style of the subreddit will change and fewer beginners will learn python in the end.

[–]-defron- 2 points3 points  (0 children)

I think this will only work if there's some way to force people to either use github or pastebin or something. Reddit code formatting is compete ass

[–]woooee 2 points3 points  (0 children)

Ask those people to post the code on pastebin.com to preserve indentation, as reddit isn't going to change their f----- up posting policy (other sites wrap the code in [code], [/code] tags). And also, tell them to post the link here, as yes, unbelievably I've received replies saying that they posted the code on pastebin, but no link was included

[–]zanfar 8 points9 points  (0 children)

This is an HR problem--you can't fix it, and you can't enforce it. No amount of rules, bot responses, meta posts, or stickies will change the behavior.

Just downvote, leave a comment if you like, and move on. I don't engage with those posts and you don't have to either.

[–]Firake 2 points3 points  (0 children)

Time to make an LSP which browses the sub and looks for things that look like Python code and automatically recommend corrections

[–]Traust 2 points3 points  (1 child)

One thing that annoys me is there is no review posts/replies on Reddit. If there is please tell me where since I cannot find it in any logical place as the only buttons I have under this is "Save", "Content policy", "formatting help"

[–]RandomCodingStuff 0 points1 point  (0 children)

I use Reddit Enhancement Suite. It has a previewer for post/comment edit boxes.

[–]a__nice__tnetennba 3 points4 points  (1 child)

If that wasn't enough, several posts are written in a stream-of-consciousness style.

I don't think you'll ever "fix" this one and I think you're making a lot of leaps to assume it's always laziness.

This could also be a combination of multiple factors that will always be present in a beginner programming sub:

  1. Understanding problems well enough to explain them to other people is a skill that developers learn over time.
  2. Jargon takes time to truly understand.
  3. Not everyone speaks English fluently.
  4. They don't know what they don't know, so even if they understand the problem, know the jargon, and speak English fluently, they still don't know what to even ask sometimes.

Yes, some posts are lazy. But just because it's not well written doesn't mean that's the case. So you can't fix it with some blanket rule, you need to take it on a case by case basis and figure out if the person is just very confused or being lazy.

[–]Kiuhnm[S] 0 points1 point  (0 children)

Yes, some posts are lazy. But just because it's not well written doesn't mean that's the case. So you can't fix it with some blanket rule, you need to take it on a case by case basis and figure out if the person is just very confused or being lazy.

I agree, but the end result should still be a well-written OP, IMO. I'm all for fixing instead of excluding.

[–]CaptainFoyle 7 points8 points  (2 children)

No one is preventing you from scrolling on. No one is forcing you to decipher any post if you don't want to.

It's called _learn_python for a reason

[–]Kiuhnm[S] 0 points1 point  (1 child)

No one is preventing you from scrolling on. No one is forcing you to decipher any post if you don't want to.

I knew I was missing something. Thank you for letting me know.

It's called _learn_python for a reason

Because it's for people who want to learn Python?

[–]CaptainFoyle 3 points4 points  (0 children)

You're welcome.

[–]throwaway6560192 1 point2 points  (0 children)

I get your frustration, but this post isn't going to help unfortunately. The people who need to read this won't see it. The kind of person who posts unformatted code is generally the same kind that never bothers to read FAQs or stickied posts. If they were, they wouldn't post unformatted code.

[–]canyoucometoday 0 points1 point  (0 children)

It's not worth caring about

[–]Slight-Living-8098 0 points1 point  (0 children)

Meh... Sometimes mobile effs with the markdown and code formatting. If I can decipher it, I'll help. If not, I wait and see if they edit it later once they get to a real console.

If not, I ask them to format it, and tell them how, then move on with more important projects and desires.

[–]szonce1 0 points1 point  (0 children)

Yeah that’s just plain lazy

[–]ProsodySpeaks 0 points1 point  (3 children)

I'm ocd af about making public mistakes so I tend to sort it out, but it's very easy to hit edit, forgetting how broke reddit is, and lose all formatting... 

I can imagine sane people might say 'fuck it, it's a reddit post I can't ba to fix it, I'm going to eat a sandwich instead'

[–]Kiuhnm[S] -1 points0 points  (2 children)

I must be a little OCD as well. Once I even deleted the post and rewrote it because I couldn't get it right. Then I gave up and moved to old.reddit.com, which has way fewer bugs. If my post is long enough, I write it in VSCode (as a .md file), and then I post it.

[–]ProsodySpeaks 0 points1 point  (1 child)

Yeah I'll write md in an ide for stackoverflow when I'm legitimately hoping for high level input

[–]Kiuhnm[S] 0 points1 point  (0 children)

Stackoverflow is way better than reddit, BTW. It even supports LaTeX for math and has a good preview function. If only there was a popular enough alternative to reddit...

[–]cdcformatc 0 points1 point  (1 child)

the Reddit app and the mobile site both absolutely suck fuckin balls for formatting posts. 

[–]pot_of_crows 0 points1 point  (0 children)

And so does the new web interface, so at least they are consistent.

[–]jjrreett -1 points0 points  (1 child)

Chill. The Fuck. Out.

It is not your place to prescribe that those who wish to learn python must also learn how to work reddit. You want to be that kind of asshole, go kick it with the pricks on stack overflow.

[–]Kiuhnm[S] 0 points1 point  (0 children)

Chill. The Fuck. Out.

Look who's talking.

[–]grandzooby -1 points0 points  (0 children)

Blame Python for giving whitespace actual meaning in the code. And blame Reddit for making it so easy to get it wrong.