16,817 reputation
13063
bio website thehungersite.com
location United Kingdom
age 45
visits member for 3 years
seen 3 hours ago
experienced software engineer with many years in the industry, mostly c++ for large-scale, high-reliability systems.

Apr
8
comment Different database for Membership and our web data or use just one?
No need to have different databases for this case, just put them in different schemas within the same DB (assuming your DB supports such a thing) they can be secured using this almost as well. If not, different databases are good.
Apr
8
revised Real time unit testing - or “how to mock now”
added 949 characters in body
Apr
8
answered How to Learn Doing it Right Way?
Apr
8
comment Why is “Select * from table” considered bad practice
@Aaronaught seriously, one little bit of bad practice does mean its ok because you do it once. People who use string comparitors use them all over the place, array indexes become keyed by strings and next thing you know, you've slowed everything down - and then you look at benchmarks and say "it must be that big db connection because I profiled the indexes and they look insignificant". Overall performance comes from an eye on how everything works.
Apr
7
answered Do C++ library developers only write C compatible interfaces as an afterthought?
Apr
7
answered Real time unit testing - or “how to mock now”
Apr
7
comment Can I change operator precedence and associativity in C++?
that'll be the function called operator*() though, no different to a function called anything else. a.add(b) tells you nothing other than a function call is being made - exactly the same as if you'd used the + operator. I suppose you could use the alternative form: a.operator+(b); if you really preferred the explicitness. So you found a bug... when I was little I was chased by a dog.. but that doesn't mean I have to be scared of dogs today.
Apr
7
comment What do we call the process of changing hard-coded codes into soft-coded codes?
put "enabling configuration options", though this assumes that's what you're doing - if you're just altering the codebase to put the '42' behind a facade, then I doubt it is useful work - do the refactoring as you use those values during other tasks.
Apr
7
comment I don't understand the arguments against operator overloading
the 'bitwise shift' operator is only called that for historical reasons. When applied to standard types, it does a bitwise shift (in the same way that the + operator adds numbers together when applied to numeric types), however when applied to a complex type, it can do what it likes, as long as it makes sense for that type.
Apr
7
comment Can I change operator precedence and associativity in C++?
+1, but I have a feeling Java didn't allow operator overloading because it had limitations in its underlying format, so only methods were allowed - one reason why properties are so prevalent, you could not access the member directly, but you could via a method call. So it was there to make the platform easier to create, not because of ideology. (don't ask for a reference, this is dredged up from memory of an IBM course nearly 20 years ago!)
Apr
7
comment Can I change operator precedence and associativity in C++?
@JohnR.Strohm but consider the debugging fun where a.add(b) != a.add(b). Operator overloading is a good syntactic sugar, nearly all of the arguments against it are strawmen.
Apr
6
comment Why do projects opt to stay on an older version of the .NET Framework?
My car's 8 years old now, and it still works fine. 'course I bought an expensive, well built car rather than some cheap n cheerful runabout. My parent's house is roughly 40 years old, and still standing. And I used to drive across a bridge that was built several hundred years ago. Maybe these analogies holds up better than simply looking at age as a simplistic number - quality matters far more.
Apr
6
comment Why do projects opt to stay on an older version of the .NET Framework?
and sometimes you can't upgrade. My MMC snapin (on windows 7) only works with .NET 3.0, and some places don't want to ship the framework - so they go with what came with the OS, in Windows 7's case that's .NET 3.5
Apr
6
comment Why is “Select * from table” considered bad practice
@Aaronaught and yet you criticise indexes for being "an error waiting to happen" yet you advocate "select *". String compares v integer compares - they're hugely different, and a program based on string compares is going to be very slow, it may be "a few CPU instructions" (plus a few memory accesses, and cache stalls) but they add up. Sometimes they really add up.
Apr
6
comment Why is “Select * from table” considered bad practice
@Aaronaught who says he's using a major framework? who says he isn't using index access? You can assume all you like, but at the end of the day - its an error waiting to happen solely to save someone typing out what they wanted to use - laziness is always poor programming practice. (and index is good - its fast, unlike string compares for everything. There are reasons apps run as fast today as they used to years ago even though we have vastly faster computers. This is one of them)
Apr
5
awarded  Guru
Apr
4
comment Why is “Select * from table” considered bad practice
@gnat can a question really be considered a duplicate of a closed question? (ie because the closed one wasn't really suitable in the first place)
Apr
4
comment Why is “Select * from table” considered bad practice
@Tonny I'd agree - but when I answered (first) I never thought this question would generate quite so much discussion and commentary! Its obvious to query only for named columns, isn't it?!
Apr
3
comment Why is “Select * from table” considered bad practice
@TallGuy the point is you do not know which order the columns will appear in (ie if something changes). I prefer to be explicit in these things, so I am not surprised by code that reads columnX yet one day suddenly starts to be populated with columnN. Its sloppy, lazy programming practice. (and its also inefficient if you only use a subset).
Apr
3
awarded  Good Answer