How much are SOLID principles in OOP programming (and JVM languages specifically) just a mindless following of a set of ideas that aren't always the best solution?
Consti @ p_consti @lemmy.world Posts 2Comments 56Joined 2 yr. ago
Consti @ p_consti @lemmy.world
Posts
2
Comments
56
Joined
2 yr. ago
Basically anything low level. When you need a byte, you also don't use a
int, you use auint8_t(reminder thatcharis actually not defined to be signed or unsigned, "Plain char may be signed or unsigned; this depends on the compiler, the machine in use, and its operating system"). Any time you need to interact with another system, like hardware or networking, it is incredibly important to know how many bits the other side uses to avoid mismatching.For purely the size of an
int, the most famous example is the Ariane 5 Spaceship Launch, there an integer overflow crashed the space ship. OWASP (the Open Worldwide Application Security Project) lists integer overflows as a security concern, though not ranked very highly, since it only causes problems when combined with buffer accesses (using user input with some arithmetic operation that may overflow into unexpected ranges).