Reputation
1,530
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
7 14
Newest
 Yearling
Impact
~43k people reached

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
1d
comment How to decide what instance variables to have in a class?
@nocomprende: I'm really not following your reasoning at all here, or how it relates to the original question. If you're suggesting that, in any Turing-like system of input/calculation/output that the output can always be inferred from the input then, yes, that is true. There are 0 scenarios in the universe where that logic doesn't stand. That doesn't invalidate the need for calculation, though. The point of the computer is to perform that calculation. But this theoretical discussion seems really broad compared to the original question.
1d
comment How to decide what instance variables to have in a class?
@nocomprende: I'm not sure how you leapt from "don't repeat information" to "don't use a computer at all"... I'm simply suggesting that one maintains a single source of truth in any given context for any given piece of information. The proposed alternative, manually keeping different sources of truth synchronized, is highly error-prone and overly-complex.
Jan
21
comment How to decide what instance variables to have in a class?
@nocomprende: It would still be a line or two of additional unnecessary code in that case. It's a very small example of the concept, of course. But it illustrates the point. You'd be storing the same value in multiple places. As the complexity of the system grows, the potential for bugs grows faster. Anybody working in that code needs to manually remember to keep all of the values synchronized, and humans aren't good at doing that. Exceptions can be made for very expensive calculations, but those are rare.
Jan
21
answered How to decide what instance variables to have in a class?
Oct
25
awarded  Yearling
Jun
18
comment Correct approach for creating api contract
@AshutoshPandey: If the new added field is required, it is a change to the published API regardless of how it's implemented. If it's not required, then either approach would work the same to any external observer. There really isn't much of a difference at the published API level.
Jun
18
comment Correct approach for creating api contract
In the first approach, will the server-side code be peeking into the dictionaries and making assumptions/requirements about what they contain? If so, other than losing all compile-time type safety, what's the benefit over the second approach?
Oct
25
awarded  Yearling
Oct
25
awarded  Yearling
May
22
comment Should the design take longer than code development?
This reminds me of one of my favorite quotes: "The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time." - Tom Cargill
Oct
25
awarded  Yearling
Sep
5
awarded  Student
Sep
5
asked Code Measuring and Metrics Tools?
Apr
5
comment Programming Test
Maybe have the candidates fix the system you're using? Or have them develop a new one?
Feb
15
awarded  Critic
Jan
23
awarded  Nice Answer
Jan
20
comment Should I intentionally break the build when a bug is found in production?
@JohnBuchanan: What are the tests meant to validate, if not that the software is doing what it is supposed to do? (That is, that it meets the requirements.) There are, as you state, other forms of tests outside of unit tests. But I fail to see the value in unit tests which don't validate that that software meets the needs of the business.
Jan
20
revised Should I intentionally break the build when a bug is found in production?
added 128 characters in body
Jan
20
answered Should I intentionally break the build when a bug is found in production?
Dec
24
awarded  Nice Answer