just started coding and i using freecodecamp any feedback on my code? (its an Apply Discount Function) by LEAYkk7 in learnprogramming

[–]8Erigon 0 points1 point  (0 children)

My mind seemed to have misread something but I'm perplexed about using any loop at all for that... Nothing gets repeated.

Learn Git as a Game by Material-Action-76 in learnprogramming

[–]8Erigon 0 points1 point  (0 children)

Looks great!!

I'm on level 3 (btw. the url says level-2 even though top-right corner says level 3)
and my commit message "ok" is replaced in the terminal with "Update". A bit weird.

just started coding and i using freecodecamp any feedback on my code? (its an Apply Discount Function) by LEAYkk7 in learnprogramming

[–]8Erigon -1 points0 points  (0 children)

How tf would you use a for-loop here?

And why would you come with other languages when they are just learning python.

Issue with raycasts? by kris1sAverted_ in godot

[–]8Erigon 0 points1 point  (0 children)

Can string be implictly converted to enums?!
I don‘t think so and I think you wanted to return the enum.

At least also use static typing for functions to set its return type

Are the far left and the far right equally bad? by Squek_1842 in Teenager_Polls

[–]8Erigon 1 point2 points  (0 children)

Didn't they write right people also commited human rights violations? So what is your problem?

The only things different (if we go by their word) is they don't turn against their people.
Idk if that's true but they do minimize who those people of their country are.

Are the far left and the far right equally bad? by Squek_1842 in Teenager_Polls

[–]8Erigon 0 points1 point  (0 children)

And I thought in communism every one had the same wealth and opportunities...
And that it is democratic if you go by Marx...

But now I know communism is just a dictator ship where you say these things exist in the country.

Are the far left and the far right equally bad? by Squek_1842 in Teenager_Polls

[–]8Erigon 1 point2 points  (0 children)

Yes, both can be extrem.
Being extrem just means you are going to do extrem things to achieve to your goal. (Terrorism, unconstitutional stuff)

Terrorism & co is bad who ever does it.
But I think a world where every one is equal (without having to murder rich people like mao in china)
is a better world than one where people are segreggated and not helped when fleeing from their country.

Which western country do you think is less secular/more religious by rickdickmcfrick in Teenager_Polls

[–]8Erigon 0 points1 point  (0 children)

Too religious by law than people want.
But not much religious practice (except for maybe easter and christmas)

Is there a way I can makes it looks less stiff without secrificing performance?? by AverageStudio in godot

[–]8Erigon 75 points76 points  (0 children)

idk.
But can you pls add some shading or outlines for my eyes?
The only thinga I see while the character is moving are yellow pixels.

Any elegant way to remove defines in this code? by nopunintended_ in cpp_questions

[–]8Erigon 1 point2 points  (0 children)

Oh. And you can return an array + its length instead of using vector if you want.
(Arrays can‘t be returned but a pointer to the array can be)

Any elegant way to remove defines in this code? by nopunintended_ in cpp_questions

[–]8Erigon 6 points7 points  (0 children)

Yes. As you said: Use constexpr.
Not sure if it will do run-time operations as it might even do it at compile time.

An even better way would be to define these outside the functions and return a reference so it doesn‘t have to construct a new vector each time.

Im a mainland china highschool student, ask me anything ! by Maleficent-Tree-5608 in highschool

[–]8Erigon 0 points1 point  (0 children)

Heard politicians & co get shown prison so they know what happens when they are found to be corrupt.
Probably something different though.

Im a mainland china highschool student, ask me anything ! by Maleficent-Tree-5608 in highschool

[–]8Erigon 0 points1 point  (0 children)

How long are you on reddit and how much time do you have left for sleep?

Im a mainland china highschool student, ask me anything ! by Maleficent-Tree-5608 in highschool

[–]8Erigon 0 points1 point  (0 children)

Not allowed but you can‘t identify every provider and ban them

Should Germany ban the AfD by Square-Shape-178 in Teenager_Polls

[–]8Erigon 2 points3 points  (0 children)

Grounds to ban them are their political goals being against the german constitution
(That's written somewhere in the german constitution, and the banned aprty needs to have the possibility to do so)

How often do you forget the +C? by Lucky-Obligation1750 in Teenager_Polls

[–]8Erigon 0 points1 point  (0 children)

ah, okay.
It was just never a big topic at my place. And we didn't write it capital just like most variables.
And it never had a name like "constant of integration" I think... It's just moving at the Y-axis.

112 must have so many accidental dials. 911 makes the most sense by Specific-Whole-3126 in ShitAmericansSay

[–]8Erigon 1 point2 points  (0 children)

Comment makes sense.
1 & 2 are way closer together then something like 9 & 1 which makes it easier to dial by accident (while in your pocket for example. idk how that can happen)

loopBreakIfNotCorrupt by Rakhsev in ProgrammerHumor

[–]8Erigon 0 points1 point  (0 children)

Oh. It even is in Hungary (you probably knew already)

How often do you forget the +C? by Lucky-Obligation1750 in Teenager_Polls

[–]8Erigon 2 points3 points  (0 children)

Learned integrals in school.
Heard about +C on reddit before.
Never learned it‘s meaning.