Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)N
Posts
3
Comments
21
Joined
2 yr. ago

  • And no smartphone in your pocket, of course.

  • You can use KeePassXC (with a dedicated vault or not), synced by another mean (Nextcloud, Syncthing, Git, etc.).

  • « Bonjour, je suis syndiqué à la CNT » ça passe ?

  • Certainly not the best, but codecademy is decent. After that, it should be enough for you to learn more deeply from official Python documentation, actual Python code base (from OSS repositories), and specific subjects from blog articles.

    But it will highly depend on what type of content you like. For example some people may prefer books over interactive courses. If this is your case, i think this one is recognized as a very good one: https://learnpythonthehardway.org/python3/

  • Can you explain it to me like i'm a 10 yrs old (which i'm not 🙄), then?

  • Except the ecosystem, how is terraform better than opentofu? As far as i know, currently they still are almost identical.

  • DevOps @programming.dev

    OpenTofu ecosystem?

  • Nice! It looks like the best solution out there.

  • Python >= 3.10 version:

     
        
    def foo(return_more: bool) -> DataType | tuple[DataType, MoreDataType]: ...
    
      

    But i would definitely avoid to do that if possible. I would maybe do something like this instead:

     
        
    def foo(return_more: bool) -> tuple[DataType, MoreDataType | None]:
        ...
        if return_more:
            return data, more_data
       return data, None
    
      

    Or if data is a dict, just update it with more_data:

     
        
    def foo(return_more: bool) -> dict[str, Any]:
        ...
        if return_more:
            return data.update(more_data)
       return data
    
      
  • The difference is that with Protocol you can define which method presence you want to ensure. Like i said: custom vs. generic.

  • From what i understand, Protocol is for custom interfaces that you define (this object must have do_x() method), while ABCs are generic (this object is iterable).

  • Yup, that's what i would also do.

  • Python @programming.dev

    Type hinting in modern Python: The Protocol class

    codebeez.nl /blogs/type-hinting-in-modern-python-the-protocol-class/
  • Yeah we are better served with pedantic nerds that thinks they know IaC better than some top engineer at an IaC vendor 🤷

  • Ok i think i get the point. A "generic programming language" could be used as a "domain specific language" in some context. Is that what you mean?

  • And?

  • The author seems fully aware of the existence CDKTF, and by invest i think he means that they should privilege it instead of HCL. The point is that if you learn Python, it is reusable somewhere else. If you learn HCL, you learned a vendor language, it is only used in Terraform.

  • The author is actually fine with CDK, since it uses an actual programming language. That's the point of the article.

    By the way, on a personal note, Terraform is still bad to my eyes since their license change.

  • I'm in the process of migrating to Pulumi, i like it so far.

  • You can use if instead of the ugly count hack in HCL... 🤷‍♂️

  • You won't see the end of these crapwares until there is centralized managment console with it, sadly...

  • DevOps @programming.dev

    DSLs are a waste of time

    leebriggs.co.uk /blog/2023/09/04/dsl