r/stackoverflow • u/Cheap_Arugula_9946 • Jan 22 '25
Question Average stackoverflow experience
I haven't used my SO account since mid may '24 (more than half a year).
I recently posted a mediocre question titled "Method calls in class definition". The question got some downvotes.
Well, ok, I get it: it wasn't a great question, but this is the outcome...

Is this the correct reaction to mediocre questions?
EDIT: after posting this I checked my account and got the reputation back. Can't tell the exact timings. I tbh don't care about the reputation on that site, but the point is the experience I've got.
EDIT (the day after): I've discovered I'm now also "shadow banned" from OS and I no longer can post new questions.
View all comments
Show parent comment
1
u/Cheap_Arugula_9946 Jan 24 '25
You asked for a “more pythonic” way to do what you’re doing, and the suggested duplicate pretty much does exactly that. Why doesn’t adding an initializer and then instantiating your class solve your problem? I’m far from expert in Python, but as an experienced programmer I’d rather see code in an init method than floating around on its own inside a class.
I'm sorry but I spent almost a day explaining why the question was not a duplicate. It was acknowledge it's not a duplicate and it's state changed from duplicate to closed. So it's not a duplicate.
Providing actual code in your question rather than some toy example or pseudo code always improves a question. In your case, it helps to show why you might want to do what you’re asking about. You probably don’t really need all 20 paths, though — you could edit that down to three or four and still get the point across.
I provided BOTH a psuedo code and a full example (because they asked, btw). I wrote "here the full example" and the reader can skip it.
Did you try the code that you posted? Does it work? (Answer: it works fine.) Don’t you think that info would improve your question?
Ofc it worked, If you read the question you can easily discover that it was never about "this thing does not work"
"A clear phrasing of what I think you’re trying to ask might be: It appears that any code that I put in the body of a class but outside any method executes immediately when my program runs (example below). Is it okay to take advantage of that, or is relying on that behavior a bad practice? For example, I’d like to use it to ensure that certain directories that my code depends on exist. Is there a better way to do that?
I think that was actually usefull. I've edited my question a last more time to implement your adivice. I agree that's probably even more clear.
There are a lot of helpful comments, mostly from moderator deceze, trying to help you clarify your question and your intentions. Maybe part of the problem is a bit of a language barrier (but honestly your English seems entirely fine), but in general I’d say that when you get that many questions from an experienced user (the diamond means deceze is a moderator and so probably very knowledgeable) just trying to understand what you’re asking, you probably haven’t explained your question very well.
Diamond meas nothing. Diamond people are people no different from other non diamond people. I know this is controversial, but this is why I think your comment here is heavvily biased. I EXTENSEVELY followed "suggestion" I've got in comments. It took me alsmost an entire morning (a wasted, one, to be precise). I'got nothing from that effort. Only AFTER complaining HERE the question was finally no longer marked as duplicate. I've reached that improvement not from comments on OS, not from EDITING the question, but from complaining here.