stfn :raspberrypi: :python: on Nostr: New blog post! This time it's my first post about slightly advanced programming in ...
New blog post!
This time it's my first post about slightly advanced programming in Python. I talk about using the dependency injection design pattern to separate business logic from I/O calls to have cleaner code and simpler tests.
Well, actually the topic is more generic and can be applied to any programming language, but here I use Python as an example.
Anyway, here it is!
https://stfn.pl/blog/62-python-dependency-injection/#python #programming #softwaredevelopment #pytest
Published at
2025-02-10 20:37:52Event JSON
{
"id": "d2a7d2da7f2c9b3f89cb7e22602bb4b279d2a191c849eca59a23b2745d6399e6",
"pubkey": "b31444cf76f5ae896938b59da85d937b047dff63e403d3a3f79fabfe9b961256",
"created_at": 1739219872,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"t",
"programming"
],
[
"t",
"softwaredevelopment"
],
[
"t",
"pytest"
],
[
"proxy",
"https://fosstodon.org/users/stfn/statuses/113981513567321663",
"activitypub"
]
],
"content": "New blog post!\n\nThis time it's my first post about slightly advanced programming in Python. I talk about using the dependency injection design pattern to separate business logic from I/O calls to have cleaner code and simpler tests.\n\nWell, actually the topic is more generic and can be applied to any programming language, but here I use Python as an example.\n\nAnyway, here it is!\n\nhttps://stfn.pl/blog/62-python-dependency-injection/\n\n#python #programming #softwaredevelopment #pytest",
"sig": "79d317c2143192105fd7e6f7b9ad26863992f49683aa3cec2246b94bf46584aeed088f4d9a1a5acd17d4fccd550d21744337ee334fd67de7b76cc8032f39166b"
}