I don’t see the benefit of this long naming convention…
It still allow bug to exist… like the fact that, with this code, the player can still play with 0 Hp.
Sould have been better to put a “if(health <= 0)” instead of “< 0”
Came scrolling for this ^^
I asked this question on this post on a different instance, but would there be issues being that the code compares a float to integer zero “0”?
Since the health is a float, yeah, it can create issues. A health of 0.000000001 is greater than zero, but that would almost assuredly be displayed to the user as simply 0, causing player confusion. The easiest solution is to have health and damage always be integers. A less great solution is to use a non-floating point decimal format. If such doesn’t exist in your language, you can emulate one by having health and damage both always be integers, but move the decimal point over, say two points, when displaying to the user.
It sounds like the only concern you have with code is its bugginess, which is short sights. This is unfortunately better documented code than stuff I’ve seen in production. Obviously no one should do this, but let’s not act like there’s no benefit
Ugh, this makes me want to “slash slash slash.”
Self-documenting code, high contrast… Carry on.
Visual Basic looks strange nowadays, huh…
ThisCommentsMakeItSoThatYouHateMeForWritingLikeThisSeriouslyICanNotStopPleaseSendHelp
I can read that without any issues whatsoever.
But. If. You. Put. Periods. Between. Each. Word. My brain will force a pause between every single one and I can’t override it.
Makes it even better that I’m on mobile so the text wrapped half way through a word.
Would you like a snake to replace your camel?
Best I can do instead is calling it
x
.Careful, Pascal doesn’t like it when you call him a camel
I decided to be wrong because the correct joke would be too convoluted. I’ll work on that implementation and then you can inject it at runtime via reflection.
Thanks for preparing your comment for my dependency injection! I agree that refactorability of comments is preferable over prematurely optimizing for performance.
First it needs to work, then it needs to work well, and finally it may or may not work quickly. Along the way, it should also be humorously weird.
This is getting absurd, variable names have become variable sentences.
Variable essays is the future!
This has likely been done intentionally for humour’s sake, but take a look at some of the names in Apple’s AppKit framework, like https://developer.apple.com/documentation/appkit/nspreviewrepresentingactivityitem
I’m still annoyed with how verbose Objective-C is. Just check out what one has to do to create and concatenate a string. Madness:
NSString * test = [[NSString alloc] initWithString:@"This is a test string."]; NSString * test2 = [test stringByAppendingString:@" This value is appended."];
And god forbid you want to concatenate two things to a string:
NSString * test3 = [test1 stringByAppendingString:[test2 stringByAppendingString:@" Adding a third value."]];
That page is giving me a 403
Probably still better than bool a; bool b; int c;…
Honestly? Yes, I agree
But i, i is sacred.
No one touches i
Primitive tribe discovers personal rights.
Why not leave comments
Why leave comments?
Yea this looks productive.
Imagine how useless the LSP suggestions are.
lgtm
merged
I’m assigning all my PRs to you, buddy, your performance metrics will be over 9000!
What about this?
I’d ask what I’m looking at here but feel I might regret it
No regrets. Its shorthand python written in shell and tkinter. Allows me to type up gui apps or any python script with less effort, for my fingers and brain. The blocks of color are just tags with bg and fg same color to look like blocks but its all ASCII. Same as on the right, its an idle clicker toy in tkinter/py. Just me learning more ways to code faster in python but in shell but in neither. I have a repo. https://github.com/dislux-hapfyl/pynksh Dont be put off by ksh because bash also runs it. I have plans to use a Xbox controller to move away from building with the keyboard. I can do this by further abstracting away identifiers and other data we use and combine it into a coordinate system. I already made even further progress into shortening the cognitive load by using a basic row/col like chess as you see there on the left. a00 k12 and so on… take a closer look at my repo without dismissing it quickly. It could be somewhat unnecessary but maybe someone else can see what I have made as useful.
I’m somehow more confused
Ok I don’t completely get the use case but that’s…impressive. Thanks for the detailed explanation and good luck moving it forward
It’s an unwritten rule that there‘s always a fitting xkcd post
My ASDV professor has two moods: He either names variables like this post, Or he names variables
pp
(for pointer pointer)Fuck for some reason
pp
is giving me flashbacks to having to write using Hungarian notation variable names.
Cleanest code by Unclest Bob