☆ Yσɠƚԋσʂ ☆

  • 17.7K Posts
  • 16K Comments
Joined 5 years ago
cake
Cake day: January 18th, 2020

help-circle

  • It’s worth keeping in mind that this was a war of attrition. Everybody who was motivated to fight against Russia signed up to join the army early on. Most of those people are now dead. The AFU is now reduced to grabbing people off the street and forcing them to fight. Most people who are left in Ukraine just want the war to be over and they don’t actually care whether Ukraine is going to be under Russian or western influence going forward. The only option NATO has left at this point is to go directly to war with Russia.

















  • Boilerplate is bad because it’s fundamentally just noise. When you read the code you want to be able to tell what the purpose of the code is and what the problem it solves. Ideally, code should be expressing that as clearly as possible. Having a lot of boilerplate is typically an indication that the language semantics don’t allow you to express the solution in a clear way and you have to write a lot of incidental code. The more code you have to read the more cognitive overhead there is in understanding it and keeping it all in your head.





  • I find DRY often turns into an antipattern because decoupling is far more important than code reuse in practice. Having a function that supports many different code paths can make it very brittle because any changes to it need to consider all the possible use cases. However, if you have two separate functions that are similar, but can evolve independently then you don’t have that problem. As a rule, it’s better to duplicate code first, and then extract parts that turn out to be general purpose functionality once that’s identified through usage, and to put that code into libraries.