Michał Dankiewicz (@mdank_pl) profile picture

Python well explained.

Kraków, Polska
Joined April 2013
Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)Photo by Michał Dankiewicz (@mdank_pl)
That's cool.
Replying to @PropellerSwap
How local can you get? Very. Here's Fynd running on an old Android phone - quoting onchain stocks from Robinhood.
1
1
103
Long live Ethereum, long live Turbine. networked.art/11x11
1
44
So we built an app. And it's gonna change how the world trades on-chain.
The best place for large trades is now Ethereum. Introducing Turbine.
4
8
249
Hey @SlackHQ, when dark theme sync with OS on Linux?
1
117
ReStructuredText has a terrible syntax which is impossible to remember. That's a fact, not an opinion. According to me.
1
2
745
Replying to @pycharm
@pycharm Parameter names in Quick Documentation are not emphasised enough. It all looks like a big block of text. E.g. can you *quickly* find `gamma` documentation in the screenshot? Who do I need to bribe to get this fixed? Or are there any workarounds? youtrack.jetbrains.com/issue…
So true.
TDD is not: "Take your unit tests as they are and just write them first" TDD is: "Be first user of your code. Drive the implementation with tests. Focus on behavoir. Tests are examples of usage."
What did/do you struggle the most with when learning Python? For me it's metaclasses, I think. Every time I need to do something with them, I need to le-learn them.
2
TIL that `asyncio.CancelledError` is not a subclass of `Exception`, therefore `except Exception` does not catch it, which is good. #Python
3
5
Today #Python 3.11 is released. On that occasion, I decided to finally buy Python Professional Edition. But I guess they released just the free version so far, 'cause I couldn't find a purchase page on python.org. Can't wait to get Pro!
1
1
When should you add comments to your #Python code? And - maybe more importantly - when should you NOT do it? And why does it even matter? Let me explain in this short thread. 🧵
1
2
4
Your code shouldn't NEED to be commented. Ideally, it should be obvious what the code does just from... the code. Does the function in the top tweet really need a comment and a docstring? I don't think so. Strive to write code that is self-explanatory. (See helpful links 👇)
1
1
Want your #Python code to impress the recruiter at your next #job #interview? I have conducted many interviews and reviewed many candidates' projects. Read on to learn how to write code that the recruiter wants to see.
1
5
1/10 In this thread I will tell you the things that I look for in candidate's code. I am a technical person and I can speak only for myself, so this won't guarantee that you'll pass the whole interview process, but I am pretty sure that it'll help you with the technical part.
1
1
TIL a lesson about dataclasses in #Python 🐍 When you subclass from a dataclass, you should decorate the child class as well. Otherwise, attributes defined in the child won't affect the __init__ method. Try it with #pyrun
5
12
`defaultdict` is an incredibly useful #Python 🐍 feature which can greatly simplify your code. It is a dictionary that returns something even for missing keys. One of the most common use cases is when you need to create a dictionary of lists. Have a look and try with #pyrun
2
7
1
14
How to name functions and methods? A short thread. 🧵 #Python #programming #beginner
1
17
1
69
Function names should be verbs. ❌ calculator(...), greeting(...), rotation(...), area(...) ✅ calculate(...), greet(...), rotate(...), compute_area(...) This way you won't mistake them for variables. Also, you can read the code more naturally.
1
6
Ready for #Python #CodeReviewChallenge task 4? Can you spot the problem with this code?
2
4
4
Solution: each bin is the same list object! Doing `bins[0].append(1)` appends not only to the first bin, but also to all other bins (because there are no other bins, it's actually the same bin repeated N times).
Replying to @PatFlynn
@PatFlynn just inspired me to share something personal. So... I am a paraglider pilot. :)
1
Replying to @PatFlynn
@PatFlynn just inspired me to share something personal. So... I am a paraglider pilot. :)
How to name variables? A short thread.🧵 #Python #programming #beginner
5
8
3
28
Names should be self-explanatory. ❌ `a` or `f` or `i` is usually bad. ✅ `edge_length` or `force` or `row_index` is usually better.
1
4