1. 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 …

  2. 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 …
  3. 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 …

  4. Git `remote.origin.prune` vs `fetch.prune`: Which Should You Set?

    Posted on in Programming

    Remote-tracking branches are Git's cached view of branches on another server: origin/feature/login, not your local feature/login. When a branch is deleted on GitHub or GitLab, Git does not remove that cached name until a fetch with pruning asks it to. The result is familiar: a branch appears …

  5. 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 …
  6. 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 …

  7. Disabling Wordpress

    Posted on in Software

    Today is the day!

    I've been working for several months to complete the transition off of Wordpress. After making a flurry of updates today, I decided now was as good a time as ever to finally pull the trigger.

    This site started on Wordpress in 2007. Over the years, I've …

  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. How To Update a Git Remote After a Repository Moves

    Posted on in Programming

    A repository move does not require throwing away a useful clone. If the project moves organizations, changes hosts, or is renamed, your local branches, stash, reflog, hooks, and unpushed work can stay right where they are. Update the remote deliberately, verify it, and then decide whether the branch topology also …

  11. Use a Different SSH Identity for One Git Repository

    Posted on in Programming

    Multiple GitHub accounts on one laptop are normal now: a managed work identity, a personal account, perhaps an open-source organization account. The failure mode is still surprising. git fetch says the repository does not exist even though it absolutely does, because SSH offered a key that authenticated successfully for the …

  12. Quick Codemods with sed

    Posted on in Programming

    I had a few different changes last week (in two different repos) that required one-line changes in lots of files.

    Quick note here that I'm using GNU sed. If you're on a Mac, you can use GNU sed, too (via Homebrew, for example).

    Example 1: Change Status

    In this first …

  13. [Python] Popular Search Terms

    Posted on in programming

    I thought it would be neat to keep an eye on the popular google search terms related to Python.

    The list below uses JavaScript from Google Trends. You can use the kebab menu icon to choose between "Top" and "Rising" search phrases.

  14. Here Comes Git

    Posted on in uncategorized

    In January of 2016, I joined Facebook and had to make the switch from git to hg. To be honest, I wasn't really some sort of zen master of git, but it didn't take me long to completely forget everything I knew about it.

    Now that I've moved on to …

Slaptijack's Koding Kraken