arclight Profile picture
21 Jul, 10 tweets, 2 min read
I'm coming to the conclusion that Python really doesn't want you to develop packages and modules. No guidance on setting up project directories, etc., no info on running local dev code vs installed code. This ecosystem is a goddamn nightmare.
If you want to write a standalone, it's trivial. If you want to build an actual installable package with source code arranged in anything resembling a standard or workable manner, get f'ed. Either it can't sort its path out or it can't find local packages
Good OO Practice is to build a set of independent reusable packages and have a small CLI driver that imports those packages and calls main(). None of this is new. Staggering how awful/missing Python guidance is.
I'm not some n00b; I've been using Python on and off for a decade, and programming since the early 80s. Python is not my primary language for the simple reason that it's not a very good language for the bulk of my development. You don't use a toaster oven to cook a pot roast.
And that's not a ding against either pot roasts or toaster ovens; we have all sorts of tools for addressing all sorts of computational niches. Not every tool is superior at every task; they tried that with PL/I and to a lesser extent with ALGOL: it just doesn't work.
It should not be so murderously difficult to set up a basic Python dev environment that supports driver/library-style development. And yet it is.
I've built Python 3.9.6 from source and installed it locally. I've set up a virtual environment so I can control my dependencies. I used pyscaffold to set up a skeleton project. I'm ostensibly in control of all aspects of this environment. It should not be this difficult.
And this is much less about Python-the-language than Python-the-culture or Python-the-ecosystem. I can only see this lack of basic guidance and tooling to be contempt for developers. It's meant to be difficult because you're not dedicated or skilled enough, not a True Believer
Jupyter is great for scoping and visualization and small-scale experimentation. Transitioning from Jupyter to a standalone script is mostly painless. Migrating to self-contained, reusable, and sensibly redistributable packages is nigh-impossible.
Python is the one-time-use plastic of languages. It's pretty and convenient and disposable. Once your application serves its immediate purpose, you throw it away.

I mean, that solves the legacy code problem for some definition of 'solve'.

• • •

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with arclight

arclight Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @arclight

22 Jul
Curious what non-nuclear people think that hole in the middle of the pellet is for...
It's time to divulge my answer, fully expecting the fuels people to correct me if I stray too far.

The central hole serves a few related purposes, the main one being to reduce the maximum temperature of the fuel pellet.
Fission is strongly dependent on material density and geometry. Ignoring heat for the moment, the fission rate at the center of the pellet is highest along the centerline; neutrons born near the surface are more likely to `leak` out of the pellet and not cause another fission
Read 21 tweets
22 Jul
I love this from the preface to McCracken's "A Guide to FORTRAN IV Programming" Image
I'm not sure which is funnier; computer programming courses being worth no more than 1 credit, or Fortran programming "is not very difficult to learn".
That's from 2nd Edition (1972); I have 2st Edition on order (covers FORTRAN II; circa 1962-3)
Read 4 tweets
21 Jul
Back on the phone with the specialty pharmacy, trying to get a refill on meds, my records corrected, and this spurious $2000 charge resolved. Better to get the billing sorted before they try to tag me for another $2k. Been dreading making this call for days...
... so my account was messed up (somehow) and copay assist wasn't getting billed so I may have fixed matters for the next 4 weeks until ExpressScripts finds a new way to try and kill me.
And as I say to the front-end pharmacy worker, imagine trying to navigate this as a cancer patient. "Oh yeah, we didn't feel like paying for your chemo for six months. Oops."
Read 5 tweets
21 Jul
My goal today was to work on my code, not complain about Python. It's just incredibly frustrating trying to Do The Right Thing as a professional developer and have a language/ecosystem fight you so vigorously.
I swear it will be easier to develop what I want in Fortran (even interfacing with C code - regex libraries, etc.) than in Python. Fortran is not a good language for text processing but its advantage is it's simple. For all its deficiencies, it really doesn't get in your way.
I've spent a day and a half trying to set up a standard(-ish) dev environment for a simple CLI app and a package of implementation code and it's turning out to be intractable. That day and a half should've been spent writing my code, not trying to make infrastructure work.
Read 4 tweets
20 Jul
Starting a Python project makes me sad and sleepy. It's like C++: there are no good ways of doing anything, only less-bad ways. But C++ is deep and cryptic; Python is restlessly moody and contrarian. C++ also leverages the conventions of C so there's a sensible place to start
I probably haven't looked at pyscaffold or cookiecutter in a year or two and they don't seem to have changed any. Neither explains what it intends to do without running it; cookiecutter still wants to play 20 questions but refuses to even tell you what they are before starting.
I feel like I'm showing up at the DMV to get a drivers license without any idea what paperwork I need to bring, how much it costs, whether I have to take a test, road and/or written, etc. The whole experience is avoidably stressful and frustrating. Feels really unfriendly.
Read 7 tweets
20 Jul
I won't go into details but ExpressScripts is the Comcast of insurers. Except Comcast was occasionally known to provide their primary service. It's staggering how bad they are. It's worse than being uninsured because nobody lies to you about what they'll pay for.
It's like we're paying for them to ignore us and feign amnesia
I'm honestly at the end of my rope with them. It's gone from incompetence to malice to out-and-out fraud. That's the only word I have for it. Fraud.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!