Since switching to Linux, I have slowly fallen in love with Vim. I love how Vim makes it so that “your hands should never have to leave your keyboard” (Chris). The biggest drawback to using Vim, and Emacs, is that there’s a fairly steep learning curve. You pretty much have to abandon your comfort zone and force yourself to learn all of the different key bindings.
I’m very lucky in that I work with two vim gurus: Chris and Travis. Basically any question I have ever had with Vim, these two were able to answer them. But for times when they are not around I love using these sites:
This is a very short list because Vim is based on a few basic concepts and building on top of that. Once you get the basics, learning how to use buffers and macros gives you the ability to edit your files in any manner.
linux, programming
commands, gvim, howto, linux, tips, tutorial, vim, vim commands, vim tips
Working with Mysql a lot, I’ve come across a lot of resources for finding ways of improving Myql performance in relation to configurations, queries and importing/exporting data. Here’s a list of sources I use a lot:
MySQL Performance Blog: This is my favorite Mysql site and was absolutely indispensable when first starting out with Mysql. They pretty much cover any Mysql related topic.
MySQL Reference: The actual reference site is a must have. It’s fairly thorough and covers everything in simple detail.
Travis’s Mysql Postings: He’s the most knowledgeable database person I know and is usually the first person I go to with anything Mysql.
Jay’s Mysql Postings: He’s the 2nd most knowledgeable database person I know and he’s always spot-on with any tips he gives.
The rest are just a list of sites/pages that I find useful for whenever I need something specific:
Speeding up InnoDB Imports
10 Performance Tips
84 Performance Tips
Google Search
mysql, web
innodb, mysql, mysql tips, performance, tips
Browsers do a lousy job of providing an interface to the HTML document. The DOM is supposed to be that interface but it is horribly slow, and clunky. Traversing the DOM tree extensively is one of the sure-fire way to slow down your site. In an effort to help out Javascript coders, the DOM does have functions like getElementsByTagName, getElementsByClassName and getElementsByName, but they do not all work across all browsers. This why you should create a function called getElementsByID:
var groupCache = {};
function getElementsById(id){
if(!groupCache[id]){
groupCache[id] = [];
}
var nodes = groupCache[id];
for(var x=0; x<nodes .length; x++){
if(nodes[x].id != ""){
nodes.splice(x, 1);
x--;
}
}
var tmpNode = document.getElementById(id);
while(tmpNode){
nodes.push(tmpNode);
tmpNode.id = "";
tmpNode = document.getElementById(id);
}
return nodes;
}
Now whenever you want a collection of DOM objects, just give all of them the same id and call this function to grab an array of the objects you want. This is not the most ideal way and its actually a pretty big hack. But sometimes, speed is more important than form.
programming
browser, browsers, dom, getelementbyid, getelementsbyid, help, html, html document, javascript, javascript tip, tip, tips