832 reputation
711
bio website tincancamera.com
location United Kingdom
age 44
visits member for 4 years, 7 months
seen yesterday
It might look like a spider, but it's a 7000 year old petroglyph from an Irish barrow tomb.

1d
answered Writing a parser on top of an XML-based AST: am i doing it right?
Apr
8
comment Secure Rest api from authenticated user
@royB You can't stop users making calls. You check the token and get the user, and check whether that user has the access rights to make perform the action, then the response to the request is a non-authorized error. Also, design the API so the actions the user takes are at least power - there's no 'increase points' API, there's a 'charge my account $5 and increase points' API or 'perform this move in the game' API.
Apr
8
answered Secure Rest api from authenticated user
Dec
22
comment Unit testing and reality
@Skahrz you mock the things you're not testing, so if you want to test the thing which calls the service without having network overhead, then you'd mock the service. But you also unit test the service itself to check that it is working.
Dec
19
awarded  Yearling
Dec
19
answered Unit testing and reality
Dec
19
comment Is it good practice to inherit from generic types?
@DocBrown then there isn't a closest approximation - if you think scope is more important than semantics, then inheriting and hiding all constructors is closer; if you think semantics is more important, the semantics of inheritance is 'this is a sub-type' not 'this is an alias'. Also you cannot use inheritance to 'rename' a sealed type, and many systems adopt the open-closed principle by requiring all public classes to be either sealed or abstract.
Dec
17
comment Is it good practice to inherit from generic types?
No, using StringList = List<string>; is the closest C# equivalent of a typedef. Subclassing like this will prevent use of any constructors with arguments.
Dec
17
revised What is a good word for the current “state” of a state machine?
added 3 characters in body
Dec
17
answered What is a good word for the current “state” of a state machine?
Dec
7
comment Early destruction of objects in c++
@ratchetfreak the referent of a static smart pointer is not a global object, the pointer itself is the global object.
Nov
3
comment Generics in low level languages
@KonradMorawski the specialisation is preserved in the reflected type information, but for generating code the behaviour is to erase the type - The first time a generic type is constructed with any reference type, the runtime creates a specialized generic type with object references substituted for the parameters in the MSIL. Then, every time that a constructed type is instantiated with a reference type as its parameter, regardless of what type it is, the runtime reuses the previously created specialized version ... msdn.microsoft.com/en-us/library/f4a6ta2h.aspx
Nov
2
comment Generics in low level languages
C# does both ( type erasure for classes, instantiation for value types) so it's not a binary choice.
Oct
8
answered Website testable design
Sep
11
awarded  Enlightened
Sep
11
awarded  Nice Answer
Sep
4
answered Is a complete rewrite against the license/eula of this software?
Aug
30
comment Industry has no place for passionate programmers?
I find the fact that all the other frogs understood English more astounding than that a frog could climb up a tower.
Aug
30
comment Parameterized Java Types (Generics)
@ggovan that's a constraint, but the resulting IPersistentCollection must have a concrete type
Aug
30
comment Parameterized Java Types (Generics)
If both Car and Train both implement interfaces Vehicle and PurchasableItem, which type would a concatenation of cars and trains become?