New answers tagged

0

If I understand your question (and I may not..) : You need to clearly understand your relationship with your this "one of my customers". If you sign over (or did sign over) exclusive copyrights to one customer for some software you write, you will not have the right to use that same copy with other clients. And if you are contracting for that one customer,...


2

I tend to find it a good idea to use a mapping at each point of conversion, yes. While maybe a hair more work to start, it tends to keep things from having to be split later and nicely isolates functionality into the context areas that it really belongs. Who's to say that a year down the road your external API source won't change? Easier at the outset I ...


0

Keep in mind if the is a network between your program and the database, it is very easy to write code that becomes IO bound. Also, if you are processing transactions you may have to take several trips to the database depending on the mechanism used to track transactions.


0

The data mapper has to know about the unit of work. You would typically pass the UoW to the mapper using DI. I understood why they are both important and when to use them but, I couldn't find anywhere how the Data Mapper can "know" that a save method, for example, was called in the middle of a transaction or not. A single UoW instance represents one ...


0

The boundary for a Unit of Work is time. It answers the question: What all are we changing in this one transaction? The boundary for a Data Mapper is space. It answers the question: What all is part of this one data structure? The unit of work is used to prevent hitting the database to often by sending every little chunk of info one at a time. The data ...


2

Eugene Philipov ran a benchmark on multiple INSERTs in one query and found out that they are really faster than running many sequential inserts after each other. This really did not come as a surprise because INSERT is a very simple operation. For updates the reason why you'd be taking multiple trips to a database is because the code is simply easier to ...


4

Is this something developers can test for? (Emulate server load) Only somewhat. They can emulate load, but emulated load is not real. The rate, latency, and diversity of the traffic will all vary. The servers being targets will vary. The level of malicious code (people trying to hack/bot/flood/etc) will likely be less. And for something as large as Pokemon ...


1

You should never duplicate complex code. Period. The main reason is exactly the situation you're in: Complex software will require modification (whether to correct defects or to extend functionality doesn't matter), and making the same change twice is more effort and more error-prone. Therefore the right thing to do is to develop one code base and deploy it ...


0

You can use Cppcheck for this purpose: $ cppcheck --enable=unusedFunction . Checking foo.c... 1/2 files checked 0% done Checking main.c... 2/2 files checked 0% done [foo.c:1]: (style) The function 'foo' is never used.



Top 50 recent answers are included