100+ Resources for Web Developers | BlogWell Photo Credit: SMITHMag Update #1 – March 14, 2008 Update #2 – September 22, 2008 Translated into Italian at Geekissimo There is some amazing stuff out there on the Web–resources, tools, tricks, and tips. So we’ve put together a list of over 100 resources to help make your life as a developer easier; where to find snippets of code, sites that automate processes, cheat sheets, lessons, useful tools and a couple of silly videos to give your brain a break if you make it through to the end. Code Photo Credit: Josh Lewis 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. .htaccess Creator Online tool to create .htaccess files 12. 13. 14. 15. 16. 17. 18. 19. jQuery jQuery is a fast, concise, JavaScript Library that simplifies how you write your web pages. Cool Online Tools Photo Credit: Stavros Markopoulos 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. Documentation and Reference Photo Credit: Perreira 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. Testing Photo Credit: Sebastian Bergmann 49. 50.
SQL date performance problems Most obfuscations involve DATE types. The Oracle database is particularly vulnerable in this respect because it has only one DATE type that always includes a time component as well. It has become common practice to use the TRUNC function to remove the time component. SELECT ... It is a perfectly valid and correct statement but it cannot properly make use of an index on SALE_DATE. “This book is definitively worth having in the company library.” — Joe Celko There is a rather simple solution for this problem: a function-based index. CREATE INDEX index_name ON table_name (TRUNC(sale_date)) But then you must always use TRUNC(date_column) in the where clause. The problem also occurs with databases that have a pure date type if you search for a longer period as shown in the following MySQL query: SELECT ... The query uses a date format that only contains year and month: again, this is an absolutely correct query that has the same problem as before. SELECT ... MySQL Oracle PostgreSQL SQL Server Tip
Vim and Ctags - Andrew's blog Ctags is an old tool, just like vim, and it works wonders for code navigation. Since I was recently told that TextMate doesn’t have ctags integration out of the box, I figured I’d make an article explaining it. Even if you’ve used it before, I’ll describe some of my own workflow, so you might learn something interesting anyway. What is ctags? Ctags is a tool that extracts important constructs from the code you’re working on. Installation and simplest use case Setting up the environment is pretty simple. If you’re on a Mac and using a package manager, you could do a brew install ctags or port install ctags.On Linux, I’ve yet to see a package manager that doesn’t provide ctags.On Windows, just download the binary from the homepage and install away. Assuming the executable is in your PATH (it might not be if you’re running Windows), you can simply go to a directory with some code and run: The program will walk through the directory recursively, tagging all source files it encounters. Summary
100 Best JavaScript Resources JavaScript is an extremely useful scripting language for enhancing user experience and usability. It is becoming more and more popular, as more developers begin to make cool techniques accessible. Here are 100 excellent JavaScript (and a few AJAX) techniques, plugins, and resources based on the major libraries of jQuery, Prototype, Scriptaculous, MooTools, and Dojo. JavaScript Techniques and Tutorials Coda Pop-Up Tutorial Build An Incredible Login Form with jQuery Create a Slick Tabbed Content Area using CSS & jQuery Create a Simple, Intelligent Accordion Effect Using Prototype and Scriptaculus Create a Simple, Powerful Product Highlighter with MooTools Creating a Dynamic Poll with jQuery and PHP Creating a “Filterable†Portfolio with jQuery Leopard Desktop with jQuery using jqDock Adding to Our Leopard Desktop with jQuery Use the jQuery UI to Control the Size of Your Text Animated Drop Down Menu with jQuery Animated Menus Using jQuery Fancy Box Easiest Tooltip and Image Preview Using jQuery
Tools To Make Your Web Development More Efficient John K. Taylor Are you a developer who is sick and tired of having to do everything manually? Does sifting through your code to hunt down tiny mistakes make you want to scream? Then perhaps some of these web development tools will come in handy for making your work more efficient. CSS Grid Builder This is a framework that was developed by Yahoo! Clean AJAX This tool has been designed to speed up AJAX development, which is just not possible when done manually. CSS Sprite Generator This tool has been designed to reduce the number of HTTP requests are needed for rendering images in web browsers. Firebug This is an extension created by Mozilla Firefox that gives a developer a wide range of web development tools and features that they otherwise may not have had access to. CSSTidy This tool is an open source application that aims to reduce file size through analyzing text, fixing and optimizing the CSS code. This useful article is shared by John K.
The End of Pagination What do you do when you have a lot of things to display to the user, far more than can possibly fit on the screen? Paginate, naturally. There are plenty of other real world examples in this 2007 article, but I wouldn't bother. I can understand paginating when you have 10, 50, 100, maybe even a few hundred items. Once you have thousands of items, you don't have a pagination problem. But perhaps you don't know exactly what you're looking for: maybe you want a variety of viewpoints and resources, or to compare a number of similar items. Once we've chosen a suitable order and a subset of relevant items … do we really need pagination at all? It isn't just oddball disemvowelled companies, either. Pagination is also friction. I'm not necessarily proposing that all traditional pagination be replaced with endless pagination. Once you've done that, there's a balance to be struck, as Google's research tells us: The scroll bar, the user's moral compass of "how much more is there?"
The Joel Test: 12 Steps to Better Code by Joel Spolsky Wednesday, August 09, 2000 Have you ever heard of SEMA? It's a fairly esoteric system for measuring how good a software team is. No, wait! The neat thing about The Joel Test is that it's easy to get a quick yes or no to each question. A score of 12 is perfect, 11 is tolerable, but 10 or lower and you've got serious problems. Of course, these are not the only factors that determine success or failure: in particular, if you have a great software team working on a product that nobody wants, well, people aren't going to want it. 1. 2. If the process takes any more than one step, it is prone to errors. For this very reason, the last company I worked at switched from WISE to InstallShield: we required that the installation process be able to run, from a script, automatically, overnight, using the NT scheduler, and WISE couldn't run from the scheduler overnight, so we threw it out. 3. Read more about daily builds in my article Daily Builds are Your Friend. 4. 5. 6. 7. 8. 9. 10.
Build PDF files dynamically with PHP Sometimes you need control over exactly how pages are rendered for printing. At times like those, HTML is not the best choice. PDF files give you complete control over how pages are rendered and how text, graphics, and images are rendered on the page. When you search the web for PDF support for PHP, the first thing you are likely to find is the commercial PDFLib library and its open source version, PDFLib-Lite. Another choice is the Free PDF library (FPDF), which is native PHP. To demonstrate building PDF files dynamically, you'll use scores from women's roller derby tournaments. Listing 1. <events><event name='Beast of the East 2011'><game score1='88' team1='Toronto Gore-Gore Rollergirls' team2='Montreal La Racaille' score2='11'/><game score1='58' team1='Toronto Death Track Dolls' team2='Montreal Les Contrabanditas' score2='49'/> ... The root element for the XML is an events tag. Listing 2 shows the PHP code that you use to read the XML. Listing 2. getresults.php <? Listing 3. Figure 1.
How to Prevent Image Bandwidth Theft With .htaccess Protect your images from being linked by other websites while you pay the bandwidth! by Christopher Heng, thesitewizard.com If your website displays beautiful pictures, you may encounter the ugly situation where your photos and other images are used without your permission on other sites. Even worse, those websites "hotlink" your pictures, that is, they don't host the pictures directly on their site, but embed them into their pages by linking to the copy on your site. System Requirements The solution outlined in this article requires your site to be hosted on a machine using the Apache web server. If this is not the case for your website, you cannot use the suggestions given here. (To find out if your web server fulfills the requirements stated here, try checking up the documentation on your web host's website — the information is usually available on their list of web hosting packages, price lists or on their order form. Steps to Take That's all there is to it. Potential Problems