Articles in the programming category

  1. What is "vendoring" a library?

    Posted on in programming

    In software development, vendoring a library means to include the library's source code in your project's codebase. This is done instead of installing the library as a dependency, which would require the library to be installed on the user's machine.

    There are a few reasons why you might want to …

  2. Why Choose Rust over Java for Microservices?

    Posted on in programming

    Microservices are all the rage these days. They're a great way to build scalable, resilient applications. And the best language for microservices development is Rust.

    Rust is a newer language, but it's quickly gaining popularity. It's memory-safe, fast, and expressive. And it has a great community of developers who are …

  3. New Feautures in Python 3.11

    Posted on in programming

    Here are some of the new features in Python 3.11:

    • Fine-grained error locations in tracebacks. Python 3.11 now provides more information about the location of errors in tracebacks. This can help you to quickly identify the source of an error and fix it.
    • Exception Groups and except*. Python …
  4. Type Checking in Python

    Posted on in programming

    What is type checking?

    Type checking is a process of verifying that the types of variables, expressions, and statements in a program are consistent with the expected types. Type checking can be performed statically, at compile time, or dynamically, at runtime.

    Benefits of type checking in Python

    There are many …

  5. [Git] remote.origin.prune vs fetch.prune

    Posted on in programming

    What is the difference between git config remote.origin.prune true and git config fetch.prune true?

    When you fetch from a remote repository, Git creates a remote-tracking branch for each branch in the remote repository. These remote-tracking branches are used to keep track of the state of the remote …

  6. Bazel vs Buck

    Posted on in programming

    Bazel and Buck are two popular build systems used by large software companies. Both systems offer a number of features that make them well-suited for building large, complex codebases, including:

    • Multi-language support: Both Bazel and Buck support a wide range of programming languages, including Java, C++, Python, and Go.
    • High-level …
  7. The Benefits of Using GitHub Copilot

    Posted on in programming

    GitHub Copilot is a powerful AI-powered code completion tool that can help you write better code faster. It uses OpenAI Codex, a massive dataset of code and natural language, to understand the context of your code and suggest relevant code snippets and entire functions.

    Here are some of the benefits …

  8. Hermeticity - So Hot Right Now

    Posted on in programming

    Hermeticity in software builds refers to the practice of creating software packages that are self-contained, with all necessary dependencies and resources included within the package. In other words, a hermetic build can be installed and run on any system, without requiring additional configuration or installations. This practice is becoming increasingly …

  9. [Python] Patching platform.uname in Tests

    Posted on in programming

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    from unittest import IsolatedAsyncioTestCase
    from unittest.mock import create_autospec, patch
    
    from foo import is_foo, is_bar, platform
    
    class FooTestCase(IsolatedAsyncioTestCase):
        @patch(
            "platform.uname",
            return_value=create_autospec(
                platform.uname_result, system="Linux", node="BAR"
            ),
        )
        def test_wrapper_is_foo(self, m_uname …
  10. Git Remote Moved?

    Posted on in programming

    There are lots of reasons why your Git repository remotes might move. I recently dealt with a migration to GitHub. You can always just clone the repository again and go about your business, but I had several local branches I wanted to keep working on.

    There's lots of ways to …

Slaptijack's Koding Kraken