The Daily WTFRemy Porter1 min readintro
CodeSOD: Extremely One Line
Summary
The article spotlights a legacy ASP.NET page where the Page_PreInit method is crammed onto one line, mixing user‑agent sniffing and magic strings, illustrating how such code hurts readability and maintainability.
- One‑line method bodies hurt readability; keep each method on its own lines.
- Avoid user‑agent string sniffing; use feature detection instead.
- Prefer enums or constants over magic strings like "uplevel".
Engineers maintaining or refactoring old ASP.NET applications should care because these anti‑patterns make the codebase harder to understand and evolve.
4/10