389 reputation
19
bio website techfilth.blogspot.com
location New Zealand
age
visits member for 3 years, 9 months
seen Oct 14 at 11:39

I have been coding since the mid 80's. But my profile says i was born in the year 2000. Go figure.


Mar
20
comment How to invoke a method in a class always when the class is accessed - like a reaction?
If configuration is a reference type (i.e. an object) then Device1.Method1 and Device2.Method3 can both manipulate properties in it if they are passed (or have access to) a reference of it. For example: Device2.Method3(I2cBus.Configuration)
May
1
awarded  Critic
Feb
18
awarded  Caucus
Nov
12
awarded  Nice Answer
Aug
19
comment Abstract DAL - Use Interface with Internal Class?
@Bob, sorry I got hooked up on that particular angle, I see from your comment 'and if I need to move the DAL to another assembly' that your DAL is probably right where I would have suggested it should be for an internal item. When you've decided what to do make sure you write it up here (if no answers fit), it'll be interesting to see what you eventually come up with.
Aug
19
answered Abstract DAL - Use Interface with Internal Class?
Aug
19
comment Abstract DAL - Use Interface with Internal Class?
Bob you have totally missed the point. The DAL exposes public stuff via a CONTRACT which is your interface. Standard OO practice means it is oblivious to who is calling it. Let's say it one more time: you can make the class internal, but you don't need to. The rest of the world manages to get by with this approach, why not you? You've also shot yourself in the foot the moment you have a different BL or service that needs to call the same DAL - are you just going to keep adding friend assemblies?
Aug
19
comment Abstract DAL - Use Interface with Internal Class?
I realise that you are trying to do a certain amount of hand-holding on the developers that use the code, but in doing so you have created yourself another problem. Which is why I made my comment - there is nothing wrong with having the methods public (it is a normal practice). If people are using them in the wrong way then you have a code review problem.
Aug
19
comment Abstract DAL - Use Interface with Internal Class?
What are you trying to achieve by keeping your DAL locked away like this? Why keep it secret? It exposes a bunch of methods, it shouldn't care exactly who is calling them. If you have an issue with it being called from the wrong place then you have a code review problem.
Jan
17
awarded  Yearling
Nov
11
awarded  Citizen Patrol
Oct
20
answered After 15 years of programming, how does one get out of it?
Aug
31
awarded  Nice Answer
Aug
28
answered Is the potential performance hit from LINQ worth it for improved readability?
Jun
27
awarded  Supporter
Apr
28
awarded  Editor
Apr
28
revised Teaching Programming to Kid / Teen
added new link
Apr
27
comment Teaching Programming to Kid / Teen
@Andrew, that is certainly related (and a good link), but i would think this question has a couple of points that make it not an exact dupe (i.e. what resources can be downloaded an had for free due to limited connectivity, plus requiring instant progress for the child due to medical condition).
Apr
27
answered Teaching Programming to Kid / Teen
Feb
18
awarded  Teacher