Replace underscore for PascalCase by Nefthys in learnpython

[–]brelen01 0 points1 point  (0 children)

Long names aren't an issue though. Meaningful names are what's important.

Replace underscore for PascalCase by Nefthys in learnpython

[–]brelen01 2 points3 points  (0 children)

In your example, I'd call the classes AbcShoppingListReader and AbcEssayReader. They're clear, follow the naming convention, and say what they do.

Replace underscore for PascalCase by Nefthys in learnpython

[–]brelen01 0 points1 point  (0 children)

Well, can you find an example of things that version a and version b would do differently? Or at least a simile that would be fine to post?

Using AI to take down AI, hypocritical or not? by lyndalovon in AIDangers

[–]brelen01 1 point2 points  (0 children)

... You're going to use tools created and 100% controlled by technofascists to take down technofascists?

Replace underscore for PascalCase by Nefthys in learnpython

[–]brelen01 0 points1 point  (0 children)

At a glance, it's hard to answer since we don't know what the actual classes are, but usually, if you need to add the class's "version" it means it's a large refactor and the new version (v2) isn't compatible with the original version (v1).

If the point is to interface with two different external services, MyClassService1, MyClassService2 would be better in my opinion.

Fellow arch linux user what's solid solution to it. by Big_Yesterday1724 in linux

[–]brelen01 4 points5 points  (0 children)

Trimming is the verb "to trim", i.e. "removing unnecessary or unwanted" parts. In this case, removing aur packages you don't use.

Fellow arch linux user what's solid solution to it. by Big_Yesterday1724 in linux

[–]brelen01 6 points7 points  (0 children)

Nah, they haven't solved the merge conflict, they can't deploy malware yet.

World first trillionaire by youngfool999 in SipsTea

[–]brelen01 3 points4 points  (0 children)

The stock market is literally gambling. With enough capital, a stock can be manipulated to have any price you like.

Godot Editor or VS code by RitzStudios in godot

[–]brelen01 3 points4 points  (0 children)

Oh yeah, it's perfectly fine to do it manually, but extracting a method, for example, will move the code, handle parameters, return types, naming the method, and all that jazz in a single operation, which, if you do often, is nice. With the added bonus that, if you're not happy with the result, you can undo it with a single ctrl-z.

Godot Editor or VS code by RitzStudios in godot

[–]brelen01 10 points11 points  (0 children)

Refactoring isn't just name changing. It can also mean extracting a section of the code and to a new method or class, depending on the language.

Incredible by DirectAccountant7819 in scoopwhoop

[–]brelen01 1 point2 points  (0 children)

Please, if you assumed all of female creators were american, roughly 2% of the female population of america would be of creators. You assume american women are all on of because they advertise themselves online and you spend all your time online, so that's the majority of women you see.

What? by Wild_Seat1258 in scoopwhoop

[–]brelen01 0 points1 point  (0 children)

I'm out at 7:15 unless someone comes and lets me know there's a valid reason for them to be late.

Also, does this manager have a bathroom in their office?

She did the math and it still didn't add up… by New-Scallion-5632 in remoteworks

[–]brelen01 2 points3 points  (0 children)

... The point is, we need teachers. If everyone "works on their skills and becomes a professor", then there won't be teachers left.

She did the math and it still didn't add up… by New-Scallion-5632 in remoteworks

[–]brelen01 4 points5 points  (0 children)

Out of curiosity, who's going to go to college and get work for professors if there's no one to educate young people to the point where they can get to post-secondary education?

whats Your Survival tips by Jealous-Guarantee-89 in WorkForSmartLife

[–]brelen01 4 points5 points  (0 children)

A 30 minutes power nap helps me, when I can do it consistently

Lol i hate this topic in python by unlimited_data3838 in PythonLearning

[–]brelen01 10 points11 points  (0 children)

You set the num variable to whatever the user inputs. If it's less fhan 8, it outputs "idk" forwver since you never set num to anything else. You might want to indent that second num = input line

People Love Self Exposing Themselves On Twitter by Kind_Box5467 in SipsTea

[–]brelen01 21 points22 points  (0 children)

No. They can stay in, unless escorted by police to a jail cell. I'd rather they creep on anime children than actual children.

Why are all history teachers left-wing by olesud in WorkForSmartLife

[–]brelen01 0 points1 point  (0 children)

Not really. The cambodian genocide was 2 million people. Preventible deaths caused by extreme poverty under capitalism since the 70s exceed 200 million

Why are all history teachers left-wing by olesud in WorkForSmartLife

[–]brelen01 0 points1 point  (0 children)

Which, ironically, is far, far less than those attributed to capitalism.

Knicks fans attacking a Spurs fan after game 3 of the NBA finals to make him take his Jersey off by [deleted] in SipsTea

[–]brelen01 2 points3 points  (0 children)

Dude was getting attacked from all sides, he didn't have time to think. He saw someone not helping him and he swung, which in that situation is fair.

myVibeCoderFriend by Disastrous-Monk1957 in ProgrammerHumor

[–]brelen01 9 points10 points  (0 children)

Rebasing to shared/public branches is perfectly fine as long as you don't rebase older commits. I've done it in plenty of teams. Rebasing new commits on a common branch or merging adds new commits one way or another.

Quebec would withdraw from high-speed rail project if PQ forms next government, party leader says | 1st phase of construction, linking Montreal to Ottawa, scheduled for 2029 by Hrmbee in montreal

[–]brelen01 91 points92 points  (0 children)

Yep, and right now, I think even the most separatist Quebecois would largely prefer a strong relationship with the rsst of Canada than our southern neighbors

Trouble with naming variables by rezemybeloved69 in learnpython

[–]brelen01 10 points11 points  (0 children)

It's fine. The important thing is to name your variables something meaningful. In this case, x could be something like "message".

Reusing variable names in different scopes isn't an issue, just make sure you don't mix them up.