Saturday, March 30, 2013

How To Find The Best Domain Name

How to Switch Back to Old Gmail Compose (Temporarily)

Response to Gmail's new compose feature has been less than celebratory. Many users are confused by the minimalist design and hidden tools, preferring instead to interact with the typical icons and options from old Gmail compose.
But Google rolled out new Gmail compose to all account holders Thursday, rendering it the default. It seems Google no longer offers users the choice to work in the old compose window — at least, not explicitly.

To "temporarily switch back to old compose," tap the Compose icon as if you were creating a new email. Then click the arrow on the bottom-right of the window. Select the option from the drop-down box that reverts your interface back to the old design.
But who's to say Google will keep that option around for long? You may prefer to dive into the new Gmail compose, anyway, since it's becoming more mandatory by the day.
What changes would you like to see in Gmail? What works? Share your opinions in the comments below.
Mashable composite. Images courtesy, Google, Sweetclipart.com.

BONUS: 10 Keyboard Shortcuts for Gmail Power Users



Top 10 Reasons Why You Should Use a PHP Framework


PHP Frameworks have been receiving a lot of attention in the past few years from the web development community. What’s this hype all about?
If you look at PHP Job listings, you will often see “MVC Framework Experience” as one of their requirements. It is becoming one of those must-have skill sets for web developers.
There are pretty good reasons behind all of this. In this article we will explore why you, as a PHP programmer, should be using a PHP Framework.

1. Code and File Organization


php_frameworks_reasons_1

Just because you created an “/inc” folder and made a “functions.php” file does not mean your code is organized.

When you setup a PHP Framework, it already has a certain folder structure. It is expected from you to follow the same standards and keep everything organized in a certain way.

Once you get used to this model, you will never want to go back.

Unfortunately for some command line champions that still use vi, this can be a challenge. You will need to work with more files, that are smaller in size. But when you use a decent modern code editor or an IDE, it will be a breeze to browse through your application code and find what you need, quickly.

2. Utilities and Libraries

PHP is a great language for web development and provides countless number of tools and libraries.

However, if you ever try to build a whole website with PHP alone, you will find yourself either hunting down a lot of 3rd party code and libraries, or have to write them yourself.

All top PHP frameworks come with certain Libraries and Helpers, that help you with:
  • Form Validation
  • Input/Output filtering
  • Database Abstraction
  • Session and Cookie Handling
  • Email, Calendar, Pagination etc…
The list goes on. Not to mention, there is plenty of plugins provided by the community that you can add to your framework.
appflowchart

3. The MVC Pattern

The famous Model View Controller Pattern dates all the way back to 1979, when a guy named Trygve Reenskaug (a Norwegian computer scientist) first described it.
PHP itself works like a template engine. However, when used irresponsibly, it leads to very ugly and unmaintainable code.
The way the MVC Pattern applies to PHP applications:
  • Models represent your data structures, usually by interfacing with the database.
  • Views contain page templates and output.
  • Controllers handle page requests and bind everything together.
This kind of separation leads to cleaner and more maintainable code.

4. Security

In PHP you can already find many input and output filtering functions to protect your website against certain attacks.
However, manually using these functions can get tiring and you may forget about them every once in a while.
With a framework, most of the work can be done for you automatically. For example in CodeIgniter:
  • Any value passed to database object gets filtered against SQL injection attacks.
  • All html generating functions, such as form helpers and url helpers filter the output automatically.
  • All user input can be filtered against XSS attacks.
  • Encrypting cookies automatically is only a matter of changing a config option.

5. Less Code & Faster Development

There is of course a learning curve for all PHP Frameworks. But once you get over this hump, you will enjoy the benefits of rapid application development.
You will write less code, which means less time spent typing. You will not have to chase down 3rd party libraries all the time for every new project because most of them will come with the default framework install.
Also, since you are being more organized, it will be much faster to chase down bugs, maintain code, and make changes to existing code.

6. Community Support

php_frameworks_reasons_2
All popular PHP Frameworks have great active communities behind them. You can talk to other developers, get help, feedback and also give back to the community yourself.
There are message boards and mailing lists… You can also learn a lot by just browsing the forums and look at what other people are talking about.

7. Job Opportunities

Have you looked at any PHP Job postings lately? Most of them require experience with either Frameworks or a CMS. Follow the demand!
Example from Careerbuilder.com:
php_frameworks_reasons_3

Experience with PHP Frameworks greatly increases your job qualifications as a web developer.

8. Performance Tools

One of the main arguments from the naysayers comes in this subject. There is obviously a performance hit when you build a “Hello World” application with a framework vs. plain PHP code.
But those benchmarks are just bad examples. First of all, you should understand that developers are more expensive than servers. Saving time from development and maintenance is likely to outweigh any extra money you need to spend on servers.
Putting all of that aside, you can actually gain performance benefits by using a PHP framework. They come with tools that help you do cachingbenchmarksprofiling etc…
Modern frameworks are also great with dynamic loading, as they load code only as needed. Different page requests can load different amount of library code based on what needs to be used.

9. Suitable for Teamwork

The way your project is organized in a PHP Framework also helps you create a suitable environment for teamwork.
You can let your designers work on the Views, database guru work on the Models, let the smart programmer (yourself ;) ) build reusable Libraries and Plugins etc…
Also you can let someone build unit tests, because they come with tools for that too.

10. And It’s Fun!

This might actually be most important point of all. When you have fun doing your work, you will be more productive and happier in general.
If you have been coding plain old PHP for years, and getting really bored with it, getting started with a Framework can give you that crucial morale boost you have been lacking.
It’s like getting a new toy, and being able to build cool things with it. At least that’s how I felt when I first got started with Frameworks. I’m sure many of the web developers have gone through similar experiences.

Conclusion

Using a PHP Framework may or may not be the best choice for you. However, you should always keep an open mind and keep up to date with all the new developments in the web development world.
Frameworks are cool and hot today, and we can’t tell what tomorrow is going to bring. I guess all I’m saying is that they are definitely worth looking into.

Thursday, March 28, 2013

New Twitter blue bird icon

Twitter updated its icon. It is now simpler, younger and more dynamic. The blue bird's head has been shaven too.


If you want to update the icons on your website you can download the vector files here (also attached below):
Positive: http://www.brandsoftheworld.com/logo/twitter-2012-positive
Negative: http://www.brandsoftheworld.com/logo/twitter-2012-negative

Usage guidelines

Do:
• Use our official, unmodified Twitter bird to represent our • brand.
• Make sure the bird faces right.
• Allow for at least 150% buffer space around the bird.
Don't:
• Use speech bubbles or words around the bird.
• Rotate or change the direction of the bird.
• Animate the bird.
• Duplicate the bird.
• Change the color of the bird.
• Use any other marks or logos to represent our brand.

How Much the World's Most Iconic Logos Cost Companies to Design Them

The price tag for some of the most iconic logos of all time varies drastically. While some of the most iconic brands in the world cost hundreds of millions of dollars to create, others got away with a check for just $15. Some spent nothing.

A good logo is crucial for a company's branding strategy.

While Pepsi recently redesigned its bottle, it decided to keep its logo, which it redesigned in 2008 for $1 million. (Signing Beyonce as a multi-year brand ambassador cost the company $50 million.)

Stock Logos—a site that offers, well, stock logos—has compiled a list that reveals how much Coca-Cola, Nike and other companies spent creating their logos.

But you'll be surprised which companies spent millions and which spent the cost of a movie ticket on their iconic images.

Microsoft: $0
Microsoft
 Google: $0


Although Google's famous, rainbow logo has gone through minor alterations over the years, the original design was created in 1998 by Google co-founder Sergey Brin on the free graphics program called GIMP. Then Ruth Kedar, a mutual friend of Brin and Larry Page from Stanford, got to work on other logo prototypes.

Coca-Cola: $0
 Coke's famous logo was created by its founder's partner and bookkeeper, Frank M. Robinson, in 1886. According to the soft drink's website, Robinson "suggested the name Coca‑Cola, thinking that ‘the two Cs would look well in advertising’. He wanted to create a unique logo to go with it, and experimented writing the company’s name in elaborate Spencerian script, a form of penmanship characteristic of the time."

The best things in life are free.

Twitter: $15


Twitter bought rights to the now-famous Twitter bird for $15 on iStockphoto. Artist Simon Oxley, a British citizen living in Japan, might have only received $6 for his work—without a credit. However, the bird has undergone a recent makeover.

Nike: $35
Nike co-founder Phil Knight purchased the famous swoosh logo from graphic design student Carolyn Davidson in 1971. Knight was teaching an accounting class at Portland State University, and he heard Davidson talking about not being able to afford oil paints in the halls. That's when he offered her $2/hour to do charts, graphs, and finally a logo.

"I don't love it, but maybe it will grow on me," Knight said, after doling out $35 for the swoosh.

Enron: $33,000

Paul Rand was paid $33,000 for creating the Enron logo in the 1990s. Rand also created logos for ABC, IBM, UPS, NeXT, and Westinghouse.

Pepsi: $1 million


Arnell Group redesigned Pepsi's logo to the tune of $1 million in 2008. According to Stock Logos, "The listed prices include a complete branding package unless otherwise noted."

A 27-page document, titled "Breathtaking," was full of pop-culture buzz words explaining Arnell's methodology for the redesign. The report was mocked using phrases like: "Emotive forces shape the gestalt of the brand identity."

BBC: $1.8 million 


The BBC made over its logo in 1997, switching from slanted fonts and splashes of color to the simple, letter boxes typed in Gill Sans.

Accenture: $100 million
 
 
Accenture
The consultancy's change from "Arthur Andersen" to Accenture was one of the most expensive rebrandings of all time. 

Top 10 MySQL Mistakes Made By PHP Developers

A database is a fundamental component for most web applications. If you’re using PHP, you’re probably using MySQL–an integral part of the LAMP stack.
PHP is relatively easy and most new developers can write functional code within a few hours. However, building a solid, dependable database takes time and expertise. Here are ten of the worst MySQL mistakes I’ve made (some apply to any language/database)…

1. Using MyISAM rather than InnoDB

MySQL has a number of database engines, but you’re most likely to encounter MyISAM and InnoDB.
MyISAM is used by default. However, unless you’re creating a very simple or experimental database, it’s almost certainly the wrong choice! MyISAM doesn’t support foreign key constraints or transactions, which are essential for data integrity. In addition, the whole table is locked whenever a record is inserted or updated; this causes a detrimental effect on performance as usage grows.
The solution is simple: use InnoDB.

2. Using PHP’s mysql functions

PHP has provided MySQL library functions since day one (or near as makes no difference). Many applications rely on mysql_connect, mysql_query, mysql_fetch_assoc, etc. but the PHP manual states:
If you are using MySQL versions 4.1.3 or later it is strongly recommended that you use the mysqli extension instead.
mysqli, or the MySQL improved extension, has several advantages:
  • an (optional) object-oriented interface
  • prepared statements (which help prevent SQL-injection attacks and increase performance)
  • multiple statements and transaction support
Alternatively, you should consider PDO if you want to support multiple databases.

3. Not sanitizing user input

This should probably be #1: never trust user input. Validate every string using server-side PHP — don’t rely on JavaScript. The simplest SQL injection attacks depend on code such as:

    $username = $_POST["name"];
    $password = $_POST["password"];
    $sql  = " SELECT userid FROM usertable WHERE username='$username' ";
    $sql .= " AND password='$password'; ";
    // run query...
 
This can be cracked by entering “admin'; --” in the username field. The SQL string will equate to:

SELECT userid FROM usertable WHERE username='admin';
The devious cracker can log in as “admin”; they need not know the password because it’s commented out of the SQL.

4. Not using UTF-8

Those of us in the US, UK, and Australia rarely consider languages other than English. We happily complete our masterpiece only to find it cannot be used elsewhere.
UTF-8 solves many internationalization issues. Although it won’t be properly supported in PHP until version 6.0, there’s little to prevent you setting MySQL character sets to UTF-8.

5. Favoring PHP over SQL

When you’re new to MySQL, it’s tempting to solve problems in the language you know. That can lead to unnecessary and slower code. For example, rather than using MySQL’s native AVG() function, you use a PHP loop to calculate an average by summing all values in a record-set.
Watch out also for SQL queries within PHP loops. Normally, it’s more effective to run a query then loop through the results.
In general, utilize the strengths of your database when analyzing data. A little SQL knowledge goes a long way.

6. Not optimizing your queries

99% of PHP performance problems will be caused by the database, and a single bad SQL query can play havoc with your web application. MySQL’s EXPLAIN statement, the Query Profiler, and many other tools can help you find that rogue SELECT.

7. Using the wrong data types

MySQL offers a range of numeric, string, and time data types. If you’re storing a date, use a DATE or DATETIME field. Using an INTEGER or STRING can make SQL queries more complicated, if not impossible.
It’s often tempting to invent your own data formats; for example, storing serialized PHP objects in string. Database management may be easier, but MySQL will become a dumb data store and it may lead to problems later.

8. Using * in SELECT queries

Never use * to return all columns in a table–it’s lazy. You should only extract the data you need. Even if you require every field, your tables will inevitably change.

9. Under- or over-indexing

As a general rule of thumb, indexes should be applied to any column named in the WHERE clause of a SELECT query.
For example, assume we have a usertable with a numeric ID (the primary key) and an email address. During log on, MySQL must locate the correct ID by searching for an email. With an index, MySQL can use a fast search algorithm to locate the email almost instantly. Without an index, MySQL must check every record in sequence until the address is found.
It’s tempting to add indexes to every column, however, they are regenerated during every table INSERT or UPDATE. That can hit performance; only add indexes when necessary.

10. Forgetting to back up

It may be rare, but databases fail. Hard disks can stop. Servers can explode. Web hosts can go bankrupt. Losing your MySQL data is catastrophic, so ensure you have automated backups or replication in place.

11. Bonus mistake: not considering other databases!

MySQL may be the most widely used database for PHP developers, but it’s not the only option. PostgreSQL and Firebird are its closest competitors; both are open source and not controlled by a corporation. Microsoft provide SQL Server Express and Oracle supply 10g Express; both are free versions of the bigger enterprise editions. Even SQLite may be a viable alternative for smaller or embedded applications.

Have I missed your worst MySQL mistakes? Write on the comments

Monday, March 25, 2013

SIX Ways to Improve Navigation and Increase PageViews



There have been numerous posts written by many people on how to increase traffic to your Blog. This “How To…” is for after you have gone through all of the basic steps such as SEO and Linking etc.

Once you have gotten people to come to your site, how do you get them to stay?

Navigation…

Most Blogging platforms leave a lot to be desired in helping your readers find anything on your site other than the landing page and Archives listed by week or month. Here are some simple steps to help visitors find things that they may be interested in or if they want more information on something you may have written previously.

~~ Use Categories. Not every platform (especially Blogger) has the capability to enable Categories. They give a quick reference to what other Subjects you have written about that may interest your reader. I explained in a post a while back on how I Added a Category List to my Blogger Blog.

~~ Intra-link. There are a lot of times you’ll find that you had written something previously that is relevant to your current topic. If that is the case, provide a link within the text (as I did above) to that information so the reader doesn't have to go looking for it.

~~ Related Posts. After you have been writing for a while, there is usually something in your archives that you know about that will provide additional information or is related to the subject in some way. Put these links at the bottom of your post as a reference source.

~~ Recent Posts. Not every platform and template provides for a list of your most recent posts, in that case you will want to add some type of Plug-in. Luckily, I didn't use one but you want a reader to know what had been written recently. Most will allow various amounts of days shown, I set mine for 7 days.

~~ Recent Comments. I found the bdp-comments Plug-in to show comments on different posts and the author in descending order. There are many variations out there. If readers see that other people are commenting, they may be tempted to join in and voice their opinion.

~~ Link to Series. Most likely you have written at least one series of posts on a particular subject. In that case, you don’t want them to get lost. Put a link to the First post in the sidebar and make sure you have links on each post, one to the next (if you use Blogger). I found the In-Series Plug-in for WordPress that simplifies the process.

These are not the only ways to improve page views and length of time visitors spend reading your material. Can you add to the list?


Write your answers on the comment  box below...