Tag Info

New answers tagged

3

I've seen the exact same situation, and what we did was assigning one person to do only data correction. That way clients got their data correction requirements done fast, and the rest of developers, freed up from that burden, could fix the app more quickly. Once most errors that generate bad data were fixed, the person assigned to data correction was ...


8

As you're not in a position to change the policy, what you and colleagues need to do is: Document the cost of the policy: the amount of time you spend making fixes in the DB as opposed to developing, Document the risk of the policy: the number of times a fix in the DB had unexpected consequences and how severe they were Document any other negative ...


2

Its difficult to say without know what you're parsing but... text files are generally bigger. You want to store a number, that can be 4 bytes for an integer, but 10 bytes (*2 for Windows unicode) for some depending on the value. Both parsing and formatting can be hugely slow. You want to write the integer "123" out to binary - just dump 4 bytes and you're ...


10

Using fscanf() in itself probably explains most of it. fscanf() has to interpret the passed-in format string, and then has to scan the input stream from the file, trying to match the specified pattern. That's actually a huge amount of work. read() just has to read in the specified number of bytes from the file and doesn't have to do any parsing of the input. ...


8

A QR Code has a version range from 1 to 40. This information tells about how much data is stored within it. Version 40 has 177 rows and 177 columns (in some decimation called 'modules') for 31,329 pixels. It should be immediately clear at this point that this is the hypothetical maximum that doesn't take into account the error correcting or any of the ...


1

As pointed out in the other answers, it depends on your unique circumstances (needed to run the simulations) whether to use a real database, or a real geographic information system (GIS). Regardless of you choice of tooling, one thing is certain: your simulations will involve application logic that is superficially similar to what is done by databases and ...


1

Get the data design done first. Understanding what data you need for each entity, and how the entities relate should simplify your design. You may find you have many entities which can be modeled as sub-types. Different sub-types may have different behavior, but should contain the same state (data). Understanding the common and specific behaviors of ...


5

You have two options: Every agent knows about every other agent, and queries those agents as needed. Every agent publishes its state changes, and other agents listen to the changes they care about. The second approach has several benefits over the first, most important being that changes only happen when necessary. For example, if only 2 farmers trade ...


2

I'm going to assume you already have a copy of the MIDI 1.0 Specification (latest version), and have digested it thoroughly. (If you haven't, that's your first homework assignment.) Manufacturers of MIDI synthesizers are usually good about publishing their dump file formats, to make it easier for third-party vendors to write programming utilities and ...


1

I do not intend write a clear answer to this question directly; as I commended above, this question is highly dependent on the use-case. In general, all of the listed implementation choices seem appropriate for some different purposes, at different times. However, I would like to draw your attention to these underlying principles and background knowledge, ...


0

What is the best datatype to store a three-state variable? Something capable or representing Positive, Neutral, and Negative. This depends greatly on the language, what you are doing, abstraction level (which also depends on the language and so on). I mainly use C++ and there are a lot of choices here. The simplest is an enum tribool_state { false_val, ...


1

Apart from an enum which is the obvious and clearest way of expressing this, the system used for interoperable system where a language-specific enum cannot be expressed is the -1/0/1 option. You may like to try a bitmask though, where 0 means 0, 1 means 'bit 2 set' and 2 means 'bit 3 set' (ie you have 3 bits that can be on or off. As long as you don't ...


-6

In Microsoft.NET, there is a type "Tuple" which can be used for your requirement. Visit http://msdn.microsoft.com/en-us/library/system.tuple%28v=vs.110%29.aspx



Top 50 recent answers are included