Edit: probably shouldn't have camel cased that method name, ey?
Edit 2: thanks for the award stranger! I'm on the beta of the 3rd party app I use and it hasn't been getting the award messages from Reddit recently, so I can't thank you privately!
Im actually all of your IT people. Just stop! We both know your code is going to explode dino-chicken-sapiens everywhere. So just don't do it today, ok? I'll get beer for us both if you just let today be chill and dont introduce the dino-chicken-sapiens to the test environment.
Sorry, it was a loose try about the fact the integration tests based on "regular" chicken will probably raise some funny results around Butcher.class, MealPackage.class, ChickenWings.class...
Hey there it's FANGG and we would like to say despite the code being most optimal we regret to inform you that you were not selected because a binary tree was not inverted in this
If you let me create a DevOps CI/CD Pipeline I would have run Unit Tests, Lint tests, Code Analysis, and then Static Analysis tests. Then created an automated deployment process that would have done a smoke-test right after a deployment, and done automated QA Tests in the test environment. And then created Docker Container images and automated those test and releases as well. And finally a safe Production release with rollback available just in case. Jurassic Park would not have fucked up if they had me and my DevOps skills.
Nah, never had any Python courses. Just C++, Java, and then did some stuff with Assembly, Lisp, Haskell, Lua, Io, Scala, and a few others I can't remember right now. But interestingly nothing in Python.
Maybe I’m just a cynic, but I can’t help but cringe when I stumble upon comments like these as it makes me think the poster is in the midst of their CS-101 course. Screams “try hard” to me, but then again who am I? FYI you cannot use hyphens (or any other arithmetic/concatenation chars) in variable names in Python, will throw syntax error
While I'm not going to attack you for picking a naming style that makes you happy, I would argue that abiding by snake_case in python is more than just a style issue.
Underscores in python are very important, and communicate information, both to future-readers, as well as intelisense, autodocs, and even the interpretor.
A few examples:
_foo is protected
__foo is private
__init__ is a constructor.
_ is an unused index
While I suppose you can justify doing something like __myPrivateVariable, it feels like you are fighting against python to do this.
If it makes you feel better, you can use PascalCase for classes! RedditComment.likes or RedditComment.karma_score for example.
The snake_case attributes make it stand out nicely from the clases, at least for me.
All fair! My experience with Python is on the slimmer side, but I'm helping someone with some Python code they started, so it was the first language that came to my head when I saw that comment.
Thanks for the info! If I ever use Python professionally, I'll definitely need to do some research.
1k
u/Reddit-username_here Jul 21 '21 edited Jul 21 '21
Edit: probably shouldn't have camel cased that method name, ey?
Edit 2: thanks for the award stranger! I'm on the beta of the 3rd party app I use and it hasn't been getting the award messages from Reddit recently, so I can't thank you privately!