Use an else after exception (or not)
Consider this bit of code:
Are there well-known PowerShell coding conventions?
Are there any well-defined conventions when programming in PowerShell?
Should comments say WHY the program is doing what it is doing? (opinion on a dictum by the inventor of Forth) [duplicate]
Use comments sparingly! (I bet that’s welcome.) Remember that program
you looked through – the one with all the comments? How helpful were
all those comments? How soon did you quit reading them? Programs are
self-documenting, even assembler programs, with a modicum of help from
mnemonics. It does no good to say:
Is it bad style to redundantly check a condition?
I often get to positions in my code where I find myself checking a specific condition over and over again.
Does studying other people’s programs help in self growth? [closed]
Closed 9 years ago.
Should I use C style in C++?
As I’ve been developing my position on how software should be developed at the company I work for, I’ve come to a certain conclusion that I’m not entirely sure of.
Using ‘new’ in a projection?
I wish to project a collection from one type (Something
) to another type (SomethingElse
). Yes, this is a very open-eneded question, but which of the two options below do you prefer?
Pythonic use of the isinstance function?
Whenever I find myself wanting to use the isinstance() function I usually know that I’m doing something wrong and end up changing my ways. However, in this case I think I have a valid use for it. I will use shapes to illustrate my point although I am not actually working with shapes. I am parsing XML configuration files that look like the following:
Question on refactoring and code design
Suppose, I have a class with a constant static final field. Then I want in certain situations that field to be different. It still can be final, because it should be initialized in constructor. My question is, what strategy I should use:
What is the convention for the star location in reference variables?
I have been learning Objective-C, noting that different books and examples use differing conventions for the location of the star (*
) when naming reference variables: