Questions tagged [fail-fast]

7 questions
32
votes
7 answers

How to treat unhandled exceptions? (Terminate the application vs. Keep it alive)

What is best practice when a unhandled exceptions occurs in a desktop application? I was thinking about to show a message to the user, so that he can contact support. I would recommend to the user to restart the application, but not force it.…
5
votes
7 answers

Fail-fast design vs. limiting constructor logic

In any programming task, my preference is to write fail-fast code. That doesn't seem to be too controversial. However, I've also seen many developers say that constructors should do as little as possible. I'm finding that these two goals are often…
Alan Shearer
  • 161
  • 3
4
votes
1 answer

How to get bug reports without inconveniencing the user

We have a piece of code that looks something like that: std::vector computeGlobalResult() { auto globalResult = std::vector{}; while (myCollection.size() < 100) { auto localResult = computeLocalResult(); …
Renaud M.
  • 382
  • 1
  • 6
2
votes
8 answers

Fail fast is brittle

I am creating a CSV consumer (with Java). There is one field / column that should contain one of the values "Rename" or "Move". I implemented this by allowing mixed case of letters, and blank space at either end. To be precise I used…
NimChimpsky
  • 4,670
1
vote
3 answers

Analogy for fail-fast "speedy" development?

Someone told me that speed is most important for them, so they deploy whatever (to production I assume), fix, redeploy/continuous release and so on. I can't remember exactly, but my takeaway impression is that he thinks it's ok to ship buggy code,…
0
votes
1 answer

API design question: Should a builder perform expensive validation when building?

I'm working on a library of C++ wrappers/bindings, for another, C-ish, API. The C'ish API has a "launch" function, which, among other things, takes a launch configuration structure (well, sort of, I'm simplifying things). Not every point in the…
0
votes
2 answers

NServiceBus: What are the advantages of not using retries?

I know you can configure NServiceBus to automatically retry to send messages (FLR: First Level Retries) and wait before retrying again (SLR: Second Level Retries), but, using the default configuration (5 FLR + 5 SLR) it'll take about one minute…
Machado
  • 4,130