Archive

Posts Tagged ‘tips’

Five good programming habits in PHP

February 16th, 2009 Gertjan No comments

Just like any language, developers can write code in PHP that ranges in quality from truly awful to very good. Learn good programming habits that can help you bridge the productivity gap.

Depending on whom you ask, the difference between a good developer and an excellent developer, in terms of productivity, is a factor of 10 to 20. An excellent developer is more productive because of his experience and good habits. When poor programming habits sneak into your code, they’re a drain on productivity. This article demonstrates some good programming habits that can make you a better programmer.

Read more…

Categories: PHP Tags: , , ,

Improve your jQuery: 25 tips

February 3rd, 2009 Gertjan No comments

jQuery is awesome. Jon Hobbs-Smith has been using it for about a year now The longer he uses it, the more he finds out about it’s inner workings.

He thought some others out there could benefit from all the little tips, tricks and techniques he has learned over the past year. Take a look at the following 25 excellent tips of jQuery, you might learn something from it.

The 25 topics are:

  • Load the framework from Google Code
  • Use a cheat sheet
  • Combine all your scripts and minify them
  • Use Firebug’s excellent console logging facilities
  • Keep selection operations to a minimum by caching
  • Keep DOM manipulation to a minimum
  • Wrap everything in a single element when doing any kind of DOM insertion
  • Use IDs instead of classes wherever possible
  • Give your selectors a context
  • Use chaining properly
  • Learn to use animate properly
  • Learn about event delegation
  • Use classes to store state
  • Even better, use jQuery’s internal data() method to store state
  • Write your own selectors
  • Streamline your HTML and modify it once the page has loaded
  • Lazy load content for speed and SEO benefits
  • Use jQuery’s utility functions
  • Use noconflict to rename the jquery object when using other frameworks
  • How to tell when images have loaded
  • Always use the latest version
  • How to check if an element exists
  • Add a JS class to your HTML attribute
  • Return ‘false’ to prevent default behaviour
  • Shorthand for the ready event

Link: Improve your jQuery – 25 excellent tips

Categories: Javascript Tags: , ,

75 Useful JavaScript Techniques

February 3rd, 2009 Gertjan No comments

Some major JavaScript libraries that developers use: jQuery, Prototype, Scriptaculous, mootools, Dojo. These frameworks have thriving communities whose members have developed countless plug-ins that can greatly add to the JavaScript framework.

Developers and designers are using more and more JavaScript in modern designs. Sometimes this can be a hindrance to the user and take away from the simplicity of the design, and other times it can add greatly to the user’s experience. The key is a) adding the right amount of JavaScript, and b) using the right JavaScript techniques

However, sometimes we need JavaScript solutions that are a little more involved or specific. Here are 75 more handy JavaScript techniques that have made websites much sleeker and more interesting.

Read more…

10 Advanced php tips to improve your programming

February 3rd, 2009 Gertjan No comments

Smashing Magazine comes up with a nifty list of 10 excellent techniques that PHP developers should learn and use every time they program. These tips will speed up proficiency and make the code much more responsive, cleaner and more optimized for performance.

Because of PHP’s huge popularity, it has become almost impossible for Web developers not to have at least a working knowledge of PHP. This tutorial is aimed at people who are just past the beginning stages of learning PHP and are ready to roll up their sleeves and get their hands dirty with the language. Listed below are 10 excellent techniques that PHP developers should learn and use every time they program. These tips will speed up proficiency and make the code much more responsive, cleaner and more optimized for performance.

These tips will speed up proficiency and make the code much more responsive, cleaner and more optimized for performance.

Read more…