

thanks! didn’t know about that
thanks! didn’t know about that
asyncio.run(easy_peasy())
That’s fair! Takes time to get used to. Modern editors make this easier by highlighting the current indent level, or can even make the top X lines of the current closure “stick” to the top of the editor for those really long blocks.
Correct, I linked the source of the quote. My implication is the general idea is applicable here. Is python one of these languages where it is idiomatic to nest code deeply?
Flat is better than nested.
From the python I have seen and written, deep nesting is avoided.
Just curious, what about spaces made it hard? What language would have been easier? In curly brace languages, 99% of the time, a curly brace is followed by a line break and an indent. Python is similar except it’s typically a colon, line break, then indent.
What I have learned is: If the code is indented too deeply, it’s a code problem, not the language.
Torvalds infamously wrote:
“… if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.”
Hold down j
and lmk how smooth it is 😅
I mean, it should be clear. Smooth and fast and snappy. If you don’t want that, use neovim like me :)
opens htop threateningly
The only reason coders’ computers work better than non-coders’ computers is coders know computers are schizophrenic little children with auto-immune diseases and we don’t beat them when they’re bad.
Well… said?
I have a small site that mirrors hacker news but with dark mode and stuff, and it is getting blasted by bot traffic. All the data is freely available from the official api but they’re scraping my piddling site which runs on an anemic VPS because it looks like user generated content. Bot protection does little to help from my provider. Gonna have to rethink my whole architecture now. Very annoying