25,667 reputation
25193
bio website thehungersite.com
location United Kingdom
age 46
visits member for 4 years
seen 6 hours ago
experienced software engineer with many years in the industry, mostly c++ for large-scale, high-reliability systems.

Mar
30
comment Secure DAL Design using Stored Procedures
na, creating sprocs is incredibly easy - you get a DBA to write them for you, and they're usually happy to do it!! (never let sprocs become business logic though, just data access wrappers)
Mar
30
comment Secure DAL Design using Stored Procedures
FYI we used to partition our DB schemas by logical component, and each component had a service to correspond to it. So think of the DB as just another service. Some of our services sourced data from other web services too, so the DB became a 3rd party service that returned data via its API (that just happened to be SQLClient calls rather than WCFClient calls). Its quite nice when your DB stops being a database and starts being just another API to call.
Mar
30
comment Secure DAL Design using Stored Procedures
SQL injection is a bug, not security. To implement security you should be restricting access and putting controls in over who can do what. Testing sprocs is actually very easy - you have transactions so you can start transaction, populate data, run test, rollback. We used to do this from C# code. You can also get your ORM to map sprocs too.
Mar
30
comment Secure DAL Design using Stored Procedures
you can organise them by schema (at least in sqlserver). We had trivial sprocs - you have no security benefit if you allow any read access to the tables. You might want to stick several related queries into a single sproc, eg selecting a user record based on id or name is ok in 1 sproc I would say. Use common sense where to draw the line. And get a decent naming convention!
Mar
30
answered Secure DAL Design using Stored Procedures
Mar
27
comment Concurrent collections, should read methods allow multiple threads at one time?
@MikeNakis in C# - try the ReaderWriterLockSlim class that is in .net framework since 2.0 IIRC.
Mar
26
comment Is there some way to mark which branch is the latest in subversion?
You can script modification of the SVN urls, create new jo9bs based on a set of templates, or look into plugins like FeatureBranchNotifier but I think that only works with Mercurial currently.
Mar
26
answered Is there some way to mark which branch is the latest in subversion?
Mar
26
comment Does code generation increase the code quality?
I disagree that the code generator should be flexible. It needs to be targeted - do one thing well, not lots of things. It should take a small, well defined input and write a chunk of code for you. When it starts to be the program, its headed for failure.
Mar
26
comment Does code generation increase the code quality?
Ooh, +1 or -1.... on one hand code generation is very useful to remove boringly repetitive code where you have a definition that is simply expanded into code, but then you're right that it gets overused into all manner of 'time saving' complexity that ends up an an anti-pattern in itself.
Mar
26
comment Checked vs Unchecked vs No Exception… A best practice of contrary beliefs
I'd rather my heart pacemaker was written in a language that did not have exceptions at all, and all lines of code handled errors through return codes. When you throw an exception you are saying"its all gone wrong" and the only safe way to continue processing is to stop and restart. A program that so easily ends up in an invalid state is not something you want for critical software (and Java explicitly disallows its use for critical software in the EULA)
Mar
26
answered Who should write the Technical Design Document? The BA or the Developer?
Mar
26
comment Development Time: sql in UI code vs domain model with datamapper
If you want faster mapping of SQL queries, use an ORM like Entity Framework. Don't worry about your speed, learn to be good and then get a new job where professionals work.
Mar
25
comment How would a one man team benefit from a continous integration setup?
Try jenkins - it is really easy to set up, keep up to date, and configure. If you have scripts that do your deployment (surely you do...) then it can checkout and run them for you. The big deal about doing this, is that it forces you to make your deployments repeatable. Can you revert a deployment to production without a load of manual steps? If your process was automatic then you would be able to quite easily. Things like this are the difference between an amateur and a professional.
Mar
25
comment How would a one man team benefit from a continous integration setup?
there may not be a compile step, but there's more you can do in a build phase such as run tests, analysis and/or document generation.
Mar
25
answered How would a one man team benefit from a continous integration setup?
Mar
24
comment Better to write your .NET library with COM limitations in mind, or separate your .NET library from Interop?
@MasonWheeler you mean like that legacy .NET stuff, aren't we supposed to be writing Universal Apps with the WinRT API nowadays? What I think: everything is legacy.
Mar
24
comment Better to write your .NET library with COM limitations in mind, or separate your .NET library from Interop?
+1. Whilst I love the beauty of black buttons on a black box practicalities are significantly more important.
Mar
24
comment Abstracting the data in a relational database.
The best way is to stick with the native access for DBs - SQL queries. Everything else is just trying to force a square hole to be round.
Mar
24
comment How “viral” is the Affero GPL?
now if only the AGPL made clear what is and is not a derived work, like mongodb guys have done, then maybe we'd see more adoption of AGPL as it'd replace GPL for people who use a service or library without having to 'taint' their own work.