Reinventing String Length
public int StringLength(string str) { int length = 0; for (int i = 0; i < str.Length; i++) { length++; } return length; }
A screenshot of C# code that manually counts the characters in a string by looping through it, despite already using `str.Length` in the loop condition. The joke is that it redundantly reimplements string length in an unnecessarily complicated way, often shared as a reaction to overengineering or inefficient code.
- @gentoomemes / 344 2022-05-21
- @right_wing_dev_squads / 7219 2023-07-23
- @right_wing_dev_squads / 9628 2024-05-15
- Type
- image
- Size
- 339×158 · 8.7 KiB
- Mood
- sarcastic
- Language
- en
- Added