Monthly Archives for April 2009

20+ Best Psd to XHTML/CSS Tutorials

Many web designers find it difficult to convert their Photoshop designs into valid HTML/XHTML markups, either due to work load or in-efficiency in quality conversion. This gives a rise to the need of quality PSD tutorials for those who can not outsource their work or wants to learn on their own.

Visit Source.


Looking to Hire a Designer or Developer?

Post a free job listing to the DesignM.ag job board for freelance, part-time or full-time positions. Your listing will be seen by thousands of talented designers and developers. - Post a job for free.

Show me your code comments and I’ll show why you don’t need them - PHP in Action » PHP

Brandon Savage has written a blog post On Code Commenting And Technical Debt. He believes that code comments are a good way to minimize technical debt.

I’m surprised to find the term technical debt mentioned without being accompanied by the term refactoring. Refactoring is generally recognized (outside the PHP world) as the way to pay down technical debt. Commenting may help, but is clearly the second-best practice.

Martin Fowler puts it this way:

Technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this problem. In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice. We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design. Although it costs to pay down the principal, we gain by reduced interest payments in the future.

Brandon’s argument in favor of commenting is perfectly valid, but misses the crux of the matter, since he ignores the option of actually improving the code itself rather than just adding comments.

Let me also comment briefly on Marco Tabini’s reponse:

What I suspect Brandon really means is that the comments are there to illustrate the intentions of the author when those intentions are not immediately made obvious by the code itself.

Yes. And no. There is no absolute boundary, no limit in principle, to how intention-revealing code can be. It’s not necessarily easy in practice, though. As I’ve said before, it’s primarily inline comments that I’m objecting to. The comments I feel a need to write are often at the class level and address the interaction between different classes.

Anyway, arguing about it theoretically is not the way to resolve the issue. Show me some good examples of comments that serve to make code clearer and that supposedly can’t be usefully eliminated by refactoring the code into something more readable. I’ll either admit that you’re right or show you (or at least outline) how to do it differently. I do recognize that even inline comments are useful…occasionally.

(By the way, I seem to have missed Brandon’s comment (Where Comments Are Useful) to my comments considered harmful post last December.)

Share/Save/Bookmark

BuddyPress for the World

Happy to announce that BuddyPress is now available to the world. BuddyPress is a package built on top of WordPress which transforms WP into a social network complete with profiles, friends, messaging, groups, and even activity streams. Of course it’s 100% GPL and Open Source. It’s built on top of MU (which can be tricky to install) so still not for everybody yet, but this is a major milestone in the WordPress world. Check it out. Congrats to Andy and the whole BuddyPress team. :) Here’s Andy’s official  announcement post and WordPress.org.