Questions tagged [error-detection]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-3 votes
3 answers

How to Validate Output Binary During/After Compilation on Platform without ECC Memory [closed]

On a platform with ECC memory, you can assure the compiled binary is 100% legit with EDAC daemon. (single-bit error will be corrected automatically, and multi-bit error will be logged so you can just ...
hurryman2212's user avatar
0 votes
0 answers

Best way to trigger javascript error to go to catch block

I have a couple of doubts regarding the quality of my code. I'm working on a helper function (for KoaJS) where I'm validating a Firebase ID token. If it is valid, I return the decoded token; otherwise ...
Guswiri Salpia's user avatar
0 votes
0 answers

Data protection: is there anything which is more rigid than simple byte by byte XOR and less complex than CRC-8?

I need to transfer only 5 byte message over the noizy line and I'd like not to make the message much longer with the data protection redundancy. Let's say I suppose that one extra byte should be ...
Roman Matveev's user avatar
55 votes
11 answers

Is there a general solution to the problem of "sudden unexpected bursts of errors" in software?

Let me explain what I mean. I have made a complex, highly polished over years PHP framework/library for my own use. I very aggressively log the smallest notice and immediately deal with it as soon as ...
user379490's user avatar
1 vote
1 answer

How to check data has been received correctly with CRC - much confusion here

I am trying to process some serial data (sent over UART). Its coming from a radio controlled receiver, is 27 bytes long. The last 2 bytes of this are a 16bit CRC check according to the spec. The ...
James Hounslow's user avatar
1 vote
1 answer

What is better way to track mistakes in error-prone part of a feature?

That is quite specific circumstances I've come across, and I somewhat struggle to find proper way how to approach this. I'm given a class written in swift-language, which has a control property, like ...
The Dreams Wind's user avatar
1 vote
2 answers

Error Monitoring On The Apps Which I'm Selling

I'm developing JS and PHP scripts and selling them on various marketplaces. But I need to track/monitor errors on my scripts. Usually, I use Sentry for own web apps, but I'm not sure if it's okay to ...
Eray's user avatar
  • 336
-1 votes
2 answers

How to structure an application (and its user interface) such that extraneous and/or malformed data can be handled?

I recently applied for a position as a software developer. As a part of the recruitment process, I was given an assignment that involves reading data from a file. The thing is that the example file ...
Lehonti's user avatar
  • 19
1 vote
1 answer

Reverse engineering a checksum or CRC

I am trying to reverse engineer a checksum or CRC wherein an 8 bit number* gets converted to a 5 bit number for error checking. I have an incomplete list of data values and checksums, and need to ...
DrWizard's user avatar
2 votes
1 answer

Hamming codes detect error in check bits

I just started learning about hamming codes and they're pretty awesome. I was just wondering though, are the check bits able to detect error in the check bits, as in, if one of the check bits is ...
richard davies's user avatar
-1 votes
1 answer

Working On Remote Errors in a Variety of Environments Without FTP or SSH Access

BACKGROUND: I've been developing in PHP for two years - self taught, and beyond the most basic editing, really just a year and a half - but my experience is limited to a small number of environments. ...
Carl Elder's user avatar
-1 votes
1 answer

Is this a named pattern: Injecting specialized objects to detect fault conditions

I've got an idea, but I wonder whether somebody else already has named it. I'm writing code to control a machine with actuators, motors, etc., and software will be responsible for preventing ...
Solomon Slow's user avatar
  • 1,213
20 votes
3 answers

How to handle post-validation errors in command (DDD + CQRS)

For example, when you submit a Register form, you have to check in the Domain Model (WriteModel in CQRS) that it is in a valid state (example, email address syntax, age, etc). Then you create a ...
JorgeeFG's user avatar
  • 659
2 votes
1 answer

Why is checking weird bit errors important in garbage collectors?

Here's a rough translation of a tweet by @xharaken. "Space rays hit computers and mess up the bits in the memory" "hardware bugs mess up the bits in the memory" such things almost never happen, but ...
hello all's user avatar
  • 358
4 votes
4 answers

Should exceptions be raised higher up or lower down or both? [closed]

When calling some function in a Python application, the function often calls functions deeper down which again call functions deeper down, etc. It is easy to unknowlingly pass a bad value to the top-...
cmeeren's user avatar
  • 329
5 votes
5 answers

Debug function input vs expecting code users to read the documentation - How far do I go? [duplicate]

I could write an endless amount of debugging code to handle the various components of input for a function, check that the correct data types are used, make sure things are decendants of the proper ...
J.Todd's user avatar
  • 3,833
0 votes
0 answers

Checking for null pointers or allowing a math library to segfault?

I've been going through the GNU GSL design document and came across this interesting line in the Test suites section: N.B. Don't bother to test for null pointers -- it's sufficient for the library ...
jigglypuff's user avatar
6 votes
5 answers

Checking array size in C/C++ to avoid segmentation faults

So it's well known that C does not have any array bounds checking when accessing memory. Nowadays, if you call myArray[7] when you initialised it as int myArray[3], your program will get a segfault ...
Chris Watts's user avatar
2 votes
2 answers

Program like NASA?: Margaret Hamilton's Three Primitive Control Structures [closed]

On slide 19 in a presentation Margaret Hamilton describes three primitive control structures. My goal is to reduce the probability of errors in my code by working with this "design framework". I am ...
noumenal's user avatar
  • 167
0 votes
2 answers

can a logic error happen way later than its cause? [closed]

For comparison, for a runtime fatal error, it is often that the cause of the error is way before the error crashes a program. For a logic error, it doesn't crash a program. It happens when the state ...
Tim's user avatar
  • 5,415
1 vote
3 answers

How do you avoid looping mistakes? Mistakes that are not detected by systems [closed]

I had this crazy initialisation -- documentList = new ArrayList<Map<String,Integer>>(); which I intended to store a new map everytime in a loop but unfortunately put itself inside the ...
Shashank Sabniveesu's user avatar
19 votes
5 answers

Detecting misusage of delete[] vs. delete at compile time

I'd like to know if it's possible to detect the delete error commented below at compile time? Especially, I'd like to hear about g++ compiler. ClassTypeA *abc_ptr = new ClassTypeA[100]; abc_ptr[10]....
SebGR's user avatar
  • 381
4 votes
1 answer

Is '@' Error Suppression a Valid Technique for Testing for an Optional Array Key?

Rarst and I were debating offline about the use of the '@' error suppression operator in PHP, specifically for use to test for existence of "optional" array keys, i.e. array keys that are being used ...
MikeSchinkel's user avatar
29 votes
9 answers

What is a faster alternative to a CRC?

I'm doing some data transmission from a dsPIC to a PC and I'm doing an 8-bit CRC to every block of 512 bytes to make sure there are no errors. With my CRC code enabled I get about 33KB/s, without it I ...
FigBug's user avatar
  • 2,369