views:

47

answers:

2

Assume you are in the process of developing some really cool software. It will be deployed to a lot of customers. They will need this software and they will use it in time-critical situations. So if something goes wrong they will call (you). And you or your team will be the ones who have to resolve the issue. Fast. You know out of experience this will happen.

Now if you could decide what to implement to aid your future self - what would that be?

Edit: This is about desktop applications. Thanks Marcelo.

Edit: Also let's assume tech support cannot talk it away and it really needs to be fixed. Or there is no dedicated tech support.

+4  A: 
  • A logging system
  • A way for the client to automatically send crash dumps
  • Decent error messages ("An unknown error occurred. Error code: 0xAA001200" is a no go)

Anyways your time is better spent improving the software.. This sounds like the kind of work for QA/tech support.

Andreas Bonini
Ok about the logging system: like a self developed logging system? Or maybe something like Windows event log? Would you let it always enabled? Or enable it on demand? Hm... This could bloat the code. But I agree that logging is a good thing. But one would have to log _everything_. Logging complex data can cost time... and memory. Would you encrypt the log? Would you use text files...?
Heinrich Ulbricht
Those are all very vague questions. It depends on your needs, the type of your application, etc (anyways logging is not really CPU intensive, and definitely not memory intensive)
Andreas Bonini
I know i know. There are many ways this question might be ansered. We can talk about general methods like generating a log (file?). Then we would need to talk about a good method to transfer the log. And soon we can talk about implementation details. Like: Say there is a logging function Log(). If you call Log() in a tight loop it might impact performance. Also the parameters you want to log might take time to generate. Now if you log everything it impacts performance.
Heinrich Ulbricht
A: 

Automated unit and integration tests.

Don Roby
Agreed, a must have to prevent bugs in the first place.
Heinrich Ulbricht
Also critical to prevent adding bugs while fixing the ones you missed.
Don Roby