Reputation
9,025
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 24 56
Newest
 Enlightened
Impact
~436k people reached

1d
comment Is catching general exceptions really a bad thing?
@Andy: Yep everything depends on what you are doing.
Aug
2
comment How to make a large codebase easier to understand for new programmers
I agree with every point you make here. I don't like the term the OP used in his post how a class works. This changes with time and maintenance. Though my team does not put the above in the source. We maintain a wiki with decisions and copy the slack channel discussion about design decisions raw into a document (We provide a link from the decision summary and conclusion to the raw notes so we don't have to re-hash old decisions). All done neatly in github (so it is all in one place).
Jul
14
revised Is it fine to have broken intermediate commits, as long as the final commit in any push works?
edited body
Jul
13
answered Is it fine to have broken intermediate commits, as long as the final commit in any push works?
Jul
7
comment Why using sizeof of type to calculate the number of elements in an array is considered inferior to using sizeof of an element?
@gnat: You should make that an answer.
Jul
6
awarded  Enlightened
Jul
6
awarded  Nice Answer
Jun
24
comment Why is #include <iostream.h> bad?
@PravasiMeet: <iostream.h> was deprecated in 1998. You should NOT use it.
Jun
11
comment What is the “type” of data that pointers hold in the C language?
You can also take the address of a pointer (which gives you a pointer to a pointer to a type). Or derefernece a pointer which takes one level of indirection from the type.
Jun
11
comment What is the “type” of data that pointers hold in the C language?
@SteveIves: That is almost true for Von-Neuman architectures. It may not hold for other architecture types. A counter example is dataflow architecture. My experience on The Manchester dataflow machine (which had no concept of memory) and as a result a pointer was "<An Instruction (A Member of a graph)><An Instruction Port><A Colour><A Counter><Boolean Flag indicating if it had arrived>"
Jun
8
answered pthread versus boost::thread - need to set the thread priority on an ubuntu box
Apr
15
comment Designing exception classes
I tend to agree in principle with your reviewer (mixing error codes and exceptions is not really that useful). But unless you have a huge library having a big hierarchy is also not useful. A base exception that contains a message string, only have separate exceptions if the catcher of the exception can potentially use the uniqueness of the exception to fix the problem.
Feb
27
comment Why are structs and classes separate concepts in C#?
If you move your last paragraph to the top and delete the current first paragraph I think you have the perfect argument. But the current first paragraph is just subjective.
Feb
1
comment Should Latin-1 be used over UTF-8 when it comes to database configuration?
@CortAmmon: Not just emotional. But these things are already in production. So there is non zero financial cost as old systems need to be converted. Not just on the the DB but all the old code that touches the DB.
Jan
11
awarded  Yearling
Oct
22
awarded  Nice Answer
Oct
14
revised How to setup the c++ rule of three in a virtual base class
added 21 characters in body
Sep
30
awarded  Explainer
Aug
4
awarded  Nice Answer
Jul
15
comment Is it a good idea to “#define me (*this)”?
@Mehrdad: But only putting yes or no makes a very boring answer. Thus explanations are usually quite useful in explaining how the answer is reached (is encoraged by How to answer ). The conclusion is not to use because the OP has the wrong attitude to start with about using this and thus a discussion on that point is required to achieve a fully balanced conclusion.