10 sql tips to speed up your database Design your database with caution This first tip may seems obvious, but the fact is that most database problems come from badly-designed table structure. For example, I have seen people storing information such as client info and payment info in the same database column. For both the database system and developers who will have to work on it, this is not a good thing. When creating a database, always put information on various tables, use clear naming standards and make use of primary keys.Source: Know what you should optimize If you want to optimize a specific query, it is extremely useful to be able to get an in-depth look at the result of a query. EXPLAIN SELECT * FROM ref_table,other_table WHERE ref_table.key_column=other_table.column; Source: The fastest query… Is the one you don’t send Don’t select what you don’t need Use LIMIT Use indexes
What Beautiful HTML Code Looks Like I originally wrote this over two years ago. It was getting a little long in the tooth, especially now that HTML5 has come along and made HTML far more beautiful than even XHTML 1.1 was. So I updated it! I can't help but view source on every nice looking website I see. It gets me to thinking, what makes beautiful code? Large PNG Original PSD Text of HTML It's big enough to print out and tape up inside your locker to impress your friends. HTML5 - HTML5 and it's new elements make for the most beautiful HTML yet.DOCTYPE - HTML5 has the best DOCTYPE everIndentation - Code is indented to show parent/child relationships and emphasize hierarchy.Charset - Declared as first thing in the head, before any content.Title - Title of the site is simple and clean. Share On
Adequately Good - JavaScript Module Pattern: In-Depth The module pattern is a common JavaScript coding pattern. It's generally well understood, but there are a number of advanced uses that have not gotten a lot of attention. In this article, I'll review the basics and cover some truly remarkable advanced topics, including one which I think is original. The Basics We'll start out with a simple overview of the module pattern, which has been well-known since Eric Miraglia (of YUI) first blogged about it three years ago. Anonymous Closures This is the fundamental construct that makes it all possible, and really is the single . (function () { // ... all vars and functions are in this scope only // still maintains access to all globals }()); Notice the () around the anonymous function. Global Import JavaScript has a feature known as . Luckily, our anonymous function provides an easy alternative. (function ($, YAHOO) { // now have access to globals jQuery (as $) and YAHOO in this code }(jQuery, YAHOO)); Module Export Advanced Patterns Augmentation
Circle Hover Effects with CSS Transitions « Previous Demo: Animated Responsive Image Grid Back to the Codrops Article Use what you have by Angela Duncan View on Dribbble Common Causes of Stains by Antonio F. Mondragon View on Dribbble Pink Lightning by Charlie Wagers View on Dribbble Kind of a Data Service implementation for PHP using AMFPHP and RemoteObject : Mihai CORLAN Last week I played a little bit with AMFPHP and Flex and I put together this code. Basically I’ve built a Flex service that mimics (a little bit) the data services from LiveCycle Data Services. From the first time I worked with Data Services, I really liked the simple API you can use to retrieve data from the server and to send it back. In short, the workflow in the client goes like this: Create an instance of Data Service, and set the destination for i.Call the method fill() on this instance, and provide an ArrayCollection to be filled with what the server sends back to the client.Any changes you might make on this ArrayCollection (for example you might add or delete an item) are automatically sent to the server by the Data Service instance if you set the auto-commit property to true. Or, if you set auto-commit to false you can just call the commit() method and you are done.If you want to revert all the changes that were not committed yet, just call revertChanges(). Flex code PHP code
8 simple CSS3 transitions that will wow your users CSS3 has introduced countless possibilities for UX designers, and the best thing about them is that the coolest parts are really simple to implement. Just a couple of lines of code will give you an awesome transition effect that will excite your users, increase engagement and ultimately, when used well, increase your conversions. What’s more, these effects are hardware accelerated, and a progressive enhancement that you can use right now. Here are 8 really simple effects that will add life to your UI and smiles to your users’ faces. All of these effects (bar one) are controlled with the transition property. Having done so, set its width and height (so it has dimensions), its background color (so we can see it) and its transition property. Now all we need to do is change properties, and they’ll animate for us… If you’d like to follow along you can download the demo files here. 1. Having things fade in is a fairly common request from clients. 2. 3. 4. 5. 6. 3D shadow 7. 8.
Seth's Blog: Who is easily manipulated? Sometimes (and too often) marketers work to manipulate people. I define manipulation as working to spread an idea or generate an action that is not in a person's long-term best interest. The easiest people to manipulate are those that don't demand a lot of information, are open to messages from authority figures and are willing to make decisions on a hunch, particularly if there's a promise of short-term gains. If you want to focus on the short run and sell something, get a vote or gather a mob, the easiest place to start is with populations that leave themselves open to manipulation. There are habits and activities that leave people open to manipulation. Interesting to note that AM radio used to be filled with ads for second mortgages. Manipulating people using modern techniques is astonishingly easy (if the marketer has few morals).
50 Useful CSS Snippets Every Designer Should Have With so many new trends advancing every year it can be difficult keeping up with the industry. Website designers and frontend developers have been deeply ingrained into the newer CSS3 properties, determining the ultimate browser support and quirky hacks. But there are also brilliant CSS2 code snippets which have been unrequited in comparison. For this article I want to present 50 handy CSS2/CSS3 code snippets for any web professional. These are perfect for storing in your development IDE of choice, or even keeping them saved in a small CSS file. Either way I am sure designers & developers can find some use for some of the snippets in this collection. Recommended Reading: 20 Useful CSS Tips For Beginners 1. Basic CSS browser resets are some of the most common snippets you’ll find online. 2. This clearfix code has been around the Web for years circulating amongst savvy web developers. 3. 2011 Updated Clearfix 4. Code Source 5. Code Source 6. 7. Code Source 8. Code Source 9. 10. 11. Code Source
Reader - oracle CSS3 Animation Cheat Sheet - Justin Aguilar How it works The CSS3 Animation Cheat Sheet is a set of preset, plug-and-play animations for your web projects. All you need to do is add the stylesheet to your website and apply the premade CSS classes to the elements you want animated. The CSS3 Animation Cheat Sheet uses CSS3 @keyframes and works on all the latest browsers (that's IE 10). Add the animation stylesheet to the <head> element of your webpage: Replace css with the name of the directory where the animation stylesheet is. Add an animation class to the element you want animated: Replace slideUp with the desired animation class. For entrance animations, you need to make them invisible by adding the visibility: hidden property to the animated element: visibility: hidden; is used to hide elements before the animation is activated. The values for these animations are relative to the element's size. Adding effects Add jQuery to the <head> element of your webpage: Replace slideUp with an animation class.