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 12902

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

Is it better to have separate functions or add more arguments to a function?

If you are using an object oriented language, could it make sense to make the channel an object? channels = new Channel[4]; channels[0] = new Channel(); ... channels[0].SetVoltage(220);
Pete's user avatar
  • 8,986
1 vote

Is it okay to use exceptions as tools to "catch" errors early?

In general, yes, it is a good idea to "fail early". However, in your specific example, the explicit IllegalArgumentException does not provide a significant improvement over a NullReferenceException - …
Pete's user avatar
  • 8,986
10 votes

Is OOP becoming easier or harder?

I would say that the problems with "complexity" you mention has nothing to do with OOP. It has more to do with separating concerns. Many years ago I worked on a system, where the domain class had the …
Pete's user avatar
  • 8,986
1 vote

When calculating how many days between 2 dates, should you include both dates in the count, ...

Both Dates, because that is what the users expect (in most cases) I have worked on a few projects that had to work with logic surrounding dates, and expiration of entities. And there are some pitfall …
Pete's user avatar
  • 8,986