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

  • 0 posts edited
  • 0 helpful flags
  • 177 votes cast
Apr
18
answered Modelling a REST Object Question (Python)
Mar
9
revised How could this be considered performant code?
added 4427 characters in body
Mar
9
comment How could this be considered performant code?
@beirtipol add your test code to your post. Note that the effect of remove(Object) and the code in your post is different - if you can assume that there is only one occurrance in the list you also can add a break; after tradeIdList.set(index, 0);
Mar
9
answered How could this be considered performant code?
Mar
4
comment Extending the flyweight pattern: an oxymoron?
@RobertHarvey no, you can any number of levels of abstract classes. See the second part of stackoverflow.com/a/16725093/1527 for non C++ specific reasons
Mar
2
answered Extending the flyweight pattern: an oxymoron?
Feb
26
comment TDD vs. Productivity
Also (at least last time I checked the tools we have) code coverage reports relate to whether lines were executed but doesn't include value coverage - e.g. today I had a bug reported where I had all paths through the code executed in tests, but since there was a line like a = x + y and although all lines in the code were executed in tests, the tests only tested for the case where y = 0, so the bug (it should have been a = x - y) was never found in tests.
Feb
23
comment Why does everyone put controllers in one folder and views in another?
If you get Resharper, then F12 on the call to View in the controller takes you to the view and the first option in the right click menu on the view takes you to the controller, and the whole problem with the lack of navigation goes away.
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?