Should coding standards be enforced by the continuous integration server?
Should coding standards/style be enforced by the continuous integration server running static analysis tools (ex. PMD, StyleCop/FxCop) and failing the build if the standards are not followed? What types of rules should not be used to fail the build?
How does a variable introduce state?
I was reading the “C++ Coding Standards” and this line was there:
Using T[1] instead of T for functions overloaded for T(&)[N]
The asio::buffer function has (void*, size_t)
and (PodType(&)[N])
overloads.
I didn’t want to write ugly C-style (&x, sizeof(x))
code, so I wrote this:
Why would an employer ask for a ‘long’ code sample? [closed]
Closed 9 years ago.
What should my “large codebase sample” look like? [closed]
Closed 9 years ago.
is there any elegant way to analyze an engineer’s process?
Plenty of sentiment exists that measuring commits is inappropriate.
Is the use of “utf8=✓” preferable to “utf8=true”?
I have recently seen a few URIs containing the query parameter “utf8=✓”. My first impression (after thinking “mmm, looks cool”) was that this could be used to detect a broken character encoding.
Switch or a Dictionary when assigning to new object
Recently, I’ve come to prefer mapping 1-1 relationships using Dictionaries
instead of Switch
statements. I find it to be a little faster to write and easier to mentally process. Unfortunately, when mapping to a new instance of an object, I don’t want to define it like this:
Long lines of text in source code [duplicate]
Possible Duplicate:
Is the 80 character limit still relevant in times of widescreen monitors?
Where should I define constants in scripts?
When writing scripts using a modern scripting language, e.g. Powershell or JavaScript, where should I define constants? Should I make all constants global for readability and ease of use, or does it make sense to define constants as close to their scopes as possible (in a function, for instance, if it’s not needed elsewhere)? I’m thinking mostly of error messages, error IDs, paths to resources or configuration options.