Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
whats the bottom line mean
nice
Well, I think that's wrong: the natural incstinct as a programmer is (or should be) to made the code clear and that includes variables that should be readable, consistent vs the code and logical so others (or our future ourselves) will know what the heck was a variable for. Obviously not in a short kata nor in some conditional/bucle sentences but in long programs, right?
It's because this kata is using postgresql, and has sqlite disabled. I'd rather this kata be categorized as PostgreSQL then, to be honest, this threw me off too.
there's no problem? is there a problem? what is the problem?
and what's the problem if we only accept bool values?
Bro just needed to shorten the variable name just like the natural instinct of any programmer, also I don't know why I got sent a kyu 8 that took me seconds.
https://www.postgresql.org/docs/15/functions-string.html, you can also use the site's search functionality.
I think the biggest problem is (almost) everyone can vote.
I consider myself prety much a beginner and have eroniously voted for less efficient code because I thought it was the best. Maybe only users with high kuy score should be able to vote for best practices. Or even better, active people vetted by mods.
Guys where should i go to find all these function names such as to_hax() and translate() ?
Is there a comprehensive list of them?
couldn't agree more, i'm sick of people voting best practice just random stuff, the voting mechanism should be changed
Back in the old days when many people were completing this kata, the starting code was:
If you edit/fork the kata and look at the "Complete Solution", you'll see the legacy of this format is still in place (it's just in a non-public location).
Most kata writers don't bother changing given variable names, since that's not part of the "problem" we're being asked to solve.
So, yeah, people are right that it shouldn't be
bool
, which is why someone updated the kata to change the starting code toboolean
(which, IMO, is just as bad of a name, since it's still the name for a variable type, even if Python proper never uses it; it's like Hungarian Notation, except it's not just a notation, it's the whole name). But, you should keep kata updates in mind when talking about people's ancient solutions: the ground has shifted.To be honest when I wrote this I'd forgotten about the built-in function as I so rarely use it, but I would probably choose a different argument name with that in mind as I agree it's best to avoid shadowing built-ins.
If I wrote it now I'd probably go for
isTrue
as parameter name but not sure it's as clear...It's not a keyword but a built-in function. And yes, it's a bad idea to use it as a variable name.
bool is not a keyword in Python
If bool is, then you can't use bool in variable names.
Loading more items...