Questions tagged [dos-donts]

Use this tag for questions related to using known good practices ("best practices"), and questions that lend themselves to receiving answers in the form of DOs and DON'Ts

Use this tag for questions related to using known good practices ("best practices"), and questions that lend themselves to receiving answers in the form of DOs and DON'Ts

For instance, this simple question from early in the site's history, kindly requests a list of good practices when using files. For education purposes. The answers received are many and varied, and naturally fall into the DO THIS and DON'T DO THAT kind of categories.

4 questions
17
votes
14 answers

Quote needed: Preprocessor usage is bad OO practice

I believe, that the usage of preprocessor directives like #if UsingNetwork is bad OO practice - other coworkers do not. I think, when using an IoC container (e.g. Spring), components can be easily configured if programmed accordingly. In this…
tobsen
  • 5,328
  • 3
  • 34
  • 51
3
votes
5 answers

Scope within a scope, do or don't?

Although the example below compiles fine except for the last line with the error, I'd like to know the ins and outs of this 'scoping' within a scope? Also the terminology of this, if any. Consider these brackets: void func() { int i = 0; {…
user1555816
2
votes
3 answers

Machine-readability: Guidelines to follow such that data can be previewed nicely on CKAN

What are the guidelines to follow such that data can be previewed nicely on CKAN Data Preview tool? I am working on CKAN and have been uploading data or linking it to external websites. Some could be previewed nicely, some not. I have been…
kean23
  • 105
  • 6
1
vote
10 answers

Dos and don'ts of using files

I am preparing a lecture on files for the more junior students in programming class. One of the points I want to elaborate are good practices with files. What are the thing to keep in mind when using files in any programming language?
3Doubloons
  • 2,088
  • 14
  • 26