Readit News logoReadit News
ddejohn commented on Litestar is worth a look   b-list.org/weblog/2025/au... · Posted by u/todsacerdoti
ddejohn · 20 days ago
Excellent post that actually gets into important details for real-world applications. I'm a huge fan of the design of Litestar.

> I also still think there are a lot of bad use cases for repositories and service layers that people should avoid, but that’s a digression which should probably become its own post

As a huge proponent of the repository pattern, I'll be looking forward to this post.

ddejohn commented on We shouldn't have needed lockfiles   tonsky.me/blog/lockfiles/... · Posted by u/tobr
andy99 · 20 days ago
In case the author is reading, I can't read your article because of that animation at the bottom. I get it, it's cute, but it makes it too distracting to concentrate on the article, so I ended up just closing it.
ddejohn · 20 days ago
It's downright awful and I'm having a hard time imagining the author proof reading their own page and thinking "yeah, that's great".

As an aside, I have an article in my blog that has GIFs in it, and they're important for the content, but I'm not a frontend developer by any stretch of the imagination so I'm really at wit's end for how to make it so that the GIFs only play on mouse hover or something else. If anybody reading has some tips, I'd love to hear them. I'm using Zola static site generator, and all I've done is make minor HTML and CSS tweaks, so I really have no idea what I'm doing where it concerns frontend presentation.

ddejohn commented on Design patterns you should unlearn in Python   lihil.cc/blog/design-patt... · Posted by u/zeitlupe
mekoka · 25 days ago
If I had but one design pattern I would just LOVE to see disappear from Python, it's the need for super(). Don't get me wrong, super() is a clever piece of engineering, but if your code actually needs what it's useful for (C3 linearization, MRO, etc), then you've made things too complicated. I deplore the proliferation of libraries that have embraced the seductive, but ultimately deceptive ways of the mixin, because they saw all the big boys reaching for it. The devil gave multiple inheritance a cooler name, some new outfits, and sunglasses to confuse the Pythonistas and they embraced it with open arms.

Refactor to favor composition over inheritance. But if you really must inherit, single over multiple, and shallow over deep. Eventually your code will less and less need super() and it'll become pointless to use it over the more explicit mechanism, which incidentally makes everything cognitively lighter.

ddejohn · 24 days ago
Completely agreed. The codebase I work on really badly abused multiple inheritance all over the place. Some of our classes are 5+ layers of inheritance deep.

All the code I've written since joining has used `typing.Protocol` over ABCs, simple dependency injection (i.e., no DI framework), no inheritance anywhere, and of course extensive type annotations... and our average test coverage has gone from around 6% to around 45%.

It's honestly baffling to see how insanely over-complicated most of the Python is that I see out in the wild, especially when you consider that like 90% of the apps out there are just CRUD apps.

ddejohn commented on Ask HN: Who wants to be hired? (August 2025)    · Posted by u/whoishiring
ashwinsundar · 25 days ago
Oh man, thanks for the heads up! Fixed
ddejohn · 25 days ago
No problem. Also, hello Denver neighbor! Cheers, best of luck.
ddejohn commented on Ask HN: Who wants to be hired? (August 2025)    · Posted by u/whoishiring
ashwinsundar · 25 days ago
Location: Denver, CO

Remote: Yes

Willing to relocate: No

Technologies: python, django, docker, git, postgres, react, next.js, gatsby, typescript, jQuery, vanilla javascript, objectstore (nosql db), prisma ORM, graphql, bash/zsh, github actions, amazon web services (AWS), digitalocean, go, mqtt (mosquitto), R, matlab

Résumé/CV: https://github.com/AshwinSundar/resume/blob/main/resume.md

Email: ashiundar@gmail.com

Seeking: Part-time contracting work (25%-75%)

Target billing rate: $125-$150/hour

About: Full-stack developer with a master's degree in biomedical engineering. Polyglot technologist, with a focus on Python and Django development. Wide variety of professional experience to draw from. Am currently launching a startup (while working a full-time job as a Sr SWE) - I'd like more time to spend on the startup, while continuing to pay my bills. Thus the desire for part-time contracting work.

ddejohn · 25 days ago
heads up, your resume link is a 404
ddejohn commented on Design patterns you should unlearn in Python   lihil.cc/blog/design-patt... · Posted by u/zeitlupe
pbh101 · 25 days ago
The article addresses this.
ddejohn · 25 days ago
I know, I'm just complaining about the mountain of code that does this at my company. And there is no fixing it using the article's approach or any other for that matter due to the sheer scale of the abuse.
ddejohn commented on Design patterns you should unlearn in Python   lihil.cc/blog/design-patt... · Posted by u/zeitlupe
the__alchemist · 25 days ago
All good ones. I'll add this because A: It's common in Python, and B: There are suitable alternatives in the standard library:

Conflating key/value lookups (dicts) with structured data (classes). They are both useful tools, but are for different purposes. Many python programmers (Myself many years ago included!) misused dicts when they should have been using dataclasses.

ddejohn · 25 days ago
Everything in the codebase I maintain at my job is an arbitrary dict and there is no type information anywhere. It wasn't even written that long ago (dataclasses were a thing long before this codebase was written).

There's actually a place where the original authors subclassed dict, and dynamically generate attributes of a "data class" such that it can be used with dotted attribute access syntax or dict access syntax but the `__slots__` attribute of these classes is also generated dynamically so you don't have any auto-complete when trying the dotted attribute access. It's genuinely insane lol.

ddejohn commented on Design patterns you should unlearn in Python   lihil.cc/blog/design-patt... · Posted by u/zeitlupe
nhumrich · 25 days ago
People misunderstand the target audience and code base for the zen of python
ddejohn · 25 days ago
Who's it for, then?
ddejohn commented on Design patterns you should unlearn in Python   lihil.cc/blog/design-patt... · Posted by u/zeitlupe
necovek · 25 days ago
Module-level initialization has one huge problem in Python, though.

That means that as soon as you import a module, initialization happens. Ad infinitum, and you get 0.5s or more import times for libraries like sqlalchemy, requests...

ddejohn · 25 days ago
yep, the legacy codebase I maintain does a lot of this kind of stuff and has made it difficult to write unit tests in some cases due to all the code that runs at import and all the state we end up with
ddejohn commented on How to Firefox   kau.sh/blog/how-to-firefo... · Posted by u/Vinnl
pavel_lishin · a month ago
There's a few pain points with containers; whenever I'm browsing in a container tab, I wish CMD-T opened a new container tab, not my default tab. I haven't been able to find a setting for this :/

I also wish there were more keyboard shortcuts for opening links in specific containers, or re-opening a current tab in a different one.

I know you can set certain domains to always open in certain containers - fine for Facebook, when I occasionally have to use it - but annoying when I'm trying to do things in different (e.g.) Bluesky accounts.

ddejohn · a month ago
Not having subdomains work for container assignments is a baffling design decision. It's a well-known issue and oft-requested feature that the devs seemingly have no plan to fix. It's incredibly frustrating.

> whenever I'm browsing in a container tab, I wish CMD-T opened a new container tab

Not exactly what you're looking for, but Temporary Containers (no longer maintained, fwiw) at least will open every new tab in a new temporary container that will be wiped after a configurable amount of time after closing.

u/ddejohn

KarmaCake day522July 23, 2022View Original