Skip Navigation

Posts
60
Comments
74
Joined
2 yr. ago

  • Thanks. I didn't know that when one adds an image it would override the URL. Even though the post contains the URL, clicking on the title only shows the image. I included the URL in the post body, but it's not as visible, unfortunately.

  • By "lurking" I understand: they would be here reading and voting but not engaging otherwise. In practice, is it any different than not being here at all?

    If by "lurking" you mean that they would be here posting under pseudonyms and asking me if I would be able to identify them... Then it's a more interesting question. But I don't think I would be able to identify them from their style.

  • What microservices offers is loosely coupled services with very limited responsibilities and can be replaced easily and without any impact on a running service.

    We only get this if we do microservices correctly. That's more or less the whole point of my comment. In many cases, teams rush into splitting their monolith into smaller chunks and call it a day. Without proper monitoring, orchestration/choreography, service boundaries, tooling, etc. microservices will drag a team into territories where they will lose control.

    Unless you somehow believe that the same people writing both a monolith and microservices would opt to write spaghetti code [...]

    No, I don't believe that. However, I also don't believe people who write spaghetti code will start writing better code just because now they are writing smaller components. If the team has good coding hygiene, they will produce good code whether it's monolith or microservices. But you have a point. If we are talking about components that are 200LoC, it's more difficult to produce spaghetti (or easier to recover from it). I'm not sure that's the norm, though.

    As a final note: I'm not saying microservices are bad, or monolith is better than microservices. I'm just trying to introduce some nuance. I have been part of a microservices transformation and I think it was successful. But we met with many challenges along the way that were not immediately obvious from the beginning. To quote one of the pioneers of microservices architecture:

    Don’t think of adopting microservices as flipping a switch; think about it as turning a dial. As you turn that dial, and have more services, you’ll hopefully have more opportunity to get the good stuff out of microservices. But as you turn up that dial, you’ll hit different pain points as you go. (Sam Newman, Monolith To Microservices)

    • Linus Torvalds
    • Kent Beck
    • Dylan Beattie
    • Ian Cooper
    • Simon Brown
    • Martin Fowler
    • Daniel Terhorst-North
    • Sam Newman
    • Andy Hunt
  • I think this is a good rule-of-thumb in general. But I think the best way to decide on the correct coverage is to go through uncovered code and make a conscious decision about it. In some classes it may be OK to have 30%, in others one wants to go all the way up to 100%. That's why I'm against having a coverage percentage as a build/deployment gate.

  • White Box Testing

    Jump
  • Most of the time 100% code coverage is just a waste of time.

  • Good code is code that is easier to change, and microservices are that by design. No wonder microservices end up being better code.

    Microservices architecture by itself doesn't guarantee making anything better. Making services smaller doesn't automatically make easy-to-understand code. That's why a lot of companies that didn't pay attention to what they are doing went from monolithic architecture to "distributed big ball of mud" or "distributed monolith". Just like any other architecture pattern, for microservices to work, the team needs to make conscious decisions to overcome the challenges specific to their architecture.

  • Good point. However, approaching this problem from "YAGNI" point of view is a bit misleading, I think. If you are not going to need the timestamp, you shouldn't add it to your code base.

    In my opinion, hastiness is the culprit. When a property appears to be a binary one, we jump to the conclusion to use a boolean way too quickly. We should instead stop and ask ourselves if we are really dealing with a situation that can be reduced to a single bit. The point raised by the article is a good example: you may want to record the state change as timestamp. Moreover, in a lot of the cases, the answer is not even binary. The values for is_published may be, "Yes", "No" or "I don't know" (and then we will be too quick to assign null to "I don't know"). Underlying problem is that we don't spend enough time when modeling our problems. And this is a sure way of accumulating technical debt.

  • You can change the captcha by refreshing it using the button next to it

  • That's a heroic effort! I laughed so hard.

  • Careful with Paul. He may starve.

  • OK, I may have hit a wall with this one.

  • I think I will quit at this point.