Questions tagged [robustness]

Robustness is the ability of a system to continue to run after it detects an error (Steve McConnell, "Code Complete").

Robustness is the ability of a system to continue to run after it detects an error.
/Steve McConnell, "Code Complete"/

As per wikipedia:

In computer science, robustness is the ability of a computer system to cope with errors during execution or the ability of an algorithm to continue to operate despite abnormalities in input, calculations, etc.

The opposite of robust code is fragile code; an example of fragile code would be having a class with all its member variables marked as public.


The benefits of having robust code are many, some of the most important ones are:
1. Easy to change. Robust code is easier to change because external factors don’t affect its behaviour.
2. Less bugs. The more robust the code is, the less combinations that cause a bug in the code.
3. Better integration. Robust code is predictable, so from an integrator point view, is always going to have the same behavior. 4. Consistency. Robust code works fine no matter who, when or how it gets called.
/Robustness, the forgotten code quality/

Several links by theme:
Examples for Robustness Requirements
10 characteristics of a robust application or service

134 questions
1
vote
2 answers

Preventing crash in user-written includes()

Consider the following code: try { include_once "malformedFile.php"; } catch(Exception $e) { return null; } I have no way to ensure that the file malformedFile.php is valid PHP code, won't crash or won't call die(). How can I continue onto…
dotancohen
  • 30,064
  • 36
  • 138
  • 197
0
votes
2 answers

How should I try 3 times if my code failed to connect a web service in C#?

Here is my code: FtpWebRequest reqFTP; reqFTP = (FtpWebRequest)FtpWebRequest.Create(Constant.IP); reqFTP.Credentials = new NetworkCredential(UserName, Password); reqFTP.Method = WebRequestMethods.Ftp.ListDirectory; response =…
kevin
  • 13,559
  • 30
  • 79
  • 104
0
votes
0 answers

Robustness check in Structural Equation Modelling (SEM) in R

I have conducted SEM analysis in R and used Maximum Likelihood Robust estimator as my data are categorical and deviate from multivariate normality. when I submitted my manuscript, one reviewer asked for robustness analysis. I have been searching for…
Bahar
  • 1
0
votes
1 answer

How to obtain exact results with CGAL Filtered Predicate

I've implemented some code that uses filtered predicate of cgal. I am defining my own filtered predicate to use Exact_predicates_inexact_constructions_kernel at first and then Exact_predicates_exact_constructions_kernel at second if the first call…
Merve A
  • 31
  • 4
0
votes
0 answers

SvelteKit: recover state after user 404

How to make robust navigation on SvelteKit, to keep app state values when a 404 occurs if user cheats the browser URL bar ? I have a complex navigation in my game app. (EDIT 3: removed / simplified some paragraphs) Real-world example is almost 30…
0
votes
1 answer

Safely and efficiently processing a json web service response in rust

I have already searched a lot but have so far not found the solution I was hoping for: Q: What is a proper and efficient way in rust to process a json response from a web service which can by definition not be trusted or relied on 100%. The json…
binaryanomaly
  • 4,712
  • 4
  • 15
  • 22
0
votes
1 answer

Are there any good techniques to avoid broken program state in case of unexpected crash?

I have a class UserInterface containing a list of Items (whatever they represent). The content of these Items is too expensive to keep in memory due to possibly big size, so each Item only stores some metadata (description, preview...) for the…
Alexey104
  • 969
  • 1
  • 5
  • 17
0
votes
1 answer

How to measure image classification model robustness?

Image Classification models trained on animal classification data like iNaturalist or iWildcam sometimes developed spurious correlations with the background. How to measure model performance limitations caused only by such spurious correlations as…
0
votes
0 answers

How to interpret the results of robustness checking?

I am attempting to perform a comparative study, in which I conducted four regression models (2x2) and wanted to compare different functions of ivs to dvs. I wonder how to do robustness checking in this case and what is a robust results? Should all…
0
votes
1 answer

netlib scalapack example1.f - execution problems

I'm trying to compile, link and run netlib's scalapack example1.f program. code for example1.f The code compiles and link OK, but when executed it shows instabilities in the results. Sometimes the residual is very low. Other times it is around…
Lambda
  • 1
  • 3
0
votes
1 answer

CPLEX Studio - Robust Optimization

I'm currently working on a robust optimization of the VRP with CPLEX Studio and at the moment I'm not getting anywhere. Setting up the deterministic problem is no problem so far, but I am failing at implementing the uncertainty. I am working with…
F4814N-K
  • 1
  • 1
0
votes
2 answers

How robust is online sourcing of js scripts, and best practices

I come from an R background and I am starting to learn some javascript for data visualization purposes (think leaflet, d3, chart,...). I trying to wrap my head around the fact that many tutorials and templates suggest loading packages, CSS, or even…
FZS
  • 243
  • 1
  • 8
0
votes
1 answer

Can/Should I disable the cache expiry when backing data store is unavailable?

I'm just started out with Ehcache, and it seems pretty good so far. I'm using it in a simplistic fashion to speed up reads against a database, but I wonder whether I can also use it to let the application stay up if the database is unavailable for…
brabster
  • 42,504
  • 27
  • 146
  • 186
0
votes
1 answer

Periodic operations in a Self-Hosted WCF Service using Timers

I know that it is not a good idea to have timers inside a WCF service class that is hosted inside IIS since these are meant to have short lifetimes. And from the advice here it also sounds like having a service is the best way to go for that…
Andre Luus
  • 3,692
  • 3
  • 33
  • 46
0
votes
3 answers

How do I open, write and save a file while avoiding errors?

I need to erase a file in my program. My solution was to have an erase() method that would do that like so: public static void erase(String string) { FileWriter fw = null; try { fw = new FileWriter(string); fw.write(new…
chustar
  • 12,225
  • 24
  • 81
  • 119
1 2 3
8 9