|
Technical Debt via Martin Fowler , via Steve McConnell
YAGNI (You Ain't Gonna Need It) via Wikipedia
BDUF (Big Design Up Front) via Wikipedia
UPDATE: To clarify the question, I think I can also state it this way and keep my meaning:
"In what ways do you...
Started by Troy DeMonbreun on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
Steve, adapt; plan, do, adapt" idea of agile (iterations, iteration reviews) you would avoid those things that in mind, you'll avoid....
I don't believe you need to avoid technical debt, just keep it at a manageable level.
Philosophically.
|
|
Typically languages have keywords that you are unable to use directly with the exact same spelling and case for naming things (variables,functions,classes ...) in your program. Yet sometimes a keyword is the only natural choice for naming something. What...
Started by mike g on
, 15 posts
by 15 people.
Answer Snippets (Read the full thread at stackoverflow):
Import re re.compile()
instead of:
from re import * compile()
Sometimes, when I can't avoid keyword name clashes....
Clazz to avoid name clashes.
Either find a different name or change it slightly - e.g .
I just avoid the name, usually.
|
|
Lately I have seen our development team getting dangerously close to the ' second system syndrome ' type ideas while we are planning the next version of our product. While I'm all for making improvements and undoing some of the mistakes of our past, I...
Started by Wally Lawless on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Loose coupling" between sub-systems Having documented design decisions (avoid re-hashing previously into the requirements to avoid over-designing, having a fixed scope helps prevent developers from running.
|
Ask your Facebook Friends
|
I often need to design a dialog in Delphi/C++Builder that allows various properties of an object to be modified, and the code to use it typically looks like this.
Dialog.Edit1.Text := MyObject.Username; Dialog.Edit2.Text := MyObject.Password; // ... many...
Started by Roddy on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Again, many more of the same end; end;
And builder....
If (Dialog.ShowModal = mrOk) begin with MyObject do begin Username := Dialog.Edit1.Text; Password := Dialog.Edit2.Text; // .. .
Delphi at least have 'With', though it doesn't solve the problem completely .
|
|
Question: What are some other strategies on avoiding magic numbers or hard-coded values in your SQL scripts or stored procedures?
Consider a stored procedure whose job is to check/update a value of a record based on its StatusID or some other FK lookup...
Started by pcampbell on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
As this seems to be unavoidable when using a DB such as Sql Server where a lot of the BL can exists in the DB , I think you might rather revert to using string ... .
Well to start with, Business Logic should probably be avoided in the storage layer.
|
|
It seems to me that when you use relationships in Hibernate/JPA that using relationships like OneToMany can have a performance boost on reads because only one database call would need to be run to get a parent entity and all children entities. I want ...
Started by Benju on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
However, you can.
If you want to avoid relationships then you lose a significant advantage of JPA.
|
|
I am wondering if it is possible to avoid the lost update problem, where multiple threads are updating the same date, while avoiding using synchronized(x) { } .
I will be doing numerous adds and increments:
val++; ary[x] += y; ary[z]++;
I do not know ...
Started by Nash0 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Java.util.concurrent....
Not just be one, but a scheduler acting at the wrong moment could wipe out milliseconds of updates .
So updates can clobber one another.
For the purposes of threading, ++ and += are treated as two operations (four for double and long ) .
|
|
Is there a common idiom for avoiding pointless slice copying for cases like this:
>>> a = bytearray(b'hello') >>> b = bytearray(b'goodbye, cruel world.') >>> a.extend(b[14:20]) >>> a bytearray(b'hello world')
It seems...
Started by Scott Griffiths on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
As you pointed out - count has a mechanism for that anyway
>> .
Wish to avoid copying the slice.
|
|
Sometimes when i'm writing moderately complex SELECT statements with a few JOINs, wrong key columns are sometimes used in the JOIN statement that still return valid-looking results.
Because the auto numbering values (especially early in development) all...
Started by Paul Sasik on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
One option....
If you have a visualization or diagramming tool for your SQL statements, you can follow the joins visually, and any errors will become immediately apparent, provided you have followed a sensible naming scheme for your primary and foreign keys .
|
|
When you need to check/have combinations of array elements, how can you avoid nesting foreach?
Example code:
$as = array($optionA1, $optionA2) $bs = array($optionB1, $optionB2) $cs = array($optionC1, $optionC2) foreach ($as as $a) { foreach ($bs as $b...
Started by koen on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
It would be interesting to know the reasons you want to avoid the nested foreach loops?
You haven't really given enough information to know what.
Be significantly slower, so I would avoid it.
|