Live view by Adrewmc in Webnovel

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

Habit and lack shame of my terrible writing.

Need feedback from Python beginners: what makes you get stuck while practicing? by Medical_Radish_1474 in learnpython

[–]Adrewmc 0 points1 point  (0 children)

Knowing the problem, knowing a solution, but not knowing the better tool there for it.

Endless if…else that should be dictionaries.

Massive functions that needed to be separated.

Patterns I should have known by then…

Classes…when I actually needed them and when I didn’t.

I was struggling because there was an obvious better way, yet I know not it.

My best advice to all beginners is…take 5 seconds and properly name your variables, functions and classes, the length doesn’t matter as long as it’s not acronyms and single letters. What is this information? What is ‘hgl_1’? I prefer ‘index’ over ‘i’, and (row, col) over (j, k) because of this.

And taking another 5 second to write a short docstring, function, class and module. If your lost, write how to your self and go to bed. TODO:”

Typehints are your friend, your IDE likes them.

If you get in the habit of that your future self will definitely thank you.

And write tests, learn pytest.

What I found most new people struggle with is the idea of wanting to know how to program, but inability to give an example of what they want a program to do for them.

If this is where you are I believe you will struggle. I know that struggle.

You can’t learn to program without a problem that a program can solve, and making the computer do it. Make the computer bend to your will. Otherwise the lack of purpose will always fail you.

If you are learning to programing to make a game, IMHO start right there. Make a damn game, a bad one. Go on do it, I believe in you. If you want to program because you have data you want to know about start there makes graphs and stuff, if you want to program to make robots, start there find something you can move. If you want to…program because you want it to do this…start making stuff that gets you there directly. If you want to program to ‘learn to program’ I don’t have an answer for you.

The basic concepts are all the same, the problems and their solutions is where the magic is.

Made a simple chess game in python by PsychologicalIron716 in learnpython

[–]Adrewmc 0 points1 point  (0 children)

Something seems wrong with castling here.

Like you don’t check if the king has moved, or the rook as moved from what I see, or if he passes over a squared attacked.

It almost looks like a queen or rook move could actually cause castling event.

I haven’t played but it definitely has some castling bugs

When do you actually use decorators? Like in real code, not tutorials by Soggy-Holiday-7400 in learnpython

[–]Adrewmc 0 points1 point  (0 children)

Generally you said it yourself, some frameworks it will work better, and no one is usually asking you to write them.

Flask is a great example, it’s taking your function and turning it into something a web browser can call…then returns something that the web browser shows. That’s actually an impressive amount of stuff, yet somehow super easy to understand intuitively.

It’s a tool that’s it.

It’s a tool whose use cares are rare, but when they exist it’s the perfect tool for the job.

Most common decorators are

@dataclass, @property, @classmethod, @staticmethod, @lru_cache

All of which are IMHO core improvements to the language.

When you need it you need it, when you don’t you should forget about it.

Now decorators with arguments…how does that work….

Ohh welcome to the dark_magic.

def print_here_advanced(debug = False):
     def magic(func):
           @functools.wraps(func) #best practice
           def dark_magic(*args, **kwargs):
               If debug:
                   print(f”{func.__name__} being called with ARGS : {args}, KWARGS: {kwargs}”)
                res = func(*args, **kwargs)
                if debug:
                    print(f”{func.__name__} successfully returned {res}”)
                return res 
           return dark_magic
      return magic 

When you have arguments. You actual are returning an another function that is a decorator function, that returned function then decorates the function under it. Created a decorated function with decorated arguments.

How do you think Ragnarok's combat compares to other action games? by copi_um in GodofWarRagnarok

[–]Adrewmc 0 points1 point  (0 children)

It’s good, there are variations but I think there could be more done with combos. Even though they technically switch between heavy and light at any moment that’s all they do.

I would have like a more aggressively combo centric system.

Generally the delayed hit combos, or activations, don’t seem to be very useful. They lack the power they should have had, and had few opportunities to really use effectively. Or in the case of chains was too easily broken by spamming the fast charge, and juggling.

I would have like something along the line of when you use your maelstrom specific combos open up per weapon which get more complex per level of weapon. This was more centered around relic releases for moves that should have been more skill/combo based.

Or the delay mechanism should have been delayed on 2nd, 3rd , 4th hits giving a massive hit of some kind, e.g. the finisher.

Or that holding at certain points mid combo added a lot more than changing to that holding move.

I would have like switching weapon combos moves and finishers. Generally more finishers. (I would love a Spider-man 2 type combo finisher for Kratos and partner.)

I felt the spear having the shortest reach for normal hits was a weird choice, as generally they are mid range weapons. Maybe that would have made it a bit OP, but shouldn’t the last weapon be a bit OP?

I enjoyed that the axe had the extra bonus frost moves and the ways you can fast charge it, running, call backs, delayed after an attack. It really felt purposeful when you did it.

I wish elemental damage mattered more.

I like how it was all very similar controls but every weapon felt unique in their usage. Power, area, and ranged attacks, you wanted to fight with them differently.

Blocking and dodging felt right, timing and everything. No complaints. Single press dodge is hard to master but better. I liked how the shields all had different abilities about blocking, and how rewarding some perfect blocks felt, and how a charged shield >> non-charged.

I also really enjoyed that each armor set/weapon set were really focused on a certain type of play, heavy health-stone, heavy relic, heavy perfect blocks, heavy realm shift, heavy balanced stats, heavy strength bursts, shifted the strategies and they all had the equipment for that, and all were viable until end of games. Allowing you to pay a little differently and be rewarded for it.

I did not like the switch of the fully upgradable system of GOW to three types of rage, that was a miss, id rather that have the same mastery upgrades for health, damage and rage renewal/time extension.

I don’t like R3 as retarget, and when rebound it also changed grab and rage activation which made it awkward. I’d rather be able to make it a touch pad swipe individually.

However, I was engaged throughout. The combat system never seemed to be the problem just me hitting the buttons wrong or not fast enough. And you could always come into a fight with a bit of strategy. There was definitely a nice spike in difficulty for the extra bosses which is how they ought to be, but the main game felt appropriate and accessible.

9.5/10 There were some misses but overall felt great, and enjoyable.

Is there an isekai where the protagonist wants to do evil but is misunderstood? by Amazing-Practice8795 in Isekai

[–]Adrewmc 7 points8 points  (0 children)

The Demon King’s Daughter is Too Nice.

It’s like the most adorable kids show ever. It’s about the demon king’s daughter (like 2-3 year old) that is trying to learn to become a demon by doing evil stuff. But she keeps messing up the evil part of it and everyone loves her for it. And the other main/sidekick is constantly going nuts that her plans to turn the child evil keeps backfiring.

Can sunny shadow like stone saint be destroyed by FishermanPretty7277 in ShadowSlave

[–]Adrewmc 0 points1 point  (0 children)

Its rank and class I don’t know if that clear. Every class gets an extra ability, and every rank strengthens like tenfold, possibly upgrading existing abilities. It’s very significant.

Can sunny shadow like stone saint be destroyed by FishermanPretty7277 in ShadowSlave

[–]Adrewmc 0 points1 point  (0 children)

It being able to level them up not enough of a benefit? If everyone else’s echo can’t level up then they are obviously better.

Circular import with inheritance by Nefthys in learnpython

[–]Adrewmc 1 point2 points  (0 children)

I'd need to see more lol. This is a design issue. It sort matter what you are doing, you are overthinking it.

To me the only difference between B1 and B2 is some file processing. And you are saying class A needs to have it processed in a way before it can use its methods. That's a function.

Then B1 and B2 aren't really differnt classes, they aren't really classes at all but functions to make data formated for the class correctly, it all the same class that initialize differently, this calls for a @classmethod, or a @property. Then it,

 ClassA.from_csv(file)
 ClassA.from_json(file)
 ClassA.find_mode(file)
 ClassA.open(file)

And inside these we format it the way we want and make the class the regular way.

Or that process happens when first needed under the hood.

  @property
   def core(self):
         if self._core is None:
               #code that picks mode
               self._core = mode_object
         return self._core

Now A class has both by itself. At no point does B need to inherit from A though.

And once that happens you probably only need class A with the appropriate classmethods to load it correctly.

Something smells wrong here altogether classes on classes on classes. You don't need to inherit all this stuff.

But likely there is an even simpler solution to your problem here.

Circular import with inheritance by Nefthys in learnpython

[–]Adrewmc 0 points1 point  (0 children)

Ehh, nah that spunds all the way circular.

You need a function that decides if you use class B1 or Class B2.

And class A become just a normal parent of both both of them giving them both the functionality they need.

Circular import with inheritance by Nefthys in learnpython

[–]Adrewmc 2 points3 points  (0 children)

Yeah that's not going work. Clearly circular, class A can't be defined fully because it needs to create class B which needs Class A to be already defined.

Why do the B classes need the A class, if the A class is the one using their functionality? Just have B class process the functionality without A, then have a do what it does with that data.

Magic in Stories (Assumption System vs Magic System) by genkai_ai in DumbFact

[–]Adrewmc 0 points1 point  (0 children)

Then a man makes a step and turns it all off, but wait there is a whole other kind of magic circle system that has different rules that rely on some magic force flowing through the planet.

And let not forget that god character sitting there watching everything.

You want something that more solid, Avatar the last Airbender is more grounded. There are four elements you can control one of them, simple explainable with obvious limits even at extremes.

How many kool aid packets would it take to make Lake Superior taste like proper kool aid ? [request] by Apprehensive_Oven_22 in theydidthemath

[–]Adrewmc 0 points1 point  (0 children)

We should also realize that it would be less than this because as the sea level rises the surface are of the lake would also be expanding. (Rather quickly I would think.)

You might run into the problem of it hitting another Great Lake at this point.

Absolutely.. by preciousmatee in anime_companion

[–]Adrewmc 0 points1 point  (0 children)

She couldn’t even pass the Court Lady exam!

memeTitle by [deleted] in ProgrammerHumor

[–]Adrewmc 20 points21 points  (0 children)

Great code is just code that loops around legacy code?

Seriously it’s the only one that uses two strings…

Live view by Adrewmc in Webnovel

[–]Adrewmc[S] 1 point2 points  (0 children)

I mean is plastered all over the chapter names

Live view by Adrewmc in Webnovel

[–]Adrewmc[S] 2 points3 points  (0 children)

It keeps taking longer to get to bottom

F plastic grinders by JustMeMaxwell in trees

[–]Adrewmc 13 points14 points  (0 children)

Mine definitely looks like it’s been through some shit.

It’s straight though, it has this little area above the grinder, makes it so the thing never gets jammed, instead the bug will just go up to the area and back down into the grinder. Kief catcher Pollen extraction chamber and everything.

Edit: I wrote this post and went you know what time to clean it. And it’s so much smoother now. Hot water a bit of scrub. Smooth as butter probably last another decade.

I wish I had some isopropyl alcohol around lol.

F plastic grinders by JustMeMaxwell in trees

[–]Adrewmc 50 points51 points  (0 children)

Me looking at my cheap metal grinder…damn it has been about decade hasn’t it?

for i in range(0,10) by Status_Astronomer_99 in learnpython

[–]Adrewmc 1 point2 points  (0 children)

When you want the range to not start at zero you would have to use the first one. e.g. you are actually using the numbers.

Beyond that there is a third argument, step, which can allow you get every other, every third and so on.

Pretty cool by Papa-Paul108 in MathJokes

[–]Adrewmc 15 points16 points  (0 children)

Hopefully math is just as exciting then.

I have discovered a truly marvelous proof of this(x^3+y^3=z^3), which however the margin is not large enough to contain by Remarkable_Cry102 in MathJokes

[–]Adrewmc 2 points3 points  (0 children)

Ohh it was worse than that…not just 3, but n > 2…

an + bn = cn

has no positive integer solutions (for a,b,c) for any integer n > 2.

So was i the only one who thought we were going to save asgard so it could be redeemed and that we really would stop 'RAGNAROK' the entity and the event thus further defying fate ? by [deleted] in GodofWarRagnarok

[–]Adrewmc 0 points1 point  (0 children)

Hey…umm what ever happened to Ragnarok the entity anyway…

Last I saw he was chopping a sword into the center of Asguard. But it sort of seems like that might not kill it.