mastodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance, open to everyone, but mainly English and French speaking.

Administered by:

Server stats:

746
active users

#encapsulation

0 posts0 participants0 posts today
Continued thread

quotes from the text:

"The concepts rejected as “not complex enough” might be simple building blocks, like molecules in a living body, that can be combined with other concepts to create a framework that can handle an adequate amount of complexity."

"I.e. that the black box has only the purpose of simplification and not that of knowledge elitism and hidden power structures."

New article:

⚠️Why you should avoid import * in Python 🐍
pybit.es/articles/why-you-shou

Covering:
- Why modules are great and namespacing explained
- Why import * is a problem
- A practical example where a function gets overriden
- The recommended way to do imports
- What PEP8 has to say about this
- Protection workaround, use __all__ to define your module's public interface

PyBites⚠️Why You Should Avoid Import * In Python 🐍 - PyBitesHowever, not all ways of using modules are equally beneficial. In this article, we will discuss why using import * can be more problematic than it's worth,

People newer to Python often get confused by the statement:

if __name__ == "__main__":

That's many underscores ("dunders"), right?

In essence it lets you put code in your module that ONLY should execute when the module is called directly. So not when you import from it.

I explain this further with a practical example in this 3 minute video:
youtube.com/watch?v=ubpFY7_dAW

I once was hired as consultant to guide a team who wanted move their monolith to #microservices. We got only halfway. And it was good!

The route to microservices goes via #DomainModeling, #decoupling, and #encapsulation. Bounded contexts, decoupling and modules was enough to put the team back on track and moving again. We never built a single microservice.

This week, Ted Neward wrote about this idea in a post that I now no longer have to write:

blogs.newardassociates.com/blo

blogs.newardassociates.comYou Want Modules, Not MicroservicesDissecting why everybody keeps talking about microservices.