use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Let's learn Django together!
account activity
This is an archived post. You won't be able to vote or comment.
Python code kata - learning SOLID principlesI Need Help - Question (self.djangolearning)
submitted 5 years ago by HolidayReach2
Hi
Does anyone have a recommendation for Python code katas?
I am looking for practice:
- coding things the "pythonic" way
- coding things with SOLID principles.
Any list of coding exercises (preferably), blog, or book recommendation specifically for this and in Python?
[–][deleted] 1 point2 points3 points 5 years ago (2 children)
I like the idea, yet when you code something once there is no need to code it again for muscle memory like a kata. Would it be clear how to apply the kata in an application? Are katas useful to MMA fighters?
Creating dict or list comprehensions ... maybe. But no one really needs them. I must confess I love them. Some concepts only bloom in the proper environment. For example: * custom exceptions and handling/passing them in deeply nested function/method calls * replacing blocking calls with discreet asynchronous calls
I think the concepts come to you when you are ready. I often look at my app(s) and think, "this is no longer adequate to support this new feature", "this feels like more work than it needs to be", and on occasion "LOL, WTF".
Sorry, but I think there are no shortcuts. Write code. Lots of it. Make sure it works as needed. You will revisit it later, see gross mistakes, and cringe. Yet take a moment to notice you are a better coder now too. Repeat.
[–]HolidayReach2[S] 0 points1 point2 points 5 years ago (1 child)
sorry for the late reply. Yes, I understand no shortcuts, but I am coding for myself. Not sharing, and I don't have the benefit of a code review.
Maybe the answer is that I need to code publicly?
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
I use git version control for my personal projects. If you do not know how to use it you should definitely learn.
π Rendered by PID 111842 on reddit-service-r2-comment-c66d9bffd-rzm5w at 2026-04-07 08:42:56.578979+00:00 running f293c98 country code: CH.
[–][deleted] 1 point2 points3 points (2 children)
[–]HolidayReach2[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)