Why do I hate Python?
I don’t like python. I’ve been working on a web crawler for nearly a month. I made the decision to use Python as a compromise between using one of the best supported browser driving libraries, playwright, and not using Javascript.
I have basic gripes that others have had: significant whitespace, weird operators
like and
and or
instead of &&
and ||
. I also abhore the state of dependencies
in python and I regularly recite to people that we don’t need docker, it was
announced at PyCon in 2013 because go was so much more portable and even then
before go.mod had dependency management good enough that it could solve the problem
for python.
I’m starting to regret my decision now. Previously, using go wrappers around
playwright running inside node was bad, but since then I’ve been exposed to
go’s chromedp
which I’ve used in my professional life. My only reservation
was that I needed to click buttons inside an iframe and other seeming edge-cases.
I now realize that if I could get it to work in any way, whether that’s looking
at the url inside the iframe and just navigating to it, really digging into the
documentation on chromedp
or whatever, it would have been worth it. I like
working in go, the language makes structuring code rationally appealing where
my lack of experience in python makes for a sprawling spaghet when I need to
do more than really simple work.
I’m starting to consider learning more than what I picked up in my Python 101 elective during my B.S.C.S. (Yes I’m a qualified bullshitter of computer speak). I don’t want to but I’m really torn here; do you:
- go to the programming language where the maintained framework exists
- find and maybe even try to improve the framework in your favorite language?
And this is kind of a funny question. I certainly wouldn’t consider learning Japanese for a single project but the difficulty of learning a programming language hardly rises to that level. I would consider translating important work done in another human language to my native tongue with help if I was interested in it and knew another language. But again this isn’t perfectly analogous, I find it difficult to work on large open source projects. It comes with many issues/requests and little backup/teamwork. And it doesn’t pay.
I think my answer here might be to experiment. After all, my degree says science I have a control (my previous experience crawling in PHP, Go, and Python) or something like a control, and I have a hypothesis: this would have been easier in Go.
Whether or not I actually do that experiment, well, time gets more precious every single day.
Thanks for reading.