novonine-Note-33398-11

Token ID: 1

ERC-721 1 Transfers

Metadata

{
  "title": "Debug My Way",
  "tags": [
    "post",
    "code",
    "debug"
  ],
  "summary": "The simpler and more boring the code is, the more satisfied I am with my work.",
  "sources": [
    "xlog"
  ],
  "external_urls": [
    "https://logs.novonine.space/debug"
  ],
  "date_published": "2023-01-14T23:48:18.494Z",
  "content": "![british-library-uKvNvTqMs3Q-unsplash.jpg](ipfs://bafybeicfyh5cfqn2bo7h4ydgkx33egb74q64zdswykctqwdnir5yuuk6vy)\n\n## The main reasons I write tests are:\n- reduced cognitive load,\n- improved communication with my peers,\n- ability to sleep at night.\n\nTesting allows me to split hard problems into chunks small enough to fit in my head. I'm young, but with every passing year as a software engineer more and more often I wonder whether these chunks are becoming smaller because I'm getting better at my craft or because I'm losing the ability to hold and process large, complex ideas. Yes, I know I'm a bit paranoid.\n\n1. _Writing code is easier than reading it._\n2. _If your code is hard to write now it will be almost impossible to read later._\n\nThis is a paraphrase as I can't find the original quote, but I think it sums up the issue pretty well. Structure your code in a way that a more tired, less focused, \"drunk\" version of you would understand.\n\nTests help with this because they make the intent behind the code more obvious. First, test cases document the use cases. What's more important is that the code written following TDD tends to be simpler and less abstract.\n\nThe simpler and more boring the code is, the more satisfied I am with my work.\n\nIf we're working together, the last thing I want to do is to make your life harder. It's in the interest of both of us to be able to focus on something more rewarding than untangling spaghetti – such as, you know, building stuff.",
  "attributes": [
    {
      "value": "debug",
      "trait_type": "xlog_slug"
    }
  ]
}