Javier Neira's Library tagged → View Popular
PreciseJava.com - Best practices to improve performance in JDBC
-
You can send multiple queries to the database at a time using batch update
feature of statement objects this reduces the number of JDBC calls and improves
performance. Here is an example of how you can do batch update,statement.addBatch( "sql query1");
statement.addBatch(" sql query2");
statement.addBatch(" sql query3");
statement.executeBatch();
All three types of statements have these methods to do batch update.
The Programmer's Paradox: Spaghetti Code
-
4. Fixing one bug creates several more.
-
Fundamental Laws of Spaghetti Code:
1. You can't understand it just by looking at it.
2. Repetitive code will always fall out of synchronization.
3. The work will always gets harder and slower as it progresses.
4. Fixing one bug creates several more.
5. You can't enhance the code if you are spending all of your time fixing the bugs. - 24 more annotations...
Richard Dingwall » The trouble with soft delete
-
First is the standard deleted flag to indicate an item should be ignored:
-
nother style uses meaningful status codes:
- 20 more annotations...
TDD is not about testing!!! | Making Good Software
-
TDD as invented by Kent Beck, (who also invented Xtreme programming and Junit),
-
TDD is a design practice, is more related with emergent design than with testing. TDD is pointless if it is not combined with other agile engineering practices, as pair programming, or agile philosophies as YAGNI and KISS, in TDD having a large set of tests is a nice side effect, not just its purpose.
- 1 more annotations...
Google Closure: How not to write JavaScript
-
“It’s a JavaScript library written by Java developers who clearly don’t
get JavaScript.” -
var a = "I am a string!";
2 alert(typeof a); // Will output "string"
3 var b = new String("I am also a string!");
4 alert(typeof b); // Will output "object" - 1 more annotations...
What DNS Is Not - ACM Queue
What DNS is not is a mapping service or a mechanism for delivering policy-based information. DNS was designed to express facts, not policies. Because it works so well and is ubiquitous, however, it's all too common for entrepreneurs to see it as a greenfield opportunity. Those of us who work to implement, enhance, and deploy DNS and to keep the global system of name servers operating will continue to find ways to keep the thing alive even with all these innovators taking their little bites out of it.
12 Tips to improve your jQuery code | Geekology
-
DOM manipulation is one of the slowest operations JavaScript (and hence, jQuery) can perform.
-
Use IDs instead of classes in selectors
- 3 more annotations...
El secreto del éxito | K-Government
-
os mejores resultados se han dado en los proyectos de tamaño y complejidad mediana.
-
siendo los más pequeños los más satisfactorios. De hecho, y perdonan la inmodestia, todos los proyectos que he realizado yo solo (y no todos eran necesariamente pequeños) han sido coronados por el éxito.
- 2 more annotations...
6 Advanced JavaScript Techniques You Should Know
//2. Object Literals to Pass Optional Arguments
function showStatistics(args) {
document.write("<p><strong>Name:</strong> " + args.name + "<br />");
document.write("<strong>Team:</strong> " + args.team + "<br />");
if (typeof args.position === "string") {
document.write("<strong>Position:</strong> " + args.position + "<br />");
}
if (typeof args.average === "number") {
document.write("<strong>Average:</strong> " + args.average + "<br />");
}
if (typeof args.homeruns === "number") {
document.write("<strong>Home Runs:</strong> " + args.homeruns + "<br />");
}
if (typeof args.rbi === "number") {
document.write("<strong>Runs Batted In:</strong> " + args.rbi + "</p>");
}
}
showStatistics({
name: "Mark Teixeira"
});
showStatistics({
name: "Mark Teixeira",
team: "New York Yankees"
});
showStatistics({
name: "Mark Teixeira",
team: "New York Yankees",
position: "1st Base",
average: .284,
homeruns: 32,
rbi: 101
});
//Using Namespaces to Prevent Conflicts
if (typeof MY == "undefined") {
MY = new Object();
MY.CUSTOM = new Object();
}
MY.CUSTOM.namespace = function() {
function showStatistics(args) {
..................
}
showStatistics({
name: "Mark Teixeira",
team: "New York Yankees",
position: "1st Base",
average: .284,
homeruns: 32,
rbi: 101
});
}
MY.CUSTOM.namespace();
-
function showStatistics(args) {
document.write("<p><strong>Name:</strong> " + args.name + "<br />");
document.write("<strong>Team:</strong> " + args.team + "<br />");
if (typeof args.position === "string") {
document.write("<strong>Position:</strong> " + args.position + "<br />");
}
if (typeof args.average === "number") {
document.write("<strong>Average:</strong> " + args.average + "<br />");
}
if (typeof args.homeruns === "number") {
document.write("<strong>Home Runs:</strong> " + args.homeruns + "<br />");
}
if (typeof args.rbi === "number") {
document.write("<strong>Runs Batted In:</strong> " + args.rbi + "</p>");
}
}
showStatistics({
name: "Mark Teixeira"
});
showStatistics({
name: "Mark Teixeira",
team: "New York Yankees"
});
showStatistics({
name: "Mark Teixeira",
team: "New York Yankees",
position: "1st Base",
average: .284,
homeruns: 32,
rbi: 101
}); -
Object-oriented JavaScript implements namespace-like principles due to the fact that properties and methods are declared inside of objects, thus there are less likely to be conflicts. A conflict could arise, however, through object names. And very likely, the conflict will occur "silently", thus you may not be alerted to the issue immediately.
- 2 more annotations...
Selected Tags
Related Tags
Sponsored Links
Top Contributors
Groups interested in bestprac...
-
Enterprise2.0 Knowledge Management
Items: 3 | Visits: 1
Created by: Scott Grothaus
-
What Works: Instructional Resources
Items: 10 | Visits: 2
Created by: Kathleen N
-
bestpractices
Items: 29 | Visits: 3
Created by: tosh .
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo
