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

2d
awarded  Populist
2d
answered Job Interview Challenges
2d
comment Transforming XML to JSON in C++
yes it is.. but you asked "which one do I choose". If you've already chosen xslt... get on with it! :)
Apr
16
answered Transforming XML to JSON in C++
Apr
16
comment Transforming XML to JSON in C++
Then you need to update the question a little: can you write a standalone app in any language or is it part of an existing C++ program? Is performance an issue? what languages do you (and colleagues) know as future maintenance is important.
Apr
16
comment Transforming XML to JSON in C++
Use the library - that's why libraries are for, and that one comes with source so you can tweak it to your exact needs if necessary. But the ultimate approach is to modify the sending application to spit out JSON instead.
Apr
16
comment Would you re-design completely under .Net?
And this is why you should not jump into the "lets rewrite"- Pratik (or his successors) are now supporting an ancient ASP.NET 2.0/Ajax/.NET framework 2.0 project wishing they could rewrite it in something modern, maybe C++11 :-)
Apr
15
awarded  Good Answer
Apr
15
comment TDD Red-Green-Refactor and if/how to test methods that become private
@BenAaronson or he has a public method with some code that he has tested, and later makes it private, this too is ok, it means the test is now obsolete (assuming it was correct to make such a test in the first place) - whatever calls the private method should have its test improved to exercise that private code by passing the right data or whatever to it. This is the root of it all - TDD is about testing the interface not the implementation which is where the OP is going wrong. Tests for each individual method is an easy route to making this mistake - at least that's what I'm trying to convey!
Apr
15
comment TDD Red-Green-Refactor and if/how to test methods that become private
@BenAaronson My point is really that he's has followed strict TDD but has created tests for methods that he shouldn't have - when he wrote the test he had a mind to the method he was going to be testing, and now finds things to be falling apart. If he had in mind a class interface then his tests would be more focussed on the use of that class and not the implementation of the methods which he now has. If you start with a class with 1 method, and later migrate some of that method's code to a private fn, the test shouldn't need to be changed.
Apr
15
awarded  Nice Answer
Apr
15
comment TDD Red-Green-Refactor and if/how to test methods that become private
@DocBrown what's that got to do with methods? red/green/refactor says to write a small bit of test, then write a small bit of code, then refactor to continually improve the system (AFAIK). Nowhere does unit testing 1 method at a time come into play, you can do this with a class just as easily. The only link is that you may be making changes to a single method at a time as you only make small changes, but you should still be testing more than just that. Here's a link that explains RGR without mentioning methods at all
Apr
15
comment TDD Red-Green-Refactor and if/how to test methods that become private
@DocBrown no, it answers him completely in saying "don't over-granualise" your units and make life hard for yourself. TDD is not method based, it is unit based where a unit is whatever make sense. If you have a C library, then yes each unit will be a function. If you have an class the unit is an object. As Fowler says, sometimes a unit is several tightly-related classes. I think many people consider unit testing to be method-by-method simply because some dumb tools generate stubs based on methods.
Apr
15
answered performance versus reusability
Apr
15
comment Full screen command line app that user cannot close in any way
4 8 15 16 23 42 - cultural reference from the TV series Lost
Apr
15
comment Full screen command line app that user cannot close in any way
install DOS! (ok, ok, or an OS that doesn't have a GUI layer such as Linux without a GUI installed, only having the monitor window available)
Apr
15
comment .NET developer job postings all seem to want ASP.NET - where to start?
it'll partly depend on which of the many versions of ASP.NET you want to work with :-( You should get up to speed quickly after reading a tutorial for ASP.NET on MSDN to get the basic concepts.
Apr
15
answered How to share memory between applications written in C/C++
Apr
15
comment TDD Red-Green-Refactor and if/how to test methods that become private
@HenrikBerg think why you have objects in the first place - they're not convenient ways to group functions, but are self-contained units that make complex systems easier to work with. Hence, you should be thinking of testing the class as a thing.
Apr
15
answered TDD Red-Green-Refactor and if/how to test methods that become private