Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 222588

Programming Practices are the commonly or not so commonly used practices in development of software. These can include things like Agile Development, Kanban, Coding shortcuts, etc.

-3 votes
2 answers
177 views

Guards: Isn't it true the we can replace them if "if" - "else if" - "else" without any signi... [closed]

There are a lot of examples over Internet that show why you should use guards. For example: public double getPayAmount() { if (isDead){ return deadAmount(); } if (isSeparated){ return se …
user90726's user avatar
  • 205
1 vote
Accepted

Guards: Isn't it true the we can replace them if "if" - "else if" - "else" without any signi...

Here is an example from Implementation Patterns book by Kent Beck: // version without guards void compute() { Server server= getServer(); if (server != null) { Client client= server.getClient( …
user90726's user avatar
  • 205
1 vote
1 answer
406 views

Which statements can be considered as exit points?

There are many discussions related to whether it is better to have only one or multiple exit points per function, but it is not clear to me which statements can be considered as exit points: only retu …
user90726's user avatar
  • 205