Reputation
1,104
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
9 11
Newest
 Yearling
Impact
~23k people reached

  • 0 posts edited
  • 0 helpful flags
  • 173 votes cast
Dec
9
answered What is the name of this design pattern?
Nov
30
comment What is the difference between size and length?
Specifically, in C#, foo.Count should be the noun with O(1) but foo.Count() can be the verb with O(N) ( unless the receiver implements an interface with a Count property - stackoverflow.com/questions/1651301/… )
Oct
7
answered UML modeling angular controllers / factories and services
Sep
30
comment How to draw programmer's attentions in certain conditions?
@k3b true. At least in my systems, that generally occurs if something is no longer used but hasn't been removed from the schema, which is outside of the scope of the export mechanism - the unit tests for object persistence check whether each field of an object is persisted, but I don't test for unused columns as that would have no observable effect on the system function.
Sep
30
answered How to draw programmer's attentions in certain conditions?
Sep
10
awarded  Yearling
Jun
28
answered What design pattern is this?
Jun
23
awarded  Pundit
Jun
23
comment How safe is it to compile a piece of source code from a random stranger?
Java does allow hiding of runnable code in comments. Not all Java IDEs perform unicode conversions when doing syntax highlighting, which is not remotely the same thing.
Jun
17
comment Scientific evidence that supports using long variable names instead of abbreviations?
Given that loop variables or intermediate values in long formulas often have single character names i, j, k without loss of meaning ( calling them outerIndex, secondIndex adds no value), is the code more understandable because of the longer names or because there are fewer nested loops or multi-line formulas?
Jun
7
comment How to tell your boss that his programming style is really bad?
I'd be very surprised if a checking tool would pick up the examples - if you get a warning gol comparing string values or having a loop with a break in it, then an awful lot of valid code will generate warnings
Jun
6
comment Abstract Property In Base Class To Force Programmer To Define It
@GisMofx If you want to force the state name in each subclass, make the get abstract but don't require a state. Then each subclass will have to provide return "MyState1" as their implementation, and can add mutable storage for the value if they need it. But you need to clarify the requirements in the question - does every type of state require a StateName which can be read, and does any type of state require it to be mutated after creation?
May
28
answered Design pattern for mapping data fields
May
27
comment When is an object of real world a (computational) object in OOP world?
@overexchange that assumes a 1:1 mapping between real world state and object state. It is quite common for a real world objects to be represented as something higher dimensional - for example, an object representing a ball might have an associated sequence of seven dimensional vectors representing it position and rotation in space and time. The state of the real world ball at an instant corresponds to a value in the sequence, and the state evolves over time, but the sequence does not have to be mutable to implement that.
May
25
comment A new name for unit tests
You must write very simple code then. The amount of reachable states in most modern systems mean that to do end-to-end testing would take the lifetime of the universe - testing two pieces each with 4bits of state takes 16 cases to test each, or 32 test cases in total; made into an end-to-end system gives 8bits of state or 256 test cases to cover all states. Personally, I'd rather do 1/8 the work.
May
20
comment Why are shortcuts like x += y considered good practice?
Most functional programmers will consider this bad practice.
May
20
comment Problems with OO design for application with pluggable components
You also might find dl.acm.org/citation.cfm?id=1134016 interesting as a different approach
May
19
comment Python: Are all dictionary comprehensions just more expressive and compact for loops?
'Expressive power' has a specific meaning when discussing computer languages, if you use 'expressive' by itself then half your audience will think you mean the non-technical 'effective at conveying meaning' and half will think you mean 'having a greater expressive power'
May
13
answered “Sweep” a vector of pointers
May
13
comment Teaching myself, as a physicist, to become a better programmer
Although physics is potentially a rich source of metaphors, the intent in XP is finding a metaphor which facilitates communication with the on-site customer and other team members, so would generally tend to choose metaphors which are more commonly understood.