Reputation
9,596
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 12 27
Newest
 Custodian
Impact
~457k people reached

Jan
27
answered Preparing to remove a tightly coupled service provider out of source code
Jan
26
comment Splitting one class into subclasses to save memory
I believe that @VincentSavard's point was that computers are complex systems with many layers of subsystems, and there are many ways that simple optimizations like yours might be overshadowed by larger concerns. For example, structure padding to align everything on a 64-bit boundary might mean you're only saving (say) three bytes instead of eight. Or your structure might not fit in a single cache line even without the name pointer, so saving eight bytes might not buy you anything anyway.
Jan
21
answered User account model with two or three possible profile
Jan
20
comment Difficult design with multiple associations between two entities
@heapOverflow: Then it sounds like you'll need two associations, public_books and private_books. Use a UNION ALL query to get all books for one author.
Jan
18
comment Unit Testing: Assembler code and different architectures
QEMU can emulate a SPARC V8. Perhaps you could run your SPARC unit tests on an emulator.
Jan
14
comment Junction table related to another junction table
If you're really worried about performance, create your database and add some sample data, then look at the query plans for some representative queries. Since you're joining on primary keys to largely static data (how often are you going to get new hotels and/or services?), I doubt you're going to have any performance issues.
Jan
12
awarded  Talkative
Jan
7
awarded  Excavator
Jan
7
revised Is the “exposer (hack) pattern” a newly identified pattern or does it have another name?
Grammar ("your" --> "you're")
Jan
7
revised Java Heap Allocation Faster than C++
Spelling ("effect" should have been "affect")
Jan
6
comment Designs and practices to guard against erroneous null entries from database
@DanielPryden: At my last job, we had an Architecture Review Board (with a DBA sub-committee) that would review cross-domain technical changes. Very technical, but they only met every two weeks and if you didn't provide enough detail for them they'd defer a decision until you did...at a subsequent meeting. Most non-trivial system changes that didn't consist of adding functionality through new code would routinely take a month or so.
Jan
6
answered Tracking time users spend on my website
Jan
6
comment Designs and practices to guard against erroneous null entries from database
@KilianFoth: I don't think they're contradictory. Data required by OP's process may be unknown at entry time, so it's to be expected that some columns might be null. Those values should be supplied during some upstream process, so by the time they arrive in OP's bailiwick everything is coherent. It sounds like there may be no clear indication that the data is complete, so OP has to deal with the incomplete stuff.
Jan
5
comment Broken Old/Legacy Unit Tests
Good ideas, but OP already said he has no resources to perform any heavy analysis, so unfortunately he won't be able to use them.
Jan
5
comment What is the origin of “Program to an interface, not an implementation”?
I always thought it was fallout from the design-by-contact practice followed by Bertram Meyer's Eiffel language, but it could be older.
Jan
5
comment Designs and practices to guard against erroneous null entries from database
@RobbieDee: Shouldn't matter. If you have to rewrite the mapping code then either the null checks are in there and you modify them as part of the rewrite, or you've got a separate method that performs the null checks on your business objects, so there's no rewrite needed. And as Doc Brown implies, sometimes it's important to notice that data is missing instead of glossing over that fact with a default value.
Jan
5
answered Designs and practices to guard against erroneous null entries from database
Jan
4
answered How to solve circular dependency?
Jan
4
comment How to prevent user from requesting API method multiple times in parallel?
Sure, or you could use optimistic locking and add a lastUpdated field to the record and reject any updates that have an earlier update timestamp. The request handler could be configured to either return a failure status for rejected updates or retry them.
Jan
4
answered How to prevent user from requesting API method multiple times in parallel?