476 reputation
713
bio website orthogonaltonormal.com
location Johnstown, PA
age 33
visits member for 3 years, 9 months
seen 15 hours ago
//TODO Glorious Lies

Nov
20
comment Name/Fix for Production Code Whose Sole Purpose is to Facilitate Testing?
For testing file IO, IMO it's generally simpler just to accept that the WriteFile() and ReadFile() methods of the class will only be covered by relatively lightweight integration tests that do actual file io instead of trying to mock the file system itself.
Sep
19
awarded  Notable Question
Aug
8
comment Sense of unit tests without TDD
@DougM writing tests first and intending to only write code needed to pass the tests does not guarantee that no untested code will be written (intentionally or by accident). To achieve that you need to have something (most likely a CI system) that generates a failure if code coverage falls below 100%. Setting that up is independent of if tests or code are written first.
Aug
6
comment Quantifying the advantages of a modern version control system
The biggest nightmare I had with clearcase was that, like CVS, it only versioned at the individual file level; meaning merge problems/etc would result in the newest version in CC to become a broken build and the inability to roll an entire codebase back to an arbitrary date/time. Using the option to do a local view instead of a virtual network drive greatly reduced pain from IO latency.
Jul
31
comment Client-side coding: How to prevent malicious use?
Any attempt to protect secure resources client-side is doomed because it violates several of the immutable laws of security. #2/3 - if your software is running on your adversaries computer it's not your computer by definition and you've already lost. #7 attempting to protect a resource by encryption is doomed since you also have to provide the client the decryption key. #10 no technology can fix the above. blogs.technet.com/b/rhalbheer/archive/2011/06/16/…
Jul
30
comment Should the commit history be used to convey critical information to developers?
@Klors As long as you don't restrict yourself to the most pedantic definitions of unit tests and refuse to do other types of automated tests, a test based on checking the file system/etc for the libraries name (if it has the version encoded in it) or a hash/checksum of the file itself could be used to throw a red flag at anyone wanting to update the library even in cases where the new versions flaw is difficult/impossible to capture in a test. (eg multi-threaded race conditions)
Jul
25
comment Should temporary code be put under version control and how?
@MainMa does that still work when the dll you need to reference is part of an application that needs to be installed conventionally?
Jul
25
comment Should temporary code be put under version control and how?
With VS, you sometimes need to take care to make sure you don't have absolute paths sneaking in. I've ran into more than a few problems with busted references when upgrading to win64 and having libraries for 3rd party platforms move from C:\Program Files\... to C:\Program Files (x86)\...
Jul
14
comment Is it a good idea to “#define me (*this)”?
Why not just go all out, and do: #include "vb.h", #Include pascal.h, or #include FOTRAN.h and have the next person to touch your code submit it to TDWTF.
Jun
7
answered Does it make sense to write tests for legacy code when there is no time for a complete refactoring?
Jan
10
awarded  Good Question
Oct
24
comment What are the safety benefits of a type system?
my misgivings are that you should try for 100% coverage in both types; and the use of a percent is obscuring the key fact: that 100% in a strongly typed language is significantly fewer tests than in a weakly typed one, or that phrased alternately a significant bit of the latter's required 100% is given free by enforcing type.
Oct
24
comment What are the safety benefits of a type system?
The use of 100% bothers me though; since there are lots of types of errors that type compile time type safety can't confirm are missing and which still need to be tested.
Oct
24
comment What are the safety benefits of a type system?
+1 for compiling as the equivalent to writing a lot of tests.
Oct
18
comment Is it acceptable to upload offensive content to GitHub?
@MichaelT and Triple-Double-ROT13 better still.
Oct
10
comment Is it reasonable to insist on reproducing every defect before diagnosing and fixing it?
Related: programmers.stackexchange.com/questions/196105/…
Oct
10
comment Is it reasonable to insist on reproducing every defect before diagnosing and fixing it?
If you're able to find a multi-threaded race condition by code inspection you should be able to to reproduce it consistently by modifying the code with additional locking statements that force the threads to start/stop in a sequence that triggers it. ex Thread1-Startup and pause, thread2-Startup and pause, 1-begin using shared object and pause, 2-modify shared object and pause, 1-try using shared object and barf. The biggest issue with this sort of approach is that while it's something you can demonstrate in a debugger it's not suited for adding to an automated test suite. BTDT-GTTS.
Oct
8
comment Overcoming slow problem solving due to increased knowledge of what might go wrong
@Neil "On time. On budget. On Mars. Pick two."
Sep
23
comment Why are CIL and CLR required in .NET?
While they haven't ported to other OSes (or if they did they haven't released the work anyway), MS has ported the CLR to multiple cpu architectures which is a more difficult task. In addition to x86, they support ARM (winRT), and supported the Itanium in earlier versions (although I think they've dropped it for the newest ones).
Sep
19
comment Are there any valid use-cases for eager boolean evaluation?
also related: stackoverflow.com/questions/11411907/…