3 Quick Tips for Improving Code Quality

preview_player
Показать описание


Improving code quality and preventing unnecessary errors is really simple. In this episode I go over 3 simple things you can do to improve the code you write.

1. Using guards, 2. Never trust data, 3. Keep it simple
Рекомендации по теме
Комментарии
Автор

Good video. I've found to be difficult for developers to embrace this simple rules. Mainly the "Never trust data". Most times we manage all data and we assume that, if we reach this point, then the data has to be correct. It's never like that.

HugoParedes
Автор

Wow this good lesson on writing quality code. You can never really assume your user is going to insert proper data. They may even do it mistakenly.  Thanks for the lesson! :-)

slickliverpool
Автор

Yes, simple code is easy to understand and maintain.

InshuMussu
Автор

How do you have the numbers of references above the method?

cwrau
Автор

Never trust the data :) Thanks a lot ... Good presentation...

huseyinozkara
Автор

4:09 Nein! Nein! Nein! Nein! Nein! Nein! Absolutely don't do that.
"something".Equals(r.Value);
The string literal "something" is guaranteed not to be null and Equals will check for nulls internally.

bencesarosi
Автор

NEVER use guards! Document the preconditions and move the responsibility to the client using your code. This way your code is simpler and you avoid that guards will be implemented redundantly in chains of method calls.

AllanHelboe