Kristijan Kralj
kristijankralj.bsky.social
Kristijan Kralj
@kristijankralj.bsky.social
Helping .NET developers master the latest tech and industry best practices.
You don't need to be perfect.

But ignoring these?

That's how "legacy code" is born.
July 30, 2025 at 6:23 AM
10. Reinventing the wheel

Unless you're writing an ORM for fun... stop.
Use proven, maintained libraries.
Protect your time and sanity.
July 30, 2025 at 6:23 AM
9. No logging or monitoring

You shipped it. Great.
Now how do you know it's working?
No logs = flying blind.
July 30, 2025 at 6:23 AM
8. Ignoring security

Validate input. Follow least privilege. Sanitize everything.
Security is not optional. Ever.
July 30, 2025 at 6:23 AM
7. Poor database design

Bad schema = slow app, no scalability.
Think long-term when modeling data.
July 30, 2025 at 6:23 AM
6. Unreadable code

Write for humans, not machines.
If it takes 3 reads to understand your logic, you’re doing too much.
July 30, 2025 at 6:23 AM
5. Unhandled exceptions

Full stack traces in responses = free roadmap for hackers.
Log errors internally. Return safe messages externally.
July 30, 2025 at 6:23 AM
4. Skipping unit tests

Too busy to test?
You'll be busier fixing bugs.
July 30, 2025 at 6:23 AM
3. Tight coupling

Classes that directly depend on other concrete classes = zero flexibility.
Abstractions exist for a reason.
July 30, 2025 at 6:23 AM
2. Hardcoded values

If you love global search and refactor headaches, use magic numbers.
Otherwise: config files, constants, or DB settings.
July 30, 2025 at 6:23 AM
1. No input validation

Bad data gets in.
Everything breaks.
It's 10x harder to clean dirty data than to block it at the door.
July 30, 2025 at 6:23 AM